runStabilityTck
@rotorsoft/act-root / act-tck/src / runStabilityTck
Function: runStabilityTck()
runStabilityTck(
options):void
Defined in: libs/act-tck/src/stability-tck.ts:56
Snapshot-based public-API stability check. Walks each entry's source file plus everything it re-exports through relative imports, and compares the concatenated text against a committed Vitest snapshot.
Catches accidental rename / removal / signature drift on the public surface before a build merges. Any change that affects re-exports shows up as a snapshot diff in the PR; reviewers either accept the change (update the snapshot deliberately) or push back.
The TCK reads source (.ts) rather than built declarations so it
doesn't need a prior pnpm build. It follows from "./relative.js"
re-exports transitively; non-relative paths (other packages, node:)
stop the walk โ drift in another package's surface is that package's
stability TCK to catch.
Parametersโ
optionsโ
See StabilityTckOptions.
Returnsโ
void
Exampleโ
import path from "node:path";
import { runStabilityTck } from "@rotorsoft/act-tck";
runStabilityTck({
name: "@rotorsoft/act-http",
entryPoints: {
"/api": path.resolve("src/api/index.ts"),
"/webhook": path.resolve("src/webhook/index.ts"),
"/sse": path.resolve("src/sse/index.ts"),
"/receiver": path.resolve("src/receiver/index.ts"),
},
});