typescript-json-schema icon indicating copy to clipboard operation
typescript-json-schema copied to clipboard

Update glob dependency to >9.0.0

Open joehan opened this issue 1 year ago • 5 comments

This package currently uses glob<v9, which transitively depends on inflight, which is deprecated due to leaking memory.

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

To fix this, just update glob to >9.0.0

joehan avatar Jun 03 '24 17:06 joehan

Exactly. In my case I get the same warning as the OP. The offending reference to glob is shown here:

$ npm ls glob
[email protected] /home/david/Projects/Evoke-mac/esx-core/server
├─┬ [email protected]
│ └─┬ @anttiviljami/[email protected]
│   └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│   └─┬ @mark.probst/[email protected]
│     └── [email protected]
└─┬ [email protected]
  └─┬ [email protected]
    └── [email protected] deduped

I also notice the offending dependency on inflight is also this same module:

$ npm ls inflight
[email protected] /home/david/Projects/Evoke-mac/esx-core/server
└─┬ [email protected]
  └─┬ [email protected]
    └─┬ @mark.probst/[email protected]
      └─┬ [email protected]
        └── [email protected]

For inflight there is not a quick fix because the suggested route is to convert to lru-cache

robogeek avatar Jun 27 '24 12:06 robogeek

For the inflight issue see: https://github.com/YousefED/typescript-json-schema/issues/608

robogeek avatar Jun 27 '24 13:06 robogeek

Do the glob people have any information on what actually changed to require a major semver bump? Something inconsequential (to this project) like a Nodejs minimum version change, or something that requires code change?

Artoria2e5 avatar Jul 12 '24 13:07 Artoria2e5

What's the status of this and #608?

We are trying to get rid of deprecated packages in our application and this is one of the last ones that pulls in something very old (i.e. [email protected] which in turn pulls in [email protected] that apparently leaks memory).

Is there something blocking the bump to Glob > 9.0.0 and thus removing inflight?

OliverWich avatar May 15 '25 14:05 OliverWich

Please send a pull request.

domoritz avatar May 15 '25 15:05 domoritz