Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds packaging metadata and manifest-updater logic to ensure three node-gyp shim files are published with executable permissions; includes changeset documenting the fix. ChangesNode-gyp Executable Permissions Fix
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes a packaging regression in the @pnpm/exe artifact where the bundled node-gyp shim scripts were published without the executable bit, which can break native module rebuilds (e.g. lifecycle scripts invoking node-gyp rebuild) when @pnpm/exe is used.
Changes:
- Add
publishConfig.executableFilestopnpm/artifacts/exe/package.jsonso the threenode-gypshim files are packed with mode0755. - Add a Changeset to publish the fix as a patch release.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pnpm/artifacts/exe/package.json | Declares publishConfig.executableFiles for the node-gyp shims so packaging assigns executable permissions. |
| .changeset/exe-node-gyp-executable.md | Adds a patch Changeset entry describing the permission fix and linking to #11483. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…and @pnpm/exe Define the node-gyp shim list once in meta-updater so the two manifests can't drift out of sync the next time someone adds, removes, or renames an executable file under dist/.
- Closes #11483. - `@pnpm/exe@11.x` was packing `dist/node-gyp-bin/node-gyp`, `dist/node-gyp-bin/node-gyp.cmd`, and `dist/node_modules/node-gyp/bin/node-gyp.js` with mode `0644` instead of `0755`. Any install whose lifecycle script invokes `node-gyp rebuild` while pnpm has prepended `dist/node-gyp-bin/` to `PATH` failed with `sh: 1: node-gyp: Permission denied` — most visibly via `pnpm/action-setup@v6`'s standalone path on GitHub Actions runners with system Node < 22.13. - The regular `pnpm` package's `package.json` already declares `publishConfig.executableFiles` for these three shims, which `pnpm publish` honors by packing matching tar entries with mode `0755` (see `releasing/commands/src/publish/pack.ts:273` and the `bins`-driven mode selection at `pack.ts:360-361`). `@pnpm/exe`'s `package.json` was missing the same field, so the shims it copies from `pnpm/dist/` shipped with `0644`. This PR mirrors the field into `@pnpm/exe`. - To prevent the two manifests from drifting again, meta-updater is now the single source of truth for the executable-files list and writes it into both `pnpm/package.json` and `pnpm/artifacts/exe/package.json`.
Summary
@pnpm/exe@11.xwas packingdist/node-gyp-bin/node-gyp,dist/node-gyp-bin/node-gyp.cmd, anddist/node_modules/node-gyp/bin/node-gyp.jswith mode0644instead of0755. Any install whose lifecycle script invokesnode-gyp rebuildwhile pnpm has prependeddist/node-gyp-bin/toPATHfailed withsh: 1: node-gyp: Permission denied— most visibly viapnpm/action-setup@v6's standalone path on GitHub Actions runners with system Node < 22.13.pnpmpackage'spackage.jsonalready declarespublishConfig.executableFilesfor these three shims, whichpnpm publishhonors by packing matching tar entries with mode0755(seereleasing/commands/src/publish/pack.ts:273and thebins-driven mode selection atpack.ts:360-361).@pnpm/exe'spackage.jsonwas missing the same field, so the shims it copies frompnpm/dist/shipped with0644. This PR mirrors the field into@pnpm/exe.pnpm/package.jsonandpnpm/artifacts/exe/package.json.Test plan
pn lint:metapasses (meta-updater output matches both committed manifests).@pnpm/exetarball has mode0755on the three node-gyp shims:-rwxr-xr-x.@pnpm/exestill produces a valid tarball (existing publish CI).Written by an agent (Claude Code, claude-opus-4-7).
Summary by CodeRabbit
Bug Fixes
Chores