@rulvar/store-sqlite 1.18.0 → 1.19.0

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ import { JournalOrderViolation, LeaseHeldError } from "@rulvar/core";
23
23
  */
24
24
  /** Appendix A interim reference for the sqlite store. */
25
25
  const DEFAULT_LEASE_TTL_MS = 6e4;
26
+ const wallClock = Date.now.bind(globalThis);
26
27
  var SqliteStore = class {
27
28
  db;
28
29
  ttlMs;
@@ -30,7 +31,7 @@ var SqliteStore = class {
30
31
  constructor(options) {
31
32
  this.db = new DatabaseSync(options.path);
32
33
  this.ttlMs = options.ttlMs ?? 6e4;
33
- this.now = options.now ?? Date.now;
34
+ this.now = options.now ?? wallClock;
34
35
  this.db.exec(`
35
36
  PRAGMA journal_mode = WAL;
36
37
  CREATE TABLE IF NOT EXISTS entries (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulvar/store-sqlite",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "Rulvar SQLite store implementing JournalStore and LeasableStore with a fencing epoch.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -22,13 +22,13 @@
22
22
  "access": "public"
23
23
  },
24
24
  "dependencies": {
25
- "@rulvar/core": "1.18.0"
25
+ "@rulvar/core": "1.19.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.20.0",
29
29
  "tsdown": "^0.22.3",
30
30
  "typescript": "~6.0.3",
31
- "@rulvar/store-conformance": "1.18.0"
31
+ "@rulvar/store-conformance": "1.19.0"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",