Skip to content

Releases: honojs/hono

v4.6.15

28 Dec 07:57
Compare
Choose a tag to compare

c.json() etc. throwing type error when the status is contentless code, e.g., 204

From this release, when c.json(), c.text(), or c.html() returns content, specifying a contentless status code such as 204 will now throw a type error.

CleanShot 2024-12-28 at 16 47 39@2x

At first glance, this seems like a breaking change but not. It is not possible to return a contentless response with c.json() or c.text(). So, in that case, please use c.body().

app.get('/', (c) => {
  return c.body(null, 204)
})

What's Changed

  • fix(jsr): exclude unused markdown files by @ryuapp in #3767
  • feat(hono/context): contentful status code typing by @askorupskyy in #3763
  • refactor(context): remove lint errors by @yusukebe in #3769
  • feat(context): ResponseInit accepts generics StatusCode for status by @yusukebe in #3770
  • feat(utils/cookie): Ability to set a priority to cookies in setCookie options by @Beyondo in #3762
  • fix(hono-base): don't use Symbol for COMPOSED_HANDLER by @yusukebe in #3773

New Contributors

Full Changelog: v4.6.14...v4.6.15

v4.6.14

14 Dec 13:29
Compare
Choose a tag to compare

What's Changed

  • perf(pattern-router): improve performance when create null object by @EdamAme-x in #3730
  • perf(trie-router): avoid calling spread operator for Object.create(null) by @usualoma in #3735
  • fix: Remove charset parameter from MIME type of application/json by @SaekiTominaga in #3743
  • fix(streaming) Prevent console.error(undefined) when pipe is aborted by @aantthony in #3747

New Contributors

Full Changelog: v4.6.13...v4.6.14

v4.6.13

06 Dec 07:17
Compare
Choose a tag to compare

What's Changed

  • refactor: use Array.prototype.at() to look at the end by @ryuapp in #3703
  • fix(aws-lambda): Fix query string handling for v1 by @Holi0317 in #3717
  • chore: Add Cloudflare Static Assets reference to serveStatic deprecation notice by @ambergristle in #3705
  • fix(middleware/cors): explicitly return No Content for the statusText when handling an OPTIONS request by @shawncarr in #3719
  • fix(utils/ipaddr): support IPv6-mapped IPv4 address by @usualoma in #3727

New Contributors

Full Changelog: v4.6.12...v4.6.13

v4.6.12

25 Nov 03:44
Compare
Choose a tag to compare

What's Changed

  • ci(perf-measures): support KB by @EdamAme-x in #3696
  • perf(router): sort handlers by score only when necessary by @EdamAme-x in #3697
  • feat(css): add CSP nonce to hono/css related style and script tags by @meck93 in #3685
  • fix(adapter/aws-lambda): add alb event requestContext undefined check for testing convenience by @ospatil in #3691

New Contributors

Full Changelog: v4.6.11...v4.6.12

v4.6.11

19 Nov 23:50
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.6.10...v4.6.11

v4.6.10

13 Nov 08:34
Compare
Choose a tag to compare

What's Changed

  • chore: format no-response.yml by @yusukebe in #3622
  • ci(deno): merge deno runtime coverage by @usualoma in #3632
  • chore: bump devDependencies by @EdamAme-x in #3633
  • fix(jsr): fix missing exports by @EdamAme-x in #3636
  • refactor(hono-base): use object abbreviation notation by @EdamAme-x in #3640
  • chore(build): validate if exporting is correct in package.json and jsr.json by @EdamAme-x in #3638
  • fix(serveStatic): add guard to prevent reading empty folders by @oussamasf in #3639
  • docs(service-worker): fix module docs for service worker adapter by @rwv in #3645
  • refactor(hono-base): remove unneeded processes and variables by @EdamAme-x in #3649
  • perf(trie-router): optimize and remove unnecessary processes by @EdamAme-x in #3647
  • refactor(router): use # for private props to reduce the minified bundle size by @EdamAme-x in #3660
  • fix(middleware/combine): prevent c.req.routeIndex from being changed by @usualoma in #3663

New Contributors

Full Changelog: v4.6.9...v4.6.10

v4.6.9

04 Nov 05:11
7c050b2
Compare
Choose a tag to compare

What's Changed

  • refactor: fix typos by @mattn in #3583
  • fix(req): correct c.req.param decodes invalid percent strings by @yusukebe in #3573
  • fix(jsx/dom): fix memo for DOM renderer by @usualoma in #3568
  • fix(jsx/dom): fix dom rendering bugs for fragment. by @usualoma in #3569
  • perf(compose): check if it is a instance only once by @EdamAme-x in #3585
  • perf(router): use .concat instead of spread syntax by @EdamAme-x in #3584
  • fix(types): remove any and fix types of adapter/deno by @EdamAme-x in #3291
  • refactor(timing/utils-body): a few minor edits by @sharma-shray in #3557
  • fix(hono-base): remove .matchRoute and reduce bundle size by @EdamAme-x in #3595
  • perf(utils/url): improve performance of url utility by @EdamAme-x in #3593
  • perf(context): improve performance of context (setHeaders) by @EdamAme-x in #3592
  • refactor(helper/html): Prefer Array.isArray over instanceof Array by @exoego in #3601
  • refactor: compare with undefined directly by @exoego in #3602
  • refactor: remove useless spread by @exoego in #3600
  • refactor(context): use simple for-of syntax by @usualoma in #3598
  • feat(context): allow URL object on c.redirect() by @cometkim in #3609
  • ci: Use latest version of Bun and Deno for CI by @fel1x-developer in #3554
  • chore(ISSUE_TEMPLATE): encourage them to add a version if possible by @EdamAme-x in #3599
  • perf(middleware/logger): optimize color status by @exoego in #3603
  • refactor(utils/mime): make object and type commonality by @EdamAme-x in #3606
  • chore: automatically close issues marked as β€œnot bug” over time by @EdamAme-x in #3611
  • perf(utils): use | 0 instead of Math.floor by @EdamAme-x in #3605
  • perf(helper/cookie): fast-path for name specified by @exoego in #3608
  • refactor: use # for private methods to reduce the minified file size by @yusukebe in #3596
  • fix(helper/websocket): allow custom events to be passed to generics by @EdamAme-x in #3616
  • fix(middleware/etag): generate etag hash value from all chunks by @usualoma in #3604
  • fix(utils/crypto): fix types of crypto utility by @EdamAme-x in #3614

New Contributors

Full Changelog: v4.6.8...v4.6.9

v4.6.8

29 Oct 06:39
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.6.7...v4.6.8

v4.6.7

26 Oct 02:19
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.6.6...v4.6.7

v4.6.6

22 Oct 05:22
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.6.5...v4.6.6