jazz-tools 0.14.6 → 0.14.7

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 (27) hide show
  1. package/.turbo/turbo-build.log +7 -7
  2. package/CHANGELOG.md +6 -0
  3. package/dist/{chunk-E2B2W453.js → chunk-RTUIFVYF.js} +12 -1
  4. package/dist/{chunk-E2B2W453.js.map → chunk-RTUIFVYF.js.map} +1 -1
  5. package/dist/exports.d.ts +1 -1
  6. package/dist/exports.d.ts.map +1 -1
  7. package/dist/implementation/zodSchema/runtimeConverters/zodFieldToCoFieldDef.d.ts +1 -1
  8. package/dist/implementation/zodSchema/runtimeConverters/zodFieldToCoFieldDef.d.ts.map +1 -1
  9. package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts +3 -2
  10. package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts.map +1 -1
  11. package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts +3 -2
  12. package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts.map +1 -1
  13. package/dist/implementation/zodSchema/zodReExport.d.ts +2 -0
  14. package/dist/implementation/zodSchema/zodReExport.d.ts.map +1 -0
  15. package/dist/index.js +75 -6
  16. package/dist/index.js.map +1 -1
  17. package/dist/testing.js +1 -1
  18. package/dist/tests/zod.test.d.ts +2 -0
  19. package/dist/tests/zod.test.d.ts.map +1 -0
  20. package/package.json +1 -1
  21. package/src/exports.ts +1 -1
  22. package/src/implementation/zodSchema/runtimeConverters/zodFieldToCoFieldDef.ts +18 -2
  23. package/src/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.ts +43 -30
  24. package/src/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.ts +45 -32
  25. package/src/implementation/zodSchema/zodReExport.ts +37 -0
  26. package/src/tests/coMap.record.test-d.ts +1 -1
  27. package/src/tests/zod.test.ts +419 -0
@@ -1,5 +1,5 @@
1
1
 
2
- > jazz-tools@0.14.6 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.14.7 build /home/runner/_work/jazz/jazz/packages/jazz-tools
3
3
  > tsup && pnpm types
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
@@ -9,14 +9,14 @@
9
9
  CLI Target: es2021
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
- ESM dist/index.js 11.07 KB
13
12
  ESM dist/testing.js 6.31 KB
14
- ESM dist/chunk-E2B2W453.js 131.23 KB
15
- ESM dist/index.js.map 20.74 KB
13
+ ESM dist/index.js 12.27 KB
14
+ ESM dist/chunk-RTUIFVYF.js 131.59 KB
16
15
  ESM dist/testing.js.map 12.57 KB
17
- ESM dist/chunk-E2B2W453.js.map 305.24 KB
18
- ESM ⚡️ Build success in 61ms
16
+ ESM dist/index.js.map 19.40 KB
17
+ ESM dist/chunk-RTUIFVYF.js.map 306.12 KB
18
+ ESM ⚡️ Build success in 48ms
19
19
 
20
- > jazz-tools@0.14.6 types /home/runner/_work/jazz/jazz/packages/jazz-tools
20
+ > jazz-tools@0.14.7 types /home/runner/_work/jazz/jazz/packages/jazz-tools
21
21
  > tsc --outDir dist
22
22
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.14.7
4
+
5
+ ### Patch Changes
6
+
7
+ - 365b0ea: reduce the z exported APIs to the ones we support and fix compatible types
8
+
3
9
  ## 0.14.6
4
10
 
5
11
  ### Patch Changes
@@ -3703,8 +3703,18 @@ function zodFieldToCoFieldDef(schema) {
3703
3703
  return coField.null;
3704
3704
  } else if (schema._zod.def.type === "enum") {
3705
3705
  return coField.string;
3706
+ } else if (schema._zod.def.type === "readonly") {
3707
+ return zodFieldToCoFieldDef(
3708
+ schema.def.innerType
3709
+ );
3706
3710
  } else if (schema._zod.def.type === "date") {
3707
3711
  return coField.Date;
3712
+ } else if (schema._zod.def.type === "template_literal") {
3713
+ return coField.string;
3714
+ } else if (schema._zod.def.type === "lazy") {
3715
+ return zodFieldToCoFieldDef(
3716
+ schema.unwrap()
3717
+ );
3708
3718
  } else if (schema._zod.def.type === "literal") {
3709
3719
  if (schema._zod.def.values.some(
3710
3720
  (literal) => typeof literal === "undefined"
@@ -4521,6 +4531,7 @@ function parseGroupCreateOptions(options) {
4521
4531
  }
4522
4532
 
4523
4533
  export {
4534
+ __export,
4524
4535
  loadCoValue,
4525
4536
  subscribeToCoValue,
4526
4537
  createCoValueObservable,
@@ -4557,4 +4568,4 @@ export {
4557
4568
  JazzContextManager
4558
4569
  };
4559
4570
  /* istanbul ignore file -- @preserve */
4560
- //# sourceMappingURL=chunk-E2B2W453.js.map
4571
+ //# sourceMappingURL=chunk-RTUIFVYF.js.map