jazz-tools 0.10.1 → 0.10.3

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > jazz-tools@0.10.1 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.10.3 build /home/runner/_work/jazz/jazz/packages/jazz-tools
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
@@ -11,8 +11,8 @@
11
11
  ESM Build start
12
12
  ESM dist/index.js 1.50 KB
13
13
  ESM dist/testing.js 6.18 KB
14
- ESM dist/chunk-24EJ3CKA.js 111.53 KB
14
+ ESM dist/chunk-XRX3CCYY.js 111.67 KB
15
15
  ESM dist/index.js.map 259.00 B
16
16
  ESM dist/testing.js.map 12.19 KB
17
- ESM dist/chunk-24EJ3CKA.js.map 268.84 KB
18
- ESM ⚡️ Build success in 48ms
17
+ ESM dist/chunk-XRX3CCYY.js.map 269.16 KB
18
+ ESM ⚡️ Build success in 43ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - d8582fc: Fixes co.optional.Date throwing when assigned undefined
8
+
9
+ ## 0.10.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [cae3a9e]
14
+ - cojson@0.10.2
15
+
3
16
  ## 0.10.1
4
17
 
5
18
  ### Patch Changes
@@ -239,6 +239,10 @@ var Encoders = {
239
239
  Date: {
240
240
  encode: (value) => value.toISOString(),
241
241
  decode: (value) => new Date(value)
242
+ },
243
+ OptionalDate: {
244
+ encode: (value) => value?.toISOString() || null,
245
+ decode: (value) => value === null ? void 0 : new Date(value)
242
246
  }
243
247
  };
244
248
  var optional = {
@@ -262,7 +266,7 @@ var optional = {
262
266
  [SchemaInit]: "json"
263
267
  },
264
268
  Date: {
265
- [SchemaInit]: { encoded: Encoders.Date }
269
+ [SchemaInit]: { encoded: Encoders.OptionalDate }
266
270
  },
267
271
  literal(..._lit) {
268
272
  return { [SchemaInit]: "json" };
@@ -3915,4 +3919,4 @@ export {
3915
3919
  consumeInviteLink
3916
3920
  };
3917
3921
  /* istanbul ignore file -- @preserve */
3918
- //# sourceMappingURL=chunk-24EJ3CKA.js.map
3922
+ //# sourceMappingURL=chunk-XRX3CCYY.js.map