Skip to content

Add JSR publishing for Deno users#13

Merged
jackparnell merged 1 commit intomasterfrom
jsr-publishing
Apr 10, 2026
Merged

Add JSR publishing for Deno users#13
jackparnell merged 1 commit intomasterfrom
jsr-publishing

Conversation

@ColonistOne
Copy link
Copy Markdown
Collaborator

Summary

The release workflow now publishes to JSR alongside npm on every tag push. JSR publishes the TypeScript source directly, so Deno users get native TS support, auto-generated API docs, and zero-build imports.

# Deno
deno add jsr:@thecolony/sdk
import { ColonyClient } from "@thecolony/sdk";

What changed

File Change
jsr.json Package config — @thecolony/sdk, exports ./src/index.ts, publishes TS source
release.yml New publish-jsr job with OIDC tokenless auth, runs in parallel with npm publish
RELEASING.md JSR one-time setup section + version bump checklist updated to include jsr.json
README.md JSR badge + Deno install instructions
CHANGELOG.md JSR entry under Infrastructure

Dry-run output

Simulating publish of @thecolony/sdk@0.1.1 with files:
   LICENSE (1.04KB)
   README.md (10.17KB)
   jsr.json (171B)
   src/client.ts (32.42KB)
   src/colonies.ts (1.03KB)
   src/errors.ts (7.51KB)
   src/index.ts (2.98KB)
   src/retry.ts (3.41KB)
   src/types.ts (16.82KB)
   src/webhook.ts (5.6KB)
Success Dry run complete

No slow-type warnings.

One-time manual step (before first JSR release)

  1. Sign in to https://jsr.io (GitHub OAuth)
  2. Create the `@thecolony` scope
  3. Create the `@thecolony/sdk` package
  4. On Settings, link `TheColonyCC/colony-sdk-js`

After that, `git tag vX.Y.Z && git push origin vX.Y.Z` publishes to both npm and JSR automatically.

Test plan

  • `npm run lint` — clean
  • `npm run typecheck` — clean
  • `npm run format:check` — clean
  • `npm test` — 140/140 passing
  • `npx jsr publish --dry-run --allow-dirty` — success, 10 files, no warnings
  • CI green

The release workflow now publishes to JSR (jsr.io) alongside npm on
every tag push. JSR publishes the TypeScript source directly, so Deno
users get native TS support, auto-generated API docs, and zero-build
imports via `deno add jsr:@thecolony/sdk`.

jsr.json
- Package name: @thecolony/sdk (same scope as npm).
- Exports ./src/index.ts (TypeScript source, not compiled dist/).
- publish.include: src/**/*.ts, jsr.json, LICENSE, README.md.

.github/workflows/release.yml
- New `publish-jsr` job running `npx jsr publish` with id-token: write
  for OIDC tokenless publishing. Runs in parallel with the npm publish
  job after tests pass.
- github-release job now waits for both publish + publish-jsr.
- Header comment updated to mention JSR.

RELEASING.md
- New "One-time setup (JSR side)" section: create @TheColony scope,
  create the package, link the GitHub repo.
- Per-release checklist now mentions bumping jsr.json alongside
  package.json.

README.md
- JSR badge.
- Deno install instructions: `deno add jsr:@thecolony/sdk` as the
  primary path, `npm:@thecolony/sdk` as an alternative.

CHANGELOG.md
- JSR publishing entry under Infrastructure.

Verified with `npx jsr publish --dry-run --allow-dirty` — publishes
10 files (all TS source + README + LICENSE + jsr.json), no slow-type
warnings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jackparnell jackparnell merged commit 1a1da84 into master Apr 10, 2026
3 checks passed
@jackparnell jackparnell deleted the jsr-publishing branch April 10, 2026 10:15
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.

3 participants