[BUG] npm update
downgrades lockfile version
#3920
Labels
Bug
thing that needs fixing
Priority 1
high priority issue
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
Current Behavior
lockfileVersion
set to3
inpackage-lock.json
is downgraded back to2
when runningnpm update
.Expected Behavior
I think the lockfile version should be preserved as is, not downgraded.
Steps To Reproduce
lockfileVersion
property to3
in apackage-lock.json
file. (You have to do it manually for now as the newlockfile-version
option doesn’t yet really work.1)npm install
, which deletes the legacydependencies
object and upgrades the hidden lockfile.npm update
and you’ll see how the lockfile version is downgraded.Environment
Footnotes
fix:
--lockfile-version
to handle string number #3900 ↩The text was updated successfully, but these errors were encountered: