Comparing version 3.21.0 to 3.21.1
@@ -41,3 +41,3 @@ "use strict"; | ||
(0, errors_1.getErrorMap)(), | ||
en_1.default, // then global default map | ||
en_1.default, | ||
].filter((x) => !!x), | ||
@@ -44,0 +44,0 @@ }); |
@@ -14,6 +14,4 @@ export declare namespace util { | ||
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined; | ||
export type identity<T> = T; | ||
export type flatten<T> = identity<{ | ||
[k in keyof T]: T[k]; | ||
}>; | ||
export type identity<T> = objectUtil.identity<T>; | ||
export type flatten<T> = objectUtil.flatten<T>; | ||
export type noUndefined<T> = T extends undefined ? never : T; | ||
@@ -25,2 +23,27 @@ export const isInteger: NumberConstructor["isInteger"]; | ||
} | ||
export declare namespace objectUtil { | ||
export type MergeShapes<U, V> = { | ||
[k in Exclude<keyof U, keyof V>]: U[k]; | ||
} & V; | ||
type optionalKeys<T extends object> = { | ||
[k in keyof T]: undefined extends T[k] ? k : never; | ||
}[keyof T]; | ||
type requiredKeys<T extends object> = { | ||
[k in keyof T]: undefined extends T[k] ? never : k; | ||
}[keyof T]; | ||
export type addQuestionMarks<T extends object> = Partial<Pick<T, optionalKeys<T>>> & Pick<T, requiredKeys<T>>; | ||
export type identity<T> = T; | ||
export type flatten<T> = identity<{ | ||
[k in keyof T]: T[k]; | ||
}>; | ||
export type noNeverKeys<T> = { | ||
[k in keyof T]: [T[k]] extends [never] ? never : k; | ||
}[keyof T]; | ||
export type noNever<T> = identity<{ | ||
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never; | ||
}>; | ||
export const mergeShapes: <U, T>(first: U, second: T) => T & U; | ||
export type extendShape<A, B> = flatten<Omit<A, keyof B> & B>; | ||
export {}; | ||
} | ||
export declare const ZodParsedType: { | ||
@@ -27,0 +50,0 @@ function: "function"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getParsedType = exports.ZodParsedType = exports.util = void 0; | ||
exports.getParsedType = exports.ZodParsedType = exports.objectUtil = exports.util = void 0; | ||
var util; | ||
@@ -33,4 +33,4 @@ (function (util) { | ||
}; | ||
util.objectKeys = typeof Object.keys === "function" // eslint-disable-line ban/ban | ||
? (obj) => Object.keys(obj) // eslint-disable-line ban/ban | ||
util.objectKeys = typeof Object.keys === "function" | ||
? (obj) => Object.keys(obj) | ||
: (object) => { | ||
@@ -53,3 +53,3 @@ const keys = []; | ||
util.isInteger = typeof Number.isInteger === "function" | ||
? (val) => Number.isInteger(val) // eslint-disable-line ban/ban | ||
? (val) => Number.isInteger(val) | ||
: (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val; | ||
@@ -69,2 +69,11 @@ function joinValues(array, separator = " | ") { | ||
})(util = exports.util || (exports.util = {})); | ||
var objectUtil; | ||
(function (objectUtil) { | ||
objectUtil.mergeShapes = (first, second) => { | ||
return { | ||
...first, | ||
...second, | ||
}; | ||
}; | ||
})(objectUtil = exports.objectUtil || (exports.objectUtil = {})); | ||
exports.ZodParsedType = util.arrayToEnum([ | ||
@@ -71,0 +80,0 @@ "string", |
@@ -42,3 +42,9 @@ "use strict"; | ||
if (typeof issue.validation === "object") { | ||
if ("startsWith" in issue.validation) { | ||
if ("includes" in issue.validation) { | ||
message = `Invalid input: must include "${issue.validation.includes}"`; | ||
if (typeof issue.validation.position === "number") { | ||
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`; | ||
} | ||
} | ||
else if ("startsWith" in issue.validation) { | ||
message = `Invalid input: must start with "${issue.validation.startsWith}"`; | ||
@@ -45,0 +51,0 @@ } |
@@ -6,3 +6,3 @@ import { enumUtil } from "./helpers/enumUtil"; | ||
import { Primitive } from "./helpers/typeAliases"; | ||
import { util } from "./helpers/util"; | ||
import { objectUtil, util } from "./helpers/util"; | ||
import { IssueData, StringValidation, ZodCustomIssue, ZodError, ZodErrorMap } from "./ZodError"; | ||
@@ -64,3 +64,2 @@ export declare type RefinementCtx = { | ||
safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>; | ||
/** Alias of safeParseAsync */ | ||
spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>; | ||
@@ -124,5 +123,13 @@ refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>; | ||
} | { | ||
kind: "includes"; | ||
value: string; | ||
position?: number; | ||
message?: string; | ||
} | { | ||
kind: "cuid2"; | ||
message?: string; | ||
} | { | ||
kind: "ulid"; | ||
message?: string; | ||
} | { | ||
kind: "startsWith"; | ||
@@ -173,2 +180,3 @@ value: string; | ||
cuid2(message?: errorUtil.ErrMessage): ZodString; | ||
ulid(message?: errorUtil.ErrMessage): ZodString; | ||
ip(options?: string | { | ||
@@ -184,2 +192,6 @@ version?: "v4" | "v6"; | ||
regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString; | ||
includes(value: string, options?: { | ||
message?: string; | ||
position?: number; | ||
}): ZodString; | ||
startsWith(value: string, message?: errorUtil.ErrMessage): ZodString; | ||
@@ -190,6 +202,2 @@ endsWith(value: string, message?: errorUtil.ErrMessage): ZodString; | ||
length(len: number, message?: errorUtil.ErrMessage): ZodString; | ||
/** | ||
* @deprecated Use z.string().min(1) instead. | ||
* @see {@link ZodString.min} | ||
*/ | ||
nonempty: (message?: errorUtil.ErrMessage | undefined) => ZodString; | ||
@@ -206,2 +214,3 @@ trim: () => ZodString; | ||
get isCUID2(): boolean; | ||
get isULID(): boolean; | ||
get isIP(): boolean; | ||
@@ -448,27 +457,2 @@ get minLength(): number | null; | ||
export declare type ZodNonEmptyArray<T extends ZodTypeAny> = ZodArray<T, "atleastone">; | ||
export declare namespace objectUtil { | ||
export type MergeShapes<U extends ZodRawShape, V extends ZodRawShape> = { | ||
[k in Exclude<keyof U, keyof V>]: U[k]; | ||
} & V; | ||
type optionalKeys<T extends object> = { | ||
[k in keyof T]: undefined extends T[k] ? k : never; | ||
}[keyof T]; | ||
type requiredKeys<T extends object> = { | ||
[k in keyof T]: undefined extends T[k] ? never : k; | ||
}[keyof T]; | ||
export type addQuestionMarks<T extends object> = Partial<Pick<T, optionalKeys<T>>> & Pick<T, requiredKeys<T>>; | ||
export type identity<T> = T; | ||
export type flatten<T extends object> = identity<{ | ||
[k in keyof T]: T[k]; | ||
}>; | ||
export type noNeverKeys<T extends ZodRawShape> = { | ||
[k in keyof T]: [T[k]] extends [never] ? never : k; | ||
}[keyof T]; | ||
export type noNever<T extends ZodRawShape> = identity<{ | ||
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never; | ||
}>; | ||
export const mergeShapes: <U extends ZodRawShape, T extends ZodRawShape>(first: U, second: T) => T & U; | ||
export {}; | ||
} | ||
export declare type extendShape<A, B> = util.flatten<Omit<A, keyof B> & B>; | ||
export declare type UnknownKeysParam = "passthrough" | "strict" | "strip"; | ||
@@ -484,9 +468,8 @@ export interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef { | ||
}; | ||
export declare type processType<T extends object> = util.flatten<objectUtil.addQuestionMarks<T>>; | ||
export declare type baseObjectOutputType<Shape extends ZodRawShape> = objectUtil.addQuestionMarks<{ | ||
export declare type baseObjectOutputType<Shape extends ZodRawShape> = objectUtil.flatten<objectUtil.addQuestionMarks<{ | ||
[k in keyof Shape]: Shape[k]["_output"]; | ||
}>; | ||
export declare type objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny, UnknownKeys extends UnknownKeysParam = UnknownKeysParam> = ZodTypeAny extends Catchall ? objectUtil.flatten<baseObjectOutputType<Shape>> & Passthrough<UnknownKeys> : objectUtil.flatten<baseObjectOutputType<Shape> & { | ||
}>>; | ||
export declare type objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny, UnknownKeys extends UnknownKeysParam = UnknownKeysParam> = (ZodTypeAny extends Catchall ? baseObjectOutputType<Shape> & Passthrough<UnknownKeys> : baseObjectOutputType<Shape> & { | ||
[k: string]: Catchall["_output"]; | ||
} & Passthrough<UnknownKeys>>; | ||
}) & Passthrough<UnknownKeys>; | ||
export declare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.flatten<objectUtil.addQuestionMarks<{ | ||
@@ -520,18 +503,6 @@ [k in keyof Shape]: Shape[k]["_input"]; | ||
passthrough(): ZodObject<T, "passthrough", Catchall>; | ||
/** | ||
* @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped. | ||
* If you want to pass through unknown properties, use `.passthrough()` instead. | ||
*/ | ||
nonstrict: () => ZodObject<T, "passthrough", Catchall>; | ||
extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<extendShape<T, Augmentation>, UnknownKeys, Catchall>; | ||
/** | ||
* @deprecated Use `.extend` instead | ||
* */ | ||
extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>; | ||
augment: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, UnknownKeys, Catchall, objectOutputType<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, Catchall, UnknownKeys>, objectInputType<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, Catchall, UnknownKeys>>; | ||
/** | ||
* Prior to zod@1.0.12 there was a bug in the | ||
* inferred type of merged objects. Please | ||
* upgrade if you are experiencing issues. | ||
*/ | ||
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>; | ||
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<objectUtil.extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>; | ||
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & { | ||
@@ -543,5 +514,2 @@ [k in Key]: Schema; | ||
omit<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, objectKeyMask<T>>): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>; | ||
/** | ||
* @deprecated | ||
*/ | ||
deepPartial(): partialUtil.DeepPartial<this>; | ||
@@ -561,5 +529,5 @@ partial(): ZodObject<{ | ||
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>; | ||
static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k in keyof baseObjectOutputType<T_1>]: baseObjectOutputType<T_1>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>[k_2]; }>; | ||
static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, { [k in keyof baseObjectOutputType<T_1>]: baseObjectOutputType<T_1>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>[k_2]; }>; | ||
static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k in keyof baseObjectOutputType<T_1>]: baseObjectOutputType<T_1>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>[k_2]; }>; | ||
static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>[k_3]; }>; | ||
static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>[k_3]; }>; | ||
static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>[k_3]; }>; | ||
} | ||
@@ -595,10 +563,2 @@ export declare type AnyZodObject = ZodObject<any, any, any>; | ||
get optionsMap(): Map<Primitive, ZodDiscriminatedUnionOption<any>>; | ||
/** | ||
* The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. | ||
* However, it only allows a union of objects, all of which need to share a discriminator property. This property must | ||
* have a different value for each object in the union. | ||
* @param discriminator the name of the discriminator property | ||
* @param types an array of object schemas | ||
* @param params | ||
*/ | ||
static create<Discriminator extends string, Types extends [ | ||
@@ -897,3 +857,3 @@ ZodDiscriminatedUnionOption<Discriminator>, | ||
export declare const late: { | ||
object: <T extends ZodRawShape>(shape: () => T, params?: RawCreateParams) => ZodObject<T, "strip", ZodTypeAny, { [k in keyof baseObjectOutputType<T>]: baseObjectOutputType<T>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T]: T[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T]: T[k_1]["_input"]; }>[k_2]; }>; | ||
object: <T extends ZodRawShape>(shape: () => T, params?: RawCreateParams) => ZodObject<T, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T]: T[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T]: T[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T]: T[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T]: T[k_2]["_input"]; }>[k_3]; }>; | ||
}; | ||
@@ -991,4 +951,4 @@ export declare enum ZodFirstPartyTypeKind { | ||
declare const arrayType: <T extends ZodTypeAny>(schema: T, params?: RawCreateParams) => ZodArray<T, "many">; | ||
declare const objectType: <T extends ZodRawShape>(shape: T, params?: RawCreateParams) => ZodObject<T, "strip", ZodTypeAny, { [k in keyof baseObjectOutputType<T>]: baseObjectOutputType<T>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T]: T[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T]: T[k_1]["_input"]; }>[k_2]; }>; | ||
declare const strictObjectType: <T extends ZodRawShape>(shape: T, params?: RawCreateParams) => ZodObject<T, "strict", ZodTypeAny, { [k in keyof baseObjectOutputType<T>]: baseObjectOutputType<T>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T]: T[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T]: T[k_1]["_input"]; }>[k_2]; }>; | ||
declare const objectType: <T extends ZodRawShape>(shape: T, params?: RawCreateParams) => ZodObject<T, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T]: T[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T]: T[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T]: T[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T]: T[k_2]["_input"]; }>[k_3]; }>; | ||
declare const strictObjectType: <T extends ZodRawShape>(shape: T, params?: RawCreateParams) => ZodObject<T, "strict", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T]: T[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T]: T[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T]: T[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T]: T[k_2]["_input"]; }>[k_3]; }>; | ||
declare const unionType: <T extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T, params?: RawCreateParams) => ZodUnion<T>; | ||
@@ -995,0 +955,0 @@ declare const discriminatedUnionType: typeof ZodDiscriminatedUnion.create; |
@@ -73,3 +73,6 @@ import type { TypeOf, ZodType } from "."; | ||
} | ||
export declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "regex" | "cuid" | "cuid2" | "datetime" | "ip" | { | ||
export declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "ip" | { | ||
includes: string; | ||
position?: number; | ||
} | { | ||
startsWith: string; | ||
@@ -76,0 +79,0 @@ } | { |
@@ -40,3 +40,2 @@ "use strict"; | ||
if (Object.setPrototypeOf) { | ||
// eslint-disable-next-line ban/ban | ||
Object.setPrototypeOf(this, actualProto); | ||
@@ -81,9 +80,2 @@ } | ||
curr[el] = curr[el] || { _errors: [] }; | ||
// if (typeof el === "string") { | ||
// curr[el] = curr[el] || { _errors: [] }; | ||
// } else if (typeof el === "number") { | ||
// const errorArray: any = []; | ||
// errorArray._errors = []; | ||
// curr[el] = curr[el] || errorArray; | ||
// } | ||
} | ||
@@ -90,0 +82,0 @@ else { |
109
package.json
{ | ||
"name": "zod", | ||
"version": "3.21.0", | ||
"description": "TypeScript-first schema declaration and validation library with static type inference", | ||
"version": "3.21.1", | ||
"author": "Colin McDonnell <colin@colinhacks.com>", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/colinhacks/zod" | ||
}, | ||
"main": "./lib/index.js", | ||
"types": "./index.d.ts", | ||
"module": "./lib/index.mjs", | ||
"devDependencies": { | ||
"@rollup/plugin-typescript": "^8.2.0", | ||
"@types/benchmark": "^2.1.0", | ||
"@types/jest": "^29.2.2", | ||
"@types/node": "14", | ||
"@typescript-eslint/eslint-plugin": "^5.15.0", | ||
"@typescript-eslint/parser": "^5.15.0", | ||
"benchmark": "^2.1.4", | ||
"dependency-cruiser": "^9.19.0", | ||
"eslint": "^8.11.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-ban": "^1.6.0", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-simple-import-sort": "^7.0.0", | ||
"eslint-plugin-unused-imports": "^2.0.0", | ||
"husky": "^7.0.4", | ||
"jest": "^29.3.1", | ||
"lint-staged": "^12.3.7", | ||
"nodemon": "^2.0.15", | ||
"prettier": "^2.6.0", | ||
"pretty-quick": "^3.1.3", | ||
"rollup": "^2.70.1", | ||
"ts-jest": "^29.0.3", | ||
"ts-morph": "^14.0.0", | ||
"ts-node": "^10.9.1", | ||
"tslib": "^2.3.1", | ||
"tsx": "^3.8.0", | ||
"typescript": "~4.5.0" | ||
}, | ||
"exports": { | ||
@@ -17,2 +49,6 @@ ".": { | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/colinhacks/zod/issues" | ||
}, | ||
"description": "TypeScript-first schema declaration and validation library with static type inference", | ||
"files": [ | ||
@@ -22,19 +58,4 @@ "/lib", | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/colinhacks/zod" | ||
}, | ||
"author": "Colin McDonnell <colin@colinhacks.com>", | ||
"license": "MIT", | ||
"sideEffects": false, | ||
"bugs": { | ||
"url": "https://github.com/colinhacks/zod/issues" | ||
}, | ||
"funding": "https://github.com/sponsors/colinhacks", | ||
"homepage": "https://zod.dev", | ||
"funding": "https://github.com/sponsors/colinhacks", | ||
"support": { | ||
"backing": { | ||
"npm-funding": true | ||
} | ||
}, | ||
"keywords": [ | ||
@@ -47,3 +68,9 @@ "typescript", | ||
], | ||
"dependencies": {}, | ||
"license": "MIT", | ||
"lint-staged": { | ||
"src/*.ts": [ | ||
"eslint --cache --fix", | ||
"prettier --ignore-unknown --write" | ||
] | ||
}, | ||
"scripts": { | ||
@@ -62,2 +89,3 @@ "prettier:check": "prettier --check src/**/*.ts deno/lib/**/*.ts --no-error-on-unmatched-pattern", | ||
"build:types": "tsc -p tsconfig.types.json", | ||
"build:test": "tsc -p tsconfig.test.json", | ||
"rollup": "rollup --config rollup.config.js", | ||
@@ -73,37 +101,10 @@ "test:watch": "jest --watch", | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-typescript": "^8.2.0", | ||
"@types/benchmark": "^2.1.0", | ||
"@types/jest": "^29.2.2", | ||
"@types/node": "14", | ||
"@typescript-eslint/eslint-plugin": "^5.15.0", | ||
"@typescript-eslint/parser": "^5.15.0", | ||
"benchmark": "^2.1.4", | ||
"dependency-cruiser": "^9.19.0", | ||
"eslint": "^8.11.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-ban": "^1.6.0", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-simple-import-sort": "^7.0.0", | ||
"eslint-plugin-unused-imports": "^2.0.0", | ||
"husky": "^7.0.4", | ||
"jest": "^29.3.1", | ||
"lint-staged": "^12.3.7", | ||
"nodemon": "^2.0.15", | ||
"prettier": "^2.6.0", | ||
"pretty-quick": "^3.1.3", | ||
"rollup": "^2.70.1", | ||
"ts-jest": "^29.0.3", | ||
"ts-morph": "^14.0.0", | ||
"ts-node": "^10.9.1", | ||
"tslib": "^2.3.1", | ||
"tsx": "^3.8.0", | ||
"typescript": "~4.5.0" | ||
"sideEffects": false, | ||
"support": { | ||
"backing": { | ||
"npm-funding": true | ||
} | ||
}, | ||
"lint-staged": { | ||
"src/*.ts": [ | ||
"eslint --cache --fix", | ||
"prettier --ignore-unknown --write" | ||
] | ||
} | ||
"types": "./index.d.ts", | ||
"dependencies": {} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
601560
2688
13846