unstale

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

@unstale/cli on npm

@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.

    5.0.0upgrade guide

@hono/zod-validator 0.92 changes

Breaking changes 1

Performance 1

  • Case-insensitive header schema metadata is cached when validator middleware is created.

    0.9.1release notes

@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>.

    0.8.0release notes

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.

    0.8.0release notes

  • The no-hook overload accepts undefined as the hook parameter alongside options.validationFunction, enabling that call to match the typed-failure path.

    0.8.0release notes

@hono/zod-validator 0.72 changes

Fixes and other changes 2

  • Query input now supports union and optional types.

    0.7.6release notes

  • The hook's return value is now reflected in zValidator's return value.

    0.7.5release notes