Releases: honojs/hono
Releases Β· honojs/hono
v1.3.2
v1.3.1
v1.3.0
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
- fix(url): fix about merging path by @yusukebe in #235
- Tweaks return values of functions for request parameters. by @usualoma in #234
- feat: [BREAKING] deprecate
Route
, useHono
instead by @yusukebe in #237 - docs: update readme by @yusukebe in #238
- for v1.3.0 by @yusukebe in #239
Full Changelog: v1.2.2...v1.3.0
v1.2.2
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