Skip to content

v14.0.0

Choose a tag to compare

@maxholman maxholman released this 02 Sep 07:08
· 128 commits to master since this release

Breaking

  • PublicValibotHonoError is renamed PublicValidationError. It is built from Standard Schema issues rather than valibot ones, so it works with any spec-compliant validator.

  • json() and send() now return the parsed response when a command carries a static responseSchema, instead of the raw body. A schema that transforms therefore changes what callers receive — id: "123" becomes a bigint if the schema says so. Commands without a responseSchema are unaffected and pass the body through untouched.

Features

  • Validate responses against a command's Standard Schema

Schema presence on the Command is the sole trigger, so consumers importing lean commands never pull in a validator and pay no bundle cost. On a mismatch the client throws ResponseValidationError carrying the command, the url, and the issues via PublicValidationError.fromIssues, so failures name the offending fields.

The schema lookup shipped in an earlier release but nothing ever called it: transforms silently never applied and invalid payloads passed through. That is what this fixes.

Housekeeping

  • .editorconfig (2-space) contradicted .oxfmtrc.json (useTabs), so indentation drifted with every save. .editorconfig is gone, oxfmt is the only source of truth, and the tree is reformatted in a single commit listed in .git-blame-ignore-revs.
  • CI now runs on pushes to master and canary, not just pull requests, and gates on formatting and lint alongside the tests.

Full Changelog: v13.1.0...v14.0.0