fix(post-publish): handle Rush version bump in npm-post-publish pipeline#5725
Merged
iclanton merged 2 commits intomicrosoft:mainfrom Mar 25, 2026
Merged
fix(post-publish): handle Rush version bump in npm-post-publish pipeline#5725iclanton merged 2 commits intomicrosoft:mainfrom
iclanton merged 2 commits intomicrosoft:mainfrom
Conversation
If `bump-decoupled-local-dependencies` updates the Rush version in `rush.json`, the subsequent `rush update` step would fail because `install-run-rush.js` tried to install the new Rush version but the checked-in `rush-package-lock.json` still referenced the old version. Fix by emitting `RushWasUpdated` and `NewRushVersion` Azure Pipelines variables from `BumpDecoupledLocalDependencies`, then conditionally bootstrapping the new Rush version (skipping lockfile validation) and updating the checked-in lockfile before running `rush update` normally. Also only write `rush.json` when the Rush version actually changed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jxanthony
approved these changes
Mar 25, 2026
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
Fix issues with updates to rushstack-websites (prior commit): adds
DisableInstallRunRushLockfileparameter to theinstall-run-rush.yamltemplate and uses it for the rushstack-websites stage, which doesn't have a lockfile checked in.Handle Rush version bump in post-publish pipeline (this commit): when
bump-decoupled-local-dependenciesupdates the Rush version inrush.json, the subsequentrush updatestep would fail becauseinstall-run-rush.jstried to install the new Rush version whileINSTALL_RUN_RUSH_LOCKFILE_PATHstill pointed to the old version's lockfile.Fix:
BumpDecoupledLocalDependenciesnow emitsRushWasUpdated(true/false) andNewRushVersionas Azure Pipelines variables, and only writesrush.jsonwhen the version actually changed.RushWasUpdatedistrue, a new conditional step bootstraps the new Rush version (skipping lockfile validation), then copies the new lockfile intocommon/config/validation/rush-package-lock.jsonbeforerush updateruns — sorush updateproceeds normally with a matching lockfile.Test plan
rush updateno longer fails)🤖 Generated with Claude Code