@rotorsoft/act-tck 1.38.14 → 1.38.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"store-tck.d.ts","sourceRoot":"","sources":["../../src/store-tck.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAQV,KAAK,EAIN,MAAM,sBAAsB,CAAC;AAc9B;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;;OASG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;;;;;OASG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;;;OAQG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,gCAAgC,CAAC,EAAE,OAAO,CAAC;IACpD;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,CAAC,eAAe,CAAC,EAA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AAE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACxD;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,WAAW,YAAa,eAAe,KAAG,IAgzKtD,CAAC"}
package/dist/index.cjs CHANGED
@@ -1292,6 +1292,20 @@ var runStoreTck = (options) => {
1292
1292
  store.commit(s, [inc(1)], make_meta({ stream: s }), 0)
1293
1293
  ).rejects.toBeInstanceOf(import_act2.ConcurrencyError);
1294
1294
  });
1295
+ (0, import_vitest9.it)("checks expectedVersion even when committing no events", async () => {
1296
+ const s = `commit-empty-cc-${uid()}`;
1297
+ await store.commit(
1298
+ s,
1299
+ [inc(1)],
1300
+ make_meta({ stream: s })
1301
+ );
1302
+ await (0, import_vitest9.expect)(
1303
+ store.commit(s, [], make_meta({ stream: s }), 5)
1304
+ ).rejects.toBeInstanceOf(import_act2.ConcurrencyError);
1305
+ (0, import_vitest9.expect)(
1306
+ await store.commit(s, [], make_meta({ stream: s }), 0)
1307
+ ).toEqual([]);
1308
+ });
1295
1309
  (0, import_vitest9.it)("preserves prior events when a concurrent commit is rejected", async () => {
1296
1310
  const s = `commit-cc-preserve-${uid()}`;
1297
1311
  await store.commit(
@@ -1718,6 +1732,22 @@ var runStoreTck = (options) => {
1718
1732
  if (error !== void 0) (0, import_vitest9.expect)(error).toBeInstanceOf(import_act2.ValidationError);
1719
1733
  else (0, import_vitest9.expect)(matched).toEqual(expected.sort());
1720
1734
  };
1735
+ (0, import_vitest9.it)("treats an empty-string stream filter as a regex that matches everything", async () => {
1736
+ const tag = uid();
1737
+ const a = `empty-${tag}-a`;
1738
+ const source = `empty-src-${tag}`;
1739
+ await store.subscribe([{ stream: a, source }]);
1740
+ const seen = [];
1741
+ await store.query_streams((p) => seen.push(p.stream), {
1742
+ stream: "",
1743
+ source,
1744
+ source_exact: true
1745
+ });
1746
+ (0, import_vitest9.expect)(seen).toEqual([a]);
1747
+ (0, import_vitest9.expect)(
1748
+ await store.reset({ stream: "", source, source_exact: true })
1749
+ ).toBe(1);
1750
+ });
1721
1751
  (0, import_vitest9.it)("portable subset: anchors, `.`, and `.*` match identically", async () => {
1722
1752
  const tag = uid();
1723
1753
  const plain = `g-${tag}-plain`;