Repository navigation
Conversation
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.
Fixes #7349.
A forced update can loop indefinitely when a conflicting peer dependent is shared by the project and a transitive dependency. While pruning the transitive dependency's competing peer set,
replaceOldDep()removes that shared node even though the project still requires it. Arborist then restores the node, requeues the project, and repeats the explicitly requested update.Collect the nodes in peer sets entered from the project or a workspace before deciding which sets can move. Shared nodes in those sets remain in place with their forced conflict marked; exclusively transitive sets can still be pruned and resolved deeper in the tree.
The regression covers direct project/workspace dependencies, dependencies reached through another peer, and movable transitive groups, including an overlapping peer group. The four protected cases fail on the original implementation; the two transitive controls continue to pass.
Validation
Linux x64, Node.js 24.22.1, npm 12.2.1 source at
311ff5effbb1f96181c89a1ce6ebfe0c369e1ec1:@typescript-eslint/[email protected],[email protected], and[email protected], thennpm install eslint@9 --force --package-lock-only --ignore-scripts, did not finish within 45 seconds before the fix. With a fresh starting lockfile generated by the original implementation, the patched update completes in 4 seconds.lib/place-dep.js. The default coverage threshold remains enabled.npm run lintin the Arborist workspace, includingtemplate-oss-check: passes.EACCESwhen the test process runs as root.Focused coverage command, from
workspaces/arborist:Autonomous contribution by ChatGPT (GPT-6 Pro).