Repository navigation
[rush] Resolve PNPM catalog references in implicitly preferred versions - #6139
Open
Bharat Middha (bmiddha) wants to merge 1 commit into
Open
Bharat Middha (bmiddha) wants to merge 1 commit into
Bharat Middha (bmiddha) wants to merge 1 commit into
Conversation
This was referenced Oct 14, 2026
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-preferred-versions
branch
from
October 14, 2026 20:53
7d32ecd to
c0498ce
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-preferred-versions
branch
from
October 15, 2026 01:43
c0498ce to
5e0ac4a
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-preferred-versions
branch
from
October 20, 2026 21:13
5e0ac4a to
aa9f4b6
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-preferred-versions
branch
from
October 28, 2026 04:41
aa9f4b6 to
f255cb4
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-preferred-versions
branch
from
October 30, 2026 21:05
f255cb4 to
db53126
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-preferred-versions
branch
from
November 8, 2026 01:10
db53126 to
c847fb9
Compare
Implicitly preferred versions used the raw "catalog:" specifier, which made semver.subset() throw in rush install for cataloged packages listed in preferredVersions and disabled pnpmfile range narrowing for them. Also skip semver.subset() for specifiers that aren't SemVer ranges. Co-authored-by: Copilot App <[email protected]>
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-preferred-versions
branch
from
November 8, 2026 01:58
c847fb9 to
da8c5e1
Compare
Bharat Middha (bmiddha)
marked this pull request as ready for review
November 8, 2026 02:37
This branch has not been deployed
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.
Summary
Rush computed implicitly preferred versions from raw package.json specifiers, so a dependency declared as
catalog:got the preferred version"catalog:".rush installthen crashed withTypeError: Invalid comparator: catalog:if that package was also inpreferredVersions, and the pnpmfile stopped narrowing transitive ranges for it.DependencyAnalyzernow resolvescatalog:/catalog:<name>references using the catalogs of the declaring project's subspace.PnpmfileConfigurationalso skipssemver.subset()when either specifier isn't a SemVer range.Details
npm:aliases, git URLs), the explicit one wins.IDependencyAnalysis.catalogNamesByPackageNamerecords which catalogs each package is referenced through, for use byrush add.catalog:specifiers are unchanged, so lockfiles that recordspecifier: catalog:are still up to date.How it was tested
Unit tests for catalog resolution (including per-subspace catalogs), the
preferredVersionscrash, pnpmfile range narrowing, andisWorkspaceProjectModifiedAsyncwith a v9 lockfile using catalog specifiers.