Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@
"dist/cjs/**/*",
"dist/esm/**/*",
"dist/types/**/*",
"!dist/**/*.test.*",
"!dist/testUtils",
"!dist/scratch.*"
"!dist/**/*.test.js",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] This changes the package contents to fix a release failure, but there’s still no regression test for the tarball contents. prepublishOnly builds and runs ATTW, yet nothing asserts that npm pack omits compiled *.test.* files, so a future tsconfig/files drift can silently reintroduce the same breakage. Add a small packaging smoke test in CI that inspects npm pack --json output or the packed file list.

"!dist/**/*.test.d.ts"
]
}
1 change: 1 addition & 0 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "dist", "**/testData", "**/*.test.ts"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Because src/testUtils contains .ts files that don't end in .test.ts, they will still be compiled into dist/cjs/testUtils (and esm/types). Consider adding "**/testUtils" to the exclude list here and in tsconfig.esm.json to prevent test helpers from being published to npm.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] This exclude array is now duplicated in both build tsconfigs and also repeats entries already defined in tsconfig.json. Since tsconfig.test.json already overrides exclude to [], you can move **/*.test.ts into the shared base tsconfig.json exclude list and drop these per-target copies to keep a single source of truth.

"compilerOptions": {
"module": "commonjs",
"outDir": "dist/cjs",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "dist", "**/testData", "**/*.test.ts"],
"compilerOptions": {
"module": "esnext",
"moduleResolution": "bundler",
Expand Down
Loading