Repository navigation
[rush] Move the rushstack repo to pnpm 12.13.0 - #6136
Draft
Bharat Middha (bmiddha) wants to merge 1 commit into
Draft
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-bump-rushstack-to-pnpm-12
branch
from
October 14, 2026 20:51
fba9b6f to
8f34474
Compare
Bharat Middha (bmiddha)
added this pull request to stack #6134
October 14, 2026 21:29
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-bump-rushstack-to-pnpm-12
branch
from
October 15, 2026 01:39
8f34474 to
2de40d6
Compare
…ncies With pnpm 12 or newer, "rush install" for a subspace that has injected workspace dependencies now passes "--no-frozen-lockfile --prefer-frozen-lockfile" instead of "--frozen-lockfile". Native pnpm's frozen-lockfile freshness check reads the injected workspace manifests without applying pnpmfile hooks, and it rejects "workspace:" targets that live outside the pnpm workspace root. Every Rush project is outside common/temp/<subspace>, so that check always fails with ERR_PNPM_OUTDATED_LOCKFILE. Rush has already verified that the committed shrinkwrap satisfies every package.json, so pnpm can safely reuse the lockfile as-is. Subspaces without injected dependencies, and pnpm versions below 12, keep using "--frozen-lockfile". Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bharat Middha (bmiddha)
force-pushed
the
bmiddha-bump-rushstack-to-pnpm-12
branch
from
October 20, 2026 21:13
2de40d6 to
34059d1
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
This PR moves the rushstack repo itself from pnpm 10.27.0 to pnpm 12.13.0.
This PR is stacked on #6133 (#6131 → #6133 → this PR). Do not merge it until:
rushVersionis bumped to that release. The pinned Rush 5.181.0 does not work with pnpm 12. See "How it was tested".packagefeedproxy.microsoft.ionpm feed servespnpm@12.13.0. The feed currently tops out at 12.10.1, apparently because of a release-age quarantine of about 7 days. 12.13.0 was released on 2026-10-13.Changes:
rush.json: changedpnpmVersionfrom10.27.0to12.13.0.common/config/rush/pnpm-config.json: replacedglobalNeverBuiltDependencieswithglobalAllowBuilds, because pnpm 11 removed the old setting.default,build-tests-subspace) and theirrepo-state.jsonfiles with pnpm 12.rush installnow uses--prefer-frozen-lockfileinstead of--frozen-lockfilewhen pnpm is >= 12 and the subspace has injected workspace dependencies. A change file is included.Details
Why 12.13.0 and not 12.10.1
pnpm 12.10.1 and older drop files that
.npmignorere-includes through negations under*. For example,rigs/heft-node-rig/.npmignorere-includes!/profiles/**, and rush-lib re-includes!/dist/**and!/lib-*/**. This breaks injected dependencies:local-node-rig→heft-node-rigcopy inbuild-tests-subspacehad noprofiles/, sorush buildfailed at startup withCannot find module "@rushstack/heft-node-rig/profiles/default/config/rush-project.json".rush-pnpm packwas broken too.pnpm pack --dry-runemitted 5 files forheft-node-rig, wherenpm packemits 27.pnpm 12.11.0 fixed this (pnpm/pnpm#16743, pnpm/pnpm#16761). With 12.13.0, the
pack --dry-runfile lists matchnpm packexactly for heft-node-rig, heft, rush-lib, node-core-library, api-extractor, rush-sdk, and rush.globalAllowBuildsmigrationpnpm 11+ fails installation when a dependency's build script is neither allowed nor denied. pnpm 10 ran every build script not listed in
globalNeverBuiltDependencies, so the new setting:@swc/core,@vscode/vsce-sign,esbuild,fsevents, andkeytar, which install or validate native binaries;unrs-resolver, which was previously never-built;aws-sdk,core-js, andcore-js-pure, whose scripts only print banners.Injected dependencies vs.
--frozen-lockfile(rush-lib change)Native pnpm 12 checks the freshness of injected workspace dependencies during a frozen install (
lockfile_freshness/directory_deps). That check fails for every Rush repo for two reasons:package.json, without pnpmfilereadPackagehooks, so it seesworkspace:*.workspace:targets must be inside the pnpm workspace root, which iscommon/temp/<subspace>. Every Rush project lives outside that folder.The result is
ERR_PNPM_OUTDATED_LOCKFILE ... local dependency "..." is outdated, which still happens with 12.13.0. Before invoking pnpm, Rush already verifies that the committed shrinkwrap satisfies allpackage.jsonfiles. So when pnpm is >= 12 andsubspace.getPackageJsonInjectedDependenciesHash()is defined, Rush now passes--no-frozen-lockfile --prefer-frozen-lockfileand prints an informational line, not a warning.The tradeoff: for subspaces with injected dependencies, pnpm may re-resolve during
rush install, which fetches metadata. In testing, the resolved package set was identical to the committed lockfile. Rush never copies the lockfile back duringinstall. Subspaces without injected dependencies, such asdefaulthere, still use--frozen-lockfile. I did not find an existing upstream pnpm issue for the containment check.Lockfile tarball URLs
When pnpm 12 re-resolves, it records
tarball:URLs that point at rotatingms-feed-N.pkgs.visualstudio.comhosts, and later fails withERR_PNPM_TARBALL_URL_MISMATCHwhen the host differs. The committed lockfiles therefore have thesetarball:fields stripped, and therepo-state.jsonhashes were recomputed. Apart from those fields, the lockfiles are byte-identical to pnpm 12.13.0's output.Known gaps (not addressed here)
hoist=falsein.npmrc, and Rush cannot yet writehoistinto the generatedpnpm-workspace.yaml.rush update(without--recheck) on the current Rush release can fail to copy the updated temp lockfile back ([rush] With pnpm 12,rush updatedoes not update pnpm-lock.yaml after pnpm changes a peer variant #6117 / [rush] Copy the temp lockfile when pnpm changes it during rush update #6119).How it was tested
Testing ran on macOS arm64 with Node 22.23.2. The feed does not serve pnpm 12.13.0 yet, so I placed the official
pnpm-darwin-arm64binary from the pnpm v12.13.0 GitHub release into Rush's~/.rush/node-v22.23.2/pnpm-12.13.0folder."Local Rush" means
node apps/rush/lib-commonjs/start-dev.js, built from this branch, so it includes #6131, #6133, and this PR.Baseline, before the switch, with pnpm 10.27.0 and pinned Rush 5.181.0:
node common/scripts/install-run-rush.js install: passednode common/scripts/install-run-rush.js build --to @microsoft/rush: passedPinned Rush 5.181.0 with pnpm 12:
CI=true node common/scripts/install-run-rush.js installwith pnpm 12.13.0 (and earlier 12.10.1): failed withERR_PNPM_OUTDATED_LOCKFILEon the injected@microsoft/rush-libinbuild-tests-subspace.node common/scripts/install-run-rush.js updatewith pnpm 12.10.1: failed withERR_PNPM_TARBALL_URL_MISMATCH.Local Rush with pnpm 12.13.0, on the final commit's contents:
update: passed. Both lockfiles match the committed ones after the tarball fields are stripped. They were first regenerated withupdate --recheck(pnpm 12.10.1) to work around [rush] With pnpm 12,rush updatedoes not update pnpm-lock.yaml after pnpm changes a peer variant #6117.CI=true install: passed.build-tests-subspaceprintedPNPM 12.13.0 cannot verify injected workspace dependencies with "--frozen-lockfile"; using "--prefer-frozen-lockfile" instead.defaultused--frozen-lockfileand printed "Lockfile is up to date, resolution step is skipped".build --production --to @microsoft/rush --to rush-lib-test --to rush-sdk-test --to typescript-newest-test --to typescript-v4-test --to webpack-local-version-test: passed. 51 operations succeeded and 6 were no-op, with no warnings.build --production(whole repo): passed. 132 operations succeeded, 51 came from cache, and 17 were no-op, with no warnings.change --verify --target-branch origin/bmiddha/pnpm12-injected-sync: passed.Other checks:
pnpm install --frozen-lockfile --strict-peer-dependencies --config.auto-install-peers=false --config.resolutionMode=highest --config.dedupe-peer-dependents=falsewith pnpm 12.13.0, run directly incommon/temp/build-tests-subspace: failed withlocal dependency "@rushstack/terminal" at "../../../libraries/terminal" is outdated. This confirms the rush-lib change is still needed on 12.13.0.heft buildinlibraries/rush-lib: passed with no warnings.heft test --test-path-pattern "BaseInstallManager|Subspace.test"inlibraries/rush-lib: passed (27/27).pnpm pack --dry-runvs.npm pack --dry-run:heft-node-rigpacked 5 files wherenpm packpacked 27.Impacted documentation
None.