Repository navigation
ci: check what npm pack would publish - #338
Open
mattpodwysocki wants to merge 7 commits into
Open
mattpodwysocki wants to merge 7 commits into
mattpodwysocki wants to merge 7 commits into
Conversation
Fails when an exports, bin, main or types target isn't in the package, or when a file in the latest published version is gone. The pack-files-removed PR label allows a deliberate removal. Guards the publish while the MCP monorepo moves packages around (AGI-1276). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm 10 in CI prints "pre-commit script created." before the JSON. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
ctufts
previously approved these changes
Nov 17, 2026
# Conflicts: # CHANGELOG.md
ctufts
previously approved these changes
Nov 17, 2026
# Conflicts: # CHANGELOG.md
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.
First step of the MCP monorepo move (AGI-1276, under AGI-1274). Moving the server into
servers/mcp-server, and later bringing devkit and docs in, can quietly change what we publish: a missingdistfile, an export that points nowhere, a file dropped fromfiles. Today we'd only find out after the release. This checks it on every PR.What it checks
npm run check:pack(afternpm run build) runsnpm pack --dry-runand:exportstarget,bin,mainandtypes.npm pack @mapbox/mcp-server@latest --dry-run. For a removal on purpose, such as dropping a tool, add thepack-files-removedlabel and the check passes but still lists the files.It takes a package directory (
node scripts/check-pack.cjs servers/mcp-server), so it carries over to each package in the monorepo and to devkit and docs as is. A package that has never been published (like a future@mapbox/mcp-core) gets only the entry point check.It runs in its own workflow,
pack.yml, which also reruns when labels change, so addingpack-files-removedtakes effect without a new push.Checked
dist/commonjs/tools/index.d.tsand a tool's.js: fails with the missing entry point and both removed files listed.PACK_ALLOW_REMOVED=true: passes for the removed tool file and still lists it.🤖 Generated with Claude Code