Bump changesets/action from 1 to 2 - #62
Conversation
Bumps [changesets/action](https://github.com/changesets/action) from 1 to 2. - [Release notes](https://github.com/changesets/action/releases) - [Changelog](https://github.com/changesets/action/blob/main/CHANGELOG.md) - [Commits](changesets/action@v1...v2) --- updated-dependencies: - dependency-name: changesets/action dependency-version: '2' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
|
There was a problem hiding this comment.
Do not merge as-is — changesets/action@v2 will break the Release workflow
I traced the only usage of this action (the Create Release Pull Request step in .github/workflows/release.yml) and read the v2 action.yml, README, CHANGELOG and source (src/index.ts, src/utils.ts). v2 is a major release with breaking changes that this workflow does not satisfy. There are two hard-failure blockers, one silent break, and one token concern.
🚫 Blocker 1 — v2 requires Changesets CLI v3, repo is on v2
The first thing src/index.ts does is await validateChangesetsCliVersion(cwd). It throws if the root @changesets/cli is >=2.0.0-0 <3.0.0-0 (or if the installed CLI major is 2). This repo declares "@changesets/cli": "^2.26.2" in package.json and pnpm-lock.yaml resolves @changesets/cli@2.31.0 — both v2. The action will immediately fail with:
This version of the Changesets action is designed to work with Changesets CLI v3. Changesets CLI v2 is not supported; use Changesets action v1 instead, which is compatible with CLI v2.
The maintainers' explicit guidance is to stay on changesets/action@v1 while you're on Changesets CLI v2.
🚫 Blocker 2 — renamed inputs (the workflow still uses the old names)
v2 renamed the root inputs and throwOnRenamedInputs hard-errors when the old ones are present. This step still passes title, commit, and version, all of which now throw. Required renames:
version: npm run version→version-script: npm run version(without this, the custom script that bumpslib/evervault/version.rbnever runs)commit: 'Release new version'→commit-message: 'Release new version'title: 'New Release'→pr-title: 'New Release'
⚠️ Silent break 3 — renamed output
The next step is gated on steps.changesets.outputs.hasChangesets == 'false'. v2 emits has-changesets (kebab-case); the old hasChangesets resolves to empty, so '' == 'false' is always false and the Create new release step (the actual gem publish to RubyGems) would silently stop running. Update to steps.changesets.outputs.has-changesets.
⚠️ Concern 4 — GITHUB_TOKEN env no longer configures the action
v2 ignores the GITHUB_TOKEN env var (token must come from the github-token input, default ${{ github.token }}), and it throws if a GITHUB_TOKEN env var is set and differs from the input. Recommend removing the env: GITHUB_TOKEN block and passing github-token: ${{ secrets.GITHUB_TOKEN }} under with:.
Why I pushed no commits
Renaming the inputs/outputs alone would not make this pass — the action still hard-fails on the CLI-v2 check (Blocker 1). A complete fix requires also upgrading @changesets/cli from v2 → v3 (a separate major bump touching package.json, .changeset/config.json schema, and pnpm-lock.yaml, with its own breaking changes), which is out of scope for this PR and can't be validated here since the release pipeline pushes to master and RubyGems.
Options
- Recommended (safe): keep
changesets/action@v1— close/hold this PR until you're ready to move to Changesets CLI v3. - If you want v2: do a coordinated change — bump
@changesets/clito^3.0.0(+ config schema + lockfile), rename the three inputs, update the output tohas-changesets, and switchGITHUB_TOKENenv →github-tokeninput — then verify a full release run.
| - name: Create Release Pull Request | ||
| id: changesets | ||
| uses: changesets/action@v1 | ||
| uses: changesets/action@v2 |
There was a problem hiding this comment.
changesets/action@v2 requires Changesets CLI v3. src/index.ts calls validateChangesetsCliVersion() before anything else and throws because this repo declares @changesets/cli: ^2.26.2 (lockfile resolves 2.31.0 — v2). It will fail with: "...Changesets CLI v2 is not supported; use Changesets action v1 instead...".
Even after fixing that, this same step still passes the removed inputs title/commit/version (v2 throws on these — use pr-title/commit-message/version-script), the env.GITHUB_TOKEN no longer configures the action (use the github-token input), and the downstream gate on line 36 uses the old output hasChangesets (now has-changesets), which would silently disable the gem publish step.
Bumps changesets/action from 1 to 2.
Release notes
Sourced from changesets/action's releases.
... (truncated)
Changelog
Sourced from changesets/action's changelog.
... (truncated)
Commits
198f833v2.1.07545547Version Packages (#719)3043070Prevent test warning annotations (#720)3b7c71cAdd back cwd input (#718)6f58ba3Update pr-status message links to new faq (#716)e52ce9eVersion Packages (#715)78fdc6bExit pre mode (#714)187a104Update deps for stable (#709)d11394aVersion Packages (next) (#712)5fa6767Fix support for prerelease exits using the new.changeset/prelayout (#711)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)