Skip to content

fix(cli): honor add virtual store directory - #13012

Closed
YESHYUNGSEOK wants to merge 2 commits into
pnpm:mainfrom
YESHYUNGSEOK:fix/pacquet-add-virtual-store-dir
Closed

YESHYUNGSEOK wants to merge 2 commits into
pnpm:mainfrom
YESHYUNGSEOK:fix/pacquet-add-virtual-store-dir

Conversation

@YESHYUNGSEOK

@YESHYUNGSEOK YESHYUNGSEOK commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Important

This branch must incorporate #13066 before this PR can merge. The intended sequence is to merge #13066 into main, then rebase or update this branch onto the latest main so the zizmor security check runs with the shared fix.

Pacquet now applies add --virtual-store-dir <dir> to the effective configuration before installation state is initialized. Relative values are resolved from the workspace root, while an absent flag continues to preserve the configured or default virtual store directory.

Global add rejects the option with pnpm's existing ERR_PNPM_CONFIG_CONFLICT_VIRTUAL_STORE_DIR_WITH_GLOBAL diagnostic before package-manager switching or configuration loading can report a different error.

The TypeScript CLI already accepted non-empty overrides, but it checked the global conflict only after reading configuration and treated an empty value as an override. The config reader now reports the conflict before loading global configuration and ignores empty non-global overrides so the configured or default virtual store directory is preserved.

Squash Commit Body

Pacquet parsed `add --virtual-store-dir` but discarded the value and also supplied an incorrect unused default. Treat the argument as an optional invocation override, resolve relative paths from the workspace root, and apply it to the same configuration passed to `State::init`.

Validate the incompatible global combination immediately after argument parsing in Pacquet and before configuration loading in the TypeScript CLI. Treat an empty non-global override as absent so both implementations preserve the configured or default directory, while an empty override combined with --global still reports the stable pnpm conflict diagnostic.

Add real-CLI regressions for local overrides, workspace-root anchoring, absent-flag configuration preservation, and global error precedence, plus config-reader regressions for empty values and pre-load conflict validation.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.

Written by an agent (Codex, GPT-5).


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

Summary by CodeRabbit

  • Bug Fixes
    • Fixed pnpm add --virtual-store-dir / pacquet add --virtual-store-dir so the provided directory is consistently respected.
    • Relative --virtual-store-dir values are now resolved from the workspace root.
    • --virtual-store-dir correctly overrides workspace virtual store settings and prevents creating the default virtual store.
    • If --virtual-store-dir is provided as empty, the configured virtual store directory is preserved.
    • Improved validation to prevent using --virtual-store-dir with global installs (pnpm add -g / --global), surfacing conflicts before global config is loaded.
  • Tests
    • Added CLI and config reader coverage for these scenarios.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ea6c819b-2f2e-4eea-80f2-82e71d9ae479

📥 Commits

Reviewing files that changed from the base of the PR and between 61481cd and 5bae058.

📒 Files selected for processing (7)
  • .changeset/pacquet-add-virtual-store-dir.md
  • pnpm/crates/cli/src/cli_args/add.rs
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/src/cli_args/dispatch_install.rs
  • pnpm/crates/cli/src/config_overrides.rs
  • pnpm/crates/cli/src/config_overrides/tests.rs
  • pnpm/crates/cli/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (7)
  • .changeset/pacquet-add-virtual-store-dir.md
  • pnpm/crates/cli/src/cli_args/dispatch_install.rs
  • pnpm/crates/cli/src/config_overrides/tests.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/src/cli_args/add.rs
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/src/config_overrides.rs

📝 Walkthrough

Walkthrough

The CLI treats --virtual-store-dir as an optional add override, preserves configured values for empty overrides, rejects it with --global before configuration loading, and adds tests plus a patch changeset.

Changes

Add virtual store directory behavior

Layer / File(s) Summary
Validate add configuration conflicts
pnpm/crates/cli/src/cli_args/add.rs, pnpm/crates/cli/src/cli_args/cli_command.rs, pnpm/crates/cli/src/lib.rs, pnpm11/config/reader/src/index.ts
The option is optional, conflicts with global mode, and is validated before later configuration loading.
Apply virtual store directory overrides
pnpm/crates/cli/src/config_overrides.rs, pnpm/crates/cli/src/config_overrides/tests.rs, pnpm/crates/cli/src/cli_args/dispatch_install.rs
Non-empty overrides are resolved and normalized before AddPipeline initialization; empty overrides preserve existing configuration.
Verify behavior and record release
pnpm/crates/cli/tests/add.rs, pnpm11/config/reader/test/index.ts, .changeset/pacquet-add-virtual-store-dir.md
Tests cover configured, relative, explicit, empty, and global-conflicting values, and the changeset records patch releases.

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

Sequence Diagram(s)

sequenceDiagram
  participant CliArgs
  participant ConfigValidation
  participant ConfigReader
  participant AddCommand
  participant AddPipeline
  CliArgs->>ConfigValidation: validate global and virtual-store-dir conflict
  ConfigValidation-->>CliArgs: return diagnostic or success
  CliArgs->>ConfigReader: load configuration
  AddCommand->>AddCommand: apply virtual store directory override
  AddCommand->>AddPipeline: initialize with updated configuration
Loading

Possibly related PRs

  • pnpm/pnpm#13086: Also changes --virtual-store-dir handling and related global-mode messaging.

Suggested labels: product: pacquet, product: pnpm@11

Suggested reviewers: zkochan

✨ 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.

@codecov-commenter

codecov-commenter commented Jul 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.68%. Comparing base (5e6dd35) to head (5bae058).

Files with missing lines Patch % Lines
pnpm/crates/cli/src/config_overrides.rs 95.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13012   +/-   ##
=======================================
  Coverage   86.68%   86.68%           
=======================================
  Files         522      522           
  Lines       87872    87909   +37     
=======================================
+ Hits        76168    76204   +36     
- Misses      11704    11705    +1     

☔ 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.

@github-actions

github-actions Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 5bae0585411b

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

The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time).

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.588 ± 0.148 2.396 2.854 1.69 ± 0.18
pacquet@main 2.583 ± 0.170 2.377 2.881 1.69 ± 0.19
pnpr@HEAD 1.529 ± 0.138 1.365 1.774 1.00
pnpr@main 1.633 ± 0.178 1.380 1.826 1.07 ± 0.15
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5879078722999997,
      "stddev": 0.14772063410227546,
      "median": 2.5355208967999996,
      "user": 1.7081717599999997,
      "system": 1.3884527599999998,
      "min": 2.3955194027999998,
      "max": 2.8538730608,
      "times": [
        2.7646816808,
        2.3955194027999998,
        2.4945768108,
        2.8538730608,
        2.5281932908,
        2.6644099178,
        2.4757127558,
        2.4689326808,
        2.5428485027999996,
        2.6903306197999997
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5827046768999997,
      "stddev": 0.1695073855039674,
      "median": 2.5887784808,
      "user": 1.7071090599999998,
      "system": 1.41496036,
      "min": 2.3773388528,
      "max": 2.8812331747999997,
      "times": [
        2.4740838348,
        2.4030264558,
        2.3773388528,
        2.5221844538,
        2.6553725077999997,
        2.4160022908,
        2.6689201068,
        2.7610355618,
        2.8812331747999997,
        2.6678495298
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5293115997000002,
      "stddev": 0.13845754715937583,
      "median": 1.5109441983000003,
      "user": 1.17106496,
      "system": 1.23307836,
      "min": 1.3649367638,
      "max": 1.7744522058,
      "times": [
        1.3769579928000002,
        1.7744522058,
        1.6193160598000003,
        1.4401988618000001,
        1.4053612308,
        1.3649367638,
        1.5472529468000003,
        1.4746354498,
        1.6259732338000001,
        1.6640312518000002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.6327098131,
      "stddev": 0.1779897274425945,
      "median": 1.7228499608,
      "user": 1.2129491600000002,
      "system": 1.3233713599999999,
      "min": 1.3802810018,
      "max": 1.8260246468,
      "times": [
        1.8107924518,
        1.4139767768,
        1.7869453918,
        1.4936307498,
        1.3802810018,
        1.7203943788000002,
        1.7253055428000001,
        1.7271828208000002,
        1.4425643698000001,
        1.8260246468
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 281.0 ± 12.6 258.5 292.7 1.07 ± 0.08
pacquet@main 262.5 ± 16.9 241.9 292.3 1.00
pnpr@HEAD 280.0 ± 6.1 266.0 287.6 1.07 ± 0.07
pnpr@main 293.7 ± 12.3 279.5 318.4 1.12 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.28101667498,
      "stddev": 0.012604194967423427,
      "median": 0.28629716898,
      "user": 0.23233167999999998,
      "system": 0.5660236,
      "min": 0.25854672098000003,
      "max": 0.29265111398000004,
      "times": [
        0.28828684798000004,
        0.28978806098000004,
        0.28766189498,
        0.27586284398,
        0.28493244298000003,
        0.28091827698,
        0.29185889398000003,
        0.29265111398000004,
        0.25854672098000003,
        0.25965965298
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.26250678258,
      "stddev": 0.016885098838737855,
      "median": 0.26179554848000003,
      "user": 0.21287227999999997,
      "system": 0.539137,
      "min": 0.24187561098000002,
      "max": 0.29226439598000004,
      "times": [
        0.25163113098,
        0.26488863298000004,
        0.26946325298,
        0.25870246398,
        0.24697214198,
        0.24187561098000002,
        0.24621771398,
        0.26735479898000003,
        0.28569768298000003,
        0.29226439598000004
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.28002628118,
      "stddev": 0.006070891189046004,
      "median": 0.28050494998,
      "user": 0.22615657999999997,
      "system": 0.5486711999999999,
      "min": 0.26604848398000003,
      "max": 0.28760878498000003,
      "times": [
        0.26604848398000003,
        0.28760878498000003,
        0.27879666798,
        0.27957761698,
        0.28143228298,
        0.28237167898000004,
        0.27825472998,
        0.28352681098,
        0.27627892598000003,
        0.28636682898000004
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29373926898,
      "stddev": 0.012296131307297306,
      "median": 0.28838716298,
      "user": 0.23243158,
      "system": 0.5498353,
      "min": 0.27953528698,
      "max": 0.31837503198,
      "times": [
        0.27953528698,
        0.30482134298,
        0.29433317498,
        0.28949826698000003,
        0.28711319298000004,
        0.28727605898,
        0.28372561398,
        0.31837503198,
        0.30663521098,
        0.28607950898
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.845 ± 0.050 2.777 2.964 1.76 ± 0.15
pacquet@main 2.779 ± 0.023 2.737 2.817 1.72 ± 0.14
pnpr@HEAD 1.617 ± 0.135 1.463 1.817 1.00
pnpr@main 1.668 ± 0.104 1.459 1.827 1.03 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.8445808904400005,
      "stddev": 0.050369519052252794,
      "median": 2.8451747054400003,
      "user": 1.8431220400000001,
      "system": 1.4313873400000001,
      "min": 2.77687494244,
      "max": 2.9641990484400003,
      "times": [
        2.8003919084400004,
        2.8056859014400004,
        2.84948427644,
        2.9641990484400003,
        2.8408651344400004,
        2.86009606644,
        2.85083820444,
        2.8565692994400003,
        2.8408041224400002,
        2.77687494244
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.77858431684,
      "stddev": 0.023423926473338724,
      "median": 2.77969244944,
      "user": 1.7484002399999998,
      "system": 1.3074755400000002,
      "min": 2.7370715964400003,
      "max": 2.8165851634400005,
      "times": [
        2.80441748944,
        2.8165851634400005,
        2.77819560544,
        2.7691143324400005,
        2.78118929344,
        2.7505242564400003,
        2.78556385644,
        2.7370715964400003,
        2.77285512544,
        2.79032644944
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6174433621400002,
      "stddev": 0.13533928933166078,
      "median": 1.56013620744,
      "user": 1.0222999400000001,
      "system": 1.24609194,
      "min": 1.46333879444,
      "max": 1.81699742444,
      "times": [
        1.46333879444,
        1.57067078644,
        1.54960162844,
        1.50838135844,
        1.65755269544,
        1.48691342744,
        1.80548403944,
        1.7703098934400001,
        1.81699742444,
        1.54518357344
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.66841421874,
      "stddev": 0.10359552667707496,
      "median": 1.67525394144,
      "user": 1.0621298399999999,
      "system": 1.15613264,
      "min": 1.45949134544,
      "max": 1.82724932644,
      "times": [
        1.7330425824400002,
        1.6572708844400001,
        1.5881572234399999,
        1.63710866844,
        1.82724932644,
        1.7165402274400001,
        1.45949134544,
        1.60716711044,
        1.69323699844,
        1.76487782044
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 594.4 ± 23.4 559.3 647.6 1.99 ± 0.10
pacquet@main 583.5 ± 14.5 564.5 607.5 1.95 ± 0.08
pnpr@HEAD 308.6 ± 11.6 285.3 323.0 1.03 ± 0.05
pnpr@main 299.3 ± 9.1 286.4 309.7 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.5944257695599999,
      "stddev": 0.02336717107348659,
      "median": 0.5865992736600001,
      "user": 0.72757518,
      "system": 0.67363552,
      "min": 0.55925457566,
      "max": 0.64759733666,
      "times": [
        0.55925457566,
        0.61357958566,
        0.58418489366,
        0.64759733666,
        0.60073077966,
        0.58713405866,
        0.58592393266,
        0.58275043766,
        0.59703760666,
        0.58606448866
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.58350598606,
      "stddev": 0.014511047393133799,
      "median": 0.5782294086599999,
      "user": 0.71603848,
      "system": 0.6557550199999999,
      "min": 0.56447010066,
      "max": 0.60751645666,
      "times": [
        0.56907623066,
        0.57172984866,
        0.59511652466,
        0.5979618746600001,
        0.59620163666,
        0.60751645666,
        0.57808267266,
        0.57837614466,
        0.57652837066,
        0.56447010066
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.30859619086,
      "stddev": 0.011628948865217988,
      "median": 0.30914790116,
      "user": 0.19343777999999998,
      "system": 0.5309489199999999,
      "min": 0.28533406366,
      "max": 0.32304950366000007,
      "times": [
        0.32304950366000007,
        0.28533406366,
        0.30448826166000004,
        0.31737777166000003,
        0.31532462366,
        0.30614514566000006,
        0.32134205466000004,
        0.31215065666,
        0.30277559166000007,
        0.29797423566000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29928855946000005,
      "stddev": 0.009101846612199004,
      "median": 0.29774487466000005,
      "user": 0.17925637999999997,
      "system": 0.5288785199999999,
      "min": 0.28642179866000006,
      "max": 0.30972635866000003,
      "times": [
        0.30972635866000003,
        0.30791283866,
        0.29361794666,
        0.28642179866000006,
        0.28781547866000007,
        0.29960297766000005,
        0.29588677166000005,
        0.29379256466000003,
        0.30944447866,
        0.30866438066000007
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.918 ± 0.017 1.900 1.945 6.06 ± 0.32
pacquet@main 1.920 ± 0.014 1.897 1.941 6.07 ± 0.32
pnpr@HEAD 0.316 ± 0.017 0.296 0.357 1.00
pnpr@main 0.320 ± 0.013 0.307 0.348 1.01 ± 0.07
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.9183113615800003,
      "stddev": 0.017256748791418287,
      "median": 1.9079742346800002,
      "user": 0.93691856,
      "system": 0.7748232999999999,
      "min": 1.9004666561800003,
      "max": 1.9447318401800002,
      "times": [
        1.9358429401800001,
        1.9447318401800002,
        1.90563354918,
        1.9322286551800003,
        1.9386460001800003,
        1.90688012318,
        1.9027353821800002,
        1.9004666561800003,
        1.90713318918,
        1.9088152801800002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.9200776270800002,
      "stddev": 0.0139133860895323,
      "median": 1.9226377541800002,
      "user": 0.93570536,
      "system": 0.7610335,
      "min": 1.8974061231800001,
      "max": 1.9408907691800001,
      "times": [
        1.9274270391800001,
        1.8974061231800001,
        1.9408907691800001,
        1.9099346751800002,
        1.90165918818,
        1.9285890131800003,
        1.9290384251800001,
        1.9314270911800002,
        1.9178484691800002,
        1.9165554771800002
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31642410237999996,
      "stddev": 0.016635824231438015,
      "median": 0.31562677768,
      "user": 0.20468066000000001,
      "system": 0.5419313,
      "min": 0.29641574818,
      "max": 0.35732193418,
      "times": [
        0.31770094218,
        0.31597857418,
        0.31628943818,
        0.29641574818,
        0.32490167218,
        0.31527498118,
        0.30061337118000003,
        0.31173198818000003,
        0.30801237418,
        0.35732193418
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.32030309248,
      "stddev": 0.012552032501188484,
      "median": 0.31696703268000004,
      "user": 0.21056745999999998,
      "system": 0.5350924000000001,
      "min": 0.30688447418000003,
      "max": 0.34835062518000004,
      "times": [
        0.33337635818,
        0.32390180118,
        0.31432777018,
        0.31189620718,
        0.31278745418000004,
        0.34835062518000004,
        0.32170094318000003,
        0.31960629518,
        0.30688447418000003,
        0.31019899618
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 377.3 ± 11.0 362.8 393.8 4.35 ± 0.14
pacquet@main 386.4 ± 8.6 376.7 397.2 4.45 ± 0.11
pnpr@HEAD 88.1 ± 2.4 85.2 96.8 1.01 ± 0.03
pnpr@main 86.8 ± 0.9 84.6 88.5 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.37731537064,
      "stddev": 0.010998675364036264,
      "median": 0.37517770553999996,
      "user": 0.3621606,
      "system": 0.07120173999999999,
      "min": 0.36278949554,
      "max": 0.39375949054000003,
      "times": [
        0.39328038954,
        0.37249077754,
        0.39375949054000003,
        0.36738012754,
        0.38133826454,
        0.37694058554,
        0.36278949554,
        0.36601072254,
        0.38574902754,
        0.37341482554
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.38639900724000004,
      "stddev": 0.008554541001518786,
      "median": 0.38471391654,
      "user": 0.3820935,
      "system": 0.05737294,
      "min": 0.37667490554,
      "max": 0.39721886554,
      "times": [
        0.37874997754,
        0.39721886554,
        0.37692906354,
        0.38377098854,
        0.37667490554,
        0.39678497954,
        0.39478156254,
        0.38565684454,
        0.39422870254000003,
        0.37919418254
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08807389397750001,
      "stddev": 0.002388369388377363,
      "median": 0.08744176704,
      "user": 0.02192180625,
      "system": 0.009540098125000002,
      "min": 0.08523206754,
      "max": 0.09676557354,
      "times": [
        0.08817962954,
        0.08870094054000001,
        0.08669038954,
        0.08544651054,
        0.08654909354,
        0.09182847054,
        0.09676557354,
        0.08828437654,
        0.08667249554,
        0.08819598054,
        0.09104522754,
        0.08596832254,
        0.08823958354,
        0.08636680154,
        0.08604820154000001,
        0.08725052254,
        0.08755190954,
        0.08877010054000001,
        0.08904473654,
        0.08693286454,
        0.08705773054,
        0.08751758354,
        0.09297578754000001,
        0.08523206754,
        0.08688860254,
        0.08742982954,
        0.08887224154000001,
        0.09055116854,
        0.08625422954,
        0.08737118954,
        0.08622874154,
        0.08745370454
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08681594196424243,
      "stddev": 0.0009386462574289501,
      "median": 0.08689761854,
      "user": 0.019823096969696967,
      "system": 0.010721424848484847,
      "min": 0.08461432554000001,
      "max": 0.08847001554,
      "times": [
        0.08461432554000001,
        0.08722207854,
        0.08801179354000001,
        0.08692575154,
        0.08562424454,
        0.08727708254000001,
        0.08793108154,
        0.08617981854000001,
        0.08802356654,
        0.08504187054000001,
        0.08756659654,
        0.08634675254,
        0.08638923354,
        0.08731845954,
        0.08730685854,
        0.08782274954000001,
        0.08653119954,
        0.08659380754,
        0.08672810054,
        0.08583642354,
        0.08805030554,
        0.08625252654,
        0.08716176554,
        0.08847001554,
        0.08525621254,
        0.08699841854,
        0.08646075754,
        0.08689761854,
        0.08692892754,
        0.08812958554,
        0.08687540754,
        0.08580152754,
        0.08635122154000001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.625 ± 0.150 4.461 4.846 1.32 ± 0.05
pacquet@main 4.549 ± 0.141 4.429 4.890 1.30 ± 0.04
pnpr@HEAD 3.496 ± 0.049 3.445 3.582 1.00
pnpr@main 3.638 ± 0.131 3.486 3.865 1.04 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.625305686200001,
      "stddev": 0.14972629933511755,
      "median": 4.6117180301000005,
      "user": 1.78541688,
      "system": 1.43568146,
      "min": 4.4609178721000005,
      "max": 4.8459892741,
      "times": [
        4.7949082311,
        4.4609178721000005,
        4.750889342100001,
        4.4721979121,
        4.7382270931,
        4.5638853781,
        4.6595506821,
        4.8459892741,
        4.4829097821,
        4.4835812951000005
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.5490495758,
      "stddev": 0.14149788209689412,
      "median": 4.4996763086,
      "user": 1.83284968,
      "system": 1.40214896,
      "min": 4.4292142261,
      "max": 4.8904346131,
      "times": [
        4.6656426371,
        4.608862489100001,
        4.5313474271,
        4.4735504941,
        4.8904346131,
        4.4475176241000005,
        4.4445736301,
        4.5014366481,
        4.4292142261,
        4.4979159691
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.4960967842,
      "stddev": 0.04881091270431855,
      "median": 3.4783918621,
      "user": 1.2522321799999996,
      "system": 1.27401976,
      "min": 3.4449006641,
      "max": 3.5822510250999997,
      "times": [
        3.5601723261,
        3.4860889350999997,
        3.4449006641,
        3.4655519140999997,
        3.4819898061,
        3.4640761391,
        3.4747939181,
        3.4529168521,
        3.5822510250999997,
        3.5482262620999996
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.6375694988,
      "stddev": 0.13142761325754454,
      "median": 3.6032744981,
      "user": 1.2304825799999999,
      "system": 1.29686406,
      "min": 3.4859326281,
      "max": 3.8645084721,
      "times": [
        3.4859326281,
        3.5953272460999997,
        3.8339314941,
        3.6257242590999996,
        3.7313116011,
        3.5936611051,
        3.8645084721,
        3.5142225541,
        3.6112217501,
        3.5198538780999997
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13012
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
3,041.44 ms
(-19.84%)Baseline: 3,794.41 ms
4,553.29 ms
(66.80%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,929.93 ms
(-28.02%)Baseline: 2,681.07 ms
3,217.28 ms
(59.99%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
823.10 ms
(-27.91%)Baseline: 1,141.75 ms
1,370.10 ms
(60.08%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
397.77 ms
(-27.78%)Baseline: 550.80 ms
660.95 ms
(60.18%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,568.14 ms
(-25.40%)Baseline: 3,442.32 ms
4,130.79 ms
(62.17%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,632.43 ms
(-26.40%)Baseline: 6,293.71 ms
7,552.45 ms
(61.34%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
244.46 ms
(-53.20%)Baseline: 522.41 ms
626.89 ms
(39.00%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13012
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,724.49 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
264.92 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
338.52 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
85.92 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,431.24 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,609.01 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
270.74 ms
🐰 View full continuous benchmarking report in Bencher

@YESHYUNGSEOK
YESHYUNGSEOK force-pushed the fix/pacquet-add-virtual-store-dir branch from 0812f33 to 45c3b81 Compare July 15, 2026 23:55
@YESHYUNGSEOK
YESHYUNGSEOK marked this pull request as ready for review July 16, 2026 01:35
@YESHYUNGSEOK
YESHYUNGSEOK requested a review from zkochan as a code owner July 16, 2026 01:35
@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 →

@greptile-apps

greptile-apps Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The change is safe to merge — it fixes a real bug and adds targeted regression tests for every new code path.

Both the TypeScript and Rust implementations handle the same four cases identically and each is covered by tests. The moved conflict check preserves the existing public error code and message, and the Rust validation fires before any config I/O.

No files require special attention.

Reviews (4): Last reviewed commit: "fix(cli): align virtual store override e..." | Re-trigger Greptile

Comment thread pnpm/crates/cli/src/cli_args/add.rs Resolved
Comment thread pnpm/crates/cli/src/config_overrides.rs Resolved

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.changeset/pacquet-add-virtual-store-dir.md:
- Around line 1-5: Update the TypeScript implementation of the add command to
mirror pacquet’s --virtual-store-dir behavior, including the specified error
precedence, and add the corresponding "pnpm": patch entry to the changeset. If
the behavior already exists or cannot be matched, document that explicitly
according to the project guidelines.

In `@pnpm/crates/cli/src/config_overrides.rs`:
- Around line 61-72: The apply_virtual_store_dir_override function must handle
an empty virtual_store_dir before resolving paths. Check
virtual_store_dir.as_os_str().is_empty() and leave the configured/default
virtual store directory unchanged so empty input falls back to the default
node_modules/.pnpm location, while preserving the existing resolution for
non-empty paths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 669c9792-d3ec-49b6-86d5-97a8eff5e480

📥 Commits

Reviewing files that changed from the base of the PR and between fb4639f and 45c3b81.

📒 Files selected for processing (7)
  • .changeset/pacquet-add-virtual-store-dir.md
  • pnpm/crates/cli/src/cli_args/add.rs
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/src/cli_args/dispatch_install.rs
  • pnpm/crates/cli/src/config_overrides.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/add.rs

Comment thread pnpm/crates/cli/src/config_overrides.rs Resolved
@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 16, 2026
@YESHYUNGSEOK
YESHYUNGSEOK marked this pull request as draft July 16, 2026 02:52
@YESHYUNGSEOK
YESHYUNGSEOK marked this pull request as ready for review July 21, 2026 00:03
@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 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.

🧹 Nitpick comments (1)
pnpm11/config/reader/test/index.ts (1)

432-433: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Prefer asynchronous filesystem APIs.

As per path instructions, prefer using asynchronous filesystem APIs and async/await for independent setups in TypeScript files.

♻️ Proposed refactor
-  fs.mkdirSync('.config/pnpm', { recursive: true })
-  fs.writeFileSync('.config/pnpm/config.yaml', 'invalid: [\n')
+  await fs.promises.mkdir('.config/pnpm', { recursive: true })
+  await fs.promises.writeFile('.config/pnpm/config.yaml', 'invalid: [\n')
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm11/config/reader/test/index.ts` around lines 432 - 433, Update the test
setup around the filesystem calls to use promise-based asynchronous APIs with
await instead of synchronous mkdirSync and writeFileSync. Preserve the existing
recursive directory creation and invalid config contents, and ensure the
enclosing test flow supports async setup.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pnpm11/config/reader/test/index.ts`:
- Around line 432-433: Update the test setup around the filesystem calls to use
promise-based asynchronous APIs with await instead of synchronous mkdirSync and
writeFileSync. Preserve the existing recursive directory creation and invalid
config contents, and ensure the enclosing test flow supports async setup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7932ace7-0911-4068-addb-ce013e5e2e6e

📥 Commits

Reviewing files that changed from the base of the PR and between 45c3b81 and 61481cd.

📒 Files selected for processing (5)
  • .changeset/pacquet-add-virtual-store-dir.md
  • pnpm/crates/cli/src/config_overrides.rs
  • pnpm/crates/cli/src/config_overrides/tests.rs
  • pnpm11/config/reader/src/index.ts
  • pnpm11/config/reader/test/index.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • .changeset/pacquet-add-virtual-store-dir.md
  • pnpm/crates/cli/src/config_overrides.rs

@YESHYUNGSEOK
YESHYUNGSEOK force-pushed the fix/pacquet-add-virtual-store-dir branch from 61481cd to 5bae058 Compare July 21, 2026 01:03
@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13012
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,776.87 ms
(+2.82%)Baseline: 2,700.66 ms
3,240.79 ms
(85.69%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,900.47 ms
(+2.17%)Baseline: 1,860.03 ms
2,232.03 ms
(85.15%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
559.25 ms
(+0.57%)Baseline: 556.09 ms
667.31 ms
(83.81%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
362.79 ms
(+8.38%)Baseline: 334.73 ms
401.67 ms
(90.32%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,395.52 ms
(+1.22%)Baseline: 2,366.55 ms
2,839.86 ms
(84.35%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,460.92 ms
(+0.55%)Baseline: 4,436.72 ms
5,324.06 ms
(83.79%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
258.55 ms
(+4.09%)Baseline: 248.38 ms
298.05 ms
(86.75%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13012
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,463.34 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
296.42 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
285.33 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
85.23 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,364.94 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,444.90 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
266.05 ms
🐰 View full continuous benchmarking report in Bencher

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

Labels

product: pacquet product: pnpm@11 reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants