Skip to content

Releases: honojs/hono

v1.3.2

18 May 00:19
Compare
Choose a tag to compare

What's Changed

  • fix(serve-static): enabled with other middleware by @yusukebe in #244
  • fix(Context): c.body() accept null for 204 response by @yusukebe in #245

Full Changelog: v1.3.1...v1.3.2

v1.3.1

16 May 23:17
Compare
Choose a tag to compare

What's Changed

  • chore: do not include test files in npm packages by @yusukebe in #241

Full Changelog: v1.3.0...v1.3.1

v1.3.0

16 May 13:26
Compare
Choose a tag to compare

BREAKING CHANGES!!!!

Route is deprecated. Removed. To group routes, use Hono instead of Route.

// const api = new Route() <--- obsolete
const api = new Hono()

api.get('/posts', (c) => c.text('list'))
api.post('/posts', (c) => c.text('create'))

app.route('/v1', api)

Another feature

You can get all param or all query at one.

app.get('/posts/:id', (c) => {
  const { id } = c.req.param()
  const { q, lang } = c.req.query()
  ...
}))

Thanks to @usualoma

What's Changed

Full Changelog: v1.2.2...v1.3.0

v1.2.2

15 May 07:07
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.2.1...v1.2.2

v1.2.1

14 May 01:04
Compare
Choose a tag to compare

What's Changed

  • feat(ctx): enable set and get in ctx, to hold values by @metrue in #226
  • fix: fixe bugs about basic auth middleware by @yusukebe in #227

Full Changelog: v1.2.0...v1.2.1

v1.2.0

13 May 05:44
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v1.1.1...v1.2.0

v1.1.1

01 May 12:15
Compare
Choose a tag to compare

What's Changed

This release includes a little feature but this is cool. Env variables have types. See #191

Full Changelog: v1.1.0...v1.1.1

v1.1.0

27 Apr 07:17
Compare
Choose a tag to compare

BREAKING CHANGES

This release includes BREAKING CHANGES. Content-Typeis not added automatically. See: #183

What's Changed

Full Changelog: v1.0.0...v1.1.0

v1.0.0

22 Apr 00:23
Compare
Choose a tag to compare

πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰πŸŽ‰

What's Changed

Full Changelog: yusukebe/hono@v0.5.10...v1.0.0

v0.5.10

02 Apr 06:28
Compare
Choose a tag to compare

What's Changed

Full Changelog: yusukebe/hono@v0.5.9...v0.5.10