jazz-tools 0.18.13 → 0.18.15

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.18.13 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.18.15 build /home/runner/_work/jazz/jazz/packages/jazz-tools
3
3
  > tsup && pnpm types && pnpm build:svelte
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
@@ -28,7 +28,7 @@
28
28
  CLI Using tsconfig: tsconfig.json
29
29
  CLI Building entry: {"index":"src/tiptap/index.ts"}
30
30
  CLI Using tsconfig: tsconfig.json
31
- CLI Building entry: {"index":"src/worker/index.ts"}
31
+ CLI Building entry: {"index":"src/worker/index.ts","edge-wasm":"src/worker/edge-wasm.ts"}
32
32
  CLI Using tsconfig: tsconfig.json
33
33
  CLI Building entry: {"client":"src/better-auth/auth/client.ts","server":"src/better-auth/auth/server.ts","react":"src/better-auth/auth/react.tsx"}
34
34
  CLI Using tsconfig: tsconfig.json
@@ -109,91 +109,93 @@
109
109
  ESM Build start
110
110
  ESM dist/react/ssr.js 688.00 B
111
111
  ESM dist/react/ssr.js.map 1.12 KB
112
- ESM ⚡️ Build success in 19ms
113
- ESM dist/worker/index.js 3.19 KB
114
- ESM dist/worker/index.js.map 6.17 KB
115
- ESM ⚡️ Build success in 19ms
112
+ ESM ⚡️ Build success in 15ms
116
113
  ESM dist/tiptap/index.js 564.00 B
117
114
  ESM dist/tiptap/index.js.map 1.21 KB
118
- ESM ⚡️ Build success in 21ms
119
- ESM dist/react-core/index.js 10.72 KB
120
- ESM dist/react-core/testing.js 1.17 KB
121
- ESM dist/react-core/chunk-7DYMJ74I.js 279.00 B
122
- ESM dist/react-core/index.js.map 33.90 KB
123
- ESM dist/react-core/testing.js.map 1.82 KB
124
- ESM dist/react-core/chunk-7DYMJ74I.js.map 533.00 B
125
- ESM ⚡️ Build success in 27ms
115
+ ESM ⚡️ Build success in 13ms
116
+ ESM dist/worker/index.js 3.19 KB
117
+ ESM dist/worker/edge-wasm.js 215.00 B
118
+ ESM dist/worker/index.js.map 6.17 KB
119
+ ESM dist/worker/edge-wasm.js.map 434.00 B
120
+ ESM ⚡️ Build success in 20ms
121
+ ESM dist/better-auth/auth/client.js 4.44 KB
122
+ ESM dist/better-auth/auth/server.js 8.36 KB
123
+ ESM dist/better-auth/auth/react.js 799.00 B
124
+ ESM dist/better-auth/auth/client.js.map 8.24 KB
125
+ ESM dist/better-auth/auth/server.js.map 15.29 KB
126
+ ESM dist/better-auth/auth/react.js.map 2.04 KB
127
+ ESM ⚡️ Build success in 20ms
126
128
  ESM dist/media/index.js 236.00 B
127
129
  ESM dist/media/index.browser.js 2.79 KB
128
- ESM dist/media/index.native.js 2.90 KB
129
130
  ESM dist/media/index.server.js 2.95 KB
131
+ ESM dist/media/index.native.js 2.90 KB
130
132
  ESM dist/media/chunk-W3S526L3.js 6.47 KB
131
133
  ESM dist/media/index.js.map 71.00 B
132
- ESM dist/media/index.native.js.map 6.09 KB
133
134
  ESM dist/media/index.browser.js.map 6.15 KB
134
135
  ESM dist/media/index.server.js.map 6.37 KB
136
+ ESM dist/media/index.native.js.map 6.09 KB
135
137
  ESM dist/media/chunk-W3S526L3.js.map 16.57 KB
136
- ESM ⚡️ Build success in 32ms
137
- ESM dist/better-auth/auth/client.js 4.44 KB
138
- ESM dist/better-auth/auth/server.js 8.36 KB
139
- ESM dist/better-auth/auth/react.js 799.00 B
140
- ESM dist/better-auth/auth/client.js.map 8.24 KB
141
- ESM dist/better-auth/auth/server.js.map 15.29 KB
142
- ESM dist/better-auth/auth/react.js.map 2.04 KB
143
- ESM ⚡️ Build success in 25ms
138
+ ESM ⚡️ Build success in 28ms
139
+ ESM dist/browser/index.js 13.64 KB
140
+ ESM dist/browser/index.js.map 29.14 KB
141
+ ESM ⚡️ Build success in 31ms
144
142
  ESM dist/react-native/index.js 2.53 KB
145
143
  ESM dist/react-native/testing.js 120.00 B
146
144
  ESM dist/react-native/crypto.js 161.00 B
147
145
  ESM dist/react-native/index.js.map 5.68 KB
148
146
  ESM dist/react-native/testing.js.map 176.00 B
149
147
  ESM dist/react-native/crypto.js.map 197.00 B
150
- ESM ⚡️ Build success in 31ms
151
- ESM dist/browser/index.js 13.64 KB
152
- ESM dist/browser/index.js.map 29.14 KB
153
- ESM ⚡️ Build success in 44ms
148
+ ESM ⚡️ Build success in 30ms
149
+ ESM dist/react-core/index.js 10.72 KB
150
+ ESM dist/react-core/testing.js 1.17 KB
151
+ ESM dist/react-core/chunk-7DYMJ74I.js 279.00 B
152
+ ESM dist/react-core/index.js.map 33.90 KB
153
+ ESM dist/react-core/testing.js.map 1.82 KB
154
+ ESM dist/react-core/chunk-7DYMJ74I.js.map 533.00 B
155
+ ESM ⚡️ Build success in 33ms
154
156
  ESM dist/expo/index.js 4.68 KB
155
157
  ESM dist/expo/testing.js 112.00 B
156
158
  ESM dist/expo/crypto.js 153.00 B
157
159
  ESM dist/expo/index.js.map 10.23 KB
158
160
  ESM dist/expo/testing.js.map 168.00 B
159
161
  ESM dist/expo/crypto.js.map 189.00 B
160
- ESM ⚡️ Build success in 43ms
161
- ESM dist/react/testing.js 122.00 B
162
+ ESM ⚡️ Build success in 38ms
163
+ ESM dist/prosemirror/index.js 77.76 KB
164
+ ESM dist/prosemirror/index.js.map 307.20 KB
165
+ ESM ⚡️ Build success in 46ms
162
166
  ESM dist/react/index.js 24.76 KB
167
+ ESM dist/react/testing.js 122.00 B
163
168
  ESM dist/react/testing.js.map 165.00 B
164
169
  ESM dist/react/index.js.map 53.56 KB
165
- ESM ⚡️ Build success in 49ms
170
+ ESM ⚡️ Build success in 45ms
166
171
  ESM dist/react-native-core/index.js 18.03 KB
167
172
  ESM dist/react-native-core/crypto.js 2.10 KB
168
173
  ESM dist/react-native-core/testing.js 119.00 B
169
174
  ESM dist/react-native-core/index.js.map 36.85 KB
170
175
  ESM dist/react-native-core/crypto.js.map 4.25 KB
171
176
  ESM dist/react-native-core/testing.js.map 175.00 B
172
- ESM ⚡️ Build success in 48ms
173
- ESM dist/prosemirror/index.js 77.76 KB
174
- ESM dist/prosemirror/index.js.map 307.20 KB
175
- ESM ⚡️ Build success in 55ms
177
+ ESM ⚡️ Build success in 45ms
176
178
  ESM dist/inspector/index.js 69.71 KB
177
179
  ESM dist/inspector/index.js.map 121.38 KB
178
- ESM ⚡️ Build success in 81ms
180
+ ESM ⚡️ Build success in 64ms
179
181
  ESM dist/index.js 26.13 KB
180
182
  ESM dist/testing.js 7.17 KB
181
- ESM dist/chunk-AEXYCCQS.js 173.81 KB
182
- ESM dist/index.js.map 52.92 KB
183
+ ESM dist/chunk-GRN6OAUX.js 174.37 KB
183
184
  ESM dist/testing.js.map 14.10 KB
184
- ESM dist/chunk-AEXYCCQS.js.map 415.05 KB
185
- ESM ⚡️ Build success in 110ms
185
+ ESM dist/index.js.map 52.92 KB
186
+ ESM dist/chunk-GRN6OAUX.js.map 415.70 KB
187
+ ESM ⚡️ Build success in 77ms
186
188
  ESM dist/inspector/register-custom-element.js 218.00 B
187
189
  ESM dist/inspector/register-custom-element.js.map 314.00 B
188
190
  ESM dist/inspector/custom-element-G6SPZEBR.js 1.54 MB
189
191
  ESM dist/inspector/custom-element-G6SPZEBR.js.map 2.36 MB
190
- ESM ⚡️ Build success in 155ms
192
+ ESM ⚡️ Build success in 110ms
191
193
 
192
- > jazz-tools@0.18.13 types /home/runner/_work/jazz/jazz/packages/jazz-tools
194
+ > jazz-tools@0.18.15 types /home/runner/_work/jazz/jazz/packages/jazz-tools
193
195
  > tsc --outDir dist
194
196
 
195
197
 
196
- > jazz-tools@0.18.13 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
198
+ > jazz-tools@0.18.15 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
197
199
  > rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
198
200
 
199
201
  src/svelte -> dist/svelte
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.18.15
4
+
5
+ ### Patch Changes
6
+
7
+ - a584ab3: Add WasmCrypto support for Cloudflare Workers and edge runtimes by importing `jazz-tools/load-edge-wasm`.
8
+
9
+ - Enable WasmCrypto functionality by initializing the WebAssembly environment with the import: `import "jazz-tools/load-edge-wasm"` in edge runtimes.
10
+ - Guarantee compatibility across Cloudflare Workers and other edge runtime environments.
11
+
12
+ - Updated dependencies [a584ab3]
13
+ - cojson@0.18.15
14
+ - cojson-storage-indexeddb@0.18.15
15
+ - cojson-transport-ws@0.18.15
16
+
17
+ ## 0.18.14
18
+
19
+ ### Patch Changes
20
+
21
+ - a04435e: Optimized updates on large subscriptions
22
+ - cojson@0.18.14
23
+ - cojson-storage-indexeddb@0.18.14
24
+ - cojson-transport-ws@0.18.14
25
+
3
26
  ## 0.18.13
4
27
 
5
28
  ### Patch Changes
@@ -3735,6 +3735,14 @@ var SubscriptionScope = class _SubscriptionScope {
3735
3735
  this.unstable_branch = unstable_branch;
3736
3736
  this.childNodes = /* @__PURE__ */ new Map();
3737
3737
  this.childValues = /* @__PURE__ */ new Map();
3738
+ /**
3739
+ * Explicitly-loaded child ids that are unloaded
3740
+ */
3741
+ this.pendingLoadedChildren = /* @__PURE__ */ new Set();
3742
+ /**
3743
+ * Autoloaded child ids that are unloaded
3744
+ */
3745
+ this.pendingAutoloadedChildren = /* @__PURE__ */ new Set();
3738
3746
  this.childErrors = /* @__PURE__ */ new Map();
3739
3747
  this.validationErrors = /* @__PURE__ */ new Map();
3740
3748
  this.dirty = false;
@@ -3750,6 +3758,8 @@ var SubscriptionScope = class _SubscriptionScope {
3750
3758
  if (value.type === "unloaded") {
3751
3759
  return;
3752
3760
  }
3761
+ this.pendingLoadedChildren.delete(id);
3762
+ this.pendingAutoloadedChildren.delete(id);
3753
3763
  this.childValues.set(id, value);
3754
3764
  if (value.type === "unavailable" || value.type === "unauthorized") {
3755
3765
  this.childErrors.set(id, value.prependPath(key ?? id));
@@ -3901,12 +3911,7 @@ var SubscriptionScope = class _SubscriptionScope {
3901
3911
  if (this.isStreaming() && !this.isFileStream()) {
3902
3912
  return false;
3903
3913
  }
3904
- for (const value of this.childValues.values()) {
3905
- if (value.type === "unloaded" && !this.autoloaded.has(value.id)) {
3906
- return false;
3907
- }
3908
- }
3909
- return true;
3914
+ return this.pendingLoadedChildren.size === 0;
3910
3915
  }
3911
3916
  getCurrentValue() {
3912
3917
  if (this.value.type === "unauthorized" || this.value.type === "unavailable") {
@@ -3984,14 +3989,17 @@ var SubscriptionScope = class _SubscriptionScope {
3984
3989
  }
3985
3990
  this.silenceUpdates = false;
3986
3991
  }
3992
+ isSubscribedToId(id) {
3993
+ return this.idsSubscribed.has(id) || this.childValues.has(id) || this.pendingAutoloadedChildren.has(id) || this.pendingLoadedChildren.has(id);
3994
+ }
3987
3995
  subscribeToId(id, descriptor) {
3988
- if (this.idsSubscribed.has(id) || this.childValues.has(id)) {
3996
+ if (this.isSubscribedToId(id)) {
3989
3997
  return;
3990
3998
  }
3991
3999
  this.idsSubscribed.add(id);
3992
4000
  this.autoloaded.add(id);
3993
4001
  this.silenceUpdates = true;
3994
- this.childValues.set(id, { type: "unloaded", id });
4002
+ this.pendingAutoloadedChildren.add(id);
3995
4003
  const child = new _SubscriptionScope(
3996
4004
  this.node,
3997
4005
  true,
@@ -4081,6 +4089,8 @@ var SubscriptionScope = class _SubscriptionScope {
4081
4089
  if (childNode) {
4082
4090
  childNode.destroy();
4083
4091
  }
4092
+ this.pendingLoadedChildren.delete(id);
4093
+ this.pendingAutoloadedChildren.delete(id);
4084
4094
  this.childNodes.delete(id);
4085
4095
  this.childValues.delete(id);
4086
4096
  }
@@ -4159,10 +4169,11 @@ var SubscriptionScope = class _SubscriptionScope {
4159
4169
  return void 0;
4160
4170
  }
4161
4171
  loadChildNode(id, query, descriptor, key) {
4162
- if (this.childValues.has(id)) {
4172
+ if (this.isSubscribedToId(id)) {
4163
4173
  return;
4164
4174
  }
4165
- if (key && this.autoloadedKeys.has(key)) {
4175
+ const isAutoloaded = key && this.autoloadedKeys.has(key);
4176
+ if (isAutoloaded) {
4166
4177
  this.autoloaded.add(id);
4167
4178
  }
4168
4179
  const skipInvalid = typeof query === "object" && query.$onError === null;
@@ -4173,7 +4184,11 @@ var SubscriptionScope = class _SubscriptionScope {
4173
4184
  this.skipInvalidKeys.add(id);
4174
4185
  }
4175
4186
  const resolve = typeof query === "object" && query !== null ? { ...query } : query;
4176
- this.childValues.set(id, { type: "unloaded", id });
4187
+ if (!isAutoloaded) {
4188
+ this.pendingLoadedChildren.add(id);
4189
+ } else {
4190
+ this.pendingAutoloadedChildren.add(id);
4191
+ }
4177
4192
  const child = new _SubscriptionScope(
4178
4193
  this.node,
4179
4194
  resolve,
@@ -4216,7 +4231,7 @@ function getSubscriptionScope(value) {
4216
4231
  }
4217
4232
  function accessChildByKey(parent, childId, key) {
4218
4233
  const subscriptionScope = getSubscriptionScope(parent);
4219
- if (!subscriptionScope.childValues.has(childId)) {
4234
+ if (!subscriptionScope.isSubscribedToId(childId)) {
4220
4235
  subscriptionScope.subscribeToKey(key);
4221
4236
  }
4222
4237
  const value = subscriptionScope.childValues.get(childId);
@@ -6063,4 +6078,4 @@ export {
6063
6078
  JazzContextManager
6064
6079
  };
6065
6080
  /* istanbul ignore file -- @preserve */
6066
- //# sourceMappingURL=chunk-AEXYCCQS.js.map
6081
+ //# sourceMappingURL=chunk-GRN6OAUX.js.map