Packages

hono

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

Your version

4.10.0

16 Oct 2025Where it was published

4.13.19 is the newest release of 4.x.

In short

6 new1 fixed

Security

47 advisories affect 4.10.0; 4.13.16 fixes them

42 more

Release note

Release Notes

Hono v4.10.0 is now available!

This release brings improved TypeScript support and new utilities.

The main highlight is the enhanced middleware type definitions that solve a long-standing issue with type safety for RPC clients.

Middleware Type Improvements

Imagine the following app:

import { Hono } from 'hono'

const app = new Hono()

const routes = app.get(
  '/',
  (c) => {
    return c.json({ errorMessage: 'Error!' }, 500)
  },
  (c) => {
    return c.json({ message: 'Success!' }, 200)
  }
)

The client with RPC:

import { hc } from 'hono/client'

const client = hc<typeof routes>('/')

const res = await client.index.$get()

if (res.status === 500) {
}

if (res.status === 200) {
}

Previously, it couldn't infer the responses from middleware, so a type error was thrown.

Now the responses are correctly typed.


This was a long-standing issue and we were thinking it was super difficult to resolve it. But now come true.

cloneRawRequest Utility

The new cloneRawRequest utility allows you to clone the raw Request object after it has been consumed by validators or middleware.

import { cloneRawRequest } from 'hono/request'

app.post('/api', async (c) => {
  const body = await c.req.json()

  // Clone the consumed request
  const clonedRequest = cloneRawRequest(c.req)
  await externalLibrary.process(clonedRequest)
})

Thanks @kamaal111!

New features

  • types: Passing middleware types #4393

  • ssg: Add default plugin that defines the recommended behavior #4394

  • request: Add cloneRawRequest utility for request cloning #4382

All changes

  • types: Passing middleware types

  • ssg: Add default plugin that defines the recommended behavior

  • request: Add cloneRawRequest utility for request cloning

  • proxy: Correct hop-by-hop header handling per RFC 9110

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.