fix(arborist): forward transitive overrides through linked store links (#9658) (backport release/v11)#9668
Merged
owlstronaut merged 1 commit intoJun 25, 2026
Conversation
owlstronaut
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #9658 to
release/v11.Under
install-strategy=linked, an override forcing a transitive dependency outside its dependent's declared range was applied on disk but reported asinvalidbynpm ls --all, which then exited 1 (ELSPROBLEMS); hoisted reports it asoverriddenand exits 0. It only surfaced when the overridden package's dependent was itself a transitive (store) package.Link.recalculateOutEdgesOverridesonly forwarded an OverrideSet to a store link's target when a rule named a direct dependency of the target, so the chain to a deeperdependent -> overriddenedge never received the rule. The fix walks the target's subtree and forwards when a rule actually applies to a reachable edge (matched viagetEdgeRuleon name and spec, preserving #9357), andloadActualre-forwards through links once the tree is complete.Cherry-picked cleanly except for a context-only conflict in
load-actual.jsand its test file: the unrelatedpackageExtensionsand.npm-extensionmethods and theapplies root packageExtensions to a linked actual treetest are not present onrelease/v11, so they were dropped from the resolution. Only this fix's changes are included.References
Backports #9658