Conversation
1 task
Merged
3 tasks
zkochan
pushed a commit
that referenced
this pull request
Jun 20, 2026
… resolution order (#12514) claimChildrenResolution let a non-owner occurrence of a shared package reuse the owner's missingPeersOfChildren when `existing.owner.depth >= currentDepth || existing.missingPeersOfChildren.resolved`. The second clause made reuse depend on whether the owner's resolution had settled by claim time. Under concurrent resolution that timing varies run to run, so a deeper consumer inherited the owner's missing peers on some runs but not others — flipping an optional transitive peer (e.g. `@babel/core`, reached via styled-jsx) in and out of a package's resolved peer suffix and churning the lockfile, with intermittent `pnpm dedupe --check` failures in CI. Drop the `.resolved` clause: reuse only when the owner is at the same or a deeper depth, a function of the dependency graph rather than completion order. The `.resolved` flag was introduced in #5467 (closing #5454) to avoid a deadlock where, with auto-install-peers in a workspace, a shared package awaited its own not-yet-settled missingPeersOfChildren promise. Removing the clause is strictly more conservative — a shallower owner's promise is never reused, settled or not, so no unsettled promise is ever awaited and the deadlock cannot return. The #5454 regression test still passes, as do the peer, dedupe, and cyclic suites. The deterministic owner selection from #12362 made shared-package ownership order-independent but had moved this timing branch in verbatim without neutralizing it. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
close #5454