Repository navigation
v1.7.2 — the package stops shipping its own test suite
The published package no longer ships its own test suite. No runtime behaviour changes — every product file is byte-for-byte what 1.7.1 shipped; 285 files simply stop being published.
| entries | packed | unpacked | |
|---|---|---|---|
| 1.7.1 | 508 | 778 KB | 3.08 MB |
| 1.7.2 | 223 | 497 KB | 1.65 MB |
What changed
npm run build used tsconfig.json, which covers src/ and test/ because npm run typecheck wants it to — a type error in a test is a real error. But the build shared that config, so tsc emitted dist/test/, and package.json files ships all of dist. Compiled suites were 46% of the unpacked package, against 210 entries for the product itself.
build now uses a new tsconfig.build.json that includes only src/. typecheck is unchanged.
All 285 removed entries are under dist/test/. Nothing was added, and dist/src/ is the same 210 files at the same paths — verified by diffing the emitted file list. The tarball ships 0 compiled test files.
Only emission narrows
Type coverage of the suite is preserved, and that was mutation-checked rather than assumed. With const x: number = "not a number" planted in a test file, npm run typecheck reports TS2322 and the build config ignores it. That coverage earns its place — it catches bad generics in suites that vitest runs green.
The trap this could have been
rootDir: "." is set explicitly in tsconfig.json, and that is the only reason narrowing include to src/** is safe. Unset, tsc infers the common root of its inputs — for a src-only build that is src/, relocating every output from dist/src/cli/main.js to dist/cli/main.js and breaking main, types and bin in a build that still succeeds. It is now pinned by a test rather than left as a coincidence.
The vitest dist exclude (audit OX-H3) stays, with its comment corrected rather than removed: npm run build no longer writes dist/test/, but tsc -p tsconfig.json without --noEmit still does.
Verification
npm run typecheck, npm run lint, npm run build clean; 96 files / 864 tests passing. Built artifact reports 1.7.2 three ways, and the CLI, MCP initialize and bench were each exercised against the slimmed dist/.
Full changelog: https://github.com/Epichlo/TokenDamper/blob/v1.7.2/CHANGELOG.md