Summary
When running rush update, I expect it to only change the lockfile if necessary to satisfy new constraints from rush.json, package.json, pnpmfile.js, or common-versions.json.
However, the current command runs pnpm install --no-prefer-frozen-lockfile, which is a bit more permissive of lockfile updates.
Repro steps
Pull latest main branch of a Rush monorepo, run rush update
Expected result:
No changes detected, lockfile remains the same and does equivalent of rush install
Actual result:
Updates made to pnpm-lock.yaml and repo-state.json
Details
Change --no-prefer-frozen-lockfile to --prefer-frozen-lockfile, at least for pnpm >= 5 on workspaces, or just behind an experiment/pnpm config setting.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
| Question |
Answer |
@microsoft/rush globally installed version? |
5.40.3 |
rushVersion from rush.json? |
5.40.3 |
useWorkspaces from rush.json? |
true |
| Operating system? |
Linux |
| Would you consider contributing a PR? |
Yes |
Node.js version (node -v)? |
10.24.0 |
Summary
When running
rush update, I expect it to only change the lockfile if necessary to satisfy new constraints fromrush.json,package.json,pnpmfile.js, orcommon-versions.json.However, the current command runs
pnpm install --no-prefer-frozen-lockfile, which is a bit more permissive of lockfile updates.Repro steps
Pull latest
mainbranch of a Rush monorepo, runrush updateExpected result:
No changes detected, lockfile remains the same and does equivalent of
rush installActual result:
Updates made to pnpm-lock.yaml and repo-state.json
Details
Change
--no-prefer-frozen-lockfileto--prefer-frozen-lockfile, at least for pnpm >= 5 on workspaces, or just behind an experiment/pnpm config setting.Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rushglobally installed version?rushVersionfrom rush.json?useWorkspacesfrom rush.json?node -v)?