v4.6.9

honojs/honov4.6.9Nov 4, 2024by yusukebe

AI Summary

This is a minor release focused on performance improvements, bug fixes, and code refactoring. Key improvements include allowing URL objects in `c.redirect()`, fixing request parameter decoding for invalid percent strings, and multiple performance optimizations across the router, context, and utility functions.

Key Highlights

  • Allow URL objects in `c.redirect()` for more flexible redirects
  • Fix `c.req.param` to correctly decode invalid percent strings
  • Fix JSX/DOM rendering bugs including memo and fragment handling
  • Multiple performance optimizations across compose, router, context, and utilities
  • Reduce bundle size by using private methods (`#`) and removing `.matchRoute`

New Features

  • Allow URL object on `c.redirect()` method

Full Release Notes

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

## New Contributors
* @mattn made their first contribution in https://github.com/honojs/hono/pull/3583
* @sharma-shray made their first contribution in https://github.com/honojs/hono/pull/3557
* @fel1x-developer made their first contribution in https://github.com/honojs/hono/pull/3554

**Full Changelog**: https://github.com/honojs/hono/compare/v4.6.8...v4.6.9