Repository navigation
mcp: pin npm pack contents with a files allowlist and a test - #89
Merged
Merged
Conversation
Replace the .npmignore-only guard with an explicit package.json files allowlist (index.js, README.md) and a node:test that runs npm pack --dry-run and asserts the exact shipped set. CI's existing `npm test` step in mcp/ picks it up, so any new file reaching the tarball is a deliberate edit to EXPECTED_FILES rather than a publish-time surprise. Refs codenamev#85 (published package contents). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
codenamev
approved these changes
Oct 12, 2026
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.
What
Why
`.npmignore` was the only guard, and a denylist can only name mistakes it already knows about. A new fixture dir or a stray tarball would reach npm silently. With an allowlist, adding a shipped file is a deliberate edit to `EXPECTED_FILES` in the same PR. This is the sibling of the gem pack-contents gate in codenamev/agentic#62 from the same cross-repo pass.
Not touched: `mcp/.npmignore` is now redundant and can be deleted in a follow-up or in this PR by a maintainer. #85 itself (the package needing the framework files next to `index.js`) stays open; this PR only makes the tarball contents explicit so that fix lands with a test to update.
Test
```
cd mcp && node --test test/pack-contents.test.js
ℹ tests 3 pass 3 fail 0
```
🤖 Generated with Claude Code