fix(deps): update dependency hono to v3.12.0 #679
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:
3.11.12
->3.12.0
Release Notes
honojs/hono (hono)
v3.12.0
Compare Source
Hono v3.12.0 is now available! Let's take a look at the new features.
CSRF Protection Middleware
This release introduces CSRF Protection Middleware. It is easy to use and can prevent CSRF attacks by simply writing like the following:
CSRF Protection Middleware compares the
Origin
header value with the request URL. This is the same method used by SvelteKit and is valid in many situations except when using older browsers.Thanks to @usualoma! And, the original idea for CSRF Protection was suggested by @htunnicliff. Thanks!
css Helper
We created a built-in CSS in JS(X). It's "hono/css".
The css helper can be used with JSX. You can write the CSS in a css template literal tag and specify the returned value as the
class
value and it will be applied to that element.If you use VS Code, you can use vscode-styled-components for Syntax highlighting and IntelliSense for css tagged literals.
By combining
keyframes
and JSX rendering, you can create a like button without JavaScript!Also, you can use a CSS-generating design tool such as Figma to create components even if you are not a CSS guru.
You can use other CSS in JS libraries in Hono, such as Panda CSS. However, hono/css can be used by simply importing the
hono
package, and Async components and Suspense are also supported.Thanks to @usualoma!
stream.onAbort()
c.stream()
is now deprecated and you should usestream()
in Streaming Helper. And,stream.abort()
has been added.Thanks to @sor4chi!
onNotFound
option for serveStaticCloudflare Workers, Deno, and Bun
serveStatic
now have anonNotFound
option. You can write a handle when a file is not found.Thanks to @Th1nkK1D!
colorize
option forshowRoutes()
The
colorize
option has been added to theshowRoutes
function inhono/dev
. If you set this value tofalse
, the output will not be colored, which can be used when you want to log output, etc.Other new features
getRouterName()
$url()
All Updates
c.stream*
to helper by @sor4chi in https://github.com/honojs/hono/pull/1846getRouterName()
by @yusukebe in https://github.com/honojs/hono/pull/1841onNotFound
handler in adapters'serveStatic
by @Th1nkK1D in https://github.com/honojs/hono/pull/1825colorize
option forshowRoutes()
by @yusukebe in https://github.com/honojs/hono/pull/1886param
option to$url()
by @yusukebe in https://github.com/honojs/hono/pull/1885New Contributors
Full Changelog: honojs/hono@v3.11.12...v3.12.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ 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.