Hono 4.12.31
Hono 4.12.31 has been released — the latest update to the ultrafast web framework built on Web Standards brings middleware refinements, enhanced type inference, and improved runtime compatibility.
⚡ Performance Push
Hono 4.12.31 continues the project's streak of zero-compromise performance. The RegExpRouter sees further optimizations for dynamic route patterns, shaving milliseconds off cold-start routing on Cloudflare Workers and Deno. The tiny preset remains under 12kB — still one of the smallest frameworks shipping today.
🔧 Middleware Milestones
The JWT middleware gets a long-awaited upgrade with support for custom signing algorithms and better error messaging when tokens expire. The CORS middleware now respects origin-specific configuration without requiring a blanket allow-all fallback. Several community-contributed middleware have been promoted from experimental to stable.
🦀 TypeScript Tightening
Type inference for the c.req.param() helper has been improved — no more manual type assertions on path parameters in complex routes. The generated type declarations are also slimmer, reducing IDE overhead in large projects with hundreds of route definitions.
🔄 Runtime Roundup
This release adds official compatibility notes for the latest Deno 2.9.x and Bun 1.3.x runtimes. Node.js 26.5+ users get improved stream handling in the Node.js adapter. The AWS Lambda adapter now supports response streaming via the streamifyResponse helper.
🐛 Bug Bashes
- Fixed a race condition in the
app.use()middleware chain when using async resolvers - Honored
secureflag in cookie parsing behind proxies - Patched a memory leak in WebSocket upgrade handlers on Deno
- Resolved duplicate
content-typeheaders in error responses
Hono 4.12.31 is available now on npm and JSR. Upgrade with npm install hono@latest or deno add @hono/hono. The full changelog is on GitHub — go grab it.