zod 3.13.4 → 3.14.2
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 +5 -4
- package/lib/ZodError.js +110 -205
- package/lib/benchmarks/discriminatedUnion.js +25 -25
- package/lib/benchmarks/index.js +15 -53
- package/lib/benchmarks/object.js +23 -23
- package/lib/benchmarks/primitives.d.ts +5 -0
- package/lib/benchmarks/primitives.js +78 -0
- package/lib/benchmarks/realworld.d.ts +5 -0
- package/lib/benchmarks/realworld.js +56 -0
- package/lib/benchmarks/string.js +27 -16
- package/lib/benchmarks/union.js +25 -25
- package/lib/helpers/errorUtil.js +2 -6
- package/lib/helpers/parseUtil.d.ts +7 -5
- package/lib/helpers/parseUtil.js +84 -244
- package/lib/helpers/util.js +20 -66
- package/lib/index.js +1 -1
- package/lib/index.mjs +1636 -2167
- package/lib/types.d.ts +6 -4
- package/lib/types.js +1422 -1772
- package/package.json +16 -14
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zod",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.2",
|
|
4
4
|
"description": "TypeScript-first schema declaration and validation library with static type inference",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
7
|
"module": "./lib/index.mjs",
|
|
8
|
+
"dependencies": {},
|
|
8
9
|
"exports": {
|
|
9
10
|
".": {
|
|
10
11
|
"require": "./lib/index.js",
|
|
@@ -41,12 +42,12 @@
|
|
|
41
42
|
"inference"
|
|
42
43
|
],
|
|
43
44
|
"scripts": {
|
|
44
|
-
"check
|
|
45
|
-
"fix
|
|
46
|
-
"check
|
|
47
|
-
"fix
|
|
48
|
-
"check": "yarn check
|
|
49
|
-
"fix": "yarn fix
|
|
45
|
+
"prettier:check": "prettier --check src/**/*.ts deno/lib/**/*.ts --no-error-on-unmatched-pattern",
|
|
46
|
+
"prettier:fix": "prettier --write src/**/*.ts deno/lib/**/*.ts --no-error-on-unmatched-pattern",
|
|
47
|
+
"lint:check": "eslint --ext .ts ./src",
|
|
48
|
+
"lint:fix": "eslint --fix --ext .ts ./src",
|
|
49
|
+
"check": "yarn lint:check && yarn prettier:check",
|
|
50
|
+
"fix": "yarn lint:fix && yarn prettier:fix",
|
|
50
51
|
"clean": "rm -rf lib/* deno/lib/*",
|
|
51
52
|
"build": "yarn run clean && npm run build:cjs && npm run build:esm && npm run build:deno",
|
|
52
53
|
"build:deno": "node ./deno/build.mjs",
|
|
@@ -67,8 +68,8 @@
|
|
|
67
68
|
"@types/benchmark": "^2.1.0",
|
|
68
69
|
"@types/jest": "^26.0.17",
|
|
69
70
|
"@types/node": "^14.14.10",
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
71
|
-
"@typescript-eslint/parser": "^
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "^5.15.0",
|
|
72
|
+
"@typescript-eslint/parser": "^5.15.0",
|
|
72
73
|
"benchmark": "^2.1.4",
|
|
73
74
|
"dependency-cruiser": "^9.19.0",
|
|
74
75
|
"eslint": "^7.15.0",
|
|
@@ -85,21 +86,22 @@
|
|
|
85
86
|
"prettier": "^2.2.1",
|
|
86
87
|
"rollup": "^2.42.1",
|
|
87
88
|
"rollup-plugin-uglify": "^6.0.4",
|
|
89
|
+
"table": "^6.8.0",
|
|
88
90
|
"ts-jest": "^26.4.4",
|
|
89
91
|
"ts-node": "^9.1.0",
|
|
90
92
|
"tslib": "^2.3.1",
|
|
91
|
-
"typescript": "^4.
|
|
93
|
+
"typescript": "^4.6.2"
|
|
92
94
|
},
|
|
93
95
|
"husky": {
|
|
94
96
|
"hooks": {
|
|
95
|
-
"pre-commit": "lint-staged
|
|
96
|
-
"pre-push": "lint-staged
|
|
97
|
+
"pre-commit": "lint-staged",
|
|
98
|
+
"pre-push": "lint-staged"
|
|
97
99
|
}
|
|
98
100
|
},
|
|
99
101
|
"lint-staged": {
|
|
100
102
|
"*.ts": [
|
|
101
|
-
"yarn fix
|
|
102
|
-
"yarn fix
|
|
103
|
+
"yarn lint:fix",
|
|
104
|
+
"yarn prettier:fix"
|
|
103
105
|
]
|
|
104
106
|
}
|
|
105
107
|
}
|