Repository navigation
v0.2.0-rc.1
Pre-release
Pre-release
The packages now work on zod's core (zod/v4/core) rather than its classic API, so APIs can be defined with zod/mini schemas as well as classic ones — and a bundle built from mini schemas no longer pulls in all of classic zod through tsapi's own import.
Breaking change
Validation errors are now zod core's $ZodRealError rather than classic ZodError, so err instanceof ZodError no longer matches them — an express error handler that turns those into a 400 will start answering 500. Check against $ZodError instead, which matches classic, core and mini errors alike:
import { $ZodError } from "zod/v4/core";
if (err instanceof $ZodError) {
// err.issues as before
}Everything else is unchanged
- Classic schemas keep working as they are: they are core schemas too.
- Route params merged into an endpoint's params keep the class they were written in, so a classic schema stays classic and a mini one stays mini (mixing them works, too).
- The peer range stays
zod@^4.0.0.
Full Changelog: v0.1.1...v0.2.0-rc.1