@syncular/client 0.15.24 → 0.15.26
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.
- package/dist/reactive-store.js +5 -1
- package/package.json +3 -3
- package/src/reactive-store.ts +7 -1
package/dist/reactive-store.js
CHANGED
|
@@ -688,7 +688,11 @@ export class ReactiveClientStore {
|
|
|
688
688
|
this.#offLeadership?.();
|
|
689
689
|
this.#offLeadership = undefined;
|
|
690
690
|
for (const group of this.#windowClaims.values()) {
|
|
691
|
-
|
|
691
|
+
// Releasing a window is best-effort teardown. A resource owner may have
|
|
692
|
+
// already closed the underlying worker/native handle before React effect
|
|
693
|
+
// cleanup runs (notably during schema-changing HMR). Do not let that
|
|
694
|
+
// harmless ordering race escape as an unhandled rejection.
|
|
695
|
+
void Promise.resolve(this.client.setWindow(group.base, [])).catch(() => undefined);
|
|
692
696
|
}
|
|
693
697
|
this.#windowClaims.clear();
|
|
694
698
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncular/client",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.26",
|
|
4
4
|
"description": "Syncular TypeScript client core — offline-first sync over SQLite (WASM/OPFS, Bun, Node)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Benjamin Kniffler",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@sqlite.org/sqlite-wasm": "^3.53.0-build1",
|
|
84
|
-
"@syncular/core": "0.15.
|
|
84
|
+
"@syncular/core": "0.15.26"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"better-sqlite3": ">=11"
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@syncular/server": "0.15.
|
|
95
|
+
"@syncular/server": "0.15.26",
|
|
96
96
|
"@types/better-sqlite3": "^7.6.13",
|
|
97
97
|
"better-sqlite3": "^12.11.1"
|
|
98
98
|
}
|
package/src/reactive-store.ts
CHANGED
|
@@ -847,7 +847,13 @@ export class ReactiveClientStore {
|
|
|
847
847
|
this.#offLeadership?.();
|
|
848
848
|
this.#offLeadership = undefined;
|
|
849
849
|
for (const group of this.#windowClaims.values()) {
|
|
850
|
-
|
|
850
|
+
// Releasing a window is best-effort teardown. A resource owner may have
|
|
851
|
+
// already closed the underlying worker/native handle before React effect
|
|
852
|
+
// cleanup runs (notably during schema-changing HMR). Do not let that
|
|
853
|
+
// harmless ordering race escape as an unhandled rejection.
|
|
854
|
+
void Promise.resolve(this.client.setWindow(group.base, [])).catch(
|
|
855
|
+
() => undefined,
|
|
856
|
+
);
|
|
851
857
|
}
|
|
852
858
|
this.#windowClaims.clear();
|
|
853
859
|
}
|