test: dry run of Changesets version + publish pipeline - #546
test: dry run of Changesets version + publish pipeline#546thomasthachil wants to merge 9 commits into
Conversation
…tocol Replace semantic-release with @changesets/cli for versioning and publishing. Switch all internal workspace dependencies to use the workspace: protocol, enabling single-PR chain additions instead of 4 sequential publish-wait-bump cycles across packages. Key changes: - Install @changesets/cli, remove semantic-release packages - Switch internal deps to workspace:^ (or workspace:* for exact pins) - Remove semantic-release config blocks from all 11 SDK package.json files - Add topological build ordering (dependsOn: ^build) to turbo.json - Replace semantic-release.yaml workflow with changesets/action workflow - Enable transparent workspaces in .yarnrc.yml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the semantic-release publishing docs with instructions for the new Changesets-based workflow, including how to create changesets, how the CI pipeline works, and the single-PR chain addition example. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Change v4-sdk's @uniswap/v3-sdk from workspace:* to workspace:^ to avoid publishing with an overly permissive "*" version range - Pin changesets/action to commit SHA for supply chain security Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The manypkg check rule disallows devDependencies in the private root package.json since there's no distinction in a private package. Move @changesets/cli to dependencies to match the existing convention. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deduplicate js-yaml entries to pass monorepo integrity check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…atibility Changesets requires version fields in package.json to manage versioning. These were previously omitted because semantic-release managed versions at publish time. Versions are set to the latest published npm versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
workspace:^ publishes as ^X.Y.Z which satisfies minor bumps, preventing changesets from cascading version bumps to dependent packages. workspace:~ publishes as ~X.Y.Z which only satisfies patch bumps, ensuring dependents are re-published when a dependency gets a minor or major bump. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Version Packages PR touches package.json and CHANGELOG.md across all packages, which would require approval from every CODEOWNERS team. This adds an override so swap-be or protocols can approve version-only changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ran `changeset version` locally to simulate what CI would produce when a changeset is merged. This validates that: - sdk-core bumps to 7.13.0 (minor, from the test chain addition) - All dependent packages cascade correctly via workspace:~ protocol - CHANGELOGs are auto-generated with correct dependency references Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Claude Code Review
SummaryThis PR appears to be a Changesets-generated version bump that:
ObservationsThe new chain isn't added to
|
🤖 Claude PR Metadata GenerationStatus: ❌ Error
|
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only. 1 inline comment(s) are attached below.
| MONAD = 143, | ||
| XLAYER = 196, | ||
| LINEA = 59144, | ||
| NEW_CHAIN = 100000, |
There was a problem hiding this comment.
This chain is added to ChainId but not to SUPPORTED_CHAINS. If this is intentional for testing purposes (as the changelog suggests), that's fine. Otherwise, it may need to be added to the array below.
d603553 to
f987626
Compare
Summary
This PR demonstrates a dry run of the Changesets version and publish pipeline against the base
feat/changesets-migrationbranch. It validates that the entire dependency cascade works correctly before merging the migration tomain.What was done manually in this PR (the dry run)
We simulated the two-phase Changesets workflow that CI will automate:
Phase 1: Changeset file creation (simulating developer workflow)
@uniswap/sdk-core(adding a new test chainNEW_CHAIN = 100000tochains.ts)yarn changesetand describe their changePhase 2: Version bumping (simulating CI's "Version Packages" PR)
yarn version-packages(akachangeset version) locally@uniswap/sdk-core:7.12.1→7.13.0(minor bump, as declared in the changeset)@uniswap/v2-sdk:4.19.1→4.19.2(patch bump — cascaded because it depends onsdk-coreviaworkspace:~)@uniswap/v3-sdk:3.29.1→3.29.2(patch bump — cascaded)@uniswap/v4-sdk:1.29.1→1.29.2(patch bump — cascaded)@uniswap/router-sdk:2.7.1→2.7.2(patch bump — cascaded, depends on sdk-core + v2/v3/v4)@uniswap/smart-wallet-sdk:2.5.0→2.5.1(patch bump — cascaded, depends on sdk-core)@uniswap/uniswapx-sdk:3.0.0→3.0.1(patch bump — cascaded, depends on sdk-core + permit2-sdk)@uniswap/universal-router-sdk:4.33.0→4.33.1(patch bump — cascaded, depends on multiple workspace packages)CHANGELOG.mdfiles for each bumped package with correct dependency referencesWhat CI does naturally (once
feat/changesets-migrationis merged tomain)On every PR merge to
main:The
release.ymlworkflow runs automatically via thechangesets/action:If there are unreleased changeset files (
.changeset/*.md):yarn version-packages(same command we ran manually above)package.jsonfilesCHANGELOG.mdentries.changeset/*.mdfiles**/package.jsonand**/CHANGELOG.mdowned by@Uniswap/swap-be @Uniswap/protocols) allows any of these teams to approve the automated version PR without needing every SDK ownerIf there are NO unreleased changeset files (i.e., the Version Packages PR itself was just merged):
yarn g:release(akachangeset publish)"access": "public"and"provenance": trueThe dependency cascade via
workspace:~protocol:workspace:~(e.g.,"@uniswap/sdk-core": "workspace:~")changeset publishrewritesworkspace:~→~7.13.0(tilde range of the actual version)updateInternalDependencies: "patch"config in.changeset/config.jsonensures that whensdk-coregets a version bump, all packages depending on it automatically get a patch bumpsdk-corecorrectly cascades version bumps to:v2-sdk,v3-sdk,v4-sdk,router-sdk,smart-wallet-sdk,uniswapx-sdk, anduniversal-router-sdkBuild order via Turborepo:
turbo.jsonnow has"dependsOn": ["^build"]for thebuildtaskchangeset publishrunssdk-corebuilds first, thenv2-sdk/v3-sdk/v4-sdk, thenrouter-sdk, thenuniversal-router-sdkKey files changed
sdks/sdk-core/src/chains.ts— added test chainNEW_CHAIN = 100000sdks/*/package.json— version bumps fromchangeset versionsdks/*/CHANGELOG.md— auto-generated changelogsThis PR is NOT meant to be merged
This is a validation/dry-run PR to confirm the Changesets pipeline works end-to-end. The actual migration lives in
feat/changesets-migration.🤖 Generated with Claude Code