Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(arborist): identify and repair invalid nodes in the virtual tree #4599

Merged
merged 2 commits into from
Mar 28, 2022

Conversation

nlf
Copy link
Contributor

@nlf nlf commented Mar 22, 2022

the effect after this change is that a pre-existing tree (either virtual from a package-lock, or actual from node_modules) will have any invalid edges repaired.

these invalid edges could be due to:

  • a missing meta dependency
  • a no-longer-valid override
  • other drift between package.json and package-lock.json

closes #4422
closes #4232

@nlf nlf requested a review from a team as a code owner March 22, 2022 16:45
Copy link
Member

@wraithgar wraithgar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests really tell the story here.

by loading the overrides on the root of the virtual tree, we effectively
ensure that `npm ci` will throw an error when your package.json
overrides are not in sync with the tree in your package-lock.json
@craigjbass
Copy link

Looks like github actions didn't run the tests on bf919a5, probably was caught up in the github downtime @nlf @wraithgar

@nlf
Copy link
Contributor Author

nlf commented Mar 28, 2022

Looks like github actions didn't run the tests on bf919a5, probably was caught up in the github downtime @nlf @wraithgar

it sure was. i ran a manual pass of the ci workflow, results here (tl;dr all green): https://github.com/npm/cli/actions/runs/2053519458

@craigjbass
Copy link

If I could hit merge I would. 😁

@lukekarrys lukekarrys merged commit 99d8845 into latest Mar 28, 2022
@lukekarrys lukekarrys deleted the nlf/arborist-validation branch March 28, 2022 20:20
@sseide
Copy link

sseide commented Mar 29, 2022

What is the version this will be released to? Next 8.5.x? Or other version too?

Thanks a lot

@wraithgar
Copy link
Member

The next v8 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants