Packages

hono

4.13.19 · 16 Nov 2026MIT114.5M / weekRepositoryHomepagenpmAtom feed

Your version

4.4.0

27 May 2024Where it was published

4.13.19 is the newest release of 4.x.

In short

15 new3 fixed1 changed11 internal

Security

48 advisories affect 4.4.0; 4.13.16 fixes them

43 more

Release note

Hono v4.4.0 is now available! Let's take a look at the new features.

Support JSR

Now, Hono is available on JSR - a new JavaScript/TypeScript registry! You can install the Hono package from JSR right now. If you want to run your Hono app on Deno, you can install it with the following command:

deno add @hono/hono

Then, use it in your code!

// main.ts
import { Hono } from '@hono/hono'

const app = new Hono()

app.get('/', (c) => c.text('Hello JSR!'))

export default app

And run it:

deno serve main.ts

If you edit the deno.json and set the paths appropriately, the exact same code that you are familiar with will work in Deno, Cloudflare Workers, and Bun.

deno.json:

{
  "imports": {
    "hono": "jsr:@hono/hono@^4.4.0"
  }
}

github.com/honojs/hono/assets/10682/e2269e61-60…

JSR is not exclusive to Deno. You can use it with npm and Bun.

# npm
npx jsr add @hono/hono

# bun
bunx jsr add @hono/hono

And, removing "slow types" has improved the performance of TypeScript type inference.

With the introduction of JSR, the previous package publishing from deno.land/x will be obsolete.

Introduce ConnInfo Helper

The ConnInfo Helper is a helper helps you to get the connection information. For example, you can get the client's remote address easily.

import { Hono } from 'hono'
import { getConnInfo } from 'hono/deno' // For Deno

const app = new Hono()

app.get('/', (c) => {
  const info = getConnInfo(c) // info is `ConnInfo`
  return c.text(`Your remote address is ${info.remote.address}`)
})

export default app

Introduce Timeout Middleware

The Timeout Middleware is a middleware enables you to easily manage request timeouts in your application.

Here is a simple example:

import { Hono } from 'hono'
import { timeout } from 'hono/timeout'

const app = new Hono()

// Applying a 5-second timeout
app.use('/api', timeout(5000))

// Handling a route
app.get('/api/data', async (c) => {
  // Your route handler logic
  return c.json({ data: 'Your data here' })
})

Improving JSDoc

We are now trying to improve the JSDocs. In the PR, we've added the JSDocs for all middleware. Thank you, @goisaki!

Other features

  • URL utility - decode percent-encoded path in getPath #2714

  • Body utility - add dot notation support for parseBody #2675

  • Body utility - specify detailed return type for parseBody #2771

  • SSG Helper - enhance combined hooks #2686

  • JSX DOM - improve compatibility with React - The 2024 May Update #2756

  • JSX DOM - introduce react-dom/client APIs and React.version #2795

All Updates

  • secure-header: Replace NodeJS Buffer API

  • http-exception: Prioritize the status code

  • Introduce ConnInfo helper/adapter

  • middleware: Introduce Timeout Middleware

  • Decode percent-encoded path in getPath

  • utils/body: Add dot notation support for parseBody

  • jsx/dom: Improve compatibility with React - The 2024 May Update

  • utils: Specify detailed return type for parseBody

  • ssg: Enhance conbined hooks

  • jsr: Support JSR

  • middleware: Export variables type from each index.ts

  • jsx/dom: Introduce react-dom/client APIs and React.version

  • Next for v4.4.0

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.