chore(cli): prepare npm package for publishing#26
Conversation
Abdulmuiz44
commented
Jun 2, 2026
- Clarifies @codra/cli publishing readiness.
- Improves unsupported platform messaging.
- Documents current single-platform binary packaging limitation.
- Adds/keeps safe npm pack workflow.
- Does not publish to npm yet.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 464e26bffb
ℹ️ 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".
| const nativeBins = fileLines.filter((f) => f.startsWith('bin/native/')); | ||
| if (nativeBins.length === 0) { | ||
| errors.push('no bin/native/<platform>-<arch>/ binary in pack (run npm run build first)'); |
There was a problem hiding this comment.
Include ignored native binaries in npm packs
Because packages/codra-npm-cli/.gitignore excludes bin/native/, the binary that prepack builds is still omitted from the tarball; I verified npm’s packing behavior by creating a dummy bin/native/.../codra and running npm pack --dry-run --ignore-scripts, whose tarball contents listed only README.md, bin/codra.js, and package.json. As a result this new check always reports no bin/native/... after a successful build, and an actual npm publish would ship a wrapper that cannot run unless the ignore/packaging rules are changed.
Useful? React with 👍 / 👎.