jazz-tools 0.20.10 → 0.20.11

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.20.10 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.20.11 build /home/runner/_work/jazz/jazz/packages/jazz-tools
3
3
  > tsup && pnpm types && pnpm build:svelte && pnpm build:better-auth-svelte
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts","testing":"src/testing.ts","tools/ssr":"src/tools/ssr/index.ts"}
@@ -110,6 +110,13 @@
110
110
  ESM dist/tiptap/index.js 564.00 B
111
111
  ESM dist/tiptap/index.js.map 1.21 KB
112
112
  ESM ⚡️ Build success in 39ms
113
+ ESM dist/worker/index.js 3.45 KB
114
+ ESM dist/worker/edge-wasm.js 259.00 B
115
+ ESM dist/worker/napi-crypto.js 110.00 B
116
+ ESM dist/worker/index.js.map 6.97 KB
117
+ ESM dist/worker/edge-wasm.js.map 505.00 B
118
+ ESM dist/worker/napi-crypto.js.map 162.00 B
119
+ ESM ⚡️ Build success in 38ms
113
120
  ESM dist/better-auth/auth/client.js 4.54 KB
114
121
  ESM dist/better-auth/auth/server.js 8.40 KB
115
122
  ESM dist/better-auth/auth/react.js 813.00 B
@@ -117,102 +124,95 @@
117
124
  ESM dist/better-auth/auth/server.js.map 15.40 KB
118
125
  ESM dist/better-auth/auth/react.js.map 2.07 KB
119
126
  ESM ⚡️ Build success in 33ms
120
- ESM dist/worker/index.js 3.45 KB
121
- ESM dist/worker/edge-wasm.js 259.00 B
122
- ESM dist/worker/napi-crypto.js 110.00 B
123
- ESM dist/worker/index.js.map 6.97 KB
124
- ESM dist/worker/edge-wasm.js.map 505.00 B
125
- ESM dist/worker/napi-crypto.js.map 162.00 B
126
- ESM ⚡️ Build success in 44ms
127
127
  ESM dist/media/index.js 236.00 B
128
128
  ESM dist/media/index.browser.js 2.79 KB
129
- ESM dist/media/index.native.js 4.02 KB
130
129
  ESM dist/media/index.server.js 2.95 KB
130
+ ESM dist/media/index.native.js 4.02 KB
131
131
  ESM dist/media/chunk-IRL3KNPO.js 6.70 KB
132
132
  ESM dist/media/index.js.map 71.00 B
133
133
  ESM dist/media/index.browser.js.map 6.15 KB
134
- ESM dist/media/index.native.js.map 8.13 KB
135
134
  ESM dist/media/index.server.js.map 6.37 KB
135
+ ESM dist/media/index.native.js.map 8.13 KB
136
136
  ESM dist/media/chunk-IRL3KNPO.js.map 17.00 KB
137
- ESM ⚡️ Build success in 50ms
137
+ ESM ⚡️ Build success in 60ms
138
+ ESM dist/browser/index.js 15.96 KB
139
+ ESM dist/browser/index.js.map 34.06 KB
140
+ ESM ⚡️ Build success in 62ms
138
141
  ESM dist/react-core/index.js 17.87 KB
139
142
  ESM dist/react-core/testing.js 904.00 B
140
143
  ESM dist/react-core/chunk-UOYH6JFJ.js 189.00 B
141
144
  ESM dist/react-core/index.js.map 58.59 KB
142
145
  ESM dist/react-core/testing.js.map 1.34 KB
143
146
  ESM dist/react-core/chunk-UOYH6JFJ.js.map 363.00 B
144
- ESM ⚡️ Build success in 50ms
147
+ ESM ⚡️ Build success in 58ms
148
+ ESM dist/better-auth/database-adapter/index.js 26.86 KB
149
+ ESM dist/better-auth/database-adapter/index.js.map 58.67 KB
150
+ ESM ⚡️ Build success in 52ms
145
151
  ESM dist/expo/index.js 5.65 KB
146
152
  ESM dist/expo/testing.js 112.00 B
147
153
  ESM dist/expo/polyfills.js 858.00 B
148
154
  ESM dist/expo/index.js.map 11.85 KB
149
155
  ESM dist/expo/testing.js.map 168.00 B
150
156
  ESM dist/expo/polyfills.js.map 1.61 KB
151
- ESM ⚡️ Build success in 44ms
152
- ESM dist/better-auth/database-adapter/index.js 26.86 KB
153
- ESM dist/better-auth/database-adapter/index.js.map 58.67 KB
154
- ESM ⚡️ Build success in 56ms
155
- ESM dist/browser/index.js 15.96 KB
156
- ESM dist/browser/index.js.map 34.06 KB
157
- ESM ⚡️ Build success in 72ms
157
+ ESM ⚡️ Build success in 60ms
158
158
  ESM dist/prosemirror/index.js 78.48 KB
159
159
  ESM dist/prosemirror/index.js.map 309.11 KB
160
- ESM ⚡️ Build success in 71ms
160
+ ESM ⚡️ Build success in 66ms
161
161
  ESM dist/react/index.js 26.02 KB
162
- ESM dist/react/testing.js 122.00 B
163
162
  ESM dist/react/ssr.js 693.00 B
164
- ESM dist/react/testing.js.map 165.00 B
165
- ESM dist/react/index.js.map 55.45 KB
163
+ ESM dist/react/testing.js 122.00 B
166
164
  ESM dist/react/ssr.js.map 1.10 KB
167
- ESM ⚡️ Build success in 65ms
165
+ ESM dist/react/index.js.map 55.45 KB
166
+ ESM dist/react/testing.js.map 165.00 B
167
+ ESM ⚡️ Build success in 68ms
168
+ ESM dist/react-native/index.js 38.21 KB
169
+ ESM dist/react-native/polyfills.js 858.00 B
170
+ ESM dist/react-native/testing.js 120.00 B
171
+ ESM dist/react-native/polyfills.js.map 1.61 KB
172
+ ESM dist/react-native/testing.js.map 176.00 B
173
+ ESM dist/react-native/index.js.map 76.75 KB
174
+ ESM ⚡️ Build success in 80ms
168
175
  ESM dist/react-native-core/testing.js 119.00 B
169
176
  ESM dist/react-native-core/index.js 34.47 KB
170
177
  ESM dist/react-native-core/testing.js.map 175.00 B
171
178
  ESM dist/react-native-core/index.js.map 69.10 KB
172
- ESM ⚡️ Build success in 77ms
173
- ESM dist/react-native/index.js 38.21 KB
174
- ESM dist/react-native/testing.js 120.00 B
175
- ESM dist/react-native/polyfills.js 858.00 B
176
- ESM dist/react-native/index.js.map 76.75 KB
177
- ESM dist/react-native/testing.js.map 176.00 B
178
- ESM dist/react-native/polyfills.js.map 1.61 KB
179
- ESM ⚡️ Build success in 85ms
180
- ESM dist/inspector/standalone.js 12.61 KB
179
+ ESM ⚡️ Build success in 79ms
181
180
  ESM dist/inspector/index.js 37.49 KB
181
+ ESM dist/inspector/standalone.js 12.61 KB
182
182
  ESM dist/inspector/chunk-ORKZSKZF.js 128.83 KB
183
- ESM dist/inspector/standalone.js.map 20.11 KB
184
183
  ESM dist/inspector/index.js.map 63.80 KB
184
+ ESM dist/inspector/standalone.js.map 20.11 KB
185
185
  ESM dist/inspector/chunk-ORKZSKZF.js.map 222.34 KB
186
- ESM ⚡️ Build success in 114ms
187
- ESM dist/chunk-K4D7IMFM.js 690.00 B
188
- ESM dist/tools/ssr.js 156.00 B
186
+ ESM ⚡️ Build success in 95ms
189
187
  ESM dist/testing.js 8.56 KB
190
188
  ESM dist/index.js 32.18 KB
189
+ ESM dist/tools/ssr.js 156.00 B
190
+ ESM dist/chunk-K4D7IMFM.js 690.00 B
191
191
  ESM dist/chunk-ZQWSQH6L.js 945.00 B
192
- ESM dist/chunk-YDZ264RU.js 261.62 KB
193
- ESM dist/chunk-K4D7IMFM.js.map 1.10 KB
194
- ESM dist/tools/ssr.js.map 71.00 B
192
+ ESM dist/chunk-KGV2CJMG.js 262.16 KB
195
193
  ESM dist/testing.js.map 16.22 KB
196
- ESM dist/chunk-ZQWSQH6L.js.map 71.00 B
197
194
  ESM dist/index.js.map 65.34 KB
198
- ESM dist/chunk-YDZ264RU.js.map 603.45 KB
199
- ESM ⚡️ Build success in 143ms
195
+ ESM dist/tools/ssr.js.map 71.00 B
196
+ ESM dist/chunk-K4D7IMFM.js.map 1.10 KB
197
+ ESM dist/chunk-ZQWSQH6L.js.map 71.00 B
198
+ ESM dist/chunk-KGV2CJMG.js.map 604.30 KB
199
+ ESM ⚡️ Build success in 127ms
200
200
  ESM dist/inspector/register-custom-element.js 305.00 B
201
201
  ESM dist/inspector/register-custom-element.js.map 445.00 B
202
202
  ESM dist/inspector/custom-element-7G7IZVLL.js 1.64 MB
203
203
  ESM dist/inspector/custom-element-7G7IZVLL.js.map 2.52 MB
204
- ESM ⚡️ Build success in 177ms
204
+ ESM ⚡️ Build success in 157ms
205
205
 
206
- > jazz-tools@0.20.10 types /home/runner/_work/jazz/jazz/packages/jazz-tools
206
+ > jazz-tools@0.20.11 types /home/runner/_work/jazz/jazz/packages/jazz-tools
207
207
  > tsc --outDir dist
208
208
 
209
209
 
210
- > jazz-tools@0.20.10 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
210
+ > jazz-tools@0.20.11 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
211
211
  > rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
212
212
 
213
213
  src/svelte -> dist/svelte
214
214
 
215
- > jazz-tools@0.20.10 build:better-auth-svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
215
+ > jazz-tools@0.20.11 build:better-auth-svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
216
216
  > mkdir -p dist/better-auth/auth && svelte-package -i src/better-auth/auth -o dist/better-auth/auth-temp --tsconfig tsconfig.svelte.json && cp dist/better-auth/auth-temp/svelte.svelte dist/better-auth/auth/svelte.svelte && cp dist/better-auth/auth-temp/svelte.svelte.d.ts dist/better-auth/auth/svelte.d.ts && rm -rf dist/better-auth/auth-temp
217
217
 
218
218
  src/better-auth/auth -> dist/better-auth/auth-temp
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.20.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 191ce7a: Mark CoValue migration failures as unavailable instead of throwing behavior.
8
+
9
+ When a migration throws (for example, async migrations or write attempts without permissions), loading now resolves to a CoValue with `$jazz.loadingState === "unavailable"`.
10
+
11
+ - Updated dependencies [d91408c]
12
+ - cojson@0.20.11
13
+ - cojson-storage-indexeddb@0.20.11
14
+ - cojson-transport-ws@0.20.11
15
+
3
16
  ## 0.20.10
4
17
 
5
18
  ### Patch Changes
@@ -5700,6 +5700,7 @@ var _SubscriptionScope = class _SubscriptionScope {
5700
5700
  this.version = 0;
5701
5701
  this.migrated = false;
5702
5702
  this.migrating = false;
5703
+ this.migrationFailed = false;
5703
5704
  this.closed = false;
5704
5705
  this.silenceUpdates = false;
5705
5706
  this.subscribers = /* @__PURE__ */ new Set();
@@ -5713,6 +5714,10 @@ var _SubscriptionScope = class _SubscriptionScope {
5713
5714
  id,
5714
5715
  (value) => {
5715
5716
  lastUpdate = value;
5717
+ if (this.migrationFailed) {
5718
+ this.handleUpdate(CoValueLoadingState.UNAVAILABLE);
5719
+ return;
5720
+ }
5716
5721
  if (skipRetry && value === CoValueLoadingState.UNAVAILABLE) {
5717
5722
  this.handleUpdate(value);
5718
5723
  return;
@@ -5722,9 +5727,17 @@ var _SubscriptionScope = class _SubscriptionScope {
5722
5727
  return;
5723
5728
  }
5724
5729
  this.migrating = true;
5725
- applyCoValueMigrations(
5726
- instantiateRefEncodedFromRaw(this.schema, value)
5727
- );
5730
+ const instance = instantiateRefEncodedFromRaw(this.schema, value);
5731
+ try {
5732
+ applyCoValueMigrations(instance);
5733
+ } catch (error) {
5734
+ const reason = error instanceof Error ? error.message : String(error);
5735
+ this.migrationFailed = true;
5736
+ this.migrated = true;
5737
+ console.error(`Migration failed for ${this.id}: ${reason}`);
5738
+ this.handleUpdate(CoValueLoadingState.UNAVAILABLE);
5739
+ return;
5740
+ }
5728
5741
  this.migrated = true;
5729
5742
  this.handleUpdate(lastUpdate);
5730
5743
  return;
@@ -8885,4 +8898,4 @@ export {
8885
8898
  JazzContextManager
8886
8899
  };
8887
8900
  /* istanbul ignore file -- @preserve */
8888
- //# sourceMappingURL=chunk-YDZ264RU.js.map
8901
+ //# sourceMappingURL=chunk-KGV2CJMG.js.map