@syncular/client 0.79.0 → 0.79.2

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.
@@ -344,7 +344,12 @@ export async function openPersistentWasmDatabase(name, options) {
344
344
  await util.unpauseVfs();
345
345
  db = new util.OpfsSAHPoolDb(`/${name}.db`);
346
346
  configureSahCrashRecovery(db, sqlite3);
347
- return new WasmClientDatabase(db, sqlite3, { util, lease }, { fenced: false, siblings: new Set() });
347
+ const database = new WasmClientDatabase(db, sqlite3, { util, lease }, { fenced: false, siblings: new Set() });
348
+ // §5.3: a new replica uses 64 KiB pages, because every sync-access-handle
349
+ // call costs the same whatever its size. A database with tables keeps its
350
+ // page size.
351
+ database.exec('PRAGMA page_size=65536');
352
+ return database;
348
353
  }
349
354
  catch (error) {
350
355
  db?.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncular/client",
3
- "version": "0.79.0",
3
+ "version": "0.79.2",
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",
@@ -121,11 +121,11 @@
121
121
  },
122
122
  "dependencies": {
123
123
  "@sqlite.org/sqlite-wasm": "^3.53.0-build1",
124
- "@syncular/core": "0.79.0"
124
+ "@syncular/core": "0.79.2"
125
125
  },
126
126
  "devDependencies": {
127
127
  "@electric-sql/pglite": "^0.5.4",
128
- "@syncular/server": "0.79.0",
128
+ "@syncular/server": "0.79.2",
129
129
  "playwright": "1.63.0",
130
130
  "vite": "8.3.4"
131
131
  }
@@ -561,12 +561,17 @@ export async function openPersistentWasmDatabase(
561
561
  await util.unpauseVfs();
562
562
  db = new util.OpfsSAHPoolDb(`/${name}.db`);
563
563
  configureSahCrashRecovery(db, sqlite3);
564
- return new WasmClientDatabase(
564
+ const database = new WasmClientDatabase(
565
565
  db,
566
566
  sqlite3,
567
567
  { util, lease },
568
568
  { fenced: false, siblings: new Set() },
569
569
  );
570
+ // §5.3: a new replica uses 64 KiB pages, because every sync-access-handle
571
+ // call costs the same whatever its size. A database with tables keeps its
572
+ // page size.
573
+ database.exec('PRAGMA page_size=65536');
574
+ return database;
570
575
  } catch (error) {
571
576
  db?.close();
572
577
  util?.pauseVfs();