jest: [Bug]: inflight deprecated, glob deprecated

Version

29.7.0

Steps to reproduce

npm i jest --save

Expected behavior

No warning

Actual behavior

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

Additional context

The inflight archive has not been updated since 8 years and has an alternative which is up to date https://www.npmjs.com/package/lru-cache The used glob version is deprecated and 2 years old

Is there specific reasons why these have not been replaced/updated ?

Environment

System:
    OS: macOS 14.5
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  Binaries:
    Node: 22.3.0 - ~/.nvm/versions/node/v22.3.0/bin/node
    Yarn: 1.22.22 - ~/.yarn/bin/yarn
    npm: 10.8.1 - ~/.nvm/versions/node/v22.3.0/bin/npm
    pnpm: 6.11.0 - ~/.nvm/versions/node/v14.19.0/bin/pnpm
  npmPackages:
    jest: ^29.7.0 => 29.7.0

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 47
  • Comments: 35

Commits related to this issue

Most upvoted comments

Waiting for the fix

Not stale.

I am getting the following warning in my NestJS backend project. Even after updating all the packages, I am still encountering this warning. Is there anyone who can help me get rid of it?

@ankitbavne If you’re on npm version 8 or higher, you can use overrides in your package.json:

  "overrides": {
    "glob": "10.4.2" 
  }

This will force jest to use that version in your build.

@reduckted they need to just cut release 30 and start shipping again. I feel like the only thing that’s keeping it from being released is that it’s been so long since it was released.

Waiting for fix. thank you

Apparently it was fixed fifteen months ago by #14509, but that won’t be released until v30. 🤷‍♂

Jest can’t do much until this is merged into babel-plugin-istanbul.

Are there any plans to resolve this issue in jest@30 ? The latest beta is still showing the text “Do not use it.”.

$ npm install jest@next
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

added 302 packages in 14s

46 packages are looking for funding
  run `npm fund` for details

$ npm ls inflight
└─┬ jest@30.0.0-beta.5
  └─┬ @jest/core@30.0.0-beta.5
    └─┬ @jest/transform@30.0.0-beta.5
      └─┬ babel-plugin-istanbul@7.0.0
        └─┬ test-exclude@6.0.0
          └─┬ glob@7.2.3
            └── inflight@1.0.6

To avoid the warning “Do not use it.” I would need to migrate away from Jest if it can’t be fixed anytime soon.

Waiting on a fix.

Waiting on a fix.

jest/reporters v29.7.0 is still depending on glob ^7.1.3 and is causing the dependency along with inflight to be pulled into projects requiring jest v29.7.0: https://github.com/jestjs/jest/blob/4e56991693da7cd4c3730dc3579a1dd1403ee630/packages/jest-reporters/package.json#L25

#14509 should remove this warning.