Skip to content

Commit 3c17eb8

Browse files
committed
chore(publish): exclude all test files from npm package
Update the files field to properly exclude test files: - Add `!examples/*.test.ts` to exclude example test files - Add `!src/**/*.test.ts` to exclude unit test files - Add `!src/**/*.test-d.ts` to exclude type test files The previous pattern `!**/*.test.ts` at the start didn't work because npm applies negation patterns only to already-included files.
1 parent 80c638d commit 3c17eb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
"module": "./dist/index.mjs",
2929
"types": "./dist/index.d.mts",
3030
"files": [
31-
"!example/*.test.ts",
31+
"!examples/*.test.ts",
32+
"!src/**/*.test-d.ts",
33+
"!src/**/*.test.ts",
3234
"LICENSE",
3335
"README.md",
3436
"dist",

0 commit comments

Comments
 (0)