Repository navigation
[rush] Resolve pnpm catalogs in injected cross-subspace deps - #6198
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
PNPM resolves `catalog:` only for its own workspace importers. Projects injected from another subspace are installed as external packages, so the subspace pnpmfile shim now replaces their catalog references with entries from their own subspace's catalogs. The injected dependencies hash uses the resolved versions so catalog edits trigger a reinstall. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
When a project depends on an
injectedworkspace project from another subspace, PNPM installs it as an external package and does not resolve itscatalog:references. That breaks installs and makes version-consistency checks report mismatches for repos that combine subspaces, injected dependencies and catalogs.Details
catalog:/catalog:<name>references in injected cross-subspace projects with versions from that project's own subspace catalogs.Subspaceresolves the catalog-specified versions it uses for the injected dependencies hash, so catalog edits in the provider subspace trigger a reinstall.SubspacePnpmfileConfigurationpasses each injected project's subspace catalogs to the shim settings (IPnpmfile.ts).How it was tested
heft build --productioninlibraries/rush-lib: passed with no warnings and no API report changes.heft test --production --test-path-pattern 'api/test/Subspace\.test|SubspaceGlobalPnpmfileShim\.test|SubspacePnpmfileConfiguration\.test': passed (18/18), including new tests that use therepoWithInjectedSubspaceCatalogsfixture.rush change --verify: passed.