Repository navigation
[rush] Make "rush add" and "rush upgrade-interactive" aware of PNPM catalogs - #6141
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
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-rush-add
branch
from
October 14, 2026 20:55
4b51e7a to
dfd37db
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-rush-add
branch
from
October 15, 2026 01:50
dfd37db to
cf57821
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-rush-add
branch
from
October 20, 2026 21:13
cf57821 to
aea083e
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-rush-add
branch
from
October 28, 2026 04:49
aea083e to
e34ba4e
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-rush-add
branch
from
October 30, 2026 21:06
e34ba4e to
7904bbb
Compare
Bharat Middha (bmiddha)
marked this pull request as ready for review
October 30, 2026 22:09
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-rush-add
branch
from
November 8, 2026 01:16
7904bbb to
e7059c6
Compare
rush add wrote literal versions for cataloged packages, rejected catalog: specifiers, and rush add/upgrade-interactive replaced existing catalog: references with versions. They now write or keep catalog references and update the catalog entry in pnpm-config.json instead. Co-authored-by: Copilot App <[email protected]>
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-catalog-aware-rush-add
branch
from
November 8, 2026 02:04
e7059c6 to
74464df
Compare
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 addandrush upgrade-interactiveignored PNPM catalogs.rush addwrote literal versions for cataloged packages and rejectedfoo@catalog:, and both commands replaced a project's existingcatalog:references with versions.Now
rush addwrites a catalog reference when a catalog entry matches, like pnpm'scatalogMode: prefer, and it accepts explicitcatalog:specifiers. When a cataloged dependency changes, both commands update the catalog entry inpnpm-config.json, likepnpm update.Details
pnpm-config.json, falling back tocommon/config/rush/pnpm-config.json.pnpm-config.jsondoesn't vary by--variant, so--variantstill selects onlycommon-versions.json.default. If the choice is still ambiguous, Rush writes a version as before and prints a note.--make-consistent, Rush updates the catalog entry instead. Other projects' catalog references are then kept in sync through the entry, instead of being skipped with a warning.--make-consistent, a different version is an error.upgrade-interactiveresolves catalog references before checking. That needed@rushstack/npm-check-forkto honorcwdPackageJson. TheensureConsistentVersionscheck uses the versions after the catalog change, because the change affects every consumer of the entry.pnpm-config.jsonis shared with subspaces the command doesn't update, Rush prints therush update --subspace <name>commands needed to keep their lockfiles in sync.How it was tested
PackageJsonUpdater.test.tscovers therush addandupgrade-interactivecases using the catalog test repos,AddAction.test.tscovers parsingcatalog:specifiers, andNpmCheckState.test.tscoverscwdPackageJson.rush build --production --to @microsoft/rushwith no warnings,heft test --productionin rush-lib and npm-check-fork, andrush change --verify. A few unrelated rush-lib suites time out on my machine; they pass in CI.Impacted documentation