@rotorsoft/act-tck 1.39.1 → 1.40.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 +2 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/@types/cache-differential-tck.d.ts +1 -2
- package/dist/@types/cache-differential-tck.d.ts.map +1 -1
- package/dist/@types/logger-differential-tck.d.ts +1 -2
- package/dist/@types/logger-differential-tck.d.ts.map +1 -1
- package/dist/@types/stability-tck.d.ts +11 -6
- package/dist/@types/stability-tck.d.ts.map +1 -1
- package/dist/@types/store-differential-tck.d.ts +10 -10
- package/dist/@types/store-property-tck.d.ts +1 -1
- package/dist/@types/store-tck.d.ts +7 -7
- package/dist/@types/store-tck.d.ts.map +1 -1
- package/dist/index.cjs +35 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +35 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -364,8 +364,9 @@ async function load_surface(entry2) {
|
|
|
364
364
|
const content = await fs.readFile(abs, "utf8");
|
|
365
365
|
visited.set(abs, content);
|
|
366
366
|
const re_export = /^\s*export\b[^"';]*\bfrom\s+["'](\.[^"']+)["']/gm;
|
|
367
|
+
const ext = abs.endsWith(".d.ts") ? ".d.ts" : ".ts";
|
|
367
368
|
for (const m of content.matchAll(re_export)) {
|
|
368
|
-
const rel = m[1].replace(/\.js$/,
|
|
369
|
+
const rel = m[1].replace(/\.js$/, ext);
|
|
369
370
|
const target = path.resolve(path.dirname(abs), rel);
|
|
370
371
|
await walk(target);
|
|
371
372
|
}
|
|
@@ -547,7 +548,7 @@ var build_plan = (seed, stream_count, pii_isolation) => {
|
|
|
547
548
|
// gated falsy-zero cases below compare only the *guard* behavior
|
|
548
549
|
// (filter applied → subset, vs filter dropped → all), which stays a
|
|
549
550
|
// well-defined divergence regardless of the concrete id values.
|
|
550
|
-
//
|
|
551
|
+
// Edge inputs, gated behind `queryEdgeInputs`.
|
|
551
552
|
{
|
|
552
553
|
label: "empty names filter",
|
|
553
554
|
query: { stream: `^${event_prefix}`, names: [] },
|
|
@@ -1297,6 +1298,19 @@ var runStoreTck = (options) => {
|
|
|
1297
1298
|
});
|
|
1298
1299
|
expect8(limited).toHaveLength(2);
|
|
1299
1300
|
});
|
|
1301
|
+
it7("excludes snapshots when called with no query object", async () => {
|
|
1302
|
+
const s = `q-nofilter-${uid()}`;
|
|
1303
|
+
await store.commit(
|
|
1304
|
+
s,
|
|
1305
|
+
[{ name: SNAP_EVENT2, data: { count: 0 } }],
|
|
1306
|
+
make_meta({ stream: s })
|
|
1307
|
+
);
|
|
1308
|
+
const names = [];
|
|
1309
|
+
await store.query((e) => {
|
|
1310
|
+
names.push(e.name);
|
|
1311
|
+
});
|
|
1312
|
+
expect8(names).not.toContain(SNAP_EVENT2);
|
|
1313
|
+
});
|
|
1300
1314
|
it7("with_snaps resumes from the latest snapshot per stream", async () => {
|
|
1301
1315
|
const s = `q-snap-${uid()}`;
|
|
1302
1316
|
await store.commit(
|
|
@@ -3749,6 +3763,25 @@ var runStoreTck = (options) => {
|
|
|
3749
3763
|
]);
|
|
3750
3764
|
expect8(remaining[0].id).toBe(snap_b.id);
|
|
3751
3765
|
});
|
|
3766
|
+
it7("prunes two windowed targets for one stream in call order", async () => {
|
|
3767
|
+
const later = `trunc-win-twice-${uid()}`;
|
|
3768
|
+
const a1 = await seed_windowed(later);
|
|
3769
|
+
const before = new Date(Date.now() + 6e4);
|
|
3770
|
+
const first = await store.truncate([
|
|
3771
|
+
{ stream: later, before, max_id: a1.snap_b.id },
|
|
3772
|
+
{ stream: later, before, max_id: a1.snap_a.id }
|
|
3773
|
+
]);
|
|
3774
|
+
expect8(first.get(later)?.deleted).toBe(4);
|
|
3775
|
+
expect8(first.get(later)?.committed.id).toBe(a1.snap_b.id);
|
|
3776
|
+
const earlier = `trunc-win-twice-${uid()}`;
|
|
3777
|
+
const a2 = await seed_windowed(earlier);
|
|
3778
|
+
const second = await store.truncate([
|
|
3779
|
+
{ stream: earlier, before, max_id: a2.snap_a.id },
|
|
3780
|
+
{ stream: earlier, before, max_id: a2.snap_b.id }
|
|
3781
|
+
]);
|
|
3782
|
+
expect8(second.get(earlier)?.deleted).toBe(2);
|
|
3783
|
+
expect8(second.get(earlier)?.committed.id).toBe(a2.snap_b.id);
|
|
3784
|
+
});
|
|
3752
3785
|
it7("honors the max_id cap \u2014 boundary never rises past a lagging consumer", async () => {
|
|
3753
3786
|
const s = `trunc-win-cap-${uid()}`;
|
|
3754
3787
|
const { snap_a, snap_b } = await seed_windowed(s);
|