Repository navigation
fix(npm): support pnpm 12 global installs - #12717
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughChangespnpm global directory configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR updates pnpm 12 global-install configuration while preserving older-version behavior and validating the installed executable. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant mise
participant pnpm
participant tiny
mise->>pnpm: Detect installed pnpm version
alt pnpm 12 or newer
mise->>pnpm: Install with PNPM_CONFIG_GLOBAL_DIR and PNPM_CONFIG_GLOBAL_BIN_DIR
else Older or unavailable pnpm
mise->>pnpm: Install with --global-dir and --global-bin-dir
end
pnpm-->>mise: Make tiny available through the binary directory
mise->>tiny: Run tiny --help through mise exec
tiny-->>mise: Return success
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 1 files. (1 skipped: 1 unsupported.) Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThe PR detects the selected pnpm version and uses environment-based global-directory configuration for pnpm 12+, while retaining legacy flags for earlier releases.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (5): Last reviewed commit: "fix(npm): support pnpm 12 global install..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8491bfd. Configure here.
ad66b1f to
73e1a3c
Compare

Summary
PNPM_CONFIG_GLOBAL_DIRandPNPM_CONFIG_GLOBAL_BIN_DIRwith pnpm 12+Reported in #12590
Testing
mise run lint-fixmise exec -- cargo test --bin mise test_pnpm_global_dir_transport_version_boundarymise run test:e2e e2e/backend/test_npm_package_managerAI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable.
Note
Medium Risk
Changes how global npm-tool installs invoke pnpm based on version detection; wrong version or env handling could break pnpm installs, but behavior for pnpm ≤11 is unchanged and coverage targets pnpm 12.
Overview
Fixes pnpm 12 global installs for the npm backend when
npm.package_manager=pnpm. pnpm 12’s CLI no longer accepts--global-dirand--global-bin-dirtogether, so mise now resolves the active pnpm version and, for 12.0.0+, setsPNPM_CONFIG_GLOBAL_DIRandPNPM_CONFIG_GLOBAL_BIN_DIRinstead of those flags. pnpm 11 and earlier still get the existing flag-based layout.Adds a version gate (
pnpm_uses_global_dir_env) with unit tests at the 11→12 boundary. The e2e npm package-manager script always provisions pnpm@12.0.0 and assertsmise exec -- tiny --helpafter a pnpm install.Reviewed by Cursor Bugbot for commit 73e1a3c. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
Bug Fixes
Tests