Skip to content

fix(hono): Expose runtime-specific SDK options - #25290

Merged
nicohrubec merged 1 commit into
developfrom
feat/hono-runtime-option-types
Oct 12, 2026
Merged

nicohrubec merged 1 commit into
developfrom
feat/hono-runtime-option-types

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Hono forwards SDK options to each runtime SDK, but its public types only expose core options. This makes TypeScript reject supported settings such as enableOpenTelemetrySetup, Node transport options, and Cloudflare RPC bindings.

Inherit the Node, Bun, Deno, and Cloudflare option types while retaining Hono's middleware options. Extend the existing option-preservation tests to check that these settings compile and are forwarded.

Co-Authored-By: Codex <codex@openai.com>
@linear-code

linear-code Bot commented Oct 12, 2026

Copy link
Copy Markdown

SDK-1530

@nicohrubec
nicohrubec marked this pull request as ready for review October 12, 2026 13:45
@nicohrubec
nicohrubec requested a review from a team as a code owner October 12, 2026 13:45
@nicohrubec
nicohrubec requested review from chargome, mydea and s1gr1d and removed request for a team October 12, 2026 13:45
@nicohrubec
nicohrubec merged commit 094d57d into develop Oct 12, 2026
66 checks passed
@nicohrubec
nicohrubec deleted the feat/hono-runtime-option-types branch October 12, 2026 14:48
nicohrubec pushed a commit that referenced this pull request Oct 12, 2026
Backport of: #25290

## Differences to the original PR

- `packages/hono/test/{bun,cloudflare,deno}/middleware.test.ts`,
`packages/hono/test/node/sdk.test.ts`: the option-forwarding tests use
`skipOpenTelemetrySetup` instead of `enableOpenTelemetrySetup`.
`enableOpenTelemetrySetup` is a v11-only option, and v10's runtime
option types (`OpenTelemetryServerRuntimeOptions`, `DenoOptions`,
`CloudflareOptions`) expose `skipOpenTelemetrySetup` instead. The values
were inverted to keep the same meaning (`enable: true` -> `skip: false`,
`enable: false` -> `skip: true`). The source changes are the same as in
the original PR.

<!-- junior-request-attribution:start -->
via Junior system actor `junior`.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!--
junior-conversation-id:agent-dispatch%3Adispatch_b29cfc0ab8f95b9fb7084e4e1bd2fd8e
-->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/agent-dispatch%3Adispatch_b29cfc0ab8f95b9fb7084e4e1bd2fd8e)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent-dispatch%3Adispatch_b29cfc0ab8f95b9fb7084e4e1bd2fd8e/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
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