fix(deps): update dependency hono to ^4.3.0 #1180
Merged
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:
^4.2.9
->^4.3.0
Release Notes
honojs/hono (hono)
v4.3.0
Compare Source
Hono v4.3.0 is now available! Let's take a look at the new features.
Improve the RPC-mode
Thanks to @kosei28, @nakasyou, and @NamesMT, the RPC mode has been improved!
c.text()
is typedThe response of
c.text()
was just aResponse
object, not typed.With this release, it will be a
TypedResponse
and you can get the type within the client created byhc
.Support all JSON primitives
We added the tests for the responses of
c.json()
to have the correct types and support inferring all primitives. The all tests below are passed!Status code type
If you explicitly specify the status code, such as
200
or404
, inc.json()
. It will be added as a type for passing to the client.You can get the data by the status code.
Improve compatibility with React
The compatibility of
hono/jsx/dom
has been improved. Now, these React libraries work withhono/jsx/dom
!The below demo is working with
hono/jsx/dom
, not React.If you want to use React libraries with
hono/jsx/dom
, set-uptsconfig.json
andvite.config.ts
like the followings:tsconfig.json
:vite.config.ts
:Thanks @usualoma!
createApp()
in Factory HelpercreateApp()
method is added to Factory Helper. If you use this method withcreateFactory()
, you can avoid redundancy in the definition of theEnv
type.If your application is like this, you have to set the
Env
in two places:By using
createFactory()
andcreateApp()
, you can set the Env only in one place.Deprecate
serveStatic
for Cloudflare WorkersserveStatic
exported byhono/cloudflare-workers
has been deprecated. If you create an application which serves static asset files, use Cloudflare Pages instead.Other features
headerName
option https://github.com/honojs/hono/pull/2514crossOrigin
in TimingOptions to be a function https://github.com/honojs/hono/pull/2359init
option https://github.com/honojs/hono/pull/2592All Updates
headerName
option by @eliasbrange in https://github.com/honojs/hono/pull/2514serveStatic
by @yusukebe in https://github.com/honojs/hono/pull/2583ToSchema
&WebSocket Helper
types by @NamesMT in https://github.com/honojs/hono/pull/2588createApp()
by @yusukebe in https://github.com/honojs/hono/pull/2573init
option by @NamesMT in https://github.com/honojs/hono/pull/2592New Contributors
Full Changelog: honojs/hono@v4.2.9...v4.3.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.