Releases: honojs/hono
Releases · honojs/hono
v1.2.1
v1.2.0
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
- test: add tests for builtin middleware by @yusukebe in #192
- feat(compose): compose both the ordinary middlewares and response middlewares by @metrue in #195
- ci: ci any PR by @yusukebe in #197
- feat: multiple matching routes for
TrieRouter
by @yusukebe in #196 - test(compose): a move comprehensive test cases by @metrue in #198
- feat: make everything(including Middleware) as
Handler
by @yusukebe in #193 - fix: handle not found response by @yusukebe in #202
- fix: handling not found in
compose.ts
by @yusukebe in #204 - feat:
app.route(path, Route)
by @yusukebe in #203 - fix(router): fix
trie-router
bugs by @yusukebe in #208 - docs: update readme wrangler2 no longer in beta by @patotoma in #209
- feat(trie-router): error handling for duplicate param name by @yusukebe in #215
- perf: make it faster by @yusukebe in #219
- feat: multiple matching routes for RegExpRouter by @usualoma in #220
- for v1.2.0 by @yusukebe in #221
- fix: Some RegExpRouter bugs by @usualoma in #222
- feat(reg-exp-router): error handling for duplicate param name by @usualoma in #224
- docs: remove Japanese README by @yusukebe in #225
New Contributors
Full Changelog: v1.1.1...v1.2.0
v1.1.1
v1.1.0
BREAKING CHANGES
This release includes BREAKING CHANGES. Content-Type
is not added automatically. See: #183
What's Changed
- refactor: refine code by @yusukebe in #167
- refactor(loop): simplify the for loop by @metrue in #171
- feat: chained routing by @yusukebe in #173
- chore: move repo under
honojs
organization by @yusukebe in #178 - feat(jwt): jwt middleware by @metrue in #169
- fix(jwt): the alg option should be same as the one in options by @metrue in #180
- chore: move examples to github.com/honojs/examples by @yusukebe in #181
- chore: update npm modules by @yusukebe in #182
- feat: [BREAKING]
Content-Length
is not added automatically by @yusukebe in #183
Full Changelog: v1.0.0...v1.1.0
v1.0.0
🎉🎉🎉🎉🎉🎉🎉🎉🎉
What's Changed
- docs: add a line for TypeScript support by @yusukebe in https://github.com/yusukebe/hono/pull/151
- fix:
encodeBase64/decodeBase64
throw Error if the argument is null by @yusukebe in https://github.com/yusukebe/hono/pull/155 - refactor: refine directory structure by @yusukebe in https://github.com/yusukebe/hono/pull/156
- refactor: automate
import
sorting by @yusukebe in https://github.com/yusukebe/hono/pull/157 - feat: show stack-trace in default error handler by @yusukebe in https://github.com/yusukebe/hono/pull/158
- fix: typo
SameSaite
by @yusukebe in https://github.com/yusukebe/hono/pull/159 - refactor: define
Next
type by @yusukebe in https://github.com/yusukebe/hono/pull/160 - feat: show stack-trace at graphql-server middleware by @yusukebe in https://github.com/yusukebe/hono/pull/161
- refactor: shorten
hono.ts
by @yusukebe in https://github.com/yusukebe/hono/pull/162 - feat: add types for HTTP status code by @yusukebe in https://github.com/yusukebe/hono/pull/163
- feat: update visibility by @yusukebe in https://github.com/yusukebe/hono/pull/164
- docs: add logo images by @yusukebe in https://github.com/yusukebe/hono/pull/165
Full Changelog: yusukebe/hono@v0.5.10...v1.0.0
v0.5.10
What's Changed
- feat: add JSON pretty-print middleware by @yusukebe in https://github.com/yusukebe/hono/pull/150
Full Changelog: yusukebe/hono@v0.5.9...v0.5.10
v0.5.9
What's Changed
- fix: throw error messages on GraphQL middleware by @yusukebe in https://github.com/yusukebe/hono/pull/148
- feat: add JSON pretty option by @yusukebe in https://github.com/yusukebe/hono/pull/149
Full Changelog: yusukebe/hono@v0.5.8...v0.5.9
v0.5.8
What's Changed
- feat: exports crypto util in package.json by @yusukebe in https://github.com/yusukebe/hono/pull/147
Full Changelog: yusukebe/hono@v0.5.7...v0.5.8
v0.5.7
What's Changed
- feat: exports utility methods by @yusukebe in https://github.com/yusukebe/hono/pull/146
Full Changelog: yusukebe/hono@v0.5.6...v0.5.7
v0.5.6
What's Changed
- feat:
notFound
support await/async by @yusukebe in https://github.com/yusukebe/hono/pull/140 - feat: add GraphQL Server middleware by @yusukebe in https://github.com/yusukebe/hono/pull/142
- docs: add middleware README documents by @yusukebe in https://github.com/yusukebe/hono/pull/145
Full Changelog: yusukebe/hono@v0.5.5...v0.5.6