NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1282 most downloaded on npm
Web framework built on Web Standards
Last release today
04 Oct 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
455 releases · first in 2021
One column per quarter.
fix(pages): fixed type mismatch in EventContext by @yusukebe in https://github.com/honojs/hono/pull/1026
This is a small fix.
EventContext by @yusukebe in https://github.com/honojs/hono/pull/1026Full Changelog: https://github.com/honojs/hono/compare/v3.1.5...v3.1.6
This is a patch-release. Bug fixes for URL query parsing and some small new features.
This is a patch-release. Bug fixes for URL query parsing and some small new features.
Input type by @equt in https://github.com/honojs/hono/pull/1019c.get('jwtPayload') by @yusukebe in https://github.com/honojs/hono/pull/1025Full Changelog: https://github.com/honojs/hono/compare/v3.1.4...v3.1.5
refactor(utils/url): Decode parameters more accurately without performance degradation. by @usualoma in https://github.com/honojs/hono/pull/1015
Full Changelog: https://github.com/honojs/hono/compare/v3.1.3...v3.1.4
fix(package.json): fixed test:wrangler and test:lambda by @yusukebe in https://github.com/honojs/hono/pull/1012
test:wrangler and test:lambda by @yusukebe in https://github.com/honojs/hono/pull/1012Full Changelog: https://github.com/honojs/hono/compare/v3.1.2...v3.1.3
supported issued_at validation for JWT by @Code-Hex in https://github.com/honojs/hono/pull/1001
/ if strict is false by @yusukebe in https://github.com/honojs/hono/pull/1004Full Changelog: https://github.com/honojs/hono/compare/v3.1.1...v3.1.2
fix(context): fixed a bug for c.header() with a append option by @yusukebe in https://github.com/honojs/hono/pull/997
This is a patch release.
c.header() with a append option by @yusukebe in https://github.com/honojs/hono/pull/997Full Changelog: https://github.com/honojs/hono/compare/v3.1.0...v3.1.1
feat(page/nextjs): show "deprecated" for 2nd arg of handle() by @yusukebe in https://github.com/honojs/hono/pull/981
Hono v3.1.0 has been released now. Introduce the new features.
This release includes some bug fixes for RPC-mode. In addition, there are several new features for it.
These make RPC-mode more usable.
For example, Zod has a "transform" function.
z.string()
.regex(/^[0-9]+$/)
.transform(Number)
This means that the input type(string) and output type(number) are different. But, Hono did not support different input and output types. If we use "transform" in Zod Validator Middleware, the value from c.req.valid() will be "input type" not "output type":
const app = new Hono().post(
'/foo',
zValidator(
'json',
z.object({
id: z
.string()
.regex(/^[0-9]+$/)
.transform(Number),
})
),
(c) => {
c.req.valid('json').id // expected to be `number`
<img width="643" alt="SS" src="https://user-images.githubusercontent.com/10682/224057616-69bd5ef2-f8cd-4929-bc85-c2461482db9e.png">
With this release, the validator treats input and output types as different, so it will support Zod's transformation.
<img width="577" alt="SS" src="https://user-images.githubusercontent.com/10682/224058868-927497f1-3ed5-46b7-90b9-983f8926ae58.png">
This feature is not only for the Zod Validator, but for general purposes.
param validationNow, the validator supports validating "path params".
const schema = z.object({
id: z
.string()
.regex(/^[0-9]+$/)
.transform((v) => {
return Number(v)
}),
title: z.string(),
})
app.get('/users/:id/books/:title', zodValidator('param', schema), (c) => {
const { id, title } = c.req.valid('param')
return c.jsonT({
id, // number
title, // string
})
})
query supports array paramsFor example, before this release, it was difficult to validate multiple params like tag using query:
http://localhost/search?page=123&tag=a&tag=b
Or we have to use queries but if we do so, they all will be array.
From now, the values we could get from query will be Record<string, string | string[]>. So we can write the followings:
const app = new Hono()
const schema = z.object({
q: z.string(),
tag: z.array(z.string()),
})
const route = app.get('/post', zValidator('query', schema), (c) => {
const { q, tag } = c.req.valid('query')
return c.jsonT({
queryString: q,
tags: tag,
})
})
env for getting environment variables for multi-runtimesenv function to get environment variables for any runtimes, not only variables of Cloudflare Workers' Bindings.
We can write the code with the same syntax at any runtime:
import { env } from 'hono/adapter'
app.get('/env', (c) => {
const { NAME } = env<{ NAME: string }>(c)
return c.text(NAME)
})
Supported runtimes:
With this Adapter, you can run applications using Hono on AWS Lambda, and you can also publish them with AWS API Gateway.
You can try it by using "hono-create":
npm create hono@latest my-app
This feature is experimental. The API might be changed.
The usage is almost the same as the Cloudflare Pages and Next.js adapters. Import handle, give the Hono application, and export it.
import { Hono } from 'hono'
import { handle } from 'hono/aws-lambda'
import { logger } from 'hono/logger'
const app = new Hono()
app.use('*', logger())
app.get('/hello', (c) => {
return c.json({
message: 'Hono meets Lambda',
})
})
export const handler = handle(app)
This is all you need to do to get your Hono application running in Lambda.
Use AWS API Gateway to publish applications run on Lambda.
<img width="712" alt="SS" src="https://user-images.githubusercontent.com/10682/225646479-368a9034-91c0-4abd-87b1-f2eca99115fc.png">
In API Gateway, create a Route ANY /{proxy+}. This way, the Hono application can handle all methods and paths.
<img width="641" alt="SS" src="https://user-images.githubusercontent.com/10682/225646901-eef470de-4861-490f-a6ab-209012571575.png">
The simplest way is to use esbuild to transpile to JavaScript, compress it to Zip, and upload it using aws CLI. For example, package.json could look like this.
{
"name": "lambda-hello",
"type": "module",
"scripts": {
"build": "esbuild --bundle --outfile=./dist/index.js --platform=node --target=node18 ./src/index.ts",
"zip": "zip -j lambda.zip dist/index.js",
"update": "aws lambda update-function-code --zip-file fileb://lambda.zip --function-name hello",
"deploy": "run-s build zip update"
}
}
basePath()app.route() with a single argument is renamed app.basePath().
const app = new Hono()
const route = app
.basePath('/book')
.get('/post', (c) => c.text('Book list'))
.post('/post', (c) => c.text('Created!', 201))
c.req.pathThis simple feature allows you to get the URL's path by accessing c.req.path.
app.get('/search', (c) => c.text(c.req.path)) // "search"
RequestInit to c.json() etc.It was very tedious to customize Basic Auth errors.
app.onError((e, c) => {
if (e instanceof HTTPException) {
const res = e.getResponse()
res.headers.set('content-type', 'application/json')
return new Response(
JSON.stringify({
message: 'Unauthorized!',
}),
res
)
// ...
Now it become easier because we can pass ResponseInit, i.e. meta information such as headers, to c.json().
app.onError((e, c) => {
if (e instanceof HTTPException) {
return c.json(
{
message: Unauthorized!',
},
e.getResponse()
)
}
This feature is not only used in the above cases but can also be used when we want to modify and return the content retrieved from the outside using fetch.
app.get('/mirror', async (c) => {
const res = await fetch('http://example.com')
return c.json({ foo: 'bar' }, res)
})
unknown to executionCtx.waitUntil by @yusukebe in https://github.com/honojs/hono/pull/957env support enviroment variables for multi runtimes by @yusukebe in https://github.com/honojs/hono/pull/949route() with one argument is renamed basePath(). by @usualoma in https://github.com/honojs/hono/pull/964BasePath by @yusukebe in https://github.com/honojs/hono/pull/967RequestInit to c.json() etc. by @yusukebe in https://github.com/honojs/hono/pull/959next() by @yusukebe in https://github.com/honojs/hono/pull/970test instead of wiptest! by @yusukebe in https://github.com/honojs/hono/pull/977MergePath<'/api', '/'> work well by @yusukebe in https://github.com/honojs/hono/pull/971removeIndexString supports /sub/index by @yusukebe in https://github.com/honojs/hono/pull/978eventContext by @yusukebe in https://github.com/honojs/hono/pull/980handle() by @yusukebe in https://github.com/honojs/hono/pull/981query supports array params by @yusukebe in https://github.com/honojs/hono/pull/984c.req.path by @yusukebe in https://github.com/honojs/hono/pull/988Full Changelog: https://github.com/honojs/hono/compare/v3.0.5...v3.1.0
feat(pages/nextjs): show "deprecated" for 2nd arg of handle() by @yusukebe in https://github.com/honojs/hono/pull/981
This is a pre-release.
eventContext by @yusukebe in https://github.com/honojs/hono/pull/980handle() by @yusukebe in https://github.com/honojs/hono/pull/981Full Changelog: https://github.com/honojs/hono/compare/v3.1.0-rc.1...v3.1.0-rc.2
Nothing published for this version
fix(route): support a root-level optional parameter by @yusukebe in https://github.com/honojs/hono/pull/975
This is a patch release.
Full Changelog: https://github.com/honojs/hono/compare/v3.0.4...v3.0.5
docs(readme): add creator name of RegExpRouter and SmartRouter by @yusukebe in https://github.com/honojs/hono/pull/956
This is a patch release.
Full Changelog: https://github.com/honojs/hono/compare/v3.0.3...v3.0.4
This is a patch release but includes small new features.
This is a patch release but includes small new features.
app.route()We can specify "base path" with app.route:
const api = new Hono().route('/api')
const route = api.get('/search', (c) => c.jsonT({ ok: true }))
type AppType = typeof route
const client = hc<AppType>('/')
client.api.search.$get()
jsonT() does not allow non-JSON object such as Date:
<img width="383" alt="SS" src="https://user-images.githubusercontent.com/10682/222435695-f5537d18-c512-4065-b35f-df52c3e8c5d2.png">
If $get() needs arguments but it's blank, it throw the type error.
<img width="373" alt="SS" src="https://user-images.githubusercontent.com/10682/222435888-b7386bde-6ff4-4b02-80ea-56a372eccadb.png">
MergePath by @yusukebe in https://github.com/honojs/hono/pull/936jsonT): check JSON type by @yusukebe in https://github.com/honojs/hono/pull/939$get() needs args by @yusukebe in https://github.com/honojs/hono/pull/937route() if path is not passed by @yusukebe in https://github.com/honojs/hono/pull/943Full Changelog: https://github.com/honojs/hono/compare/v3.0.2...v3.0.3
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →