Packages

hono

4.13.19 · 16 Nov 2026MIT112.7M / weekRepositoryHomepagenpmAtom feed

Your version

1.2.0

13 May 2022Where it was published

1.6.4 is the newest release of 1.x.

In short

6 new1 faster4 fixed1 changed5 internal

Security

44 advisories affect 1.2.0; 4.13.16 fixes them

39 more

Release note

Summary

Handler and Middleware are treated as the same things

You can write middleware with app.HTTP_METHODS.

app.post('/posts', cors(), (c) => {
  return c.text('This is Handler')
})

Write multiple handlers at one

app.get('*', logger(), powerdBy(), handler)

app.route(path, Route)

Route enables grouping routes.

const book = new Route()

book.get('/', (c) => c.text('List Books')) // GET /book
book.get('/:id', (c) => {
  // GET /book/:id
  const id = c.req.param('id')
  return c.text('Get Book: ' + id)
})
book.post('/', (c) => c.text('Create Book')) // POST /book

app.route('/book', book)

Update and install

yarn add hono

What's Changed

  • compose: Compose both the ordinary middlewares and response middlewares

  • Multiple matching routes for TrieRouter

  • Make everything(including Middleware) as Handler

  • Handle not found response

  • Handling not found in compose.ts

  • app.route(path, Route)

  • router: Fix trie-router bugs

  • trie-router: Error handling for duplicate param name

  • Make it faster

  • Multiple matching routes for RegExpRouter

  • For v1.2.0

  • Some RegExpRouter bugs

  • reg-exp-router: Error handling for duplicate param name

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.