[Snyk] Upgrade hono from 4.1.3 to 4.6.8 - #43
Open
cnrkuo wants to merge 1 commit into
Open
Conversation
Snyk has created this PR to upgrade hono from 4.1.3 to 4.6.8. See this package in npm: hono See this project in Snyk: https://app.snyk.io/org/kuohuanhuan/project/2ca4f692-ce62-4501-b31a-72f6421684ed?utm_source=github&utm_medium=referral&page=upgrade-pr
|
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.



Snyk has created this PR to upgrade hono from 4.1.3 to 4.6.8.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 65 versions ahead of your current version.
The recommended version was released on a month ago.
Issues fixed by the recommended upgrade:
SNYK-JS-HONO-6672874
SNYK-JS-HONO-8220272
SNYK-JS-HONO-7814167
Release notes
Package name: hono
What's Changed
--hotby @ nakasyou in #3576New Contributors
Full Changelog: v4.6.7...v4.6.8
What's Changed
requestContextby @ yusukebe in #3549New Contributors
Full Changelog: v4.6.6...v4.6.7
What's Changed
NotFoundwarning on Deno by @ pablo-abc in #3542New Contributors
Full Changelog: v4.6.5...v4.6.6
Security fix for CSRF Protection Middleware
This release includes a security fix for CSRF Protection Middleware. If you are using CSRF Protection Middleware, please upgrade this
honopackage immediately.Before this release, a request without a
Content-Typeheader can bypass the protection. This fix does not allow it. See: GHSA-2234-fmw7-43wrWhat's Changed
v2by @ yusukebe in #3506Access-Control-Allow-Originif there is no matching origin by @ uki00a in #3510New Contributors
Full Changelog: v4.6.4...v4.6.5
What's Changed
crypto-jsfrom dev dependencies by @ yusukebe in #3447createMiddlewareby @ yusukebe in #3498globalThisby @ sapphi-red in #3500overridetotoStringToBufferin classes extendingJSXNodeby @ yusukebe in #3505New Contributors
Full Changelog: v4.6.3...v4.6.4
This release has many new features, but each feature is small, so we've released it as a patch release.
What's Changed
runtime_teststoruntime-testsby @ yusukebe in #3419everymiddleware work with short-circuiting middlewares by @ paolostyle in #3441renderToStringby @ usualoma in #3432New Contributors
Full Changelog: v4.6.2...v4.6.3
What's Changed
Full Changelog: v4.6.1...v4.6.2
What's Changed
New Contributors
Full Changelog: v4.6.0...v4.6.1
Hono v4.6.0 is now available!
One of the highlights of this release is the Context Storage Middleware. Let's introduce it.
Context Storage Middleware
Many users may have been waiting for this feature. The Context Storage Middleware uses
AsyncLocalStorageto allow handling of the current Context object even outside of handlers.For example, let’s define a Hono app with a variable
message: string.Variables: {
message: string
}
}
const app = new Hono<Env>()
To enable Context Storage Middleware, register
contextStorage()as middleware at the top and set themessagevalue.//...
app.use(contextStorage())
app.use(async (c, next) => {
c.set('message', 'Hello!')
await next()
})
getContext()returns the current Context object, allowing you to get the value of themessagevariable outside the handler.app.get('/', (c) => {
return c.text(getMessage())
})
// Access the variable outside the handler.
const getMessage = () => {
return getContext<Env>().var.message
}
In the case of Cloudflare Workers, you can also access the
Bindingsoutside the handler by using this middleware.Bindings: {
KV: KVNamespace
}
}
const app = new Hono<Env>()
app.use(contextStorage())
const setKV = (value: string) => {
return getContext<Env>().env.KV.put('key', value)
}
Thanks @ marceloverdijk !
New features
c.env.eventContextin handleMiddleware #3332WSContext#3337Content-Encodingwhenstreamis true #3355precompressedoption #3366Promise<string>or (async)JSX.ElementinstreamSSE#3344onFoundoption #3396Other changes
New Contributors
Full Changelog: v4.5.11...v4.6.0
What's Changed