npm / @hono/zod-validator
@hono/zod-validator
What changed in @hono/zod-validator 0.7 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
2 breaking1 performance1 behavior and defaults4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@hono/zod-validator 51 changes
Breaking changes 1
c.req.json() now returns Promise<unknown> instead of Promise<any>; pass a type explicitly or use c.req.valid() with a validator.
@hono/zod-validator 0.92 changes
Breaking changes 1
Using this release requires hono >=4.11.2.
Performance 1
Case-insensitive header schema metadata is cached when validator middleware is created.
@hono/zod-validator 0.83 changes
Behavior and default changes 1
The no-hook overload exposes the default typed 400 failure response, so it propagates to the RPC schema and appears as a typed 400 branch in hc<typeof app>.
Fixes and other changes 2
The inferred middleware response is intersected with Response so zValidator middleware remains assignable to a plain MiddlewareHandler, avoiding a TS2322 regression.
The no-hook overload accepts undefined as the hook parameter alongside options.validationFunction, enabling that call to match the typed-failure path.
@hono/zod-validator 0.72 changes
Fixes and other changes 2
Query input now supports union and optional types.
The hook's return value is now reflected in zValidator's return value.