use-zod-default 1.0.16 → 1.0.18
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/dist/v4.js +1 -1
- package/package.json +10 -8
package/dist/v4.js
CHANGED
|
@@ -133,7 +133,7 @@ const defaultInstance = (schema, source = {}) => {
|
|
|
133
133
|
const discriminatorValue = source[discriminator];
|
|
134
134
|
// Find matching option based on discriminator value
|
|
135
135
|
const matchingSchema = schema._zod.def.options.find(option => {
|
|
136
|
-
const propValues = option._zod
|
|
136
|
+
const { propValues } = option._zod;
|
|
137
137
|
if (propValues && propValues[discriminator]) {
|
|
138
138
|
return propValues[discriminator].has(discriminatorValue);
|
|
139
139
|
}
|
package/package.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
"dependencies": {
|
|
3
|
-
"lodash": "^4.17.21",
|
|
4
|
-
"zod": "^4.0.15"
|
|
5
|
-
},
|
|
6
2
|
"devDependencies": {
|
|
7
3
|
"@types/lodash": "^4.17.12",
|
|
8
4
|
"@types/node": "^22.7.7",
|
|
9
5
|
"@vitest/coverage-v8": "^3.0.5",
|
|
10
6
|
"eslint": "^9.26.0",
|
|
7
|
+
"lodash": "^4.17.21",
|
|
11
8
|
"prettier": "^3.3.3",
|
|
12
9
|
"tsx": "^4.20.3",
|
|
13
10
|
"typescript": "^5.6.3",
|
|
14
11
|
"typescript-eslint": "^8.32.1",
|
|
15
|
-
"vitest": "^2.1.3"
|
|
12
|
+
"vitest": "^2.1.3",
|
|
13
|
+
"zod": "^4.0.17"
|
|
14
|
+
},
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"lodash": "^4.17.21",
|
|
17
|
+
"zod": "^4.0.17"
|
|
16
18
|
},
|
|
17
19
|
"exports": {
|
|
18
|
-
".": "./dist/
|
|
20
|
+
".": "./dist/v4.js",
|
|
19
21
|
"./v3": "./dist/v3.js",
|
|
20
22
|
"./v4": "./dist/v4.js"
|
|
21
23
|
},
|
|
@@ -32,9 +34,9 @@
|
|
|
32
34
|
"scripts": {
|
|
33
35
|
"build": "rm -rf dist && yarn lint && tsc -p tsconfig.json",
|
|
34
36
|
"lint": "prettier --write . && eslint . && yarn tsc",
|
|
35
|
-
"npm
|
|
37
|
+
"npm:publish": "yarn test --run && yarn build && yarn version --patch --no-git-tag-version && yarn publish --non-interactive",
|
|
36
38
|
"test": "vitest",
|
|
37
39
|
"test:coverage": "rm -rf coverage && vitest --run --coverage"
|
|
38
40
|
},
|
|
39
|
-
"version": "1.0.
|
|
41
|
+
"version": "1.0.18"
|
|
40
42
|
}
|