fix(deps): update dependency hono to v3.2.1#74
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.1.8->3.2.1Release Notes
honojs/hono
v3.2.1Compare Source
This is a patch release.
What's Changed
app.mount()supports/by @yusukebe in https://github.com/honojs/hono/pull/1119Full Changelog: honojs/hono@v3.2.0...v3.2.1
v3.2.0Compare Source
Hono v3.2 is now available! It introduces many features while maintaining simplicity.
hono/tiny,hono/quick.app.mount()hono/nextjstohono/vercel.Let's take a look!
New Routers
We introduce two new routers: LinearRouter and PatternRouter.
LinearRouter
LinearRouter is "quick". While RegExpRouter is one of the fastest routers in the JavaScript world, it's a bit slow when registering routing paths.
So, in environments that are initialized with every request, such as Fastly Compute@Edge, RegExpRouter may not be the best choice.
LinearRouter registers routes very quickly, even compared to other fast JavaScript routers. The following is one of the benchmark results, which includes the route registration phase.
And according to this comment, it will be 40% faster on Fastly Compute@Edge.
PatternRouter
PatternRouter is "tiny". By default, Hono uses SmartRouter with RegExpRouter and TrieRouter. Although not the fastest, we made it even smaller.
If you need to reduce size for resource-limited environments, you can use PatternRouter.
An application using only PatternRouter is about 12KB in size.
Presets:
hono/tiny,hono/quickHono has several routers, each designed for a specific purpose. You can specify the router you want to use in the Hono constructor.
Presets are provided for common use cases, so you don't have to specify the router each time. The Hono class imported from all presets is the same, the only difference being the router. Therefore, you can use them interchangeably.
We introduce
hono/tinyandhono/quicktoday.hono/tinyPreset
hono/tinymeans using only PatternRouter.To use
hono/tiny, you only have to importhono/tinyand useHonoas usual.hono/quickPreset
hono/quickmeans using only LinearRouter.You can also use
hono/quicklike other presets.Which preset should I use?
We now offer three presets:
hono,hono/tiny, andhono/quick. You might be wondering, "Which preset should I use?" Please refer to the followings.honohono/quick, it exhibits high performance once booted. It's ideal for long-life servers built with Deno, Bun, or Node.js. For environments such as Cloudflare Workers, Deno Deploy, Lagon, where v8 isolates are utilized, this preset is suitable too. Because the isolates persist for a certain amount of time after booting.hono/quickhono/tinyapp.mount()By using new feature
app.mount(), you can integrate applications using other frameworks, such as itty-router, with Hono.Also Remix:
This implies that we can mount applications built with any framework, such as itty-router, Remix, Qwik, or SolidJS, into our Hono application.
Ecosystem
With this implementation, we introduce two concepts: adapt and mount. Adapt refers to Hono's ability to adapt to any runtime, while mount implies that Hono can integrate with any framework. Along with middleware, these capabilities allow us to create a comprehensive ecosystem, as depicted below:
With these special features, Hono will not just be a web framework, it will be like a "Glue".
One of the greatest aspects of this concept is that the framework does not have to create individual adapters for various platforms such as Cloudflare Worker, Cloudflare Pages, Vercel, Deno, and Bun.
If your framework is based on the Web Standard API, there is no additional work required. Hono can mount it and enable your framework to run on any runtime.
Furthermore, we can use Hono's middleware for other frameworks. For example, to add Basic authentication to an application built with ittry-router, there's no need to implement it from scratch. Just add Hono's middleware.
This is the ecosystem we wanted creating.
Node.js adapter server v1.0.0 has been released
The first major release of the Node.js adapter server, "v1.0.0", is now available! This version uses only the native Web Standard APIs available in Node.js v18 or higher. The size has been significantly reduced and this means we are really following to Web Standard APIs.
You can start using it right away by installing it from npm.
Then, simply import the
servefunction and adapt it to your Hono application.Support for routing includes a hostname
The new
getPath()function now supports routing that includes a hostname.With
getPath(), you can also handle the host header value for routing.Support for AWS Lambda functions URLs
The AWS Lambda adapter now supports Lambda functions URLs.
Cookie Middleware
We're introducing a new Cookie Middleware.
And
c.req.cookie()andc.cookie()are deprecated and will be removed in the next major version, v4.hono/nextjstohono/vercelWe've created
hono/verceland deprecatedhono/nextjs.hono/nextjswill be removed in v4.Other updates
rewriteRequestPathoption for the serve-staticapp.routerNamehttp-status.tsThanks
Thank you to all our contributors!
All changes
===instead ofstartsWithandendsWithby @yusukebe in https://github.com/honojs/hono/pull/1053HTTPExceptionfrommod.tsby @yusukebe in https://github.com/honojs/hono/pull/1058runtime_testsby @yusukebe in https://github.com/honojs/hono/pull/1062rewriteRequestPathoption for Workers/Deno/Bun by @yusukebe in https://github.com/honojs/hono/pull/1065jsx-runtimebug by @yusukebe in https://github.com/honojs/hono/pull/1070c.header(key, undefined)by @yusukebe in https://github.com/honojs/hono/pull/1071c.req.cookie()/c.cookie()by @yusukebe in https://github.com/honojs/hono/pull/1066hono/vercel/ deprecatehono/nextjsby @yusukebe in https://github.com/honojs/hono/pull/1073ContextVarableMapby @yusukebe in https://github.com/honojs/hono/pull/1080hono/quickby @yusukebe in https://github.com/honojs/hono/pull/1074type.tsby @yusukebe in https://github.com/honojs/hono/pull/1082rewriteRequestPathoption by @yusukebe in https://github.com/honojs/hono/pull/1098onError()supports async by @yusukebe in https://github.com/honojs/hono/pull/1090/for genericsbasePathby @yusukebe in https://github.com/honojs/hono/pull/1083fire()correctly by @yusukebe in https://github.com/honojs/hono/pull/1106setup-bunby @yusukebe in https://github.com/honojs/hono/pull/1108app.routerName()by @yusukebe in https://github.com/honojs/hono/pull/1105app.mount()by @yusukebe in https://github.com/honojs/hono/pull/1104PatternRoutersupports a hostname, added tests by @yusukebe in https://github.com/honojs/hono/pull/1114New Contributors
Full Changelog: honojs/hono@v3.1.8...v3.2.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.