Skip to content

fix(cli): make pnpm setup install the native CLI globally - #13006

Merged
zkochan merged 6 commits into
pnpm:mainfrom
Stanzilla:fix/setup-ignore-scripts
Jul 15, 2026
Merged

zkochan merged 6 commits into
pnpm:mainfrom
Stanzilla:fix/setup-ignore-scripts

Conversation

@Stanzilla

@Stanzilla Stanzilla commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix the native pnpm setup flow, which recursively runs:

pnpm add -g --ignore-scripts file:<download-directory>

The Rust CLI rejected --ignore-scripts on add. Once accepted, the setup command also exposed two existing gaps in global local-directory installs: the package alias was not inferred from package.json, and unresolved .. components could break directory fetching when the temporary and global directories crossed a symlinked filesystem root.

This restores the behavior already supported by the TypeScript CLI by:

  • applying --ignore-scripts and --no-ignore-scripts to add configuration;
  • inferring the alias for global file: directory selectors;
  • normalizing the resolved directory path before fetching it;
  • covering the exact setup command through the public CLI.

Related to #12955.

Squash Commit Body

The native setup command installs its downloaded executable by recursively
running `pnpm add -g --ignore-scripts file:<directory>`. The Rust add parser
did not expose the script flags, so setup failed before installation.

Apply the paired script override to both local and global add configuration.
For aliasless global `file:` directory selectors, read the local manifest and
use its package name before invoking the add pipeline. Normalize the directory
fetch path lexically so relative lockfile paths remain valid when temporary
directories cross symlinked filesystem roots, such as `/var` on macOS.

Add an integration test that exercises the exact setup command shape and uses
a failing install script to prove that `--ignore-scripts` reaches the install
configuration.

Related to https://github.com/pnpm/pnpm/issues/12955.

Checklist

  • The TypeScript CLI already supports this setup command shape; this restores parity in the Rust pnpm/ port.
  • Added a changeset (pnpm changeset) for pacquet.
  • Added or updated tests.

Written by an agent (GitHub Copilot CLI, gpt-5.6-sol).


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features

    • Added --ignore-scripts and --no-ignore-scripts options to the add command.
    • Global installs/updates now derive stable aliases for local file: directories, including unnamed packages.
  • Bug Fixes

    • Fixed global installs for local directory packages when lifecycle scripts are disabled.
    • Improved installation directory handling by normalizing injected paths.
    • Addressed an issue where pnpm setup could fail due to a globally installed native CLI executable.
  • Tests

    • Added Unix-only regression coverage for pnpm add -g --ignore-scripts with local directories.
    • Added a unit test for unnamed local file: alias derivation.
  • Chores

    • Updated CI dependency installation steps to run OS-specific commands.

Copilot AI review requested due to automatic review settings July 14, 2026 21:31
@Stanzilla
Stanzilla requested a review from zkochan as a code owner July 14, 2026 21:31
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The add command now supports script override flags, applies them during global and local state initialization, infers aliases for local file: packages, and normalizes directory fetch paths. Tests, CI updates, and a pacquet patch changeset were added.

Changes

Global add installation flow

Layer / File(s) Summary
Add script flag propagation
pnpm/crates/cli/src/cli_args/add.rs, pnpm/crates/cli/src/cli_args/dispatch_install.rs, pnpm/crates/cli/tests/global.rs
Adds script override flags, applies the resolved setting to add configurations, initializes non-global state directly, and tests global local-directory installation.
Local package alias inference
pnpm/crates/cli/src/cli_args/global.rs, pnpm/crates/cli/src/cli_args/global/tests.rs
Reads local package manifests and formats aliases for directory-based file: selectors used by global add and update group installs, including unnamed packages.
Directory resolution and release metadata
pnpm/crates/package-manager/src/install_package_by_snapshot.rs, .changeset/native-setup-ignore-scripts.md
Lexically normalizes injected directory paths and records a pacquet patch changeset for the native setup fix.
Windows CI dependency installation
.github/workflows/pacquet-ci.yml
Separates Windows and non-Windows dependency installation, disabling the global virtual store for Windows runners.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AddArgs
  participant Config
  participant State
  participant GlobalInstall
  User->>AddArgs: pnpm add -g --ignore-scripts file:<dir>
  AddArgs->>Config: resolve ignore_scripts override
  Config->>State: initialize with updated configuration
  State->>GlobalInstall: run global add
  GlobalInstall->>GlobalInstall: infer local package alias
  GlobalInstall-->>User: complete installation without lifecycle scripts
Loading

Possibly related PRs

  • pnpm/pnpm#12402: Both changes support global installation with --ignore-scripts.
  • pnpm/pnpm#12454: Both changes wire ignore_scripts through pacquet installation behavior.
  • pnpm/pnpm#13010: Both changes update Windows CI installation behavior in pacquet-ci.yml.

Suggested labels: product: pacquet

Suggested reviewers: zkochan, copilot

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes the native (Rust/pacquet) pnpm setup flow by restoring parity with the TypeScript CLI for the recursive global install it performs (pnpm add -g --ignore-scripts file:<dir>), including script-flag handling, alias inference for file: directories, and path normalization for directory fetches. Adds an integration test to cover the exact setup-triggered command shape.

Changes:

  • Add --ignore-scripts / --no-ignore-scripts support to add, applying the override into config before state initialization (both local and global).
  • Infer a package alias for global file: directory selectors by reading the local package.json name.
  • Normalize directory resolution paths lexically before directory fetching; add an integration test and a pacquet changeset.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pnpm/crates/package-manager/src/install_package_by_snapshot.rs Lexically normalizes directory resolution paths before fetching.
pnpm/crates/cli/tests/global.rs Adds an integration test covering add -g --ignore-scripts file:<dir> behavior used by pnpm setup.
pnpm/crates/cli/src/cli_args/global.rs Infers aliases for global file: directory selectors by reading package.json.
pnpm/crates/cli/src/cli_args/dispatch_install.rs Applies add CLI config overrides (ignore-scripts) before initializing state.
pnpm/crates/cli/src/cli_args/add.rs Introduces --ignore-scripts / --no-ignore-scripts flags and config application helper.
.changeset/native-setup-ignore-scripts.md Adds a pacquet patch changeset for the setup fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pnpm/crates/cli/src/cli_args/global.rs Resolved
@greptile-apps

greptile-apps Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The change is well-scoped and safe to merge: it threads an existing config flag to a command that was missing it, adds a small path-normalization wrapper, and fills a gap in alias inference for global file: installs.

Each changed function has a narrow, well-understood effect. The apply_cli_config mutation follows the same pattern already used by install and deploy. The infer_local_package_alias function passes non-file: selectors through unchanged, so existing registry and link: installs are unaffected. The lexical_normalize call is a pure path operation with no side effects. The integration test validates the exact failure mode the PR addresses.

No files require special attention. The dispatch_install.rs change to the non-global add path is the most structurally significant, but it is straightforwardly equivalent to the prior ctx.state closure with the config mutation inserted at the right point.

Reviews (8): Last reviewed commit: "fix(cli): keep global file:/link: select..." | Re-trigger Greptile

Comment thread pnpm/crates/cli/tests/global.rs Resolved
Comment thread pnpm/crates/cli/src/cli_args/global.rs Resolved
@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 14, 2026
@codecov-commenter

codecov-commenter commented Jul 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.25000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.55%. Comparing base (b49c224) to head (4e9b4b4).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/cli/src/cli_args/global.rs 74.28% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13006      +/-   ##
==========================================
+ Coverage   85.53%   85.55%   +0.01%     
==========================================
  Files         498      498              
  Lines       79541    79588      +47     
==========================================
+ Hits        68037    68088      +51     
+ Misses      11504    11500       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI review requested due to automatic review settings July 14, 2026 22:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@Stanzilla

Copy link
Copy Markdown
Contributor Author

The remaining Windows CI failure occurs during pnpm install, before the test suite, with the same Failed to create symlink ... os error 267 failure currently present on main (for example, Rust CI run 29364275372). All branch-specific Rust checks, including Dylint, macOS, and Ubuntu tests, pass. I attempted to rerun the failed job, but fork contributors do not have permission to rerun upstream Actions jobs.


Written by an agent (GitHub Copilot CLI, gpt-5.6-sol).

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: b5e596b1c51b

Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD.

Scenario: Isolated linker: fresh restore, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.740 ± 0.212 2.419 3.028 1.70 ± 0.22
pacquet@main 2.780 ± 0.185 2.580 3.204 1.73 ± 0.21
pnpr@HEAD 1.673 ± 0.200 1.467 1.961 1.04 ± 0.17
pnpr@main 1.611 ± 0.169 1.365 1.828 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.74029313132,
      "stddev": 0.21219502842084909,
      "median": 2.81417157292,
      "user": 2.56388312,
      "system": 1.90018894,
      "min": 2.41915582192,
      "max": 3.02849686192,
      "times": [
        2.4644159269199997,
        2.41915582192,
        2.81541221592,
        2.56544063092,
        2.61038769792,
        3.02849686192,
        2.9797705249199997,
        2.81293092992,
        2.82508104192,
        2.88183966092
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.77970600342,
      "stddev": 0.18498027936414066,
      "median": 2.77754819792,
      "user": 2.96275372,
      "system": 2.36441964,
      "min": 2.58006988692,
      "max": 3.2037656699199997,
      "times": [
        3.2037656699199997,
        2.65313989292,
        2.79205889692,
        2.82877368492,
        2.90275829592,
        2.58423391792,
        2.66212901892,
        2.58006988692,
        2.7630374989199997,
        2.82709327092
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.67296499722,
      "stddev": 0.2001269312422653,
      "median": 1.6419206434200002,
      "user": 1.94112962,
      "system": 1.8483846399999997,
      "min": 1.46737938692,
      "max": 1.9614191859200003,
      "times": [
        1.7967503029200003,
        1.7253339599200002,
        1.5585073269200003,
        1.46737938692,
        1.50638352692,
        1.9614191859200003,
        1.46807508692,
        1.8090870659200002,
        1.9544085509200002,
        1.4823055789200001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.61095703722,
      "stddev": 0.1685659741870905,
      "median": 1.6481912104200003,
      "user": 1.62124402,
      "system": 1.58525064,
      "min": 1.36518551792,
      "max": 1.8283788769200002,
      "times": [
        1.44923767292,
        1.6494485489200001,
        1.70522045192,
        1.48610871392,
        1.6469338719200002,
        1.81239609792,
        1.8283788769200002,
        1.7454237219200002,
        1.42123689792,
        1.36518551792
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 242.6 ± 17.1 226.7 280.0 1.00
pacquet@main 250.8 ± 17.7 221.0 271.9 1.03 ± 0.10
pnpr@HEAD 315.6 ± 32.5 272.6 376.9 1.30 ± 0.16
pnpr@main 317.0 ± 33.5 268.3 379.7 1.31 ± 0.17
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.24261667888,
      "stddev": 0.017088932428157344,
      "median": 0.23808192238000003,
      "user": 0.2240277,
      "system": 0.6385892599999999,
      "min": 0.22668588888000002,
      "max": 0.28001528088,
      "times": [
        0.23415884888000002,
        0.23163949088000002,
        0.24638345088000002,
        0.22739012788000001,
        0.22975274988000002,
        0.24666359588000003,
        0.24200499588000002,
        0.22668588888000002,
        0.26147235888,
        0.28001528088
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.25078728918,
      "stddev": 0.017657047076834548,
      "median": 0.25278360988,
      "user": 0.23072849999999995,
      "system": 0.65179846,
      "min": 0.22096111188000003,
      "max": 0.27191466988,
      "times": [
        0.24036534288000003,
        0.22729946688000002,
        0.24546229288000002,
        0.25701148488,
        0.24936841388,
        0.26971778688,
        0.25619880588,
        0.27191466988,
        0.26957351588,
        0.22096111188000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31561733288,
      "stddev": 0.032526109924267424,
      "median": 0.31389418688000004,
      "user": 0.30722499999999997,
      "system": 0.7599007600000001,
      "min": 0.27256855088,
      "max": 0.37689987888,
      "times": [
        0.28070295088,
        0.27256855088,
        0.29294212788,
        0.31417304588,
        0.31486556788,
        0.34205096688000003,
        0.34994231388,
        0.37689987888,
        0.31361532788,
        0.29841259788
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.31697191368,
      "stddev": 0.03353530955633332,
      "median": 0.31732753538,
      "user": 0.28678729999999997,
      "system": 0.74685056,
      "min": 0.26829304187999997,
      "max": 0.37970282288,
      "times": [
        0.33201539288,
        0.32738603888,
        0.34976885588,
        0.27597656988,
        0.37970282288,
        0.32443932088,
        0.31021574988,
        0.30843087288,
        0.26829304187999997,
        0.29349047088
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.911 ± 0.052 2.855 3.024 1.81 ± 0.19
pacquet@main 2.953 ± 0.130 2.732 3.199 1.84 ± 0.20
pnpr@HEAD 1.605 ± 0.164 1.438 1.891 1.00
pnpr@main 1.610 ± 0.193 1.420 1.939 1.00 ± 0.16
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.91142369824,
      "stddev": 0.05177018928730816,
      "median": 2.9036329650400003,
      "user": 2.5322595799999994,
      "system": 1.8094161800000002,
      "min": 2.85454402004,
      "max": 3.0239205630400003,
      "times": [
        2.8860860760400002,
        2.90073497504,
        2.8670159180400003,
        2.9065309550400005,
        2.8578213000400003,
        2.85454402004,
        2.9508730510400003,
        3.0239205630400003,
        2.93994514404,
        2.92676498004
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.9532475565400005,
      "stddev": 0.12958174748223378,
      "median": 2.9452359310400005,
      "user": 2.67358328,
      "system": 1.8119040799999997,
      "min": 2.73218522304,
      "max": 3.19900245204,
      "times": [
        2.9446466380400005,
        2.94425345604,
        3.11062254104,
        2.96982339404,
        3.19900245204,
        2.9458252240400005,
        2.9604689920400005,
        2.87287823204,
        2.73218522304,
        2.8527694130400003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.60505449584,
      "stddev": 0.16404118494530956,
      "median": 1.55260197254,
      "user": 1.39970138,
      "system": 1.34514008,
      "min": 1.43780077904,
      "max": 1.89148940004,
      "times": [
        1.60897666304,
        1.49622728204,
        1.45762314704,
        1.89148940004,
        1.7920169640399999,
        1.7824856990400002,
        1.47906930104,
        1.43780077904,
        1.47920254604,
        1.62565317704
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.61036790084,
      "stddev": 0.1933943548697487,
      "median": 1.54503704304,
      "user": 1.4310349799999997,
      "system": 1.4208543800000002,
      "min": 1.41956378604,
      "max": 1.9390144850400002,
      "times": [
        1.59283621004,
        1.42049972304,
        1.8262904850400001,
        1.49723787604,
        1.41956378604,
        1.45198355504,
        1.84586907904,
        1.48524848504,
        1.6251353240400002,
        1.9390144850400002
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 683.9 ± 48.3 619.8 767.6 2.34 ± 0.22
pacquet@main 710.1 ± 95.9 600.3 874.8 2.43 ± 0.36
pnpr@HEAD 292.9 ± 12.9 277.8 317.8 1.00 ± 0.08
pnpr@main 291.8 ± 18.7 263.1 320.2 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6838745106800002,
      "stddev": 0.04826606581365457,
      "median": 0.6713980591800002,
      "user": 0.8593352400000001,
      "system": 0.84465516,
      "min": 0.6197932786800001,
      "max": 0.76761831168,
      "times": [
        0.6507364886800001,
        0.6600544976800001,
        0.6799657846800001,
        0.7581493836800001,
        0.76761831168,
        0.7118676246800001,
        0.6628303336800001,
        0.6815038106800001,
        0.6462255926800001,
        0.6197932786800001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.7100522850800001,
      "stddev": 0.09593260008123011,
      "median": 0.6868459236800001,
      "user": 0.9278308399999998,
      "system": 0.8162003600000001,
      "min": 0.6003236336800001,
      "max": 0.8748274746800001,
      "times": [
        0.6287819776800001,
        0.6380658376800001,
        0.6003236336800001,
        0.67554632268,
        0.6567924636800001,
        0.8733024606800001,
        0.8748274746800001,
        0.7420323686800001,
        0.71270478668,
        0.6981455246800001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29292513647999996,
      "stddev": 0.012945666580587255,
      "median": 0.29193897468,
      "user": 0.23140123999999998,
      "system": 0.62325856,
      "min": 0.27779321368,
      "max": 0.31782620168000003,
      "times": [
        0.30678085968,
        0.28086160168,
        0.27848109168,
        0.28631849368,
        0.27779321368,
        0.29167935368000003,
        0.29772823168,
        0.29958372168,
        0.31782620168000003,
        0.29219859568
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29178292957999996,
      "stddev": 0.01868277626690181,
      "median": 0.28740211218,
      "user": 0.22079543999999998,
      "system": 0.64207316,
      "min": 0.26311017568,
      "max": 0.32019448968,
      "times": [
        0.26311017568,
        0.29185243868,
        0.31167092468,
        0.31572087468,
        0.28295178568,
        0.28061939168,
        0.29382475268,
        0.27707683468,
        0.32019448968,
        0.28080762768
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.943 ± 0.029 1.905 1.996 7.11 ± 0.50
pacquet@main 1.925 ± 0.033 1.873 1.966 7.04 ± 0.50
pnpr@HEAD 0.273 ± 0.019 0.243 0.301 1.00
pnpr@main 0.283 ± 0.015 0.261 0.308 1.04 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.94337139062,
      "stddev": 0.02914125494715001,
      "median": 1.94014320052,
      "user": 1.1301676600000001,
      "system": 0.9070140200000001,
      "min": 1.9048904115199998,
      "max": 1.99638750252,
      "times": [
        1.9048904115199998,
        1.93200621652,
        1.94866995852,
        1.94610014052,
        1.9748594125199999,
        1.99638750252,
        1.93418626052,
        1.9133798095199999,
        1.96616521852,
        1.9170689755199999
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.9249460660199997,
      "stddev": 0.032998156463496686,
      "median": 1.92994852052,
      "user": 1.10356036,
      "system": 0.8926535199999999,
      "min": 1.87253448352,
      "max": 1.96591189052,
      "times": [
        1.96591189052,
        1.9594030895199999,
        1.9366876205199999,
        1.93362758052,
        1.9164299225199999,
        1.87253448352,
        1.88564685652,
        1.92626946052,
        1.96075923652,
        1.89219051952
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27344623582,
      "stddev": 0.018856142550151625,
      "median": 0.27301875952,
      "user": 0.21328686000000002,
      "system": 0.5852555200000001,
      "min": 0.24323394152000002,
      "max": 0.30139035052,
      "times": [
        0.30139035052,
        0.28002653552,
        0.28941156952,
        0.27927557252,
        0.26373492252,
        0.24323394152000002,
        0.25028859652,
        0.26587806152000004,
        0.29446086152,
        0.26676194652
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.28324450032,
      "stddev": 0.015142971170827113,
      "median": 0.28104531102,
      "user": 0.21360096,
      "system": 0.61639332,
      "min": 0.26096893552,
      "max": 0.30789168352,
      "times": [
        0.26885205452,
        0.28444001352000003,
        0.29810120652,
        0.26096893552,
        0.27765060852,
        0.28704843452,
        0.27300939252,
        0.27404399052,
        0.30789168352,
        0.30043868352
      ]
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 466.9 ± 62.3 401.0 592.3 4.56 ± 0.69
pacquet@main 434.3 ± 37.2 395.9 506.6 4.25 ± 0.48
pnpr@HEAD 105.6 ± 6.8 94.3 119.3 1.03 ± 0.10
pnpr@main 102.3 ± 7.4 90.0 114.3 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.46693498976000003,
      "stddev": 0.062265228935497005,
      "median": 0.44289578716,
      "user": 0.45819893999999994,
      "system": 0.1001512,
      "min": 0.40104609666,
      "max": 0.5922683286600001,
      "times": [
        0.40104609666,
        0.43859049666,
        0.41304985666,
        0.5922683286600001,
        0.49031445666,
        0.50602155766,
        0.5357307186600001,
        0.44720107766,
        0.42168360666,
        0.42344370166
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.43431267906000004,
      "stddev": 0.03716008802902856,
      "median": 0.42566050616,
      "user": 0.4188737399999999,
      "system": 0.1082738,
      "min": 0.39589895466,
      "max": 0.50664573166,
      "times": [
        0.43363010266,
        0.43094009166,
        0.42038092066,
        0.39589895466,
        0.41699006766,
        0.40844526566,
        0.40264609566,
        0.43372289866,
        0.49382666166,
        0.50664573166
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.10557067358592594,
      "stddev": 0.006753866065355093,
      "median": 0.10471129766000001,
      "user": 0.02837032148148148,
      "system": 0.018495296296296294,
      "min": 0.09425051966,
      "max": 0.11928281166000002,
      "times": [
        0.09866619666000001,
        0.10917578466000001,
        0.09614156666000001,
        0.11169334566000001,
        0.09667434366000001,
        0.10408431766000001,
        0.09425051966,
        0.10965293366000001,
        0.11928281166000002,
        0.10471129766000001,
        0.11337405666000001,
        0.11429932266000001,
        0.10492901266000002,
        0.11142336566000001,
        0.10142442366000001,
        0.10386275766000001,
        0.11662156566000001,
        0.10044324866000001,
        0.09714898066000001,
        0.10097381166000001,
        0.09792227366000002,
        0.10366145566000001,
        0.11257183066000001,
        0.10386742066000001,
        0.10579554066,
        0.10607801066000001,
        0.11167799166000002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.10228845051714287,
      "stddev": 0.007393987251940063,
      "median": 0.10130206766000001,
      "user": 0.02483426857142858,
      "system": 0.019103000000000002,
      "min": 0.09002491466000001,
      "max": 0.11429851866000001,
      "times": [
        0.10018803466000001,
        0.09878389666000001,
        0.09510847866000001,
        0.10612103966000001,
        0.11263446766000001,
        0.11429851866000001,
        0.10877984166000002,
        0.10711078066000002,
        0.09839930266000001,
        0.09268772066000001,
        0.09580698566000001,
        0.09242304466000001,
        0.11119656066000001,
        0.09949760566000002,
        0.09319753566000001,
        0.09610082766000001,
        0.09427377166,
        0.09002491466000001,
        0.10401069366000001,
        0.10600731366,
        0.10241610066000001,
        0.09794412266000001,
        0.10853657466000001,
        0.11338122066000002,
        0.09853012366000001,
        0.10262364866000001,
        0.11017239966000002,
        0.11382108866000001
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.678 ± 0.115 4.554 4.916 1.30 ± 0.04
pacquet@main 4.575 ± 0.054 4.493 4.650 1.27 ± 0.03
pnpr@HEAD 3.610 ± 0.147 3.487 3.893 1.00 ± 0.05
pnpr@main 3.602 ± 0.086 3.480 3.743 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.67786605294,
      "stddev": 0.11477454513621246,
      "median": 4.64994260664,
      "user": 2.4538333999999997,
      "system": 1.83998782,
      "min": 4.554250920139999,
      "max": 4.91606306714,
      "times": [
        4.79397622814,
        4.554250920139999,
        4.63511312514,
        4.5765216211399995,
        4.683692758139999,
        4.589057846139999,
        4.76267804714,
        4.664772088139999,
        4.60253482814,
        4.91606306714
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.57540712564,
      "stddev": 0.054183558637015065,
      "median": 4.56822839314,
      "user": 2.4439781,
      "system": 1.9246644199999998,
      "min": 4.49316407914,
      "max": 4.6498996751399995,
      "times": [
        4.54253194814,
        4.63268356814,
        4.54159146914,
        4.49316407914,
        4.60167599814,
        4.56037243614,
        4.51608855514,
        4.5760843501399995,
        4.6498996751399995,
        4.63997917714
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.6102063318399997,
      "stddev": 0.14731601159729568,
      "median": 3.54767095364,
      "user": 1.6645832000000003,
      "system": 1.47029352,
      "min": 3.4874639151399998,
      "max": 3.89290408714,
      "times": [
        3.5276310031399998,
        3.53697466514,
        3.55517534214,
        3.50879473314,
        3.5497100061399998,
        3.4874639151399998,
        3.89290408714,
        3.8683558261399997,
        3.5456319011399997,
        3.62942183914
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.6017748316400002,
      "stddev": 0.08553378173977737,
      "median": 3.57671535314,
      "user": 1.7534464,
      "system": 1.5770801200000002,
      "min": 3.47961257514,
      "max": 3.74337129714,
      "times": [
        3.5236233221399997,
        3.54920487514,
        3.74337129714,
        3.6710811631399998,
        3.5782324221399997,
        3.57519828414,
        3.5446626871399998,
        3.64861415114,
        3.70414753914,
        3.47961257514
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13006
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,911.42 ms
(-29.21%)Baseline: 4,112.68 ms
4,935.21 ms
(58.99%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,943.37 ms
(-32.70%)Baseline: 2,887.74 ms
3,465.29 ms
(56.08%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
683.87 ms
(-46.46%)Baseline: 1,277.37 ms
1,532.84 ms
(44.61%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
466.93 ms
(-21.83%)Baseline: 597.37 ms
716.84 ms
(65.14%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,740.29 ms
(-26.11%)Baseline: 3,708.46 ms
4,450.15 ms
(61.58%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,677.87 ms
(-31.85%)Baseline: 6,863.87 ms
8,236.64 ms
(56.79%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
242.62 ms
(-59.91%)Baseline: 605.12 ms
726.15 ms
(33.41%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13006
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,605.05 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
273.45 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
292.93 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
105.57 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,672.96 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,610.21 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
315.62 ms
🐰 View full continuous benchmarking report in Bencher

Copilot AI review requested due to automatic review settings July 15, 2026 10:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread pnpm/crates/cli/tests/global.rs Resolved
@Stanzilla Stanzilla mentioned this pull request Jul 15, 2026
Copilot AI review requested due to automatic review settings July 15, 2026 17:49
@zkochan
zkochan force-pushed the fix/setup-ignore-scripts branch from 08badc9 to 0e66783 Compare July 15, 2026 17:49
Stanzilla and others added 4 commits July 15, 2026 21:17
The `add -g --ignore-scripts file:<dir>` regression test set `PNPM_HOME`
but never pinned a store or cache, so the global install could read from
and write to the developer/CI machine's default global store, polluting
state and risking flakiness across runs.

Seed a per-test `storeDir` / `cacheDir` under the temporary pnpm home
(where the global install resolves its config), mirroring
`prepare_global_home`, so the install is fully sandboxed.
Copilot AI review requested due to automatic review settings July 15, 2026 19:29
@zkochan
zkochan force-pushed the fix/setup-ignore-scripts branch from fe246d4 to b5e596b Compare July 15, 2026 19:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@zkochan zkochan changed the title fix(cli): repair native setup installation fix(cli): make pnpm setup install the native CLI globally Jul 15, 2026
Comment thread pnpm/crates/cli/src/cli_args/global.rs Resolved
Comment thread pnpm/crates/cli/src/cli_args/global.rs Resolved
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit b5e596b

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

resolve_local_param joined every non-absolute file:/link: selector to the
base directory. That diverged from the TypeScript resolveLocalParam, which
rewrites only dot-relative selectors, and it broke home-relative selectors:
`file:~/pkg` became `<base_dir>/~/pkg`, defeating the resolver's `~`
expansion.

Rewrite only dot-relative selectors, matching pnpm, and pass bare names,
`~/`, and absolute selectors through unchanged. Cover the passthrough with
a regression test.
Copilot AI review requested due to automatic review settings July 15, 2026 20:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 4e9b4b4

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review state: automerge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants