-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Override doesn't update version number in packages
section of lockfile
#4687
Comments
I had setup a quick example and was going to create an issue, but I'll share here instead in case more examples are helpful. Example repo All the overridden dependencies have vulnerabilities in the versions used by |
i was able to reproduced this, and i believe #4709 fixes the last of these bugs. i would note, however, that the "node_modules/meow": {
"version": "3.7.0",
"license": "MIT",
"dependencies": {
"camelcase-keys": "^2.0.0",
"decamelize": "^1.1.2",
"loud-rejection": "^1.0.0",
"map-obj": "^1.0.1",
"minimist": "^1.1.3",
"normalize-package-data": "^2.3.4",
"object-assign": "^4.0.1",
"read-pkg-up": "^1.0.1",
"redent": "^1.0.0",
"trim-newlines": "^1.0.0"
},
},
"node_modules/trim-newlines": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz"
}, |
this is a different issue. the |
Thanks a lot for looking into this
so that means that my expectation was wrong and everything works as designed - as far as I am concerned we can close this bug then. |
Just to add to the discussion what we noticed is that |
So, the other issue I had was resolved with 8.7.0 - and my misconception above was corrected by @nlf's feedback. For my part, this ticket can be closed. However, I haven't seen the |
Hi @jklingen - I was also not able to re-produce the issue since I changed to npm 8.7.0 - so at least from my side this issue can also be closed 👍 |
Okay, I am closing this, thanks to everybody involved 🙇 |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When using the
overrides
feature to mitigate a vulnerable transient dependency, the version number of the overridden package is not updated in thepackages
section of the lockfile.Example
Excerpt from package.json
Excerpt from package-lock.json in
packages > node-modules/meow > dependencies
This entry seems to raise a false-positive in a tool we use for checking for vulnerable dependencies.
Expected Behavior
I expect the vulnerable version no longer to appear in the lock file after it was overwritten.
In case this is actually intended behavior, is there any technical documentation on how the
overrides
feature should affect the contents of the lockfile?Steps To Reproduce
npm install
for the package.json file below.packages > node-modules/meow > dependencies > trim-newlines
Environment
The text was updated successfully, but these errors were encountered: