@rotorsoft/act-tck 1.5.0 → 1.5.2
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 +21 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/@types/fixtures/helpers.d.ts +2 -2
- package/dist/@types/fixtures/helpers.d.ts.map +1 -1
- package/dist/@types/index.d.ts +3 -1
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/@types/stability-tck.d.ts +52 -0
- package/dist/@types/stability-tck.d.ts.map +1 -0
- package/dist/@types/store-tck.d.ts.map +1 -1
- package/dist/index.cjs +686 -506
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +673 -502
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/@types/index.d.ts
CHANGED
|
@@ -64,9 +64,11 @@ export { runCacheTck } from "./cache-tck.js";
|
|
|
64
64
|
export type { CounterEvents } from "./fixtures/events.js";
|
|
65
65
|
export { COUNTER_EVENT_NAMES, CounterSchemas, Decremented, Incremented, Reset, } from "./fixtures/events.js";
|
|
66
66
|
export type { CommittedCounterEvent, CounterMessage, } from "./fixtures/helpers.js";
|
|
67
|
-
export { actor, collect, dec, inc,
|
|
67
|
+
export { actor, collect, dec, inc, reset, uid, } from "./fixtures/helpers.js";
|
|
68
68
|
export type { LoggerTckOptions } from "./logger-tck.js";
|
|
69
69
|
export { runLoggerTck } from "./logger-tck.js";
|
|
70
|
+
export type { StabilityTckOptions } from "./stability-tck.js";
|
|
71
|
+
export { runStabilityTck } from "./stability-tck.js";
|
|
70
72
|
export type { StoreCapabilities, StoreTckOptions } from "./store-tck.js";
|
|
71
73
|
export { runStoreTck } from "./store-tck.js";
|
|
72
74
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for {@link runStabilityTck}.
|
|
3
|
+
*
|
|
4
|
+
* @property name - Display name for the snapshot suite (e.g., the package
|
|
5
|
+
* name). Used as the `describe` block label so failing snapshots are
|
|
6
|
+
* attributable at a glance.
|
|
7
|
+
* @property entryPoints - Map of subpath → entry source file. The TCK
|
|
8
|
+
* reads each entry, follows its relative re-exports recursively, and
|
|
9
|
+
* snapshots the resulting surface text. Empty-string subpaths label
|
|
10
|
+
* the root entry; everything else is rendered with its key (e.g.
|
|
11
|
+
* `"/receiver"`).
|
|
12
|
+
*/
|
|
13
|
+
export type StabilityTckOptions = {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly entryPoints: Readonly<Record<string, string>>;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Snapshot-based public-API stability check. Walks each entry's source
|
|
19
|
+
* file plus everything it re-exports through relative imports, and
|
|
20
|
+
* compares the concatenated text against a committed Vitest snapshot.
|
|
21
|
+
*
|
|
22
|
+
* Catches accidental rename / removal / signature drift on the public
|
|
23
|
+
* surface before a build merges. Any change that affects re-exports
|
|
24
|
+
* shows up as a snapshot diff in the PR; reviewers either accept the
|
|
25
|
+
* change (update the snapshot deliberately) or push back.
|
|
26
|
+
*
|
|
27
|
+
* The TCK reads source (`.ts`) rather than built declarations so it
|
|
28
|
+
* doesn't need a prior `pnpm build`. It follows `from "./relative.js"`
|
|
29
|
+
* re-exports transitively; non-relative paths (other packages, `node:`)
|
|
30
|
+
* stop the walk — drift in another package's surface is that package's
|
|
31
|
+
* stability TCK to catch.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* import path from "node:path";
|
|
36
|
+
* import { runStabilityTck } from "@rotorsoft/act-tck";
|
|
37
|
+
*
|
|
38
|
+
* runStabilityTck({
|
|
39
|
+
* name: "@rotorsoft/act-http",
|
|
40
|
+
* entryPoints: {
|
|
41
|
+
* "/api": path.resolve("src/api/index.ts"),
|
|
42
|
+
* "/webhook": path.resolve("src/webhook/index.ts"),
|
|
43
|
+
* "/sse": path.resolve("src/sse/index.ts"),
|
|
44
|
+
* "/receiver": path.resolve("src/receiver/index.ts"),
|
|
45
|
+
* },
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @param options - See {@link StabilityTckOptions}.
|
|
50
|
+
*/
|
|
51
|
+
export declare function runStabilityTck(options: StabilityTckOptions): void;
|
|
52
|
+
//# sourceMappingURL=stability-tck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stability-tck.d.ts","sourceRoot":"","sources":["../../src/stability-tck.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAUlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-tck.d.ts","sourceRoot":"","sources":["../../src/store-tck.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAQV,KAAK,EAEN,MAAM,sBAAsB,CAAC;AAc9B;;;;GAIG;A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