jestjs / jest

Delightful JavaScript Testing.
https://jestjs.io
MIT License
44.05k stars 6.44k forks source link

[Bug]: npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. #15236

Open anomiex opened 1 month ago

anomiex commented 1 month ago

Version

30.0.0-alpha.5

Steps to reproduce

Starting with an empty project, do the following:

  1. npm install jest@next

Expected behavior

No deprecation warnings.

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

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
xavierraffin commented 1 month ago

Same warning on my dependency tree:

├─┬ jest@29.7.0
│ └─┬ @jest/core@29.7.0
│   ├─┬ @jest/reporters@29.7.0
│   │ └── glob@7.2.3
│   ├─┬ jest-config@29.7.0
│   │ └── glob@7.2.3
│   └─┬ jest-runtime@29.7.0
│     └── glob@7.2.3
├─┬ ts-jest@29.2.4
│ └─┬ @jest/transform@29.7.0
│   └─┬ babel-plugin-istanbul@6.1.1
│     └─┬ test-exclude@6.0.0
│       └── glob@7.2.3

Should switch to glob@10.4.2

xavierraffin commented 1 month ago

Duplicate of https://github.com/jestjs/jest/issues/15173 ? (maybe not exactly)

anomiex commented 1 month ago

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.

SimenB commented 1 month ago

Unfortunately test-exclude has dropped Node 16, so we cannot upgrade in the babel plugin. Might be able to drop the dep, tho?

github-actions[bot] commented 6 days ago

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.

anomiex commented 5 days ago

Issue still exists in jest@next, stale-bot.

avifenesh commented 8 minutes ago

+1