Releases: honojs/middleware
@hono/typia-validator@0.1.3
Patch Changes
- #1943
10435bb61fd3f0f2c957a1e13ed9dbe3c014c134Thanks @BarryThePenguin! - Widen peer dependency support to include v9, v10, v11, and v12
@hono/inertia@0.6.0
Minor Changes
-
#1934
35682a73136e7483bfd22e14659e9a307155f296Thanks @ashunar0! - feat(inertia): add infinite scroll withscroll()Adds a
scroll()helper that wraps a paginated page payload with the metadata
the Inertia client's<InfiniteScroll>adapter needs to keep loading more items
as the user scrolls:users: scroll({ data: await db.users.page(currentPage), currentPage, lastPage: 10, pageName: 'users_page', matchOn: 'id', })
The value travels as-is; the renderer emits
page.scrollProps[key] = { previousPage, nextPage, currentPage, pageName }on every response and opts the
prop into the merge protocol — defaulting toappend, switched toprepend
when the client sendsX-Inertia-Infinite-Scroll-Merge-Intent: prepend. The
optionalmatchOnis forwarded aspage.matchPropsOnfor client-side dedupe.
MirrorsInertia::scroll(...)in inertia-laravel 3.x.
@hono/inertia@0.5.0
Minor Changes
-
#1932
5318463bd4be3b6c7abb6f5c46a61bd1d5b36ca6Thanks @ashunar0! - feat(inertia): add merge props withmerge(),prepend(), anddeepMerge()Adds three helpers that mark a prop for client-side combination on the
next partial reload, instead of the default replace behavior:merge(data, { matchOn? })— appends array items / shallow-spreads object keys.prepend(data, { matchOn? })— same asmerge()but inserts at the start.deepMerge(data, { matchOn? })— recurses into nested arrays/objects (use for
wrapper-shaped paginated props like{ data: [...], meta: {...} }).
The value travels as-is; the renderer advertises which keys to combine via the
newpage.mergeProps/page.prependProps/page.deepMergePropsarrays and
emits dot-paths onpage.matchPropsOnfor the client's dedupe logic.import { deepMerge, inertia, merge, prepend } from '@hono/inertia' app.use(inertia()) app.get('/feed', (c) => c.render('Feed', { posts: merge(await db.posts.page(n), { matchOn: 'id' }), notifications: prepend(await fetchNotifications(), { matchOn: 'id' }), conversations: deepMerge( { data: await db.messages.page(n), meta: { nextCursor } }, { matchOn: 'data.id' } ), }) )
The merge metadata is emitted on every response (initial + partial) so the
client knows which keys to combine on the next partial reload. Full page visits
always replace props entirely.
@hono/session@0.2.1
Patch Changes
- #1929
5c31f325be19d2254569118f169fd7049190e640Thanks @orpheus6678! - Use ofenv()adapter to facilitate the retrieval ofAUTH_SECRETacross different runtimes as opposed to just cloudflare workers
@hono/ua-blocker@0.1.31
Patch Changes
- #1927
c70fca68112f5d6bcea182f860cc71a38a1ca698Thanks @github-actions! - chore(ua-blocker): syncrobots.jsonwith upstream
@hono/inertia@0.4.0
Minor Changes
-
#1911
c5758a6e4b3ca44c8c03a06effc2e6c7134e4d25Thanks @{! - feat(inertia): add deferred props withdefer()Adds a
defer(resolver, group?)helper that defers a prop until after the
initial render. On the initial response the resolver is skipped and the
prop key is advertised viapage.deferredProps[group]; the Inertia client
then issues one partial reload per group, at which point the resolver runs
and the value is sent down.import { defer, inertia } from '@hono/inertia' app.use(inertia()) app.get('/', (c) => c.render('Dashboard', { id: 1 }, // sent on initial response posts: defer(() => fetchPosts()), // fetched after mount stats: defer(() => fetchStats(), 'secondary'), }), )
Multiple deferred props that share a group are fetched together. The
default group is"default".
@hono/oidc-auth@1.8.3
Patch Changes
- #1916
d939c2d419b671cee283b589ebfff14eb01b1722Thanks @thegu5! - bump oauth4webapi dependency from 2.6.0 to 3.8.6
@hono/inertia@0.3.0
Minor Changes
- #1904
a1334f21e77cea7db953825d35f58c271aa7b9fbThanks @ashunar0! - add server-side support for Inertia.js partial reloads. Honors theX-Inertia-Partial-Component,X-Inertia-Partial-Data(only), andX-Inertia-Partial-Exceptheaders, and accepts function-valued props (() => T | Promise<T>) that are evaluated lazily — function props excluded from a partial reload are never invoked, so heavy data fetching can be skipped.
@hono/ua-blocker@0.1.30
Patch Changes
- #1901
295b080bde1bd00e66f5e66e8c403e94e1cfec7eThanks @github-actions! - chore(ua-blocker): syncrobots.jsonwith upstream
@hono/mcp@0.3.0
Minor Changes
- #1774
9575cbc4b8b32bb1605a465a414a9728f1a6ef9bThanks @bookernath! - relax Accept header validation to acceptapplication/json,text/event-stream, or*/*individually, improving compatibility with Gemini CLI, Java MCP SDK, Open WebUI, and curl. AddstrictAcceptHeaderoption for strict MCP spec compliance.