fix: update glob
package
#828
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, when using this package, a warning is shown:
It was mentioned here as well #789 (comment) by @wing328
The reason for these errors is because an old version of
glob
is pulled:it gets added to the package lock when generating the
dist
viayarn build
.The reason is that the
glob
package is used here:openapi-generator-cli/apps/generator-cli/src/app/services/generator.service.ts
Line 7 in 113ee84
package.json
does not define it as a runtime dependency. Thus, at build timenx
uses theglob
package that is available:which is the one that has been hoisted from a bunch of dev dependencies. These use old versions of glob that satisfy the dependency of an unversioned

glob
, thus making it intodist/apps/generator-cli/package.json
:By Specifying the dependency as a first-class runtime dep, we prevent this unintended hoisting.
A
yarn build
with the contents of this PR yields:for
dist/apps/generator-cli/package.json
.Thus removing the old
glob
(and by transitive dependency the oldinflight
), removing the warnings.However, twist, this package currently defines
"node": ">=10.0.0"
as a minimum req. The current version ofglob
has a (quite sane) minimum of 20:We need to either use an older version of
glob
, or bump the node dependency. Given that node 18 still has security support (see https://endoflife.date/nodejs) , we might need to find an acceptable compromise between 18 and Node 10. Thoughts?The last
9.x
version ofglob
has"node": ">=16"
, which should be acceptable?EOL for Node 16 was September 11th, 2023, about a year ago and the last glob 9.x release was about a year ago: https://www.npmjs.com/package/glob/v/9.3.5
We could go
glob@10
then we would be on a supported branch, but that version doesn't define a minimum engine version