Avoid recursive npm publish lifecycle - #10
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0189065fbe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "release:minor": "npm version minor && npm publish", | ||
| "release:major": "npm version major && npm publish", | ||
| "publish": "npm publish" | ||
| "release": "npm publish" |
There was a problem hiding this comment.
Update the documented publish command
Renaming this script leaves the release instructions in README.md:5 pointing to npm run publish. Following that documented workflow now exits with Missing script: "publish", so maintainers cannot complete the prescribed prebuild release process. Update the documentation to use npm run release as part of this rename.
Useful? React with 👍 / 👎.
Rename the publish script to release. npm treats a script named publish as part of the publish lifecycle, so npm publish invoked that script and recursively started a second publish. The release alias preserves the manual command without registering a lifecycle hook. Validation: package.json has no scripts.publish entry, npm pack --dry-run succeeds, and git diff --check passes.