Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Ensure that root is added when root.meta is set #163

Closed
wants to merge 1 commit into from

Conversation

isaacs
Copy link
Contributor

@isaacs isaacs commented Oct 20, 2020

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

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
@ruyadorno ruyadorno closed this in b2c445f Oct 23, 2020
@wraithgar wraithgar deleted the isaacs/auto-add-root-to-meta branch April 22, 2021 17:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] npm update breaks package-lock file
2 participants