Last 12 weeks ยท 93 commits
5 of 6 standards met
Fixes #2343 When is called, returns (not a string), which leads to inconsistent behavior across runtimes - Bun returns an empty string , Cloudflare returns , and Node throws an error. This follows the same approach discussed in the issue thread, matching Deno's implementation: check the result of and throw a if the value isn't serializable. This way the behavior is consistent across all runtimes instead of silently returning wrong responses. Also moved the fast path to use instead of so the serialization check happens before sending the response regardless of which code path is taken. Added a test to verify the behavior.
Repository: honojs/hono. Description: Web framework built on Web Standards Stars: 29086, Forks: 956. Primary language: TypeScript. Languages: TypeScript (99.4%), JavaScript (0.6%), Dockerfile (0%), HTML (0%). License: MIT. Homepage: https://hono.dev Topics: aws-lambda, bun, cloudflare, cloudflare-workers, deno, npm, router, typescript, web-framework. Latest release: v4.12.3 (2d ago). Open PRs: 98, open issues: 270. Last activity: 2d ago. Community health: 75%. Top contributors: yusukebe, usualoma, EdamAme-x, watany-dev, ryuapp, nakasyou, metrue, exoego, sor4chi, yasuaki640 and others.
TypeScript
Fixes a type inference issue where loses route paths for apps composed with . Problem can produce a union schema (). was mapping over the inferred schema directly, and in this union case route keys could collapse, causing to be inferred as Changes Use inside before applying . Add regression test: . Checklist [x] [x] [x] [x]
What version of Hono are you using? 4.11.3 What runtime/platform is your app running on? (with version if possible) Cloudflare Workers What steps can reproduce the bug? 1. Connect to the websocket. 2. Send a message to the server as client. 3. Observe the response. 4. Disconnect the websocket. 5. Observe the Cloudflare Workers error: . What is the expected behavior? When disconnecting after sending a message it should not show that error. Interestingly, when connecting, and disconnecting right after without sending a message, it works fine. What do you see instead? The following unexpected Cloudflare Workers error: . Additional information _No response_
Summary In a Supabase Edge Function running on Deno, fails type-checking for a valid schema. The same schema validates correctly with manual , suggesting a type identity mismatch between resolved instances. Environment Deno: Runtime: Supabase Edge Functions : : : macOS (Apple Silicon) (function-level) Command TS2345ZodObjectZodSchemaTS2589TS7006resultanyzValidator('query', schema, ...)z.object(...)zodzValidator(...)ExampleSchema.safeParse(c.req.query())` in the same route works as expected. This appears consistent with duplicate or segregated Zod type instances during Deno dependency resolution.