Skip to content

Fix only-pnpm to support pnpm 11, and dedupe script#27332

Open
CraigMacomber wants to merge 2 commits into
microsoft:mainfrom
CraigMacomber:only11
Open

Fix only-pnpm to support pnpm 11, and dedupe script#27332
CraigMacomber wants to merge 2 commits into
microsoft:mainfrom
CraigMacomber:only11

Conversation

@CraigMacomber
Copy link
Copy Markdown
Contributor

Description

Fix only-pnpm to support pnpm 11, and dedupe script

Reviewer Guidance

The review process is outlined on this wiki page.

Copilot AI review requested due to automatic review settings May 18, 2026 19:06
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

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:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.cjs check to use npm_execpath.
  • Removes the compat-workspaces-local copy of only-pnpm.cjs.
  • Points the compat workspace preinstall script 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"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package is private, so I don't think it gets installed, but maybe I'm missing something about how its used.

Comment thread packages/test/test-version-utils/compat-workspaces/full/package.json Outdated
Comment thread scripts/only-pnpm.cjs
`;

const used_pnpm = process.env.npm_config_user_agent.startsWith(`pnpm`);
const used_pnpm = (process.env.npm_execpath ?? "").includes(`pnpm`);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants