Skip to content

Latest commit

 

History

History
142 lines (84 loc) · 2.65 KB

CHANGELOG.md

File metadata and controls

142 lines (84 loc) · 2.65 KB

Changelog

3.0.0-beta.1

  • Moved default value logic into ZodDefault. Implemented .nullish() method.

3.0.0-alpha.33

  • Added .returnType and .parameters methods to ZodFunction

3.0.0-alpha.32

  • Added .required() method to ZodObject

3.0.0-alpha.30

  • Added Rollup for bundling ESM module
  • Added back ZodIntersection
  • Added .and() method to base class
  • Added z.strictCreate
  • Allowing optional default values on ZodOptional

March 17, 2021

  • 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 to ZodType
  • Added format method to ZodError
  • Added unwrap method to ZodOptional and ZodNullable
  • Added new default method and moved default functionality into ZodOptional
  • Implemented z.setErrorMap
  • Exporting z variable from index.ts to enable import { z } from 'zod';

Jan 25, 2021

  • New implementation of transformers
  • Removed type guards

zod@2

  • Added ZodTransformer
  • Async refinements
  • Introduced .safeParse option
  • Introduced .regex method on string schemas
  • Implemented .primitives() and .nonprimitives() on object schemas
  • Implemented z.nativeEnum() for creating schemas from TypeScript enums
  • Switched to new URL() constructor to check valid URLs
  • Dropping support for TypeScript 3.2
  • Added z.instanceof() and z.custom()
  • Implemented ZodSchema.array() method
  • Introduced z.void()
  • Major overhaul to error handling system, including the introduction of custom error maps
  • Wrote new error handling guide
  • Added several built-in validators to string, number, and array schemas
  • Calls to .refine now return new instance
  • Introduces ZodAny and ZodUnknown
  • Refinement types (.refine)
  • Parsing no longer returns deep clone
  • Promise schemas
  • .parse accepts unknown
  • bigint schemas
  • .partial and .deepPartial on object schemas
  • Added ZodDate
  • Added .pick, .omit, and .extend on object schemas
  • Added ZodRecord
  • Added .nonstrict
  • Added type assertions with .check
  • Support for empty tuples
  • Added type assertions
  • Added ZodLiteral
  • Added ZodEnum
  • Improved error reporting
  • Initial release