npm: exclude test files from the published package; normalize manifest - #7
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prep for the first npm publish of
@cloudsecurityalliance/secid. Anpm publish --dry-runsurfaced two things to fix before an (immutable) first publish:files: ["dist/"]swept in the compileddist/secid-client.test.*. Added"!dist/**/*.test.*"— tarball goes 15 → 11 files. Tests still compile todist/for the localnode --testrunner; they're just excluded from the published tarball.bin.secid:./dist/secid-cli.js→dist/secid-cli.js(npm 11 flagged the./prefix as invalid and silently stripped it).repository.url: → canonicalgit+https://…form.After the change,
npm publish --dry-run --access publicis warning-free, thesecidbin is intact in the packed manifest, andnpm testpasses (24).No code changes — packaging only.
🤖 Generated with Claude Code