@infra-blocks/zod-utils 0.20.0-alpha.2 → 0.20.0

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.
Files changed (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,9 +16,9 @@ When branding is used, the brand is a string that's the same as the name of the
16
16
  is an alias for `string & z.$brand<"AwsAccountId">`.
17
17
 
18
18
  One caveat of using branded types schema is that the default value must also be branded (as should be). So,
19
- for example, where you would write `z.int().default(5)`, you instead have to write `zu.integer().default(zu.integer().parse(5))`.
20
- This is, however, exactly correct. Indeed, with vanilla zod, you could write `z.int().default(123.456)`, which violates
21
- the schema and is accepted both at compile time and runtime at the time of this writing.
19
+ for example, where you would write `z.int().default(5)`, you instead have to write `zu.number.integer().default(zu.number.integer().parse(5))`.
20
+ This example also highlights an inconsistency with Zod where you can have `z.int().default(123.456)`, which both
21
+ compiles and runs successfully.
22
22
 
23
23
  ## API
24
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infra-blocks/zod-utils",
3
- "version": "0.20.0-alpha.2",
3
+ "version": "0.20.0",
4
4
  "description": "Extensions to the zod package.",
5
5
  "keywords": [
6
6
  "zod",