From 11b37f2a53cf837f119012d128e1a442fbf5bee2 Mon Sep 17 00:00:00 2001 From: Joel Sahleen Date: Sun, 19 Jul 2026 20:45:14 -0600 Subject: [PATCH] fix: build via prepack so dist is always published Mirror the msg #46 fix: run the build before npm pack/publish so the files whitelist cannot ship an empty package if a CI build step is skipped. Co-authored-by: Cursor --- package.json | 1 + project/info.md | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9911510..7044485 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "scripts": { "test": "vitest run", "build": "tsup", + "prepack": "npm run build", "coverage": "vitest run --coverage", "docs": "typedoc --entryPointStrategy expand src/commands src/lib" }, diff --git a/project/info.md b/project/info.md index daa846b..dcb7179 100644 --- a/project/info.md +++ b/project/info.md @@ -69,7 +69,9 @@ Note: there is currently no `lint` npm script. User-facing docs also live in pushes to `main`. A `verify` job runs type-check, tests, and build (plus dependency signature audit); a `release` job builds again and runs `npx semantic-release` when verify succeeds (GitHub release + npm publish via - OIDC trusted publishing / provenance). + OIDC trusted publishing / provenance). `package.json` also defines + `"prepack": "npm run build"` so `dist/` is always produced before + `npm pack` / publish, even if a CI build step is skipped. - **`.github/workflows/docs.yml` (Deploy static content to Pages):** runs on pushes to `main` (and `workflow_dispatch`). Runs `npm run docs` and deploys the generated `docs/` folder to GitHub Pages.