Skip to content

npm: exclude test files from the published package; normalize manifest - #7

Merged
kurtseifried merged 1 commit into
mainfrom
chore/npm-exclude-tests-from-package
Jun 23, 2026
Merged

npm: exclude test files from the published package; normalize manifest#7
kurtseifried merged 1 commit into
mainfrom
chore/npm-exclude-tests-from-package

Conversation

@kurtseifried

Copy link
Copy Markdown
Contributor

Summary

Prep for the first npm publish of @cloudsecurityalliance/secid. A npm publish --dry-run surfaced two things to fix before an (immutable) first publish:

  1. Test code was being published. files: ["dist/"] swept in the compiled dist/secid-client.test.*. Added "!dist/**/*.test.*" — tarball goes 15 → 11 files. Tests still compile to dist/ for the local node --test runner; they're just excluded from the published tarball.
  2. npm 11 auto-corrected the manifest (these warnings would fire on every publish):
    • bin.secid: ./dist/secid-cli.jsdist/secid-cli.js (npm 11 flagged the ./ prefix as invalid and silently stripped it).
    • repository.url: → canonical git+https://… form.

After the change, npm publish --dry-run --access public is warning-free, the secid bin is intact in the packed manifest, and npm test passes (24).

No code changes — packaging only.

🤖 Generated with Claude Code

Prep for the first npm publish of @cloudsecurityalliance/secid. The dry-run
showed the tarball shipping compiled test files and npm 11 auto-correcting two
manifest fields:
- files: add "!dist/**/*.test.*" so consumers don't get test code (15 -> 11
  files; tests still build to dist/ for the local test runner).
- bin.secid: drop the "./" prefix (npm 11 flagged "./dist/secid-cli.js" as
  invalid and silently stripped it at publish time).
- repository.url: canonical "git+https://" form.

Result: a clean `npm publish --dry-run` with no auto-correction warnings.
Done before the first publish because published versions are immutable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kurtseifried
kurtseifried merged commit b5aa28e into main Jun 23, 2026
12 checks passed
@kurtseifried
kurtseifried deleted the chore/npm-exclude-tests-from-package branch June 23, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant