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): workspaces respect overrides on subsequent installs #8160

Open
wants to merge 1 commit into
base: latest
Choose a base branch
from

Conversation

owlstronaut
Copy link
Contributor

Fixes: #7660 #5443

Currently overrides are applied correctly to workspaces when a user does their initial npm install. However, when a user runs npm install again, the overrides are not being respected, and versions that the user has specifically overridden because of vulnerabilities or other reasons, are being installed in the node_modules of those workspaces. This ensures that when a package-lock.json is loaded, the overrides are calculated and applied to the workspaces.

@owlstronaut owlstronaut force-pushed the owlstronaut/workspace-respect-override branch from 01afa39 to 60ca847 Compare March 12, 2025 20:32
Comment on lines +294 to +297
.then(tree => {
this.#applyRootOverridesToWorkspaces(tree)
return tree
})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the only new functionality in this block, I just hate chained ternary operators, so did a minimal refactor.

@owlstronaut owlstronaut force-pushed the owlstronaut/workspace-respect-override branch from 60ca847 to 88a8067 Compare March 12, 2025 20:40
@owlstronaut owlstronaut marked this pull request as ready for review March 12, 2025 20:47
@owlstronaut owlstronaut requested a review from a team as a code owner March 12, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] subsequent installs breaks override dependencies in workspaces
1 participant