Skip to content

chore(deps): update dependency hono to v4.12.7#128

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/hono-4.x-lockfile
Open

chore(deps): update dependency hono to v4.12.7#128
renovate[bot] wants to merge 1 commit intomainfrom
renovate/hono-4.x-lockfile

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jan 13, 2026

This PR contains the following updates:

Package Change Age Confidence
hono (source) 4.11.34.12.7 age confidence

Release Notes

honojs/hono (hono)

v4.12.7

Compare Source

v4.12.6

Compare Source

v4.12.5

Compare Source

What's Changed

New Contributors

Full Changelog: honojs/hono@v4.12.4...v4.12.5

v4.12.4

Compare Source

Security fixes

This release includes fixes for the following security issues:

SSE Control Field Injection

Affects: streamSSE() in Streaming Helper. Fixes injection of unintended SSE fields by rejecting CR/LF characters in event, id, and retry. GHSA-p6xx-57qc-3wxr

Cookie Attribute Injection in setCookie()

Affects: setCookie() from hono/cookie. Fixes cookie attribute manipulation by rejecting ;, \r, and \n in domain and path options. GHSA-5pq2-9x2x-5p6w

Middleware Bypass in Serve Static

Affects: Serve Static middleware. Fixes inconsistent URL decoding that could allow protected static resources to be accessed without triggering route-based middleware. GHSA-q5qw-h33p-qvwr

Users who uses Strreaming Helper, Cookie utility, and Serve Static are strongly encouraged to upgrade to this version.


Other changes

New Contributors

Full Changelog: honojs/hono@v4.12.3...v4.12.4

v4.12.3

Compare Source

What's Changed

New Contributors

Full Changelog: honojs/hono@v4.12.2...v4.12.3

v4.12.2

Compare Source

Security fix

Fixed incorrect handling of X-Forwarded-For in the AWS Lambda adapter behind ALB that could allow IP-based access control bypass. The detail: GHSA-xh87-mx6m-69f3

Thanks @​EdamAme-x

What's Changed

Full Changelog: honojs/hono@v4.12.1...v4.12.2

v4.12.1

Compare Source

What's Changed

Full Changelog: honojs/hono@v4.12.0...v4.12.1

v4.12.0

Compare Source

Release Notes

Hono v4.12.0 is now available!

This release includes new features for the Hono client, middleware improvements, adapter enhancements, and significant performance improvements to the router and context.

$path for Hono Client

The Hono client now has a $path() method that returns the path string instead of a full URL. This is useful when you need just the path portion for routing or key-based operations:

const client = hc<typeof app>('http://localhost:8787')

// Get the path string
const path = client.api.posts.$path()
// => '/api/posts'

// With path parameters
const postPath = client.api.posts[':id'].$path({
  param: { id: '123' },
})
// => '/api/posts/123'

// With query parameters
const searchPath = client.api.posts.$path({
  query: { filter: 'test' },
})
// => '/api/posts?filter=test'

Unlike $url() which returns a URL object, $path() returns a plain path string, making it convenient for use with routers or as cache keys.

Thanks @​ShaMan123!

ApplyGlobalResponse Type Helper for RPC Client

The new ApplyGlobalResponse type helper allows you to add global error response types to all routes in the RPC client. This is useful for typing common error responses from app.onError() or global middlewares:

const app = new Hono()
  .get('/api/users', (c) => c.json({ users: ['alice', 'bob'] }, 200))
  .onError((err, c) => c.json({ error: err.message }, 500))

type AppWithErrors = ApplyGlobalResponse<
  typeof app,
  {
    401: { json: { error: string; message: string } }
    500: { json: { error: string; message: string } }
  }
>

const client = hc<AppWithErrors>('http://api.example.com')
// Now client knows about both success and error responses
const res = await client.api.users.$get()
// InferResponseType includes { users: string[] } | { error: string; message: string }

Thanks @​mohankumarelec!

SSG Redirect Plugin

A new redirectPlugin for SSG generates static HTML redirect pages for HTTP redirect responses (301, 302, 303, 307, 308):

import { toSSG } from 'hono/ssg'
import { defaultPlugin, redirectPlugin } from 'hono/ssg'

const app = new Hono()
app.get('/old', (c) => c.redirect('/new'))
app.get('/new', (c) => c.html('New Page'))

// redirectPlugin must be placed before defaultPlugin
await toSSG(app, fs, {
  plugins: [redirectPlugin(), defaultPlugin()],
})

The generated redirect pages include a <meta http-equiv="refresh"> tag, a canonical link, and a robots noindex meta tag.

Thanks @​3w36zj6!

onAuthSuccess Callback for Basic Auth

The Basic Auth middleware now supports an onAuthSuccess callback that is invoked after successful authentication. This allows you to set context variables or perform logging without re-parsing the Authorization header:

app.use(
  '/auth/*',
  basicAuth({
    username: 'hono',
    password: 'ahotproject',
    onAuthSuccess: (c, username) => {
      c.set('user', { name: username, role: 'admin' })
      console.log(`User ${username} authenticated`)
    },
  })
)

The callback also works with async functions and the verifyUser mode.

Thanks @​AprilNEA!

getConnInfo for AWS Lambda, Cloudflare Pages, and Netlify

getConnInfo() is now available for three additional adapters:

// AWS Lambda (supports API Gateway v1, v2, and ALB)
import { handle, getConnInfo } from 'hono/aws-lambda'

// Cloudflare Pages
import { handle, getConnInfo } from 'hono/cloudflare-pages'

// Netlify
import { handle, getConnInfo } from 'hono/netlify'

app.get('/', (c) => {
  const info = getConnInfo(c)
  return c.text(`Your IP: ${info.remote.address}`)
})

Thanks @​rokasta12!

alwaysRedirect Option for Trailing Slash Middleware

The trailing slash middleware now supports an alwaysRedirect option. When enabled, the middleware redirects before executing handlers, which fixes the issue where trailing slash handling doesn't work with wildcard routes:

app.use(trimTrailingSlash({ alwaysRedirect: true }))

app.get('/my-path/*', async (c) => {
  return c.text('wildcard')
})

// /my-path/something/ will be redirected to /my-path/something
// before the wildcard handler is executed

Progressive Locale Code Truncation

The normalizeLanguage function in the language middleware now supports RFC 4647 Lookup-based progressive truncation. Locale codes like ja-JP will match ja when only the base language is in supportedLanguages:

app.use(
  '/*',
  languageDetector({
    supportedLanguages: ['en', 'ja'],
    fallbackLanguage: 'en',
    order: ['cookie', 'header'],
  })
)

// Accept-Language: ja-JP → matches 'ja'
// Accept-Language: ko-KR → falls back to 'en'

Thanks @​sorafujitani!

exports Field for ExecutionContext

The ExecutionContext type now includes an exports property for Cloudflare Workers. You can use module augmentation to type it with Wrangler's generated types:

import 'hono'

declare module 'hono' {
  interface ExecutionContext {
    readonly exports: Cloudflare.Exports
  }
}

Thanks @​toreis-up!

Performance Improvements

TrieRouter 1.5x ~ 2.0x Faster

The TrieRouter has been significantly optimized with reduced spread syntax usage, O(1) hasChildren checks, lazy regular expression generation, and removal of redundant processes:

Route Node.js Deno Bun
short static GET /user 1.70x 1.40x 1.34x
dynamic GET /user/lookup/username/hey 1.38x 1.69x 1.51x
wildcard GET /static/index.html 1.51x 1.72x 1.43x
all together 1.58x 1.60x 1.82x

Thanks @​EdamAme-x!

Fast Path for c.json()

c.json() now has the same fast path optimization as c.text(). When no custom status, headers, or finalized state exists, the Response is created directly without allocating a Headers object:

// This common pattern is now faster
return c.json({ message: 'Hello' })

Benchmark results:

Metric Before After Change
Reqs/sec 92,268 95,244 +3.2%
Latency 5.42ms 5.25ms -3.1%
Throughput 17.24MB/s 19.07MB/s +10.6%

Thanks @​mgcrea!

New features

  • feat(client): Add ApplyGlobalResponse type helper for RPC Client #​4556
  • feat(ssg): add redirect plugin #​4599
  • feat(client): $path #​4636
  • feat(basic-auth): add context key and callback options #​4645
  • feat(adapter): add getConnInfo for AWS Lambda, Cloudflare Pages, and Netlify #​4649
  • feat(trailing-slash): add alwaysRedirect option to support wildcard routes #​4658
  • feat(language): add progressive locale code truncation to normalizeLanguage #​4717
  • feat(types): Add exports field to ExecutionContext #​4719

Performance

  • perf(context): add fast path to c.json() matching c.text() optimization #​4707
  • perf(trie-router): improve performance (1.5x ~ 2.0x) #​4724
  • perf(context): use createResponseInstance for new Response #​4733

All changes

New Contributors

Full Changelog: honojs/hono@v4.11.10...v4.12.0

v4.11.10

Compare Source

What's Changed

  • fix: fixed to be more properly timing safe (Merge commit from fork 91def7c)

Full Changelog: honojs/hono@v4.11.9...v4.11.10

v4.11.9

Compare Source

v4.11.8

Compare Source

What's Changed

New Contributors

Full Changelog: honojs/hono@v4.11.7...v4.11.8

v4.11.7

Compare Source

Security Release

This release includes security fixes for multiple vulnerabilities in Hono and related middleware. We recommend upgrading if you are using any of the affected components.

Components
IP Restriction Middleware

Fixed an IPv4 address validation bypass that could allow IP-based access control to be bypassed under certain configurations.

Cache Middleware

Fixed an issue where responses marked with Cache-Control: private or no-store could be cached, potentially leading to information disclosure on some runtimes.

Serve Static Middleware (Cloudflare Workers adapter)

Fixed an issue that could allow unintended access to internal asset keys when serving static files with user-controlled paths.

hono/jsx ErrorBoundary

Fixed a reflected Cross-Site Scripting (XSS) issue in the ErrorBoundary component that could occur when untrusted strings were rendered without proper escaping.

Recommendation

Users are encouraged to upgrade to this release, especially if they:

  • Use IP Restriction Middleware
  • Use Cache Middleware on Deno, Bun, or Node.js
  • Use Serve Static Middleware with user-controlled paths on Cloudflare Workers
  • Render untrusted data inside ErrorBoundary components
Security Advisories & CVEs

Full Changelog: honojs/hono@v4.11.6...v4.11.7

v4.11.6

Compare Source

What's Changed
New Contributors

Full Changelog: honojs/hono@v4.11.5...v4.11.6

v4.11.5

Compare Source

What's Changed

New Contributors

Full Changelog: honojs/hono@v4.11.4...v4.11.5

v4.11.4

Compare Source

Security

Fixed a JWT algorithm confusion issue in the JWT and JWK/JWKS middleware.

Both middlewares now require an explicit algorithm configuration to prevent the verification algorithm from being influenced by untrusted JWT header values.

If you are using the JWT or JWK/JWKS middleware, please update to the latest version as soon as possible.

JWT middleware
import { jwt } from 'hono/jwt'

app.use(
  '/auth/*',
  jwt({
    secret: 'it-is-very-secret',
    alg: 'HS256', // required
  })
)
JWK/JWKS middleware
import { jwk } from 'hono/jwk'

app.use(
  '/auth/*',
  jwk({
    jwks_uri: 'https://example.com/.well-known/jwks.json',
    alg: ['RS256'], // required (asymmetric algorithms only)
  })
)

For more details, see the Security Advisory.

What's Changed

New Contributors

Full Changelog: honojs/hono@v4.11.3...v4.11.4


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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added automated 自動作成されたもの chore 何かの設定ファイルなどの変更関連など、雑多な変更につけるタグ labels Jan 13, 2026
@renovate renovate bot requested a review from sh1ma January 13, 2026 02:30
@github-actions
Copy link

🎨 今日のランダム画像

Random Image


📸 Photo by @iro_iro_iroo
🔗 元の投稿を見る


PR作成お疲れ様です!

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

Preview Deploy

Status: ✅ デプロイ完了

Preview URL: https://pr-128-blog.sh1ma.workers.dev


このプレビューはPRがクローズされるまで利用可能です。

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

Visual Regression Test Results

Status: ❌ ビジュアルの差分を検出

差分画像

レポートを確認


これらの変更が意図的なものである場合、PRテンプレートの「スナップショットを更新する」にチェックを入れて再実行してください。

@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from 13ce358 to 1e3722a Compare January 19, 2026 18:05
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.11.4 chore(deps): update dependency hono to v4.11.5 Jan 22, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from 1e3722a to cf85e05 Compare January 22, 2026 01:43
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.11.5 chore(deps): update dependency hono to v4.11.6 Jan 26, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from cf85e05 to 867bf7f Compare January 26, 2026 17:54
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.11.6 chore(deps): update dependency hono to v4.11.7 Jan 27, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from 867bf7f to 1557692 Compare January 27, 2026 10:11
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.11.7 chore(deps): update dependency hono to v4.11.8 Feb 6, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch 2 times, most recently from 8a4b560 to 42b54e0 Compare February 8, 2026 18:02
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.11.8 chore(deps): update dependency hono to v4.11.9 Feb 8, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from 42b54e0 to bd55e4f Compare February 18, 2026 15:59
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.11.9 chore(deps): update dependency hono to v4.11.10 Feb 18, 2026
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.11.10 chore(deps): update dependency hono to v4.12.0 Feb 19, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch 2 times, most recently from b47ccb7 to 2c539c9 Compare February 21, 2026 13:01
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.12.0 chore(deps): update dependency hono to v4.12.1 Feb 21, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from 2c539c9 to f93b8fe Compare February 23, 2026 08:38
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.12.1 chore(deps): update dependency hono to v4.12.2 Feb 23, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from f93b8fe to 77c88b0 Compare February 26, 2026 14:48
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.12.2 chore(deps): update dependency hono to v4.12.3 Feb 26, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from 77c88b0 to cacc12c Compare March 3, 2026 14:01
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.12.3 chore(deps): update dependency hono to v4.12.4 Mar 3, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from cacc12c to 6d7d9e6 Compare March 4, 2026 13:37
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.12.4 chore(deps): update dependency hono to v4.12.5 Mar 4, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from 6d7d9e6 to 390097f Compare March 10, 2026 06:00
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.12.5 chore(deps): update dependency hono to v4.12.6 Mar 10, 2026
@renovate renovate bot force-pushed the renovate/hono-4.x-lockfile branch from 390097f to 5045408 Compare March 10, 2026 13:56
@renovate renovate bot changed the title chore(deps): update dependency hono to v4.12.6 chore(deps): update dependency hono to v4.12.7 Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated 自動作成されたもの chore 何かの設定ファイルなどの変更関連など、雑多な変更につけるタグ

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants