jest
jest copied to clipboard
[Bug]: npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it.
Version
30.0.0-alpha.5
Steps to reproduce
Starting with an empty project, do the following:
npm install jest@next
Expected behavior
No deprecation warnings.
Actual behavior
npm warn deprecated [email protected]: 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 [email protected]: Glob versions prior to v9 are no longer supported
Additional context
The dependencies come in via babel-plugin-istanbul. See istanbuljs/babel-plugin-istanbul#294 and istanbuljs/babel-plugin-istanbul#295.
Note this is not the same as the direct dependencies fixed by #14509.
Environment
System:
OS: Linux 6.9 Debian GNU/Linux trixie/sid
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Binaries:
Node: 20.16.0 - /usr/bin/node
Yarn: 1.22.22 - /usr/local/bin/yarn
npm: 10.8.1 - /usr/bin/npm
pnpm: 9.6.0 - /usr/local/bin/pnpm
npmPackages:
jest: ^30.0.0-alpha.5 => 30.0.0-alpha.5
Same warning on my dependency tree:
├─┬ [email protected]
│ └─┬ @jest/[email protected]
│ ├─┬ @jest/[email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ @jest/[email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
Should switch to [email protected]
Duplicate of https://github.com/jestjs/jest/issues/15173 ? (maybe not exactly)
Not necessarily. #15173 is reporting the warnings in 29.7.0, which were partially fixed by #14509. Same for #15087. This issue is specifically about what remains in 30.0.0-alpha.5 after #14509.
Unfortunately test-exclude has dropped Node 16, so we cannot upgrade in the babel plugin. Might be able to drop the dep, tho?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Issue still exists in jest@next, stale-bot.
+1
Quote reply
For inflight not sure for globe (v9 is available and installed manually)
for glob 9
+1
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Issue still exists in jest@next, stale-bot.
Same issue here, is anyone working on this?
Are there any workaround or alternatives for this?
As a workaround for this specific issue in jest@next, you could use package manager overrides to use test-exclude v7 in place of the test-exclude v6 that babel-plugin-istanbul depends on. At a quick glance, I see no functional differences between 6.0.0 and 7.0.0, just the updated dependencies (which all still appear to support node 16, FWIW, despite https://github.com/istanbuljs/test-exclude/commit/ad7dfe1beb553678725faeca158f9ae605b3f561 suggesting that deps were the reason for test-exclude requiring node >=18 rather than >=16, which is what is blocking jest and babel-plugin-istanbul from updating to that version officially).
Let's keep this issue focused on jest@next. If you're still using jest 29.7.0, please use https://github.com/jestjs/jest/issues/15173 to discuss any additional workarounds needed for that version. 🙂
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Still waiting
Issue still exists in jest@next, stale-bot.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Issue still exists in jest@next, stale-bot.
will it be fixed or something? it has duplicates, I did reference my issue (same) here: https://github.com/jestjs/jest/issues/15503#issuecomment-2661667208
As a current workaround, override the glob (which installs inflight) version in your ´package.json´:
"overrides": {
"glob": "^11.0.1"
}
The error will be gone and you can check it with npm ls inflight
Rather than blindly overriding glob for everything, which may break other packages (e.g. things using glob v9's default exports, or any of the many things from v8 that were changed in v9), the workaround from https://github.com/jestjs/jest/issues/15236#issuecomment-2509023010 would be more targeted at the dependency chain involved here.
If you want something copy-pasteable, here are snippets for npm
"overrides": {
"babel-plugin-istanbul": {
"test-exclude": "^7"
}
}
and pnpm
"pnpm": {
"overrides": {
"babel-plugin-istanbul>test-exclude": "^7"
}
}
Note neither of those address the stuff from jest 29.7.0 that has been fixed in jest@next; please discuss additional workarounds for jest 29.7.0 in https://github.com/jestjs/jest/issues/15173 to keep this one specific to jest@next.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Issue still exists in jest@next, stale-bot.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Perhaps jest was never serious, just in jest. The project does not seem to have much activity or good governance, when issues like these remain stale and nobody does anything. I know, it's volunteers and I can't very well demand anything whatsoever, just be grateful for what they already did. And I agree with that. But it is nevertheless no good getting dependent on a dead project, and I'm sure the contributers to jest can see this perspective is also valid.
Issue still exists in jest@next, stale-bot.
+1
+1
This issue still exist for npm install jest@next