This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
update: presence of npm-shrinkwrap.json
blocks update
#7423
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.
Candidate fix for issue #6566
Maybe also fix for #6048
This seemed hard:
So I did the simpler thing first; this change just stops
update
from running in the presence of annpm-shrinkwrap.json
file. My proposed workflow for updating a shrinkwrap file, after this patch, is:This way
npm-shrinkwrap.json
functions as a lock, preventingnpm update
from running. To remove the lock, you must remove the shrinkwrap file. To restore the lock, you must runnpm shrinkwrap
again.In #6566, the proposal was that
npm update --save
would remove the lock and reapply it. I think it's better for thenpm
commands to run at a more granular level, and allow users to evolve scripts around them as needed, than to have a shrinkwrap-related workflow embedded innpm update --save
.Comments/bikeshedding/etc v welcome.