zod 3.20.6 → 3.21.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +211 -18
- package/lib/ZodError.d.ts +17 -13
- package/lib/ZodError.js +0 -8
- package/lib/benchmarks/index.js +33 -8
- package/lib/helpers/parseUtil.js +1 -1
- package/lib/helpers/partialUtil.d.ts +4 -4
- package/lib/helpers/util.d.ts +25 -4
- package/lib/helpers/util.js +13 -4
- package/lib/index.d.ts +3 -3
- package/lib/index.js +3 -3
- package/lib/index.mjs +366 -56
- package/lib/index.umd.js +367 -57
- package/lib/locales/en.js +15 -3
- package/lib/types.d.ts +123 -86
- package/lib/types.js +329 -221
- package/package.json +55 -54
package/package.json
CHANGED
|
@@ -1,11 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zod",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"
|
|
3
|
+
"version": "3.21.4",
|
|
4
|
+
"author": "Colin McDonnell <colin@colinhacks.com>",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/colinhacks/zod"
|
|
8
|
+
},
|
|
5
9
|
"main": "./lib/index.js",
|
|
6
|
-
"types": "./index.d.ts",
|
|
7
10
|
"module": "./lib/index.mjs",
|
|
8
|
-
"
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"@rollup/plugin-typescript": "^8.2.0",
|
|
13
|
+
"@types/benchmark": "^2.1.0",
|
|
14
|
+
"@types/jest": "^29.2.2",
|
|
15
|
+
"@types/node": "14",
|
|
16
|
+
"@typescript-eslint/eslint-plugin": "^5.15.0",
|
|
17
|
+
"@typescript-eslint/parser": "^5.15.0",
|
|
18
|
+
"benchmark": "^2.1.4",
|
|
19
|
+
"dependency-cruiser": "^9.19.0",
|
|
20
|
+
"eslint": "^8.11.0",
|
|
21
|
+
"eslint-config-prettier": "^8.5.0",
|
|
22
|
+
"eslint-plugin-ban": "^1.6.0",
|
|
23
|
+
"eslint-plugin-import": "^2.25.4",
|
|
24
|
+
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
25
|
+
"eslint-plugin-unused-imports": "^2.0.0",
|
|
26
|
+
"husky": "^7.0.4",
|
|
27
|
+
"jest": "^29.3.1",
|
|
28
|
+
"lint-staged": "^12.3.7",
|
|
29
|
+
"nodemon": "^2.0.15",
|
|
30
|
+
"prettier": "^2.6.0",
|
|
31
|
+
"pretty-quick": "^3.1.3",
|
|
32
|
+
"rollup": "^2.70.1",
|
|
33
|
+
"ts-jest": "^29.0.3",
|
|
34
|
+
"ts-morph": "^14.0.0",
|
|
35
|
+
"ts-node": "^10.9.1",
|
|
36
|
+
"tslib": "^2.3.1",
|
|
37
|
+
"tsx": "^3.8.0",
|
|
38
|
+
"typescript": "~4.5.0"
|
|
39
|
+
},
|
|
9
40
|
"exports": {
|
|
10
41
|
".": {
|
|
11
42
|
"require": "./lib/index.js",
|
|
@@ -15,27 +46,16 @@
|
|
|
15
46
|
"./package.json": "./package.json",
|
|
16
47
|
"./locales/*": "./lib/locales/*"
|
|
17
48
|
},
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/colinhacks/zod/issues"
|
|
51
|
+
},
|
|
52
|
+
"description": "TypeScript-first schema declaration and validation library with static type inference",
|
|
18
53
|
"files": [
|
|
19
54
|
"/lib",
|
|
20
55
|
"/index.d.ts"
|
|
21
56
|
],
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "https://github.com/colinhacks/zod"
|
|
25
|
-
},
|
|
26
|
-
"author": "Colin McDonnell <colin@colinhacks.com>",
|
|
27
|
-
"license": "MIT",
|
|
28
|
-
"sideEffects": false,
|
|
29
|
-
"bugs": {
|
|
30
|
-
"url": "https://github.com/colinhacks/zod/issues"
|
|
31
|
-
},
|
|
32
|
-
"homepage": "https://zod.dev",
|
|
33
57
|
"funding": "https://github.com/sponsors/colinhacks",
|
|
34
|
-
"
|
|
35
|
-
"backing": {
|
|
36
|
-
"npm-funding": true
|
|
37
|
-
}
|
|
38
|
-
},
|
|
58
|
+
"homepage": "https://zod.dev",
|
|
39
59
|
"keywords": [
|
|
40
60
|
"typescript",
|
|
41
61
|
"schema",
|
|
@@ -43,6 +63,13 @@
|
|
|
43
63
|
"type",
|
|
44
64
|
"inference"
|
|
45
65
|
],
|
|
66
|
+
"license": "MIT",
|
|
67
|
+
"lint-staged": {
|
|
68
|
+
"src/*.ts": [
|
|
69
|
+
"eslint --cache --fix",
|
|
70
|
+
"prettier --ignore-unknown --write"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
46
73
|
"scripts": {
|
|
47
74
|
"prettier:check": "prettier --check src/**/*.ts deno/lib/**/*.ts --no-error-on-unmatched-pattern",
|
|
48
75
|
"prettier:fix": "prettier --write src/**/*.ts deno/lib/**/*.ts --ignore-unknown --no-error-on-unmatched-pattern",
|
|
@@ -56,6 +83,7 @@
|
|
|
56
83
|
"build:esm": "rollup --config rollup.config.js",
|
|
57
84
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
58
85
|
"build:types": "tsc -p tsconfig.types.json",
|
|
86
|
+
"build:test": "tsc -p tsconfig.test.json",
|
|
59
87
|
"rollup": "rollup --config rollup.config.js",
|
|
60
88
|
"test:watch": "jest --watch",
|
|
61
89
|
"test": "jest --coverage",
|
|
@@ -66,39 +94,12 @@
|
|
|
66
94
|
"benchmark": "tsx src/benchmarks/index.ts",
|
|
67
95
|
"prepare": "husky install"
|
|
68
96
|
},
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"@typescript-eslint/eslint-plugin": "^5.15.0",
|
|
75
|
-
"@typescript-eslint/parser": "^5.15.0",
|
|
76
|
-
"benchmark": "^2.1.4",
|
|
77
|
-
"dependency-cruiser": "^9.19.0",
|
|
78
|
-
"eslint": "^8.11.0",
|
|
79
|
-
"eslint-config-prettier": "^8.5.0",
|
|
80
|
-
"eslint-plugin-ban": "^1.6.0",
|
|
81
|
-
"eslint-plugin-import": "^2.25.4",
|
|
82
|
-
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
83
|
-
"eslint-plugin-unused-imports": "^2.0.0",
|
|
84
|
-
"husky": "^7.0.4",
|
|
85
|
-
"jest": "^29.3.1",
|
|
86
|
-
"lint-staged": "^12.3.7",
|
|
87
|
-
"nodemon": "^2.0.15",
|
|
88
|
-
"prettier": "^2.6.0",
|
|
89
|
-
"pretty-quick": "^3.1.3",
|
|
90
|
-
"rollup": "^2.70.1",
|
|
91
|
-
"ts-jest": "^29.0.3",
|
|
92
|
-
"ts-morph": "^14.0.0",
|
|
93
|
-
"ts-node": "^10.9.1",
|
|
94
|
-
"tslib": "^2.3.1",
|
|
95
|
-
"tsx": "^3.8.0",
|
|
96
|
-
"typescript": "4.5"
|
|
97
|
+
"sideEffects": false,
|
|
98
|
+
"support": {
|
|
99
|
+
"backing": {
|
|
100
|
+
"npm-funding": true
|
|
101
|
+
}
|
|
97
102
|
},
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
"eslint --cache --fix",
|
|
101
|
-
"prettier --ignore-unknown --write"
|
|
102
|
-
]
|
|
103
|
-
}
|
|
103
|
+
"types": "./index.d.ts",
|
|
104
|
+
"dependencies": {}
|
|
104
105
|
}
|