Skip to content

fix(ci): install @changesets/cli as workspace devDep#11

Open
masnwilliams wants to merge 2 commits into
mainfrom
hypeship/fix-release-changesets-cli
Open

fix(ci): install @changesets/cli as workspace devDep#11
masnwilliams wants to merge 2 commits into
mainfrom
hypeship/fix-release-changesets-cli

Conversation

@masnwilliams
Copy link
Copy Markdown
Contributor

@masnwilliams masnwilliams commented May 14, 2026

Summary

  • Add @changesets/cli to root devDependencies so the changesets/action@v1 preflight check in the release workflow can resolve it from the workspace.
  • Drop the now-redundant global-install step from .github/workflows/release.yaml.

Why

The release workflow has two execution paths depending on whether there are pending changesets:

State after merge Action branch Needs workspace @changesets/cli? Result
Pending changesets "Open Version PR" Yes (action preflight) ❌ Currently fails
No pending changesets bun run release No (uses binary on PATH) ✅ Works

The current workflow installs @changesets/cli globally via npm, which puts the binary on PATH for the changeset publish invocation but doesn't satisfy the action's preflight resolve. Result: every merge that adds a changeset fails the Release job, and the Version Packages PR has to be created manually.

This happened on the most recent merge with the error:

Error: Have you forgotten to install `@changesets/cli` in
"/home/runner/work/managed-auth-react/managed-auth-react"?

Installing as a workspace devDep makes the action's resolve succeed and also causes Bun to create node_modules/.bin/changeset naturally, so the global-install step becomes unnecessary.

Test plan

  • bun install resolves cleanly with the new devDep
  • node_modules/.bin/changeset exists after install (verified locally)
  • bun run format:check passes
  • Confirm the Release job opens the Version Packages PR on merge — there's a pending changeset (fix-strict-mode-double-exchange.md) sitting in .changeset/ that the workflow couldn't process, so the merge of this PR will be the live test

Note

Medium Risk
Touches the release workflow and publish invocation; mistakes could block automated version PR creation or npm publishing, but changes are limited to tooling/config.

Overview
Ensures changesets/action@v1 can resolve @changesets/cli by adding it to root devDependencies, and updates bun.lock accordingly.

Simplifies the GitHub release workflow by removing the global @changesets/cli install and running the publish command via bunx changeset publish.

Reviewed by Cursor Bugbot for commit be5dc5d. Bugbot is set up for automated code reviews on this repo. Configure here.

The release workflow's `changesets/action@v1` step resolves
`@changesets/cli` from the workspace's node_modules before doing
anything, so a global install via `npm install -g` lets the binary
land on PATH but doesn't satisfy the action's preflight resolve.

Symptom: every merge that *adds* a changeset (vs the follow-up
Version Packages PR, which has no pending changesets and skips the
action's open-version-PR branch) fails the Release job with:

    Error: Have you forgotten to install `@changesets/cli` in
    "/home/runner/work/managed-auth-react/managed-auth-react"?

Fix: add `@changesets/cli` to the root devDependencies so it
resolves from the workspace. Bun does create `node_modules/.bin/changeset`
when it's a workspace dep, so the earlier "bun skips the .bin shim"
workaround is no longer needed and the global-install step is dropped.
The publish input to changesets/action is passed to
@actions/exec.getExecOutput, which does a PATH-based lookup — it does
not search the workspace's node_modules/.bin. With the global install
gone, `changeset publish` would no longer resolve. `bunx` explicitly
resolves to the workspace devDep (verified: returns 2.31.0).
@masnwilliams masnwilliams marked this pull request as ready for review May 14, 2026 21:48
@firetiger-agent
Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

Any PR that changes the kernel API. Monitor changes to API endpoints (packages/api/cmd/api/) and Temporal workflows (packages/api/lib/temporal) in the kernel repo

Reason: PR modifies CI/build configuration and dependencies, not kernel API endpoints or Temporal workflows.

To monitor this PR anyway, reply with @firetiger monitor this.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5955033. Configure here.

Comment thread .github/workflows/release.yaml
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
managed-auth-react-demo Error Error May 15, 2026 2:36pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant