@blamejs/core 0.15.9 → 0.15.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.
@@ -544,12 +544,6 @@ function _walkAndReSeal(node, oldKeys, newKeys) {
544
544
  return { value: node, changed: false };
545
545
  }
546
546
 
547
- // Transaction-control statements only (BEGIN / COMMIT / ROLLBACK) - fixed
548
- // keywords, no identifier / value, so they stay verbatim rather than route
549
- // through b.sql (the builder has no transaction-control verb). The param is
550
- // named `stmtText` so it does not shadow the module-level `sql` builder.
551
- function _runStmt(db, stmtText) { db.prepare(stmtText).run(); }
552
-
553
547
  function _rotateColumn(db, table, column, schema, roots, batchSize, progress) {
554
548
  // Every statement composes through b.sql (sqlite dialect, quoteName so
555
549
  // the concrete handle's table is quoted, not left bare for a cluster
@@ -655,8 +649,9 @@ function _rotateOverflow(db, table, oldKeys, newKeys, batchSize, progress, warni
655
649
  var rows = sel.all(lastId);
656
650
  if (rows.length === 0) break;
657
651
 
658
- _runStmt(db, "BEGIN");
659
- try {
652
+ // One transaction per page via the shared wrapper — the rotate worker
653
+ // no longer hand-rolls the BEGIN/COMMIT/ROLLBACK skeleton.
654
+ dbSchema.runInTransaction(db, function () {
660
655
  for (var i = 0; i < rows.length; i++) {
661
656
  var row = rows[i];
662
657
  var doc;
@@ -671,11 +666,7 @@ function _rotateOverflow(db, table, oldKeys, newKeys, batchSize, progress, warni
671
666
  var rv = _walkAndReSeal(doc, oldKeys, newKeys);
672
667
  if (rv.changed) upd.run(JSON.stringify(rv.value), row._id);
673
668
  }
674
- _runStmt(db, "COMMIT");
675
- } catch (e) {
676
- _runStmt(db, "ROLLBACK");
677
- throw e;
678
- }
669
+ });
679
670
  processed += rows.length;
680
671
  lastId = rows[rows.length - 1]._id;
681
672
  _emit(progress, { phase: "rotate_overflow", table: table, rowsProcessed: processed, rowsTotal: total });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blamejs/core",
3
- "version": "0.15.9",
3
+ "version": "0.15.11",
4
4
  "description": "The Node framework that owns its stack.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "blamejs contributors",
package/sbom.cdx.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
3
3
  "bomFormat": "CycloneDX",
4
4
  "specVersion": "1.5",
5
- "serialNumber": "urn:uuid:19fb1b2e-d7b6-4169-b9c6-f60726097293",
5
+ "serialNumber": "urn:uuid:693c533d-2a9b-43e7-93e5-01669defbb95",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-06-14T00:18:26.195Z",
8
+ "timestamp": "2026-06-14T07:19:57.070Z",
9
9
  "lifecycles": [
10
10
  {
11
11
  "phase": "build"
@@ -19,14 +19,14 @@
19
19
  }
20
20
  ],
21
21
  "component": {
22
- "bom-ref": "@blamejs/core@0.15.9",
22
+ "bom-ref": "@blamejs/core@0.15.11",
23
23
  "type": "application",
24
24
  "name": "blamejs",
25
- "version": "0.15.9",
25
+ "version": "0.15.11",
26
26
  "scope": "required",
27
27
  "author": "blamejs contributors",
28
28
  "description": "The Node framework that owns its stack.",
29
- "purl": "pkg:npm/%40blamejs/core@0.15.9",
29
+ "purl": "pkg:npm/%40blamejs/core@0.15.11",
30
30
  "properties": [],
31
31
  "externalReferences": [
32
32
  {
@@ -54,7 +54,7 @@
54
54
  "components": [],
55
55
  "dependencies": [
56
56
  {
57
- "ref": "@blamejs/core@0.15.9",
57
+ "ref": "@blamejs/core@0.15.11",
58
58
  "dependsOn": []
59
59
  }
60
60
  ]