chore: upgrade Changesets CLI to v3 with changesets/action v2 - #355
Merged
Merged
Conversation
The two have to move together. Action v2 refuses CLI v2 (#340, reverted in #342), and action v1 can't handle CLI v3: v1 finds what was published by matching `New tag:` in the publish output, which v3 no longer prints. Releases would still reach npm, but no git tags would be pushed and no GitHub releases created. - Bump @changesets/cli to 3.0.3 and changesets/action to v2. - Rename the action inputs for v2 (commit-message, pr-title, publish-script, create-github-releases). v2.1.2 fails on the old names. - Drop the GITHUB_TOKEN env from the release step. v2 takes the token from its github-token input (the default GitHub token), passes it to the publish script itself, and fails if the env var differs. - Remove the Renovate hold on changesets/action. - Point .changeset/config.json's $schema at @changesets/config 4.0.1, the version CLI v3 uses. The config validates against it unchanged. Action v2 reads the published packages from an NDJSON file named by CHANGESETS_OUTPUT. Verified locally that the variable reaches the CLI through `pnpm -w changeset`, that `changeset publish-plan` works against npm with pnpm 12, and that `changeset version` produces the same version bumps and changelog entries as CLI v2 for the pending changeset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
commit: |
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
The Changesets CLI and
changesets/actionmajors have to move together:New tag:lines in the publish output, and v3 no longer prints them (it printsCreated git tags:). Packages would still reach npm, but no git tags would be pushed and no GitHub releases created, with no error.This PR does both at once. It's also the last reason #348 isn't safe to merge: #348 bumps the CLI to v3 on its own.
Changes
@changesets/cli2.31.1 → 3.0.3, andchangesets/actionv1 → v2.commit-message,pr-title,publish-scriptandcreate-github-releases. v2.1.2 fails outright on the old names.GITHUB_TOKENenv var from the release step. v2 takes its token from thegithub-tokeninput (the default GitHub token) and passes it to the publish script itself. It also fails if the env var ever differs from that input.changesets/action..changeset/config.json:$schemanow points at@changesets/config4.0.1, the version CLI v3 uses. The config validates against it unchanged.Verification (local)
CHANGESETS_OUTPUT. That variable reaches the CLI throughpnpm -w changeseton pnpm 12, and the CLI wrote the file. If it didn't, v2 would only log a warning and skip tags and releases.pnpm publish --json --access … --tag … --no-git-checks, the same command already dry-run on pnpm 12 in chore: upgrade pnpm to v12 #349.changeset publish-plan, which uses pnpm 12'spnpm info, correctly reports nothing new to publish.changeset versionproduces the same bumps (@playcanvas/react0.11.6,@playcanvas/blocks0.3.10), changelog entries and formatting under CLI v2 and v3 for the pending changeset.After merging
The next push to main runs action v2 for real. Because a changeset is pending, it will update the open version PR #339, which uses the same
changeset-release/mainbranch. Merging #339 is then the first publish on the new setup. Check that npm shows provenance for both packages, and that the git tags and GitHub releases were created.Merge this before #348. Renovate will then drop
@changesets/clifrom #348.No changeset: release tooling only.
🤖 Generated with Claude Code