Skip to content
Myr

feat(adapters/deno): publish to JSR (#5465)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* feat(adapters/deno): publish to JSR * update * update readme * refactor * refactor

authored by Yusuke Wada · committed by GitHub · parent b877827 · Browse files · 10 files+57 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

10 files+57 added−9 removed

  • tests:+2 added−2 removed
  • other:+55 added−7 removed

10 files+57 added−9 removed

modified:.github/workflows/release.yml+10 added
modified:adapters/deno/src/conninfo.test.ts+1 added-1 removed
modified:adapters/deno/src/index.ts+4 added-4 removed
modified:adapters/deno/src/websocket.test.ts+1 added-1 removed
1import { Context, Hono } from 'hono'2import { upgradeWebSocket } from './websocket'2import { upgradeWebSocket } from './websocket.ts'34globalThis.Deno = {} as typeof Deno56describe('WebSockets', () => {
155 unmodified lines
added:adapters/deno/deno.json+23 added
modified:adapters/deno/package.json+2 added-1 removed
modified:adapters/deno/README.md+3 added-1 removed
1 unmodified line
23Deno adapter for [Hono](https://hono.dev).45```sh6deno add npm:@hono/deno6deno add jsr:@hono/deno7```89The package is also published to npm, so `deno add npm:@hono/deno` works too.1011## Migrating from `hono/deno`1213The exports are the same. Change the import path:14
10 unmodified lines
modified:adapters/deno/tsconfig.json+2 added-1 removed
6 unmodified lines
7 "types": [8 "node",9 "vitest/globals"10 ],11 "noEmit": true11 "noEmit": true,12 "allowImportingTsExtensions": true13 },14 "include": [15 "src/**/*.ts"16 ]
1 unmodified line
modified:docs/MAINTAINING.md+8 added
42 unmodified lines
43This bumps `adapters/bun/package.json`, commits, creates an annotated tag `@hono/bun@<version>` and pushes. The `release.yml` workflow then packs the adapter and runs `npm stage publish`. Approve the staged version on npm (2FA) to make it public.4445At the end the script prints a release-note draft built from the commits that touched `adapters/bun` since the previous adapter tag, plus a prefilled GitHub "new release" link. Creating a GitHub Release is optional.4647### JSR4849`@hono/deno` is also published to JSR. `adapters/deno/deno.json` is the JSR package config: its `imports`50map `hono` to `jsr:@hono/hono`, and its `version` stays `0.0.0` like the root `jsr.json`.51The `release.yml` workflow runs `deno publish --set-version <version from the tag>` when the tagged adapter has a `deno.json`.52Before the first release, create the package on jsr.io under the `@hono` scope and link the `honojs/hono`53repository so the workflow can publish with OIDC. `deno publish --dry-run --set-version 0.0.1` in `adapters/deno` checks the package locally.5455### Adding a new adapter56571. Copy `adapters/bun` as `adapters/<name>` and adjust `package.json` (`name`, `description`) and the sources.582. The workspace picks it up automatically (`pnpm-workspace.yaml` has `adapters/*`).
12 unmodified lines
modified:pnpm-lock.yaml+3 added
251 unmodified lines
252 version: link:../..253254 adapters/deno:255 devDependencies:256 '@types/node':257 specifier: ^24.3.0258 version: 24.13.6259 hono:260 specifier: workspace:*261 version: link:../..262
9792 unmodified lines