@quereus/store 3.3.0 → 4.0.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.
- package/README.md +436 -317
- package/dist/src/common/backing-host.d.ts +198 -0
- package/dist/src/common/backing-host.d.ts.map +1 -0
- package/dist/src/common/backing-host.js +452 -0
- package/dist/src/common/backing-host.js.map +1 -0
- package/dist/src/common/bytes.d.ts +16 -0
- package/dist/src/common/bytes.d.ts.map +1 -0
- package/dist/src/common/bytes.js +33 -0
- package/dist/src/common/bytes.js.map +1 -0
- package/dist/src/common/cached-kv-store.d.ts +3 -3
- package/dist/src/common/cached-kv-store.d.ts.map +1 -1
- package/dist/src/common/cached-kv-store.js +6 -4
- package/dist/src/common/cached-kv-store.js.map +1 -1
- package/dist/src/common/encoding.d.ts +9 -1
- package/dist/src/common/encoding.d.ts.map +1 -1
- package/dist/src/common/encoding.js +12 -2
- package/dist/src/common/encoding.js.map +1 -1
- package/dist/src/common/index.d.ts +8 -6
- package/dist/src/common/index.d.ts.map +1 -1
- package/dist/src/common/index.js +7 -3
- package/dist/src/common/index.js.map +1 -1
- package/dist/src/common/key-builder.d.ts +125 -4
- package/dist/src/common/key-builder.d.ts.map +1 -1
- package/dist/src/common/key-builder.js +186 -9
- package/dist/src/common/key-builder.js.map +1 -1
- package/dist/src/common/kv-store.d.ts +75 -4
- package/dist/src/common/kv-store.d.ts.map +1 -1
- package/dist/src/common/memory-store.d.ts +3 -3
- package/dist/src/common/memory-store.d.ts.map +1 -1
- package/dist/src/common/memory-store.js +4 -2
- package/dist/src/common/memory-store.js.map +1 -1
- package/dist/src/common/store-connection.d.ts +11 -4
- package/dist/src/common/store-connection.d.ts.map +1 -1
- package/dist/src/common/store-connection.js +12 -6
- package/dist/src/common/store-connection.js.map +1 -1
- package/dist/src/common/store-module.d.ts +580 -20
- package/dist/src/common/store-module.d.ts.map +1 -1
- package/dist/src/common/store-module.js +1590 -135
- package/dist/src/common/store-module.js.map +1 -1
- package/dist/src/common/store-table.d.ts +347 -14
- package/dist/src/common/store-table.d.ts.map +1 -1
- package/dist/src/common/store-table.js +751 -98
- package/dist/src/common/store-table.js.map +1 -1
- package/dist/src/common/transaction.d.ts +135 -27
- package/dist/src/common/transaction.d.ts.map +1 -1
- package/dist/src/common/transaction.js +216 -55
- package/dist/src/common/transaction.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,37 +1,94 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Transaction coordinator for virtual table modules.
|
|
3
3
|
*
|
|
4
|
-
* Manages a shared WriteBatch across all tables in a
|
|
5
|
-
* providing
|
|
4
|
+
* Manages a shared WriteBatch across all tables in a storage MODULE,
|
|
5
|
+
* providing cross-table atomicity.
|
|
6
6
|
*/
|
|
7
7
|
import { QuereusError, StatusCode } from '@quereus/quereus';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { bytesToHex, compareBytes } from './bytes.js';
|
|
9
|
+
/** Shared empty view returned when a store has no pending ops. */
|
|
10
|
+
const EMPTY_PENDING = Object.freeze({
|
|
11
|
+
puts: new Map(),
|
|
12
|
+
deletes: new Set(),
|
|
13
|
+
});
|
|
14
|
+
const EMPTY_ORDERED = Object.freeze({
|
|
15
|
+
puts: [],
|
|
16
|
+
deletes: new Set(),
|
|
17
|
+
});
|
|
12
18
|
/**
|
|
13
|
-
* Coordinates transactions across
|
|
19
|
+
* Coordinates transactions across the tables of one storage MODULE.
|
|
20
|
+
*
|
|
21
|
+
* A single coordinator is shared by every {@link KVStore}-backed connection the
|
|
22
|
+
* module owns (see `StoreModule.getCoordinator`). All mutations within a
|
|
23
|
+
* transaction are buffered, addressed by their explicit target store handle.
|
|
24
|
+
* On commit, every store's ops are written — in ONE {@link AtomicBatch} when the
|
|
25
|
+
* provider exposes a shared commit domain, else one per-store batch — and events
|
|
26
|
+
* are fired. On rollback, the buffer and events are discarded. Because the
|
|
27
|
+
* engine commits connections sequentially and commit/rollback are idempotent
|
|
28
|
+
* (`if (!this.inTransaction) return`), the first connection to commit flushes
|
|
29
|
+
* ALL the module's accumulated ops in one batch; the rest no-op. This gives
|
|
30
|
+
* cross-table all-or-nothing commit: a transaction touching tables A and B can
|
|
31
|
+
* never persist A but not B.
|
|
14
32
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
33
|
+
* Buffered ops are additionally indexed per target store with last-write-wins
|
|
34
|
+
* semantics (see {@link getPendingOpsForStore} / {@link getOrderedPendingOps}),
|
|
35
|
+
* so reads that need to see intra-transaction writes are O(1) rather than a
|
|
36
|
+
* re-scan of the op log. Every op carries an explicit store handle — data ops,
|
|
37
|
+
* index ops, and backing-host writes alike — so two tables' data ops never
|
|
38
|
+
* collide: each table's data store is a distinct handle and buckets separately.
|
|
18
39
|
*/
|
|
19
40
|
export class TransactionCoordinator {
|
|
20
|
-
store;
|
|
21
41
|
eventEmitter;
|
|
42
|
+
/**
|
|
43
|
+
* Optional factory yielding an {@link AtomicBatch} that spans the provider's
|
|
44
|
+
* stores. Re-evaluated per commit so a provider that gains/loses the
|
|
45
|
+
* capability (or is swapped under test) is always honored; returning
|
|
46
|
+
* `undefined` falls back to the per-store {@link KVStore.batch} loop.
|
|
47
|
+
*/
|
|
48
|
+
atomicBatchFactory;
|
|
22
49
|
// Transaction state
|
|
23
50
|
inTransaction = false;
|
|
24
51
|
pendingOps = [];
|
|
25
52
|
pendingEvents = [];
|
|
26
53
|
savepointStack = [];
|
|
27
54
|
callbacks = [];
|
|
28
|
-
|
|
29
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Incremental last-write-wins index over `pendingOps`, bucketed per target
|
|
57
|
+
* store handle. Every op is addressed by its concrete store, so a table's
|
|
58
|
+
* data store and each of its secondary-index stores bucket separately, and
|
|
59
|
+
* two different tables (different data-store handles) never share a bucket.
|
|
60
|
+
*/
|
|
61
|
+
pendingIndex = new Map();
|
|
62
|
+
constructor(eventEmitter, atomicBatchFactory) {
|
|
30
63
|
this.eventEmitter = eventEmitter;
|
|
64
|
+
this.atomicBatchFactory = atomicBatchFactory;
|
|
31
65
|
}
|
|
32
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Register callbacks for transaction lifecycle events.
|
|
68
|
+
*
|
|
69
|
+
* Returns a disposer that removes this EXACT pair (identity-matched). The splice
|
|
70
|
+
* runs only at teardown — never inside the commit/rollback fire loops — so there
|
|
71
|
+
* is no iterate-during-mutate hazard. The coordinator is module-wide and never
|
|
72
|
+
* prunes on its own, so a hard table eviction (drop / recreate / rename) MUST
|
|
73
|
+
* call its disposer; otherwise the pair's closures — and the {@link StoreTable}
|
|
74
|
+
* they capture — stay pinned for the module's lifetime (the leak this fixes).
|
|
75
|
+
*/
|
|
33
76
|
registerCallbacks(callbacks) {
|
|
34
77
|
this.callbacks.push(callbacks);
|
|
78
|
+
return () => {
|
|
79
|
+
const i = this.callbacks.indexOf(callbacks);
|
|
80
|
+
if (i >= 0)
|
|
81
|
+
this.callbacks.splice(i, 1);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Number of registered lifecycle-callback pairs. Introspection for tests
|
|
86
|
+
* (regression coverage that hard eviction deregisters its pair, so the count
|
|
87
|
+
* stays O(live tables) rather than O(drop/recreate cycles)); not part of the
|
|
88
|
+
* transactional contract.
|
|
89
|
+
*/
|
|
90
|
+
get callbackCount() {
|
|
91
|
+
return this.callbacks.length;
|
|
35
92
|
}
|
|
36
93
|
/** Check if a transaction is active. */
|
|
37
94
|
isInTransaction() {
|
|
@@ -47,20 +104,29 @@ export class TransactionCoordinator {
|
|
|
47
104
|
this.pendingOps = [];
|
|
48
105
|
this.pendingEvents = [];
|
|
49
106
|
this.savepointStack = [];
|
|
107
|
+
this.pendingIndex = new Map();
|
|
50
108
|
}
|
|
51
|
-
/** Queue a put operation
|
|
109
|
+
/** Queue a put operation targeting `store`. */
|
|
52
110
|
put(key, value, store) {
|
|
53
111
|
if (!this.inTransaction) {
|
|
54
112
|
throw new QuereusError('Cannot queue operation outside transaction', StatusCode.MISUSE);
|
|
55
113
|
}
|
|
56
114
|
this.pendingOps.push({ type: 'put', store, key, value });
|
|
115
|
+
const bucket = this.bucketFor(store);
|
|
116
|
+
const hex = bytesToHex(key);
|
|
117
|
+
bucket.puts.set(hex, { key, value });
|
|
118
|
+
bucket.deletes.delete(hex);
|
|
57
119
|
}
|
|
58
|
-
/** Queue a delete operation
|
|
120
|
+
/** Queue a delete operation targeting `store`. */
|
|
59
121
|
delete(key, store) {
|
|
60
122
|
if (!this.inTransaction) {
|
|
61
123
|
throw new QuereusError('Cannot queue operation outside transaction', StatusCode.MISUSE);
|
|
62
124
|
}
|
|
63
125
|
this.pendingOps.push({ type: 'delete', store, key });
|
|
126
|
+
const bucket = this.bucketFor(store);
|
|
127
|
+
const hex = bytesToHex(key);
|
|
128
|
+
bucket.deletes.add(hex);
|
|
129
|
+
bucket.puts.delete(hex);
|
|
64
130
|
}
|
|
65
131
|
/** Queue a data change event (fired on commit). */
|
|
66
132
|
queueEvent(event) {
|
|
@@ -77,30 +143,53 @@ export class TransactionCoordinator {
|
|
|
77
143
|
return;
|
|
78
144
|
}
|
|
79
145
|
try {
|
|
80
|
-
// Group pending operations by target store
|
|
146
|
+
// Group pending operations by target store handle. Each physical store
|
|
147
|
+
// appears once, so the atomic path never double-opens a store and the
|
|
148
|
+
// fallback path writes one batch per store.
|
|
81
149
|
if (this.pendingOps.length > 0) {
|
|
82
150
|
const opsByStore = new Map();
|
|
83
151
|
for (const op of this.pendingOps) {
|
|
84
|
-
|
|
85
|
-
let ops = opsByStore.get(target);
|
|
152
|
+
let ops = opsByStore.get(op.store);
|
|
86
153
|
if (!ops) {
|
|
87
154
|
ops = [];
|
|
88
|
-
opsByStore.set(
|
|
155
|
+
opsByStore.set(op.store, ops);
|
|
89
156
|
}
|
|
90
157
|
ops.push(op);
|
|
91
158
|
}
|
|
92
|
-
//
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
159
|
+
// Atomic path — when the provider exposes a shared commit domain, queue
|
|
160
|
+
// every grouped op into ONE AtomicBatch (spanning every touched store of
|
|
161
|
+
// every table) and commit once. This is what makes a multi-table
|
|
162
|
+
// transaction all-or-nothing.
|
|
163
|
+
const atomicBatch = this.atomicBatchFactory?.();
|
|
164
|
+
if (atomicBatch) {
|
|
165
|
+
for (const [store, ops] of opsByStore) {
|
|
166
|
+
for (const op of ops) {
|
|
167
|
+
if (op.type === 'put') {
|
|
168
|
+
atomicBatch.put(store, op.key, op.value);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
atomicBatch.delete(store, op.key);
|
|
172
|
+
}
|
|
98
173
|
}
|
|
99
|
-
|
|
100
|
-
|
|
174
|
+
}
|
|
175
|
+
await atomicBatch.write();
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
// Fallback path — one batch per store, written sequentially. No worse
|
|
179
|
+
// than the prior per-table commits, which were already non-atomic
|
|
180
|
+
// across tables.
|
|
181
|
+
for (const [store, ops] of opsByStore) {
|
|
182
|
+
const batch = store.batch();
|
|
183
|
+
for (const op of ops) {
|
|
184
|
+
if (op.type === 'put') {
|
|
185
|
+
batch.put(op.key, op.value);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
batch.delete(op.key);
|
|
189
|
+
}
|
|
101
190
|
}
|
|
191
|
+
await batch.write();
|
|
102
192
|
}
|
|
103
|
-
await batch.write();
|
|
104
193
|
}
|
|
105
194
|
}
|
|
106
195
|
// Fire all pending events
|
|
@@ -127,30 +216,81 @@ export class TransactionCoordinator {
|
|
|
127
216
|
}
|
|
128
217
|
this.clearTransaction();
|
|
129
218
|
}
|
|
130
|
-
/**
|
|
131
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Create a savepoint at the given depth (depth-idempotent).
|
|
221
|
+
*
|
|
222
|
+
* The coordinator is module-wide: `Database.registerConnection` replays the
|
|
223
|
+
* active savepoint stack onto every newly-registered connection, and
|
|
224
|
+
* `_createSavepointBroadcast` broadcasts each new savepoint to all active
|
|
225
|
+
* connections — so N connections (plus lazy-registration replay) all push the
|
|
226
|
+
* SAME depth onto this one shared stack. Pushing only when the stack length
|
|
227
|
+
* equals the requested depth keeps each depth recorded once: a `length > depth`
|
|
228
|
+
* call means a sibling connection (or replay) already recorded it → no-op.
|
|
229
|
+
*/
|
|
230
|
+
createSavepoint(depth) {
|
|
132
231
|
if (!this.inTransaction) {
|
|
133
232
|
// Start implicit transaction
|
|
134
233
|
this.begin();
|
|
135
234
|
}
|
|
235
|
+
if (this.savepointStack.length !== depth) {
|
|
236
|
+
// Already recorded by a sibling connection or the registration replay —
|
|
237
|
+
// a duplicate push here would corrupt depth accounting (two stack entries
|
|
238
|
+
// for one logical savepoint).
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
136
241
|
this.savepointStack.push({
|
|
137
242
|
opIndex: this.pendingOps.length,
|
|
138
243
|
eventIndex: this.pendingEvents.length,
|
|
139
244
|
});
|
|
140
245
|
}
|
|
141
|
-
/**
|
|
246
|
+
/**
|
|
247
|
+
* Release savepoints down to the target depth.
|
|
248
|
+
*
|
|
249
|
+
* Depth-addressed and idempotent under repeated same-target calls (setting
|
|
250
|
+
* `length = targetDepth` twice is a no-op the second time). When the target
|
|
251
|
+
* depth exceeds the current stack size (e.g. after a store DDL-commit —
|
|
252
|
+
* `replaceContents`/`renameTable` — cleared the stack while the engine still
|
|
253
|
+
* broadcasts the savepoint), warns and returns without padding the array.
|
|
254
|
+
* Mirrors `vtab/memory/layer/connection.ts` `releaseSavepoint`.
|
|
255
|
+
*/
|
|
142
256
|
releaseSavepoint(targetDepth) {
|
|
257
|
+
if (targetDepth > this.savepointStack.length) {
|
|
258
|
+
// Setting Array.length to a value larger than the current length pads with
|
|
259
|
+
// undefined slots, corrupting subsequent rollback-to / release lookups.
|
|
260
|
+
// The most likely cause is a DDL-commit (replaceContents / renameTable)
|
|
261
|
+
// that cleared the stack while the engine still holds open savepoints.
|
|
262
|
+
console.warn(`[TransactionCoordinator] release savepoint depth ${targetDepth} out of range `
|
|
263
|
+
+ `(stack size: ${this.savepointStack.length}); transaction was committed out from under it`);
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
143
266
|
this.savepointStack.length = targetDepth;
|
|
144
267
|
}
|
|
145
|
-
/**
|
|
268
|
+
/**
|
|
269
|
+
* Rollback to a savepoint at the target depth (preserves the savepoint).
|
|
270
|
+
*
|
|
271
|
+
* Depth-addressed and idempotent under repeated same-target calls: re-slicing
|
|
272
|
+
* `pendingOps`/`pendingEvents` back to the snapshot indices and rebuilding the
|
|
273
|
+
* index is stable when nothing was queued in between. When the target depth is
|
|
274
|
+
* out of range (e.g. after a store DDL-commit — `replaceContents`/`renameTable`
|
|
275
|
+
* — cleared the stack while the engine still broadcasts the savepoint), warns
|
|
276
|
+
* and returns rather than throwing. Degrades to DDL-commits semantics: the
|
|
277
|
+
* committed DDL and everything before it stays committed. Mirrors
|
|
278
|
+
* `vtab/memory/layer/connection.ts` `rollbackToSavepoint`.
|
|
279
|
+
*/
|
|
146
280
|
rollbackToSavepoint(targetDepth) {
|
|
147
281
|
if (targetDepth >= this.savepointStack.length) {
|
|
148
|
-
|
|
282
|
+
console.warn(`[TransactionCoordinator] rollback-to savepoint depth ${targetDepth} out of range `
|
|
283
|
+
+ `(stack size: ${this.savepointStack.length}); transaction was committed out from under it`);
|
|
284
|
+
return;
|
|
149
285
|
}
|
|
150
286
|
const snapshot = this.savepointStack[targetDepth];
|
|
151
287
|
// Truncate operations and events back to the snapshot
|
|
152
288
|
this.pendingOps = this.pendingOps.slice(0, snapshot.opIndex);
|
|
153
289
|
this.pendingEvents = this.pendingEvents.slice(0, snapshot.eventIndex);
|
|
290
|
+
// Rebuild the pending index from the truncated log: last-write-wins can't
|
|
291
|
+
// be incrementally undone (the pre-image is gone), and rollback-to is rare
|
|
292
|
+
// enough that an O(ops) replay is fine.
|
|
293
|
+
this.rebuildPendingIndex();
|
|
154
294
|
// Remove savepoints above the target, but preserve the target itself
|
|
155
295
|
this.savepointStack.length = targetDepth + 1;
|
|
156
296
|
}
|
|
@@ -160,35 +300,56 @@ export class TransactionCoordinator {
|
|
|
160
300
|
this.pendingOps = [];
|
|
161
301
|
this.pendingEvents = [];
|
|
162
302
|
this.savepointStack = [];
|
|
303
|
+
this.pendingIndex = new Map();
|
|
163
304
|
}
|
|
164
|
-
/** Get the
|
|
165
|
-
|
|
166
|
-
|
|
305
|
+
/** Get or create the mutable index bucket for a store handle. */
|
|
306
|
+
bucketFor(store) {
|
|
307
|
+
let bucket = this.pendingIndex.get(store);
|
|
308
|
+
if (!bucket) {
|
|
309
|
+
bucket = { puts: new Map(), deletes: new Set() };
|
|
310
|
+
this.pendingIndex.set(store, bucket);
|
|
311
|
+
}
|
|
312
|
+
return bucket;
|
|
167
313
|
}
|
|
168
|
-
/**
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
* intra-transaction writes (e.g. UNIQUE constraint checks).
|
|
172
|
-
*/
|
|
173
|
-
getPendingOpsForStore(store) {
|
|
174
|
-
const target = store ?? this.store;
|
|
175
|
-
const puts = new Map();
|
|
176
|
-
const deletes = new Set();
|
|
314
|
+
/** Rebuild the per-store index by replaying the (truncated) op log. */
|
|
315
|
+
rebuildPendingIndex() {
|
|
316
|
+
this.pendingIndex = new Map();
|
|
177
317
|
for (const op of this.pendingOps) {
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
continue;
|
|
181
|
-
const hex = keyToHex(op.key);
|
|
318
|
+
const bucket = this.bucketFor(op.store);
|
|
319
|
+
const hex = bytesToHex(op.key);
|
|
182
320
|
if (op.type === 'put') {
|
|
183
|
-
puts.set(hex, { key: op.key, value: op.value });
|
|
184
|
-
deletes.delete(hex);
|
|
321
|
+
bucket.puts.set(hex, { key: op.key, value: op.value });
|
|
322
|
+
bucket.deletes.delete(hex);
|
|
185
323
|
}
|
|
186
324
|
else {
|
|
187
|
-
deletes.add(hex);
|
|
188
|
-
puts.delete(hex);
|
|
325
|
+
bucket.deletes.add(hex);
|
|
326
|
+
bucket.puts.delete(hex);
|
|
189
327
|
}
|
|
190
328
|
}
|
|
191
|
-
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Pending ops targeting `store`, collapsed to last-write-wins. Used by reads
|
|
332
|
+
* that need to see intra-transaction writes (e.g. UNIQUE constraint checks).
|
|
333
|
+
* O(1): returns the live indexed view (see {@link PendingStoreOps} for
|
|
334
|
+
* caveats).
|
|
335
|
+
*/
|
|
336
|
+
getPendingOpsForStore(store) {
|
|
337
|
+
return this.pendingIndex.get(store) ?? EMPTY_PENDING;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Key-ordered pending view for `store`: puts sorted ascending by encoded key
|
|
341
|
+
* bytes plus the delete set — the merge input for read-your-own-writes scans.
|
|
342
|
+
* Copies and sorts on demand (pending sets are transaction-sized), so the
|
|
343
|
+
* returned view is a stable snapshot even when coordinator mutations interleave
|
|
344
|
+
* with a long-lived merge scan.
|
|
345
|
+
*/
|
|
346
|
+
getOrderedPendingOps(store) {
|
|
347
|
+
const bucket = this.pendingIndex.get(store);
|
|
348
|
+
if (!bucket || (bucket.puts.size === 0 && bucket.deletes.size === 0)) {
|
|
349
|
+
return EMPTY_ORDERED;
|
|
350
|
+
}
|
|
351
|
+
const puts = Array.from(bucket.puts.values()).sort((a, b) => compareBytes(a.key, b.key));
|
|
352
|
+
return { puts, deletes: new Set(bucket.deletes) };
|
|
192
353
|
}
|
|
193
354
|
}
|
|
194
355
|
//# sourceMappingURL=transaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/common/transaction.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/common/transaction.ts"],"names":[],"mappings":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BAAqB,CAAC,KAAc;QAClC,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC;IACvD,CAAC;IAED;;;;;;OAMG;IACH,oBAAoB,CAAC,KAAc;QACjC,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC;YACrE,OAAO,aAAa,CAAC;QACvB,CAAC;QACD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACzF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IACpD,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quereus/store",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Abstract key-value storage module for Quereus",
|
|
6
6
|
"keywords": [
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"test:single": "cd ../.. && node --import ./packages/quereus-store/register.mjs node_modules/mocha/bin/mocha.js --bail"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@quereus/isolation": "^
|
|
44
|
-
"@quereus/quereus": "^
|
|
43
|
+
"@quereus/isolation": "^4.0.0",
|
|
44
|
+
"@quereus/quereus": "^4.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@quereus/isolation": "^
|
|
48
|
-
"@quereus/quereus": "^
|
|
47
|
+
"@quereus/isolation": "^4.0.0",
|
|
48
|
+
"@quereus/quereus": "^4.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/mocha": "^10.0.10",
|