Skip to content

ci: setup jsr publishing#37

Merged
mandarini merged 1 commit intomainfrom
ci/setup-jsr-pub
Apr 22, 2026
Merged

ci: setup jsr publishing#37
mandarini merged 1 commit intomainfrom
ci/setup-jsr-pub

Conversation

@mandarini
Copy link
Copy Markdown
Collaborator

@mandarini mandarini commented Apr 22, 2026

Summary

Adds JSR (jsr.io) publishing so @supabase/server can be consumed natively by Deno users via jsr:@supabase/server.

What changed

  • jsr.json -- new package config with all three export entry points (., ./core, ./adapters/hono) pointing to TypeScript source files
  • release-please-config.json -- added jsr.json to extra-files so release-please bumps the version in both package.json and jsr.json atomically
  • release.yml -- added a "Publish to JSR" step after npm publish, using OIDC auth (id-token: write was already configured). Runs with continue-on-error: true so JSR failures never block the npm release
  • ci.yml -- added a jsr publish --dry-run step to catch packaging errors (slow types, bad exports) on every push/PR
  • src/errors.ts -- added explicit return type annotations to all arrow functions in EnvErrorMap and AuthErrorMap (required by JSR's "no slow types" rule since the Errors object is publicly exported)
  • src/adapters/hono/middleware.ts -- added explicit MiddlewareHandler return type to the exported withSupabase function (same reason)

Design decisions

  • Version managed by release-please, not a CI-stamped placeholder. The extra-files config uses release-please's built-in GenericJson updater for .json files.
  • No separate publish script -- the workflow step is a single npx jsr publish --allow-dirty since all version management is handled by release-please.
  • JSR publishes from source (.ts files), not from dist/. The publish.include field scopes what gets uploaded.
  • Non-blocking -- mirrors the pattern used in supabase-js where JSR is secondary to npm.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 22, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@supabase/server@37

commit: 0d3a96e

@mandarini mandarini merged commit 0bd1e6d into main Apr 22, 2026
7 checks passed
@mandarini mandarini deleted the ci/setup-jsr-pub branch April 22, 2026 13:39
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.

2 participants