Never miss a release that matters
AI-powered summaries of every GitHub release.
AI Summaries
Changelogs condensed into clear, actionable insights.
Always Free
Track up to 5 packages at no cost, forever.
Weekly Digest
A curated summary of every release, delivered weekly.
TL;DR
This update improves request handling reliability and fixes critical bugs in the SSE and compression middlewares.
Fixes Worth Knowing
- Fixed multipart boundary mismatches when using
cloneRawRequest. - Resolved an issue where
parseBody()did not reuse cached formData. - SSE (Server-Sent Events) now correctly emits the retry field when set to
0. - Compression middleware no longer incorrectly compresses 206 Partial Content responses.
- Improved
Cache-Controldirective deduplication to be case-insensitive. - Fixed
replaceUrlParamin the client to prevent incorrect matching of prefixing parameters.
TL;DR
Hono now supports first-party session management, improving security and simplifying user authentication.
New
- First-Party Sessions: Implement secure, cookie-based sessions without external dependencies (session management).
Context.exec(): Allows middleware to short-circuit request processing (request handling).
Fixes Worth Knowing
- Fixed an issue where
next()wasn’t correctly called in middleware, leading to unexpected behavior. - Resolved a bug causing incorrect content type detection for streamed responses (HTTP responses).
Package: Hono Release:
--- v4.5.0-rc.1 (2024-06-28) --- v4.5.0-rc.1 This is a pre-release.
Breaking
Context.render()now requires aContent-Typeheader to be set explicitly (HTTP responses).
New
Context.exec(): Allows middleware to short-circuit request processing (request handling).
Fixes Worth Knowing
- Fixed an issue where
next()wasn’t correctly called in middleware, leading to unexpected behavior. - Resolved a bug causing incorrect content type detection for streamed responses (HTTP responses).
TL;DR
Hono’s type inference for route parameters (routing definitions) is now more accurate, improving developer experience when working with dynamic routes.
Fixes Worth Knowing
- Resolved an issue where routes with the same parameter name could fail to match correctly (trie-router).
- Fixed a circular dependency in the HTML rendering module, preventing potential errors.
- Improved type definitions to correctly infer parameter types in
MergeSchemaPath(type definitions).
TL;DR
Hono now supports request/response transformers (functions to modify data) allowing for middleware-like behavior without full middleware overhead.
New
- Request/Response Transformers: Implement data manipulation logic directly within routes, offering a lightweight alternative to traditional middleware.
TL;DR
Hono now supports first-party authorization using JSON Web Tokens (JWTs), simplifying secure API development.
New
- Added JWT authorization middleware for simplified API security.
- Implemented
Context.getandContext.setmethods for managing request-specific data (key-value store).
Fixes Worth Knowing
- Resolved an issue where middleware execution order was incorrect when using
beforehooks. - Fixed a bug causing incorrect content type detection for streamed responses.
Package: Hono Release:
--- vv3.5.0 (2023-08-22) --- v3.5.0 This is a stable release!
Breaking
- Removed the
NextMiddlewaretype; useMiddlewareinstead (function type).
New
- Added support for custom error handling via the
onErrorhook.
Fixes Worth Knowing
- Corrected handling of query parameters in nested routes.
- Improved performance of route matching.
Before You Upgrade
- Update any code using
NextMiddlewareto use theMiddlewarefunction type instead.
Package: Hono Release:
--- vv3.5.1 (2023-08-23) --- v3.5.1
Fixes Worth Knowing
- Fixed a regression where streamed responses were not being correctly handled in some environments.
- Resolved an issue where the
onErrorhook was not being called for certain types of errors.
TL;DR
Hono now correctly handles errors within sub-routes (nested apps) using the parent app’s error handler, improving error management in complex applications.
Fixes Worth Knowing
c.req.header()now correctly returnsundefinedwhen a header is not present, preventing potential type errors.- Static file serving (Serve Static Middleware) now correctly handles URL-encoded paths and avoids 404 errors in some cases.
- Additional mime types have been added for broader file support.
Before You Upgrade
If you rely on the return type of c.req.header(), update your code to handle potential undefined values.
TL;DR
Deno users must update how they start their Hono (web framework) applications, replacing app.fire() with serve((req) => app.fetch(req)).
Breaking
app.fire()(Deno startup method) is removed; useserve((req) => app.fetch(req))instead.
New
- Deno: All middleware functions are now exported, increasing flexibility.
TL;DR
Hono now includes built-in GraphQL server middleware and improved notFound handling, simplifying API development with this fast web framework (Node.js).
New
- GraphQL Server middleware is now available for easily creating GraphQL endpoints.
notFoundhandler now supportsasync/awaitfor more flexible error handling.
Fixes Worth Knowing
- GraphQL middleware now correctly throws error messages, improving debugging.
- JSON responses can now be pretty-printed for easier readability.
Before You Upgrade
Review the updated middleware documentation to take advantage of the new GraphQL features.