Skip to content
This repository was archived by the owner on Aug 20, 2026. It is now read-only.

Commit ab5a6bb

Browse files
committed
fix: add files field and prepublishOnly build step
The published 1.0.0 tarball included raw source files instead of the built dist/ output, because the package.json had no 'files' field (npm defaulted to including everything not gitignored, which excluded dist/ since it is in .gitignore) and no 'prepublishOnly' lifecycle hook to build before publishing. Add both: files: [dist] so only the built output ships, and prepublishOnly: tsdown so npm builds before pack.
1 parent fef36fa commit ab5a6bb

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Run the full test suite before push to catch breakage early.
2-
pnpm test
2+
./node_modules/.bin/vitest run

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@
3737
"test": "vitest run",
3838
"test:watch": "vitest",
3939
"prepare": "husky",
40+
"prepublishOnly": "tsdown",
4041
"lint:check": "eslint . --max-warnings 0"
4142
},
43+
"files": [
44+
"dist"
45+
],
4246
"packageManager": "pnpm@11.6.0",
4347
"dependencies": {
4448
"fflate": "^0.8.2"

0 commit comments

Comments
 (0)