@kubb/plugin-zod 5.8.0 → 5.8.1
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/index.cjs +48 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +48 -2
- package/dist/index.js.map +1 -1
- package/docs/options.md +2 -0
- package/package.json +3 -3
package/docs/options.md
CHANGED
|
@@ -105,6 +105,8 @@ Chooses which primitives to coerce.
|
|
|
105
105
|
::
|
|
106
106
|
|
|
107
107
|
> [!NOTE]
|
|
108
|
+
> `numbers` also coerces an enum whose schema has a numeric `format`, such as `type: integer, format: int32`. Other enums are not coerced. When such an enum is the discriminator of a `oneOf`, the union prints as `z.union` instead of `z.discriminatedUnion`, which cannot read coerced values.
|
|
109
|
+
>
|
|
108
110
|
> `dates` coerces only `Date`-typed fields (from `dateType: 'date'`). ISO-string fields are never coerced, and neither are `format: time` fields, because `new Date()` cannot parse a bare `HH:mm:ss`. For a time-of-day type such as `Temporal.PlainTime`, see [Encode custom types](https://kubb.dev/extensions/kubb-labs/plugin-zod/guides/customization#encode-custom-types).
|
|
109
111
|
|
|
110
112
|
### guidType
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-zod",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.1",
|
|
4
4
|
"description": "Generate Zod validation schemas with Kubb for runtime data parsing and type safety. Pairs with @kubb/plugin-ts for end-to-end type coverage.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"code-generation",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"registry": "https://registry.npmjs.org/"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@kubb/kit": "^5.15.
|
|
73
|
-
"@kubb/renderer-jsx": "^5.15.
|
|
72
|
+
"@kubb/kit": "^5.15.4",
|
|
73
|
+
"@kubb/renderer-jsx": "^5.15.4"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@internals/shared": "0.0.0",
|