Packages

hono

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

Your version

4.6.15

28 Dec 2024Where it was published

4.13.19 is the newest release of 4.x.

In short

1 breaking3 new2 fixed1 internal

  • Breaking

    At first glance, this seems like a breaking change but not.

Security

47 advisories affect 4.6.15; 4.13.16 fixes them

42 more

Release note

c.json() etc. throwing type error when the status is contentless code, e.g., 204

From this release, when c.json(), c.text(), or c.html() returns content, specifying a contentless status code such as 204 will now throw a type error.

CleanShot 2024-12-28 at 16 47 39@2x

At first glance, this seems like a breaking change but not. It is not possible to return a contentless response with c.json() or c.text(). So, in that case, please use c.body().

app.get('/', (c) => {
  return c.body(null, 204)
})

What's Changed

  • jsr: Exclude unused markdown files

  • hono/context: Contentful status code typing

  • context: ResponseInit accepts generics StatusCode for status

  • utils/cookie: Ability to set a priority to cookies in setCookie options

  • hono-base: Don't use Symbol for COMPOSED_HANDLER

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.