[BUG] running npm update
erases the name
field from package-lock.json
#5470
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
running
npm update
erases thename
field frompackage-lock.json
for workspaces.When the
name
field is missing other cli commands likenpm audit
get confused.Expected Behavior
running
npm update
does not have unexpected side effects in projects that use workspacesSteps To Reproduce
I've created a reproduction here: https://github.com/romainmenke/npm-update-bug-1
run
npm update
and thengit diff
on branchmain
to see the effects onpackage-lock.json
I've also create a pull request with this same diff :
romainmenke/npm-update-bug-1#1
Environment
The text was updated successfully, but these errors were encountered: