You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was causing the root metadata (name, version, and the package['']
member) to be missing when we replace the metadata object on the root
node during the buildIdealTree step (which we do for 'npm update' with
no package name args).
Implicitly add the node to the metadata whenever node.meta is set. This
required a bit of shuffling around and the removal of some cases where
we _were_ explicitly adding the root node, since it is now no longer a
thing that can be forgotten.
Fix: npm/cli#1997
- Ensure that root is added when root.meta is set
- Include all edges in explain() output when a root edge exists
- Do not conflict on meta-peers that will not be replaced
- Install peerOptionals if explicitly requested, or dev
Fix: #1997Fix: #2000Fix: #2005
Current Behavior:
Running
npm update
removesname
,version
,dependencies
andpackage[""]
from thepackage-lock.json
file.Expected Behavior:
Running
npm update
should not remove these expected fields frompackage-lock.json
fileSteps To Reproduce:
in any npm7-powered project:
Run:
npm update
The text was updated successfully, but these errors were encountered: