This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
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.11.6
->^4.0.0
Release Notes
honojs/hono (hono)
v4.2.9
Compare Source
What's Changed
Full Changelog: honojs/hono@v4.2.8...v4.2.9
v4.2.8
Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.2.7...v4.2.8
v4.2.7
Compare Source
This release fixes "Restricted Directory Traversal in serveStatic with deno".
Full Changelog: honojs/hono@v4.2.6...v4.2.7
v4.2.6
Compare Source
What's Changed
$ws
when not used WebSockets by @nakasyou in https://github.com/honojs/hono/pull/2532New Contributors
Full Changelog: honojs/hono@v4.2.5...v4.2.6
v4.2.5
Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.2.4...v4.2.5
v4.2.4
Compare Source
What's Changed
typ
Field Optional to Enhance Compatibility by @naporin0624 in https://github.com/honojs/hono/pull/2488baseUrl
fortestClient
by @yusukebe in https://github.com/honojs/hono/pull/2496OutputTypeExcludeResponseType
whenInputType
is unknown by @nagasawaryoya in https://github.com/honojs/hono/pull/2500New Contributors
Full Changelog: honojs/hono@v4.2.3...v4.2.4
v4.2.3
Compare Source
What's Changed
package.json
correctly by @yusukebe in https://github.com/honojs/hono/pull/2483Full Changelog: honojs/hono@v4.2.2...v4.2.3
v4.2.2
Compare Source
What's Changed
null
correctly by @yusukebe in https://github.com/honojs/hono/pull/2469New Contributors
Full Changelog: honojs/hono@v4.2.1...v4.2.2
v4.2.1
Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.2.0...v4.2.1
v4.2.0
Compare Source
Hono v4.2.0 is now available! Let's take a look at the new features.
Added more algorithms for JWT
The number of algorithms that JWT util can handle has increased from only 3 to 13! This means that JWT util now implements many of the algorithms supported by JWT.
You can use these algorithms from the JWT middleware or JWT helpers. Thanks @Code-Hex!
Method Override Middleware
Method Override Middleware has been added. This middleware override the method of the real request with the specified method.
HTML
form
does not allow you to send a DELETE method request. Instead, by sending an input withname
as_method
and a value ofDELETE
, you can call the handler registered inapp.delete()
.Trailing Slash Middleware
Trailing Slash Middleware resolves the handling of Trailing Slashes in GET requests. You can use
appendTrailingSlash
andtrimTrailingSlash
functions.For example, it redirects a GET request to
/about/me
to/about/me/
.Thanks @rnmeow!
Other features
extensionMap
https://github.com/honojs/hono/pull/2382userId
hook https://github.com/honojs/hono/pull/2389payload
https://github.com/honojs/hono/pull/2424options.origin
function https://github.com/honojs/hono/pull/2436vary
header option https://github.com/honojs/hono/pull/2426cause
option https://github.com/honojs/hono/pull/2224NO_COLOR
https://github.com/honojs/hono/pull/2228JwtTokenInvalid
object ascause
when JWT is invalid https://github.com/honojs/hono/pull/2448verifyToken
option https://github.com/honojs/hono/pull/2449verifyUser
option https://github.com/honojs/hono/pull/2450All Updates
extentionMap
by @watany-dev in https://github.com/honojs/hono/pull/2382payload
by @nakasyou in https://github.com/honojs/hono/pull/2424vary
header in cache middleware by @naporin0624 in https://github.com/honojs/hono/pull/2426crypto
if not exist by @yusukebe in https://github.com/honojs/hono/pull/2445alg
option value by @yusukebe in https://github.com/honojs/hono/pull/2446;
by @yusukebe in https://github.com/honojs/hono/pull/2447JwtTokenInvalid
object ascause
when JWT is invalid by @yusukebe in https://github.com/honojs/hono/pull/2448verifyToken
option by @yusukebe in https://github.com/honojs/hono/pull/2449verifyUser
option by @yusukebe in https://github.com/honojs/hono/pull/2450New Contributors
Full Changelog: honojs/hono@v4.1.7...v4.2.0
v4.1.7
Compare Source
What's Changed
globalThis.caches
by @yusukebe in https://github.com/honojs/hono/pull/2444Full Changelog: honojs/hono@v4.1.6...v4.1.7
v4.1.6
Compare Source
What's Changed
caches
is not defined by @yusukebe in https://github.com/honojs/hono/pull/2443Full Changelog: honojs/hono@v4.1.5...v4.1.6
v4.1.5
Compare Source
What's Changed
Arrap.prototype.map
if it is not needed return value by @nakasyou in https://github.com/honojs/hono/pull/2419await
cached contents by @yusukebe in https://github.com/honojs/hono/pull/2430New Contributors
Full Changelog: honojs/hono@v4.1.4...v4.1.5
v4.1.4
Compare Source
What's Changed
Full Changelog: honojs/hono@v4.1.3...v4.1.4
v4.1.3
Compare Source
What's Changed
src/helper.ts
by @yusukebe in https://github.com/honojs/hono/pull/2385json
andform
validation by @yusukebe in https://github.com/honojs/hono/pull/2392Full Changelog: honojs/hono@v4.1.2...v4.1.3
v4.1.2
Compare Source
What's Changed
slice
+indexOf
forgetPath()
by @yusukebe in https://github.com/honojs/hono/pull/2376MergePath
merge blank paths correctly by @yusukebe in https://github.com/honojs/hono/pull/2365New Contributors
Full Changelog: honojs/hono@v4.1.1...v4.1.2
v4.1.1
Compare Source
What's Changed
ExecutionContext
fromhono
by @yusukebe in https://github.com/honojs/hono/pull/2346denoify
by @yusukebe in https://github.com/honojs/hono/pull/2362true
by @yusukebe in https://github.com/honojs/hono/pull/2363this.#headers
by @yusukebe in https://github.com/honojs/hono/pull/2364New Contributors
Full Changelog: honojs/hono@v4.1.0...v4.1.1
v4.1.0
Compare Source
Hono v4.1.0 is now available! Let's take a look at the new features.
WebSocket Helper
Now Hono supports WebSockets! With WebSocket helper, you can easily handle WebSockets in your application. Currently, Cloudflare Workers / Pages, Deno, and Bun adapters are available.
PRC mode is now also supported for WebSockets endpoints. The following is a demo.
Thanks @nakasyou!
Body Limit Middleware
Introducing Body Limit Middleware. This middleware can limit the file size of the request body.
Thanks @EdamAme-x and @usualoma!
ES2022
We made the
target
in thetsconfig.json
as ES2022 instead of ES2020. So, the generated JavaScript files are now ES2022. That made the file size smaller! The following is the result of the minify and build of "Hello World" with Wrangler.Performance has also been improved in some Node.js environments.
Other features
__Secure-
and__Host- prefix
https://github.com/honojs/hono/pull/2269cause
option https://github.com/honojs/hono/pull/2224NO_COLOR
https://github.com/honojs/hono/pull/2228All Updates
NO_COLOR
by @ryuapp in https://github.com/honojs/hono/pull/2228@hono/node-server
by @yusukebe in https://github.com/honojs/hono/pull/2323bodyLimit
for Deno by @yusukebe in https://github.com/honojs/hono/pull/2324New Contributors
Full Changelog: honojs/hono@v4.0.10...v4.1.0
v4.0.10
Compare Source
What's Changed
Full Changelog: honojs/hono@v4.0.9...v4.0.10
v4.0.9
Compare Source
What's Changed
{}
instead of Partial by @yusukebe in https://github.com/honojs/hono/pull/2305Full Changelog: honojs/hono@v4.0.8...v4.0.9
v4.0.8
Compare Source
What's Changed
app: Hono<any, any, any>
fortoSSG
by @yusukebe in https://github.com/honojs/hono/pull/2272New Contributors
Full Changelog: honojs/hono@v4.0.7...v4.0.8
v4.0.7
Compare Source
What's Changed
MergeSchemaPath
supports regexp path params by @yusukebe in https://github.com/honojs/hono/pull/2271Full Changelog: honojs/hono@v4.0.6...v4.0.7
v4.0.6
Compare Source
What's Changed
Full Changelog: honojs/hono@v4.0.5...v4.0.6
v4.0.5
Compare Source
What's Changed
Full Changelog: honojs/hono@v4.0.4...v4.0.5
v4.0.4
Compare Source
What's Changed
--frozen-lockfile
by @ryuapp in https://github.com/honojs/hono/pull/2229@edge
forcompute
by @yusukebe in https://github.com/honojs/hono/pull/2235Full Changelog: honojs/hono@v4.0.3...v4.0.4
v4.0.3
Compare Source
What's Changed
Full Changelog: honojs/hono@v4.0.2...v4.0.3
v4.0.2
Compare Source
This is a patch release. But, it includes a minor feature.
SSG helper now generates HTML files only if they are handling GET or ALL methods.
What's Changed
createHandler
Response Types (handler x1) by @nakasyou in https://github.com/honojs/hono/pull/2192c.env
variables to disable/enable SSG by @usualoma in https://github.com/honojs/hono/pull/2179New Contributors
Full Changelog: honojs/hono@v4.0.1...v4.0.2
v4.0.1
Compare Source
What's Changed
Full Changelog: honojs/hono@v4.0.0...v4.0.1
v4.0.0
Compare Source
Hono v4.0.0 is out! This major update includes some breaking changes and the addition of three major features.
So Hono is going to full-stack. Let's take a look at the three features.
1. Static Site Generation
We introduce SSG Helper. With it you can generate static pages of your Hono applications.
To use this, create a separate file
build.ts
from the application and call thetoSSG()
function in it.There are adapters for Bun and Deno, so you can write shorter for Bun, for example.
And, just run it.
Then HTML is generated.
$ ls static about.html index.html
You can easily deploy this page to Cloudflare Pages, etc.
$ wrangler pages deploy static
With Vite
We have created a plugin
@hono/vite-ssg
for Vite. By using this, you will be able to develop and build a static sites with just thevite
command.The configuration is the following:
If you want to develope, just run the command:
If you want to build, just run the command:
In combination with the deployment mentioned above to Cloudflare Pages, you can develop, SSG build, and deploy non-stop. And each of them is extremely fast (the video is 2x faster).
2. Client Components
hono/jsx
was originally designed to run server-side as an alternative to template engines such as Mustache. Server-side JSX is an interesting experiment, creating a new stack to combine with HTMX and Alpine.js. But that's not all.Now,
hono/jsx
runs on the client as well. We call ithono/jsx/dom
or Client Components.The exact same code as React runs with Hono's JSX.
The Hooks listed below are also implemented and you can create Client Components just like in React.
startViewTransition
familyIn addition, the original APIs,
startViewTransition
family make the View Transition API easy to use.You can easily create the animation.
Ultra-small
The
hono/jsx/dom
is fast and ultra-small. It has a smaller JSX runtime dedicated to the DOM in addition to the common server and client ones. Just specifyhono/jsx/dom
instead ofhono/jsx
intsconfig.json
.The above counter example is 2.8KB with Brotli compression.
In comparison, React is 47.3 KB for the same thing.
3. File-based Routing
Last is File-based Routing. This is not included in the hono package, but is provided in a separate package.
It is named HonoX.
HonoX
HonoX has the following features.
You can try it now. One of create-hono's starter templates named "x-base" uses HonoX.
For detailed usage, please see the following HonoX repository.
https://github.com/honojs/honox
The core is still tiny
The addition of this feature has no impact on the core. "Hello World" in hono/tiny is still small, only 12KB minified.
Other new features
'*'
forapp.use()
- https://github.com/honojs/hono/pull/1753app.on
supports multiple paths - https://github.com/honojs/hono/pull/1923c.json()
- https://github.com/honojs/hono/pull/2021mimes
option for serve-static - https://github.com/honojs/hono/pull/2094Breaking Changes
There are several breaking changes. Please see the Migration Guide below.
https://github.com/honojs/hono/blob/main/docs/MIGRATION.md
Thanks
Thanks to all contributors. Great job on all the hard work!
All Updates
app.on
supports multiple paths by @yusukebe in https://github.com/honojs/hono/pull/1923import
by @yusukebe in https://github.com/honojs/hono/pull/1969node:path
by @nakasyou in https://github.com/honojs/hono/pull/1965deprecated
fromFactory
andcreateHandlers
by @yusukebe in https://github.com/honojs/hono/pull/1979manifest
required by @yusukebe in https://github.com/honojs/hono/pull/1984.tsx
by @yusukebe in https://github.com/honojs/hono/pull/1994c.get()
inference by @yusukebe in https://github.com/honojs/hono/pull/1995ssgParams
middleware by @nakasyou in https://github.com/honojs/hono/pull/1960isDynamicRoute
andssgParams
matter by @yusukebe in https://github.com/honojs/hono/pull/2006useTransition()
handling more simple by @usualoma in https://github.com/honojs/hono/pull/2003test:deno
by @yusukebe in https://github.com/honojs/hono/pull/2014deno.lock
by @yusukebe in https://github.com/honojs/hono/pull/2015return c.json()
by @yusukebe in https://github.com/honojs/hono/pull/2021Configuration
📅 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.