Releases: colinhacks/zod
Releases · colinhacks/zod
3.0.0-alpha.7
- Refactored parsing logic into individual subclass methods
- Eliminated ZodTypes to enable custom ZodType subclasses
- Removed ZodIntersection
- Added ZodEffects as a container for refinement and transform logic
- Added
or
method toZodType
- Added
format
method toZodError
- Added
unwrap
method toZodOptional
andZodNullable
- Added new
default
method and moved default functionality into ZodOptional - Implemented
z.setErrorMap
- Exporting
z
variable fromindex.ts
to enableimport { z } from 'zod';
v3-snapshot-2021-01-21
changed min ts version
1.11
.safeParse
on all schemas — this lets you validate data in a more functional way, similar toio-ts
: https://github.com/vriad/zod#safe-parse.regex
method on string schemas: https://github.com/vriad/zod#strings.primitives()
and.nonprimitives()
methods on object schemas — quickly pick or omit primitive fields from objects, useful for validating API inputs: https://github.com/vriad/zod#primitives-and-nonprimitivesz.nativeEnum()
— create a Zod schema from an existing TypeScriptenum
: https://github.com/vriad/zod#native-enums
1.10.2
1.10
Dropping support for TypeScript 3.2 due to errors with deepPartial
v1.9
- Added z.instanceof() and z.custom()
- Implemented ZodSchema.array() method.
v1.8
- Major overhaul to error handling system, including the introduction of custom error maps.
- Introduced z.void()
- Wrote new error handling guide.
1.7
Added several built-in validators to string, number, and array schemas. Calls to .refine now return new instance.
v1.0
After working out some initial kinks (#20, #24), fixing some compatibility issues with previous versions of TypeScript (#25), and implementing some of the most glaring feature holes (#2, #5, #8, #17), Zod is ready for a proper v1 release 🚀
Thanks to everyone for submitting issues and PRs! Keep em coming.
v1.2.0
Major improvement to object schemas.
Implemented .pick
, .omit
, and .augment
. Documented in README.