Skip to content

feat: adopt changesets for versioning#45

Closed
RatulMaharaj wants to merge 1 commit into
mainfrom
feat/changesets
Closed

feat: adopt changesets for versioning#45
RatulMaharaj wants to merge 1 commit into
mainfrom
feat/changesets

Conversation

@RatulMaharaj

Copy link
Copy Markdown
Member

What

Sets up changesets for versioning, running entirely under Deno (npm:@changesets/cli, no Node needed locally).

Changesets only understands package.json, so a small shim bridges it to Deno:

  • Private package.json stubs per package (plus a root with workspaces) exist solely for changesets to track and bump versions. JSR still publishes from deno.json.
  • scripts/sync-versions.ts copies each bumped version into its deno.json.
  • All three packages are in a fixed group, matching the existing lockstep releases.
  • New tasks: deno task changeset (add a changeset) and deno task version (bump + sync + changelogs).
  • version.yml runs changesets/action on pushes to main and opens a "Version Packages" PR; merging it is the cue to cut a GitHub release, which triggers the unchanged publish-jsr.yml.

Also adds CLAUDE.md: always use changesets; always read skills/writing/looped-docs.md before writing docs.

Testing

Smoke-tested end to end locally: a test patch changeset bumped all three packages in lockstep across both package.json and deno.json and generated changelogs (then reverted).

🤖 Generated with Claude Code

Changesets doesn't read deno.json, so private package.json stubs carry
the versions it manages; deno task version bumps them and syncs each
version into deno.json via scripts/sync-versions.ts. All three packages
version in lockstep (fixed group). version.yml opens a "Version
Packages" PR on main; merging it is the cue to cut a GitHub release,
which publishes to JSR as before.

Also adds CLAUDE.md with the changesets rule and the looped-docs
writing-skill rule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RatulMaharaj

Copy link
Copy Markdown
Member Author

Closing without merging — we're staying on the simpler release flow instead.

Two things surfaced while trying this locally:

  1. The package.json stubs flip Deno into node_modules resolution mode for the whole workspace, which breaks deno task test / ok / CI unless a node_modules dir is materialized (or nodeModulesDir: auto is set). The shim isn't inert — it changes how the runtime resolves every npm dep.
  2. The machinery outgrows the problem. Three packages in a fixed group releasing in lockstep means changesets is managing exactly one version number — at the cost of a second version source of truth, a sync script, a bot-opened Version Packages PR, and stub files that exist only for the tool.

The flow that shipped v0.2.0 already covers the goals: versions bump in one commit, the release event publishes JSR + immutable image tags together, and a CI guard fails the release if the tag disagrees with VERSION. The one remaining pain — bumping four files by hand — is a five-line deno task bump script, not a versioning framework.

Worth salvaging from this branch separately: the CLAUDE.md (minus the changesets rule) and possibly changelog generation, which gh release create --generate-notes covers for now.

🤖 Generated with Claude Code

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