Packages

hono

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

Your version

1.5.0

17 Jun 2022Where it was published

1.6.4 is the newest release of 1.x.

In short

1 breaking1 internal

  • Breaking

    This release includes BREAKING CHANGES.

Security

44 advisories affect 1.5.0; 4.13.16 fixes them

39 more

Release note

Breaking changes!!

This release includes BREAKING CHANGES.

Routing priority has been changed. The new rules are below:


Handlers or middleware will be executed in registration order.

app.get('/book/a', (c) => c.text('a')) // a
app.get('/book/:slug', (c) => c.text('common')) // common
GET /book/a ---> `a`
GET /book/b ---> `common`

When a handler is executed, the process will be stopped.

app.get('*', (c) => c.text('common')) // common
app.get('/foo', (c) => c.text('foo')) // foo
GET /foo ---> `common` // foo will not be dispatched

If you have the middleware that you want to execute, write the code above the handler.

app.use('*', logger())
app.get('/foo', (c) => c.text('foo'))

If you want a "fallback" handler, write the code below the other handler.

app.get('/foo', (c) => c.text('foo')) // foo
app.get('*', (c) => c.text('fallback')) // fallback
GET /bar ---> `fallback`

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.