chore: use prepack/postpack to swap npm README during pack/publish#286
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
chore: use prepack/postpack to swap npm README during pack/publish#286devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
… pack/publish Co-Authored-By: ishan <ishan@exa.ai>
Contributor
Author
|
Prompt hidden (unlisted session) |
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Adds
prepack/postpacklifecycle scripts so the npm tarball includesnpm.readme.mdas the package README on npmjs.com, while preserving the GitHub README in the repo.prepack: backs upREADME.mdto/tmp/.exa-mcp-readme-backup, then copiesnpm.readme.md→README.mdpostpack: restores originalREADME.mdfrom backup and cleans upUses
prepack/postpack(notprepublishOnly/postpublish) because these fire on bothnpm packandnpm publish, enabling dry-run verification vianpm pack.Review & Testing Checklist for Human
npm pack, extract the tarball (tar -xzf exa-mcp-server-*.tgz), and verifypackage/README.mdstarts with the npm-specific content (npm badge, npx instructions) — not the GitHub README (Cursor/VS Code install badges)npm packcompletes, confirmREADME.mdin the working directory is the original GitHub version (check for "Install in Cursor" badge)npm installandnpm run build— confirm neither triggers the README swap (prepack/postpack should only fire during pack/publish)prepackandpostpack,README.mdwill contain npm content. Recovery:git checkout README.md. The/tmpbackup also persists. Assess if this risk level is acceptable without atrap-based script.Notes
/tmp/.exa-mcp-readme-backup(outside project root) to prevent npm from auto-includingREADME.github.mdor similar backup files in the tarballnpm.readme.mdmust exist in the repo root orprepackwill fail, which is a reasonable guard railprepublishOnlyis unchanged — it still only runsbuild:stdioLink to Devin session: https://app.devin.ai/sessions/1e3db21a1dca402fa07fabff5faa4959