Packages

hono

4.13.19 · 16 Nov 2026MIT113.6M / weekRepositoryHomepagenpmAtom feed

Your version

3.4.0

8 Aug 2023Where it was published

3.12.12 is the newest release of 3.x.

In short

3 new2 faster3 fixed12 changed7 internal

Security

44 advisories affect 3.4.0; 4.13.16 fixes them

39 more

Release note

v3.4.0 is out now! This release includes two significant new features.

Netlify Adapter

We're introducing the Netlify Adapter! With this adapter, you can run your Hono application on Netlify Edge Functions.

import { Hono } from 'https://deno.land/x/hono@v3.4.1/mod.ts'
import { prettyJSON } from 'https://deno.land/x/hono@v3.4.1/middleware.ts'
import { handle, type Env } from 'https://deno.land/x/hono@v3.4.1/adapter/netlify/mod.ts'

const app = new Hono<Env>()

app.get('/', prettyJSON(), (c) =>
  c.json({
    'You are in': c.env.context.geo.country?.name
  })
)

export default handle(app)

You can try it with the create-hono command:

npm create hono@latest my-app

Additionally, we now have 12 starter templates, ensuring that Hono runs on various platforms.

  1. aws-lambda

  2. Bun

  3. cloudflare-pages

  4. cloudflare-workers

  5. Deno

  6. Fastly

  7. Lagon

  8. lambda-edge

  9. Netlify

  10. Nextjs

  11. Nodejs

  12. Vercel

Hono really runs on every platforms.

Cookie Middleware supports Signed Cookies

Cookie Middleware now supports signed cookies. You can use getSignedCookie() and setSignedCookie() helper functions.

app.get('/signed-cookie', async (c) => {
  const secret = 'secret ingredient'
  const allSignedCookies = await getSignedCookie(c, secret)
  const fortuneCookie = await getSignedCookie(c, secret, 'fortune_cookie')
  // ...
  const anotherSecret = 'secret chocolate chips'
  await setSignedCookie(c, 'great_cookie', 'blueberry', anotherSecret)
  deleteCookie(c, 'great_cookie')
  //
})

Special thanks to @torte for this feature!

All Updates

  • utils/url: Use regexp instead of indexOf()

  • types: Add a missing handler type

  • context: Add init flag

  • middleware: Simple cookie signing functionality

  • adapter/aws-lambda: Use content-encoding to determine isBase64Encoded

  • parseBody: Allow passing generics to parseBody()

  • adapter: Add Netlify adapter

  • validator: Support async validator func

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.