From 926ade34895248923cda7398b5098d5fa5c6c92c Mon Sep 17 00:00:00 2001 From: Nate Goldman <427322+ungoldman@users.noreply.github.com> Date: Sat, 13 Jun 2026 18:01:12 -0700 Subject: [PATCH 1/4] chore: remove dead .npmignore The "files" allowlist in package.json already governs the tarball, and .npmignore referenced paths that no longer exist (tests/, example.ts). --- .npmignore | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .npmignore diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 789ce79..0000000 --- a/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -.github/ -tests/ -axe.png -example.ts From d595dafd0c8e306d607fa267ef5febb262d42126 Mon Sep 17 00:00:00 2001 From: Nate Goldman <427322+ungoldman@users.noreply.github.com> Date: Sat, 13 Jun 2026 18:01:22 -0700 Subject: [PATCH 2/4] chore: ignore coverage output and logs --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f06235c..ab899ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules dist +coverage +*.log From 5c3699e24d2c7bf29282000c22b9ea96e60b948f Mon Sep 17 00:00:00 2001 From: Nate Goldman <427322+ungoldman@users.noreply.github.com> Date: Sat, 13 Jun 2026 18:01:39 -0700 Subject: [PATCH 3/4] chore: declare the package side-effect free sideEffects: false lets bundlers tree-shake. Importing hyperaxe only defines factories; there are no import-time side effects. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 0dad950..4451ff5 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "test:watch": "node --test --watch --import=tsx test/*.test.ts", "typecheck": "tsc -p tsconfig.test.json" }, + "sideEffects": false, "type": "module", "types": "dist/index.d.ts" } From 3a9cdd10d0a2d3d6731ff40fd3ef25b9339433a7 Mon Sep 17 00:00:00 2001 From: Nate Goldman <427322+ungoldman@users.noreply.github.com> Date: Sat, 13 Jun 2026 18:01:53 -0700 Subject: [PATCH 4/4] build: build before publish, not on install Switch prepare to prepublishOnly so the build runs ahead of npm publish rather than on every install. Since prepublishOnly (unlike prepare) does not run on npm pack, have test-pack.sh build first so it still packs a fresh dist, matching what publish does. --- package.json | 2 +- scripts/test-pack.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4451ff5..f56317b 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "lint": "biome check .", "postrelease": "git push --follow-tags && npm publish", "prebuild": "rm -rf dist", - "prepare": "npm run build", + "prepublishOnly": "npm run build", "prerelease": "git fetch --tags && npm test && npm run test:pack", "release": "npm version patch", "test": "npm run lint && npm run typecheck && npm run build && node --test --import=tsx test/*.test.ts", diff --git a/scripts/test-pack.sh b/scripts/test-pack.sh index 179c7ee..9171e8f 100755 --- a/scripts/test-pack.sh +++ b/scripts/test-pack.sh @@ -8,6 +8,9 @@ tmp="$(mktemp -d)" trap 'rm -rf "$tmp"' EXIT cd "$root" +# Build first, the way `prepublishOnly` does at publish time, so the tarball +# carries a fresh dist (npm pack does not run prepublishOnly). +npm run build >/dev/null 2>&1 tarball="$tmp/$(npm pack --pack-destination "$tmp" 2>/dev/null | tail -1)" cd "$tmp"