fix(rush-lib): suppress --prefer-frozen-lockfile during --lockfile-only phase (pnpm v10)#5801
Draft
Copilot wants to merge 1 commit into
Draft
fix(rush-lib): suppress --prefer-frozen-lockfile during --lockfile-only phase (pnpm v10)#5801Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
Copilot
AI
changed the title
fix: do not pass --prefer-frozen-lockfile during --lockfile-only phase with pnpm v10
fix(rush-lib): suppress --prefer-frozen-lockfile during --lockfile-only phase (pnpm v10)
May 11, 2026
Copilot created this pull request from a session on behalf of
bmiddha
May 11, 2026 03:24
View session
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.
Bug Fix
What was the bug?
Enabling both
usePnpmPreferFrozenLockfileForRushUpdateandusePnpmLockfileOnlyThenFrozenLockfileForRushUpdatetogether silently breaksrush updateon pnpm v10. The two-phase install's Phase 1 was receiving--prefer-frozen-lockfile --lockfile-onlysimultaneously. In pnpm v10's v9 lockfile format (packages:/snapshots:split), this combination causes pnpm to write a lockfile containing onlyimporters:, omittingpackages:andsnapshots:entirely. Phase 2 (--frozen-lockfile) then immediately fails:How did you fix it?
In
BaseInstallManager.pushConfigurationArgs, add!onlyShrinkwrapto theusePnpmPreferFrozenLockfileForRushUpdateguard so that--prefer-frozen-lockfileis never emitted during the Phase 1 lockfile-write step:This falls through to
--no-prefer-frozen-lockfilefor Phase 1, ensuring a full resolution and a complete lockfile.--prefer-frozen-lockfilecontinues to apply for single-phaserush update.rush update(both experiments on)--no-prefer-frozen-lockfile --lockfile-only--frozen-lockfilerush update--prefer-frozen-lockfilerush install--frozen-lockfileTesting
Added a test to
BaseInstallManager.test.tsasserting that whenusePnpmPreferFrozenLockfileForRushUpdateis enabled,--prefer-frozen-lockfileis absent from the args whenonlyShrinkwrap: true, and present whenonlyShrinkwrap: false.