[Snyk] Upgrade hono from 3.12.0 to 4.4.0 #1
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 was automatically created by Snyk using the credentials of a real user.
![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)
Snyk has created this PR to upgrade hono from 3.12.0 to 4.4.0.
ℹ️ 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 62 versions ahead of your current version.
The recommended version was released on 24 days ago.
Issues fixed by the recommended upgrade:
SNYK-JS-BRACES-6838727
SNYK-JS-WS-7266574
SNYK-JS-HONO-6672874
SNYK-JS-UNDICI-6564963
SNYK-JS-UNDICI-6564964
Release notes
Package name: hono
Hono v4.4.0 is now available! Let's take a look at the new features.
Support JSR
Now, Hono is available on JSR - a new JavaScript/TypeScript registry! You can install the Hono package from JSR right now. If you want to run your Hono app on Deno, you can install it with the following command:
Then, use it in your code!
import { Hono } from '@ hono/hono'
const app = new Hono()
app.get('/', (c) => c.text('Hello JSR!'))
export default app
And run it:
If you edit the
deno.json
and set the paths appropriately, the exact same code that you are familiar with will work in Deno, Cloudflare Workers, and Bun.deno.json
:Area.mp4
Area.mp4
JSR is not exclusive to Deno. You can use it with npm and Bun.
npx jsr add @ hono/hono
# bun
bunx jsr add @ hono/hono
And, removing "slow types" has improved the performance of TypeScript type inference.
With the introduction of JSR, the previous package publishing from
deno.land/x
will be obsolete.Introduce ConnInfo Helper
The ConnInfo Helper is a helper helps you to get the connection information. For example, you can get the client's remote address easily.
import { getConnInfo } from 'hono/deno' // For Deno
const app = new Hono()
app.get('/', (c) => {
const info = getConnInfo(c) // info is
ConnInfo
return c.text(
Your remote address is <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">info</span><span class="pl-kos">.</span><span class="pl-c1">remote</span><span class="pl-kos">.</span><span class="pl-c1">address</span><span class="pl-kos">}</span></span>
)})
export default app
Thank you for creating the feature, @ nakasyou!
Introduce Timeout Middleware
The Timeout Middleware is a middleware enables you to easily manage request timeouts in your application.
Here is a simple example:
import { timeout } from 'hono/timeout'
const app = new Hono()
// Applying a 5-second timeout
app.use('/api', timeout(5000))
// Handling a route
app.get('/api/data', async (c) => {
// Your route handler logic
return c.json({ data: 'Your data here' })
})
Thank you for creating the feature, @ watany-dev!
Improving JSDoc
We are now trying to improve the JSDocs. In the PR, we've added the JSDocs for all middleware. Thank you, @ goisaki!
Other features
getPath
#2714parseBody
#2675parseBody
#2771All Updates
parseBody
by @ fzn0x in #2675@ cloudflare/workers-types
by @ yusukebe in #2773c.req.param()
by @ usualoma in #2780on
condition forpublish-to-jsr
by @ yusukebe in #2786index.ts
by @ yusukebe in #2793jsr.json
by @ yusukebe in #2803v4.4.0
by @ yusukebe in #2769New Contributors
Full Changelog: v4.3.9...v4.4.0
This is a pre-release.
What's Changed
New Contributors
Full Changelog: v4.3.10...v4.3.11
What's Changed
RETAINED_304_HEADERS
by @ yusukebe in #2763Full Changelog: v4.3.9...v4.3.10
What's Changed
CreateHandlersInterface
by @ yusukebe in #2752Full Changelog: v4.3.8...v4.3.9
What's Changed
v20.13.1
by @ yusukebe in #2682any
by @ fzn0x in #2684Partial
for the options by @ yusukebe in #2712Partial
for the options by @ yusukebe in #2713ResponseInit
toc.body
by @ codeflows in #2690New Contributors
Full Changelog: v4.3.7...v4.3.8
What's Changed
New Contributors
Full Changelog: v4.3.6...v4.3.7
What's Changed
File
s by @ yusukebe in #2665New Contributors
Full Changelog: v4.3.5...v4.3.6
What's Changed
any
by @ yusukebe in #2658fetch
signature for better compatibility withdeno serve
by @ usualoma in #2661Full Changelog: v4.3.4...v4.3.5
What's Changed
New Contributors
Full Changelog: v4.3.3...v4.3.4
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: