YousefED / typescript-json-schema

Generate json-schema from your Typescript sources
BSD 3-Clause "New" or "Revised" License
3.17k stars 323 forks source link

Update glob dependency to >9.0.0 #605

Open joehan opened 6 months ago

joehan commented 6 months ago

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

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

To fix this, just update glob to >9.0.0

robogeek commented 5 months ago

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

$ npm ls glob
esx-core-server@1.0.0 /home/david/Projects/Evoke-mac/esx-core/server
├─┬ openapi-client-axios-typegen@7.6.2
│ └─┬ @anttiviljami/dtsgenerator@3.20.0
│   └── glob@10.4.2
├─┬ quicktype@23.0.170
│ └─┬ quicktype-typescript-input@23.0.170
│   └─┬ @mark.probst/typescript-json-schema@0.55.0
│     └── glob@7.2.3
└─┬ typescript-cp@0.1.9
  └─┬ rimraf@5.0.7
    └── glob@10.4.2 deduped

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

$ npm ls inflight
esx-core-server@1.0.0 /home/david/Projects/Evoke-mac/esx-core/server
└─┬ quicktype@23.0.170
  └─┬ quicktype-typescript-input@23.0.170
    └─┬ @mark.probst/typescript-json-schema@0.55.0
      └─┬ glob@7.2.3
        └── inflight@1.0.6

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

robogeek commented 5 months ago

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

Artoria2e5 commented 4 months ago

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?