Skip to content

Fix change verification after peer dependency version bumps - #6012

Merged
Bharat Middha (bmiddha) merged 3 commits into
microsoft:mainfrom
bmiddha:bharatmiddha-microsoft-fix-version-bump-change-verify
Sep 4, 2026
Merged

Fix change verification after peer dependency version bumps#6012
Bharat Middha (bmiddha) merged 3 commits into
microsoft:mainfrom
bmiddha:bharatmiddha-microsoft-fix-version-bump-change-verify

Conversation

@bmiddha

@bmiddha Bharat Middha (bmiddha) commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the remaining rush change --verify false positives after rush version --bump seen in the automated rush and noRush bump PRs (#6009 and #6010).

When excludeVersionOnlyChanges is enabled, ProjectChangeAnalyzer now ignores a changed project-root package.json only when:

  • the package's own top-level version changed;
  • its package name is unchanged; and
  • every other field except peerDependencies is unchanged.

This intentionally permits arbitrary peer dependency additions, removals, or range rewrites alongside the package's own version bump. Changes to dependencies, devDependencies, optionalDependencies, or any unrelated package field remain substantive and still require a change file. Existing root CHANGELOG.md / CHANGELOG.json handling is unchanged.

Validation

  • node ../../common/scripts/install-run-rushx.js test --test-path-pattern ProjectChangeAnalyzer from libraries/rush-lib: 34 passed.
  • node common/scripts/install-run-rush.js build --to @microsoft/rush-lib: passed, including TypeScript, ESLint, and API Extractor.
  • Built the modified local Rush and copied only its lib-commonjs and dist output into clean detached origin/main snapshots, then invoked the engine directly rather than allowing install-run-rush to select published Rush 5.178.1:
    • node libraries/rush-lib/lib-commonjs/start.js version --bump --version-policy rush
      • changed 85 package manifests;
      • node libraries/rush-lib/lib-commonjs/start.js change --verify passed.
    • node libraries/rush-lib/lib-commonjs/start.js version --bump --version-policy noRush
      • changed 74 package manifests;
      • node libraries/rush-lib/lib-commonjs/start.js change --verify passed.
    • After the noRush bump, manually changed and staged @rushstack/heft-lint-plugin's non-peer dependencies.semver range from ~7.7.4 to ~7.7.3.
      • direct local change --verify failed with exit code 1 and reported @rushstack/heft-lint-plugin, as expected.

The automated pipelines currently select published Rush 5.178.1 through install-run-rush. Existing bump PRs will not gain this behavior until a Rush release containing this fix is published and selected (or an equivalent preview/local selection is used) before regenerating the bumps.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bmiddha Bharat Middha (bmiddha) changed the title Fix rush change verification after version bumps Fix change verification after peer dependency version bumps Sep 4, 2026
@bmiddha
Bharat Middha (bmiddha) force-pushed the bharatmiddha-microsoft-fix-version-bump-change-verify branch from 9d8be41 to b9bea15 Compare September 4, 2026 23:00
@bmiddha Bharat Middha (bmiddha) changed the title Fix change verification after peer dependency version bumps Fix rush change verification after version bumps Sep 4, 2026
@bmiddha Bharat Middha (bmiddha) changed the title Fix rush change verification after version bumps Fix change verification after peer dependency version bumps Sep 4, 2026
@bmiddha Bharat Middha (bmiddha) changed the title Fix rush change verification after version bumps Fix change verification after peer dependency version bumps Sep 4, 2026
Comment thread libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts Outdated
@bmiddha
Bharat Middha (bmiddha) enabled auto-merge (squash) September 4, 2026 23:20
@bmiddha
Bharat Middha (bmiddha) merged commit 5928721 into microsoft:main Sep 4, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from Needs triage to Closed in Bug Triage Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

3 participants