Skip to content

Migrate from Rush to pnpm workspaces + Chronus - #5190

Merged
Timothee Guerin (timotheeguerin) merged 5 commits into
mainfrom
timotheeguerin/migrate-to-pnpm-chronus
Jun 10, 2026
Merged

Timothee Guerin (timotheeguerin) merged 5 commits into
mainfrom
timotheeguerin/migrate-to-pnpm-chronus

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Summary

Migrates the monorepo from Rush to native pnpm workspaces with Chronus for changelog management.

Changes

  • Package management: Rush → pnpm workspaces (via pnpm-workspace.yaml)
  • Changelog/versioning: rush change → chronus add / chronus verify / chronus version
  • Root package.json: Added with workspace-level scripts (build, test:ci, lint, format, watch, etc.)
  • CI pipelines: Updated all ADO pipelines and GitHub Actions to use pnpm and chronus commands
  • Removed: rush.json, common/ directory, rush-specific eng scripts (bump-for-prerelease.js, helpers.js, format.js, etc.)
  • Moved: common/config/webpack.base.config.js → eng/config/webpack.base.config.js
  • Simplified: workspace:~X.Y.Z → workspace:~ in all package.json files

New developer workflow

corepack enable
pnpm install
pnpm build
pnpm test:ci
pnpm change       # add changelog entry (replaces rush change)

- Replace Rush with native pnpm workspaces for package management
- Replace rush change/publish with Chronus for changelog management
- Add root package.json with workspace scripts
- Add pnpm-workspace.yaml, .npmrc, .chronus/config.yaml
- Move webpack base config from common/config to eng/config
- Update all CI pipelines (ADO + GitHub Actions)
- Remove rush.json, common/ directory, and rush-specific eng scripts
- Simplify workspace: protocol versions to workspace:~
- Update CONTRIBUTING.md with new workflow
- Use 'chronus version --prerelease <name>' instead of non-existent --pre-release-tag
- Use --pack-destination for CI artifact output
- Match pattern from microsoft/typespec
@azure-pipelines

Copy link
Copy Markdown

You may test this build by running autorest --reset and then either:


Add the following CLI flags
Pacakge Flag Description
@autorest/core --version:https://tinyurl.com/2d2myvu8 For changes to autorest core.
@autorest/modelerfour --use:https://tinyurl.com/2clvbogo For changes to modelerfour.

Or with all

autorest --version:https://tinyurl.com/2d2myvu8 --use:https://tinyurl.com/2clvbogo

or use the following in your autorest configuration:
# For changes to autorest core
version: "https://tinyurl.com/2d2myvu8"

# For changes to modelerfour
use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/2clvbogo"

If this build is good for you, give this comment a thumbs up. (👍) And you should run `autorest --reset` again once you're finished testing to remove it.

The CI pipeline only needs to pack packages for regression test
artifacts. Version bumping with chronus requires pending changes
and was producing invalid semver versions.

- CI: just pack at current versions (regression tests use tgz path directly)
- publish-dev: use 'chronus version --prerelease' (standard prerelease bump)
- publish: unchanged (stable + prerelease)
…npm-workspace.yaml

The test utility resolve-root.ts used rush.json to detect the monorepo
root. Since rush.json no longer exists, the walk-up would hit the root
package.json (@autorest/monorepo) which matched the @AutoREST pattern,
causing incorrect path resolution. Fix by:
- Using pnpm-workspace.yaml as the monorepo root marker
- Excluding private packages from the Azure SDK package check
@azure-pipelines

Copy link
Copy Markdown

You may test this build by running autorest --reset and then either:


Add the following CLI flags
Pacakge Flag Description
@autorest/core --version:https://tinyurl.com/257haeh5 For changes to autorest core.
@autorest/modelerfour --use:https://tinyurl.com/2ymubyy9 For changes to modelerfour.

Or with all

autorest --version:https://tinyurl.com/257haeh5 --use:https://tinyurl.com/2ymubyy9

or use the following in your autorest configuration:
# For changes to autorest core
version: "https://tinyurl.com/257haeh5"

# For changes to modelerfour
use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/2ymubyy9"

If this build is good for you, give this comment a thumbs up. (👍) And you should run `autorest --reset` again once you're finished testing to remove it.

@timotheeguerin
Timothee Guerin (timotheeguerin) marked this pull request as ready for review June 10, 2026 13:27
@azure-pipelines

Copy link
Copy Markdown

You may test this build by running autorest --reset and then either:


Add the following CLI flags
Pacakge Flag Description
@autorest/core --version:https://tinyurl.com/273mlnhe For changes to autorest core.
@autorest/modelerfour --use:https://tinyurl.com/2838rc89 For changes to modelerfour.

Or with all

autorest --version:https://tinyurl.com/273mlnhe --use:https://tinyurl.com/2838rc89

or use the following in your autorest configuration:
# For changes to autorest core
version: "https://tinyurl.com/273mlnhe"

# For changes to modelerfour
use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/2838rc89"

If this build is good for you, give this comment a thumbs up. (👍) And you should run `autorest --reset` again once you're finished testing to remove it.

@timotheeguerin
Timothee Guerin (timotheeguerin) merged commit 401ab13 into main Jun 10, 2026
11 checks passed
@timotheeguerin
Timothee Guerin (timotheeguerin) deleted the timotheeguerin/migrate-to-pnpm-chronus branch June 10, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant