Fix only-pnpm to support pnpm 11, and dedupe script#27332
Fix only-pnpm to support pnpm 11, and dedupe script#27332CraigMacomber wants to merge 2 commits into
Conversation
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (33 lines, 3 files), I've queued these reviewers:
How this works
|
There was a problem hiding this comment.
Pull request overview
This PR updates pnpm enforcement logic and removes a duplicated compatibility-workspace copy of the pnpm-only install guard.
Changes:
- Updates the root
only-pnpm.cjscheck to usenpm_execpath. - Removes the compat-workspaces-local copy of
only-pnpm.cjs. - Points the compat workspace
preinstallscript at the root script.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
scripts/only-pnpm.cjs |
Updates pnpm detection logic. |
packages/test/test-version-utils/compat-workspaces/scripts/only-pnpm.cjs |
Removes duplicated pnpm enforcement script. |
packages/test/test-version-utils/compat-workspaces/full/package.json |
Redirects compat workspace preinstall to the root pnpm enforcement script. |
| "scripts": { | ||
| "preinstall": "node ../scripts/only-pnpm.cjs" | ||
| "scripts": { | ||
| "preinstall": "node ../../../../../scripts/only-pnpm.cjs" |
There was a problem hiding this comment.
This package is private, so I don't think it gets installed, but maybe I'm missing something about how its used.
| `; | ||
|
|
||
| const used_pnpm = process.env.npm_config_user_agent.startsWith(`pnpm`); | ||
| const used_pnpm = (process.env.npm_execpath ?? "").includes(`pnpm`); |
There was a problem hiding this comment.
Anyone know why we have duplicate copies of this script? I think having them all point at the same one would be fine (other than CI being broken for some of server at the moment which would block this PR if I did that here).
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Description
Fix only-pnpm to support pnpm 11, and dedupe script
Reviewer Guidance
The review process is outlined on this wiki page.