Skip to content

fix(pacquet): avoid store link probe during version check - #15264

Merged
zkochan merged 2 commits into
mainfrom
fix/version-skip-store-probe
Sep 22, 2026
Merged

zkochan merged 2 commits into
mainfrom
fix/version-skip-store-probe

Conversation

@zkochan

@zkochan zkochan commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Avoid probing package store linkability during pnpm --version and other pre-command checks that do not require store access.

Previously, pnpm --version triggered store path resolution, which performed a filesystem linkability probe by creating and deleting a temporary probe file (_tmp_<pid>_<nanos>) in the project directory. This modified the directory timestamp and caused file watchers such as Nx to detect changes during project graph computation, leading to an infinite rebuild loop.

Store directory linkability probing is now bypassed during pre-command checks and deferred until an operation actually requires store access (e.g., when switching pnpm versions or syncing package manager dependencies).

Squash Commit Body

Avoid probing store linkability in pre-command checks when no store is required.

Running commands like `pnpm --version` previously performed a filesystem linkability
probe in the current working directory to test hardlink support against pnpm home.
The temporary file creation and deletion modified directory timestamps, causing
file watchers like Nx to detect changes and enter an infinite loop.

Add `skip_store_dir_resolution` to `Config` to bypass the probe during pre-command
checks and version flag handling, resolving store directory only when switching
pnpm versions or syncing dependencies.

Checklist

  • New features are implemented only in the Rust pnpm v12 CLI. Bug fixes are implemented in every affected version.
  • 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.
  • Updated the documentation if needed.

Opened by Antigravity.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pnpm/pnpm/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6b0a7a63-2710-4ced-bc76-f511629d4682

📥 Commits

Reviewing files that changed from the base of the PR and between 8b71a0e and d8ccf2e.

📒 Files selected for processing (2)
  • .changeset/quiet-version-store-probe.md
  • pnpm/crates/cli/tests/suite/version.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/quiet-version-store-probe.md

Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

The change adds controlled store-directory resolution. Version checks skip filesystem probing, while store-dependent pin actions reload configuration with probing enabled. Tests cover configuration behavior and project-directory preservation on Unix and Windows.

Changes

Store resolution control

Layer / File(s) Summary
Store resolution configuration
pnpm/crates/config/src/settings.rs, pnpm/crates/config/src/layout.rs, pnpm/crates/config/src/tests/behavior.rs, pnpm/crates/deps-restorer/src/install_package_from_registry/tests.rs
Config now contains skip_store_dir_resolution. Store resolution returns early when the flag is set. Tests verify that the link probe is not called, and test configuration initializes the new field.
CLI configuration flow
pnpm/crates/cli/src/cli_args/pre_command.rs, pnpm/crates/cli/src/cli_args/pre_command/tests.rs
Pre-command configuration initially skips store resolution. Pin switch and sync paths reload configuration with store resolution enabled. Runtime checks and directory canonicalization use extracted helpers.
Version command validation
pnpm/crates/cli/tests/suite/version.rs, .changeset/quiet-version-store-probe.md
Unix and Windows tests verify version output and confirm that version flags do not create pnpm-home or modify the project directory. A patch changeset records the fix.

Priority: ➖ Normal

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

Merge Risk: ⚪ Minimal · up to d8ccf

Version checks now avoid modifying project directories while store-dependent commands retain store resolution. The supplied coverage leaves no actionable merge-blocking risk.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.05     13.5±1.12ms    27.8 MB/sec    1.00     12.9±0.18ms    29.0 MB/sec
packument/parse                                  1.00     40.5±2.15µs  1637.4 MB/sec    1.09     44.2±0.32µs  1501.3 MB/sec
tarball/download_dependency                      1.25      5.6±1.23ms   770.0 KB/sec    1.00      4.5±0.33ms   959.0 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.00   199.1±10.38ms 80.4 KElem/sec    1.08    215.2±6.96ms 74.3 KElem/sec
workspace_resolution/hoist_heavy                 1.10    274.5±9.57ms        ? ?/sec    1.00    250.1±7.51ms        ? ?/sec
workspace_sort/chained_projects                  1.00     13.2±0.87ms        ? ?/sec    1.10     14.5±2.14ms        ? ?/sec

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Same-run regression check

HEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval.

Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.

Scenario Engine main median HEAD median Change Tolerance Result
isolated-fresh-restore-cold-cache-cold-store pacquet 2405.62 ms 2443.75 ms 1.6% 120.28 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store pnpr 1521.55 ms 1515.19 ms -0.4% 76.08 ms Within tolerance
isolated-fresh-restore-hot-cache-hot-store pacquet 259.51 ms 244.66 ms -5.7% 12.98 ms Within tolerance
isolated-fresh-restore-hot-cache-hot-store pnpr 283.30 ms 281.94 ms -0.5% 14.16 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pacquet 7.17 ms 7.44 ms 3.9% 2.00 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pnpr 7.34 ms 11.89 ms 62.0% 2.00 ms Inconclusive (overlapping samples)
isolated-repeat-install-cold-cache-hot-store pacquet 8.12 ms 8.86 ms 9.1% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pnpr 7.49 ms 7.29 ms -2.6% 2.00 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pacquet 2599.46 ms 2639.04 ms 1.5% 129.97 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pnpr 1598.55 ms 1517.95 ms -5.0% 79.93 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pacquet 419.28 ms 342.24 ms -18.4% 20.96 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pnpr 305.30 ms 263.09 ms -13.8% 15.26 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pacquet 1633.99 ms 1627.30 ms -0.4% 81.70 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pnpr 294.77 ms 293.31 ms -0.5% 14.74 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pacquet 233.25 ms 241.03 ms 3.3% 11.66 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pnpr 92.36 ms 93.71 ms 1.5% 4.62 ms Within tolerance
isolated-peer-heavy-resolve-hot-cache-offline pacquet 690.60 ms 737.37 ms 6.8% 34.53 ms Inconclusive (overlapping samples)
isolated-linked-workspace-resolve-hot-cache-offline pacquet 184.69 ms 193.80 ms 4.9% 9.23 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pacquet 4463.57 ms 4401.85 ms -1.4% 223.18 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pnpr 3424.42 ms 3510.04 ms 2.5% 171.22 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pacquet 165.67 ms 149.05 ms -10.0% 8.28 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pnpr 169.03 ms 213.68 ms 26.4% 8.45 ms Inconclusive (overlapping samples)

Integrated-Benchmark Report (Linux)

Commit: 405a73d322ff

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked-workspace scenario compares current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.487 ± 0.134 2.350 2.733 1.65 ± 0.17
pacquet@main 2.470 ± 0.127 2.363 2.751 1.64 ± 0.17
pnpr@HEAD 1.545 ± 0.128 1.370 1.701 1.03 ± 0.13
pnpr@main 1.505 ± 0.137 1.320 1.689 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.4873057830600005,
      "stddev": 0.13394494631980045,
      "median": 2.44374768226,
      "user": 1.6746546999999996,
      "system": 1.8145008999999999,
      "min": 2.35027086026,
      "max": 2.73342667726
    },
    {
      "command": "pacquet@main",
      "mean": 2.47033934116,
      "stddev": 0.12746804159959757,
      "median": 2.40562460526,
      "user": 1.7935702,
      "system": 1.8258520999999999,
      "min": 2.36251058726,
      "max": 2.75132521626
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5447183420600001,
      "stddev": 0.1283801298171193,
      "median": 1.51519329276,
      "user": 1.5896591,
      "system": 1.6926010999999999,
      "min": 1.3699243692599998,
      "max": 1.7013506322599998
    },
    {
      "command": "pnpr@main",
      "mean": 1.5049550653600001,
      "stddev": 0.1369282134108632,
      "median": 1.52154855726,
      "user": 1.4276446999999997,
      "system": 1.4832101999999998,
      "min": 1.3202025392599999,
      "max": 1.6889995762599999
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 248.1 ± 18.3 227.0 284.0 1.00
pacquet@main 261.5 ± 13.9 240.9 289.2 1.05 ± 0.10
pnpr@HEAD 286.2 ± 22.3 258.2 325.8 1.15 ± 0.12
pnpr@main 296.1 ± 28.6 264.9 347.2 1.19 ± 0.15
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.24811042992000001,
      "stddev": 0.018277745393793298,
      "median": 0.24466240902000003,
      "user": 0.26651034,
      "system": 0.6024898999999999,
      "min": 0.22696975802,
      "max": 0.28396019102000003
    },
    {
      "command": "pacquet@main",
      "mean": 0.26148585172000005,
      "stddev": 0.01388040412819676,
      "median": 0.25950725602,
      "user": 0.30015214,
      "system": 0.6049762,
      "min": 0.24090879302,
      "max": 0.28922246902000004
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.2862253497200001,
      "stddev": 0.022297910550965114,
      "median": 0.28194234052000006,
      "user": 0.30846483999999996,
      "system": 0.6155598999999999,
      "min": 0.25820157002000005,
      "max": 0.32580857202
    },
    {
      "command": "pnpr@main",
      "mean": 0.29612582682000005,
      "stddev": 0.028629605862138426,
      "median": 0.28329897902,
      "user": 0.3130538399999999,
      "system": 0.6415984,
      "min": 0.26494662002,
      "max": 0.34715675702000004
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 7.7 ± 0.8 6.4 12.2 1.05 ± 0.16
pacquet@main 7.3 ± 0.7 6.1 11.1 1.00
pnpr@HEAD 11.7 ± 2.4 6.3 19.0 1.60 ± 0.37
pnpr@main 7.8 ± 1.5 6.2 14.4 1.07 ± 0.23
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.007662942168505748,
      "stddev": 0.0008489308102761945,
      "median": 0.007444583680000001,
      "user": 0.004455341494252872,
      "system": 0.0036574339080459773,
      "min": 0.006391718180000001,
      "max": 0.01221971418
    },
    {
      "command": "pacquet@main",
      "mean": 0.007307821060126179,
      "stddev": 0.0007247926089751719,
      "median": 0.007165009180000001,
      "user": 0.004346758233438487,
      "system": 0.003428112933753941,
      "min": 0.006076597180000001,
      "max": 0.011139327180000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.011704605639537576,
      "stddev": 0.0024075733572186935,
      "median": 0.01189121318,
      "user": 0.00681566381502891,
      "system": 0.005527763930635838,
      "min": 0.006335642180000001,
      "max": 0.01895221818
    },
    {
      "command": "pnpr@main",
      "mean": 0.007828944580000002,
      "stddev": 0.0015137093648587418,
      "median": 0.007339596180000001,
      "user": 0.004386618095238095,
      "system": 0.00396019638095238,
      "min": 0.0061603531800000005,
      "max": 0.014393693180000002
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 9.1 ± 1.3 6.9 14.8 1.18 ± 0.25
pacquet@main 8.2 ± 1.1 6.6 13.4 1.06 ± 0.22
pnpr@HEAD 7.7 ± 1.2 6.4 14.7 1.00
pnpr@main 7.9 ± 1.2 6.5 13.5 1.03 ± 0.23
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.009077624495384618,
      "stddev": 0.001316568749771499,
      "median": 0.008858422380000001,
      "user": 0.004877522197802199,
      "system": 0.004768523406593408,
      "min": 0.00693221238,
      "max": 0.014750079380000001
    },
    {
      "command": "pacquet@main",
      "mean": 0.008219415024194758,
      "stddev": 0.0010935980999785889,
      "median": 0.00811950438,
      "user": 0.00453277617977528,
      "system": 0.004292905617977528,
      "min": 0.00662027738,
      "max": 0.01336934038
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.007717927620677967,
      "stddev": 0.0012093782430647692,
      "median": 0.0072940693800000005,
      "user": 0.004359597966101692,
      "system": 0.003919829152542373,
      "min": 0.00635443138,
      "max": 0.01470346938
    },
    {
      "command": "pnpr@main",
      "mean": 0.007937563323262412,
      "stddev": 0.0012133665392356603,
      "median": 0.00748773138,
      "user": 0.004424244822695032,
      "system": 0.0040755270212765975,
      "min": 0.00645361238,
      "max": 0.01345722038
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.662 ± 0.074 2.589 2.813 1.73 ± 0.10
pacquet@main 2.609 ± 0.052 2.554 2.743 1.70 ± 0.09
pnpr@HEAD 1.537 ± 0.078 1.457 1.674 1.00
pnpr@main 1.609 ± 0.145 1.445 1.788 1.05 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.66215374706,
      "stddev": 0.07444352191191762,
      "median": 2.63903675036,
      "user": 2.3205543200000003,
      "system": 2.31403158,
      "min": 2.58900312886,
      "max": 2.81301828386
    },
    {
      "command": "pacquet@main",
      "mean": 2.60892783016,
      "stddev": 0.05235646498292835,
      "median": 2.59945993386,
      "user": 2.1888674200000002,
      "system": 2.1949272800000004,
      "min": 2.55378867886,
      "max": 2.74261016586
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5369545064599999,
      "stddev": 0.0781172644667478,
      "median": 1.5179460168600003,
      "user": 1.3901888199999999,
      "system": 1.69431978,
      "min": 1.4574918028600001,
      "max": 1.6744278078600001
    },
    {
      "command": "pnpr@main",
      "mean": 1.6091787904600001,
      "stddev": 0.14520560646107708,
      "median": 1.59854847186,
      "user": 1.44843702,
      "system": 1.7480137800000002,
      "min": 1.44454741786,
      "max": 1.78849438986
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 352.3 ± 29.7 317.1 408.4 1.31 ± 0.13
pacquet@main 412.3 ± 61.2 321.2 506.0 1.53 ± 0.24
pnpr@HEAD 269.4 ± 14.3 256.1 293.4 1.00
pnpr@main 308.7 ± 23.5 281.9 346.6 1.15 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.35228731796,
      "stddev": 0.0296722603000704,
      "median": 0.34224331086000004,
      "user": 0.5261474799999999,
      "system": 0.7931055399999999,
      "min": 0.31711172385999997,
      "max": 0.40838961086000003
    },
    {
      "command": "pacquet@main",
      "mean": 0.41229475126000004,
      "stddev": 0.06119628241611315,
      "median": 0.41927944986,
      "user": 0.6680578799999999,
      "system": 0.91767534,
      "min": 0.32118997486,
      "max": 0.5059774948600001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.26941623555999994,
      "stddev": 0.014346974839936794,
      "median": 0.26309124886,
      "user": 0.21313437999999998,
      "system": 0.4940465399999999,
      "min": 0.25612613586,
      "max": 0.29337464286
    },
    {
      "command": "pnpr@main",
      "mean": 0.30869186216,
      "stddev": 0.02349861866466688,
      "median": 0.30529965286,
      "user": 0.24507818,
      "system": 0.5725541399999998,
      "min": 0.28189064686,
      "max": 0.34659605186
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.630 ± 0.018 1.607 1.666 5.59 ± 0.22
pacquet@main 1.631 ± 0.025 1.583 1.665 5.59 ± 0.23
pnpr@HEAD 0.294 ± 0.009 0.284 0.310 1.01 ± 0.05
pnpr@main 0.292 ± 0.011 0.274 0.304 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.63042994222,
      "stddev": 0.017805217327256137,
      "median": 1.62730490052,
      "user": 0.9730966799999999,
      "system": 1.0187984799999998,
      "min": 1.60677290702,
      "max": 1.6658452710200002
    },
    {
      "command": "pacquet@main",
      "mean": 1.6314988336199998,
      "stddev": 0.024830976154478136,
      "median": 1.6339853515200002,
      "user": 1.00495368,
      "system": 1.0292577800000002,
      "min": 1.58311584502,
      "max": 1.66510713002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29386097072,
      "stddev": 0.00863891585588645,
      "median": 0.29330635352,
      "user": 0.25134848,
      "system": 0.5329096799999999,
      "min": 0.28400568902,
      "max": 0.31006906302
    },
    {
      "command": "pnpr@main",
      "mean": 0.29191972622,
      "stddev": 0.010923731166363351,
      "median": 0.29476984002,
      "user": 0.22471927999999997,
      "system": 0.56061358,
      "min": 0.27426774602,
      "max": 0.30432790902
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 246.7 ± 19.2 226.6 281.9 2.64 ± 0.21
pacquet@main 234.3 ± 16.0 208.0 254.5 2.51 ± 0.18
pnpr@HEAD 93.5 ± 2.2 89.8 97.7 1.00
pnpr@main 93.6 ± 4.1 89.5 109.4 1.00 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.24673708477000003,
      "stddev": 0.019152189541662937,
      "median": 0.24103467652000002,
      "user": 0.2394355966666666,
      "system": 0.10408123999999998,
      "min": 0.22655171802000001,
      "max": 0.28187512902
    },
    {
      "command": "pacquet@main",
      "mean": 0.23430010511090912,
      "stddev": 0.015961924843341378,
      "median": 0.23325447802000002,
      "user": 0.23592245272727272,
      "system": 0.0876283309090909,
      "min": 0.20796800102000002,
      "max": 0.25452456702000004
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09350689202000001,
      "stddev": 0.002201285699425366,
      "median": 0.09370589252,
      "user": 0.03335681333333333,
      "system": 0.01656017333333333,
      "min": 0.08979939802,
      "max": 0.09771763602
    },
    {
      "command": "pnpr@main",
      "mean": 0.09361254950387099,
      "stddev": 0.004124238346478671,
      "median": 0.09235778002,
      "user": 0.031460276774193545,
      "system": 0.01822613548387097,
      "min": 0.08946562602,
      "max": 0.10940999402
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 765.7 ± 92.4 645.5 907.7 1.11 ± 0.24
pacquet@main 687.7 ± 119.2 459.3 880.9 1.00
pnpm@HEAD 3253.8 ± 256.1 2951.0 3761.6 4.73 ± 0.90
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.7656635565066667,
      "stddev": 0.09239789883334257,
      "median": 0.73737358084,
      "user": 0.7855220822222222,
      "system": 0.21486536666666667,
      "min": 0.6455243808400001,
      "max": 0.9076831338400001
    },
    {
      "command": "pacquet@main",
      "mean": 0.6876562007288889,
      "stddev": 0.11922574266802886,
      "median": 0.6906000898400001,
      "user": 0.7031554155555556,
      "system": 0.1831035888888889,
      "min": 0.45931576184000006,
      "max": 0.8808521088400001
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.2537989705066663,
      "stddev": 0.25608038413163964,
      "median": 3.1996266998399996,
      "user": 4.741599304444445,
      "system": 0.2861574777777778,
      "min": 2.95096190784,
      "max": 3.7616420268399997
    }
  ]
}

Scenario: Isolated linker: linked-workspace resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 192.8 ± 8.6 176.7 210.9 1.04 ± 0.06
pacquet@main 184.7 ± 5.9 175.4 197.6 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.19279356491142854,
      "stddev": 0.008637233115297634,
      "median": 0.19379514184000002,
      "user": 0.14567325714285712,
      "system": 0.09563543714285713,
      "min": 0.17668714984,
      "max": 0.21086228484
    },
    {
      "command": "pacquet@main",
      "mean": 0.1847184975733333,
      "stddev": 0.005868328115749219,
      "median": 0.18469074984,
      "user": 0.1414675,
      "system": 0.08628624666666666,
      "min": 0.17541269384,
      "max": 0.19756991784
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.438 ± 0.087 4.359 4.613 1.28 ± 0.05
pacquet@main 4.540 ± 0.136 4.433 4.829 1.31 ± 0.06
pnpr@HEAD 3.568 ± 0.126 3.452 3.788 1.03 ± 0.05
pnpr@main 3.466 ± 0.111 3.336 3.651 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.43801776204,
      "stddev": 0.0871692368154946,
      "median": 4.40185423964,
      "user": 1.5335207199999998,
      "system": 1.62491196,
      "min": 4.35922265114,
      "max": 4.61298626714
    },
    {
      "command": "pacquet@main",
      "mean": 4.53995726894,
      "stddev": 0.13602611965453373,
      "median": 4.46356529464,
      "user": 1.96153542,
      "system": 1.9551132599999996,
      "min": 4.43318693314,
      "max": 4.82893850514
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.56786945614,
      "stddev": 0.12584576672555187,
      "median": 3.51003793864,
      "user": 1.79954602,
      "system": 1.7476189599999998,
      "min": 3.45188068514,
      "max": 3.78782360914
    },
    {
      "command": "pnpr@main",
      "mean": 3.46572592234,
      "stddev": 0.111157694104428,
      "median": 3.4244212871400004,
      "user": 1.42608082,
      "system": 1.58384006,
      "min": 3.33638404314,
      "max": 3.65065894314
    }
  ]
}

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

Same install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 149.5 ± 10.8 132.8 182.1 1.00
pacquet@main 185.3 ± 41.8 144.6 256.6 1.24 ± 0.29
pnpr@HEAD 227.8 ± 61.2 158.2 305.5 1.52 ± 0.42
pnpr@main 171.9 ± 17.3 155.9 220.7 1.15 ± 0.14
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.14946477184444443,
      "stddev": 0.010756993193002018,
      "median": 0.14904791990000002,
      "user": 0.18637551111111106,
      "system": 0.15341426222222224,
      "min": 0.1328346809,
      "max": 0.18209443690000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.18534488356666665,
      "stddev": 0.04175070904293287,
      "median": 0.1656669399,
      "user": 0.232426,
      "system": 0.18496230666666666,
      "min": 0.1446165389,
      "max": 0.2565769819
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.22780481110000003,
      "stddev": 0.06117490110688091,
      "median": 0.21368039090000002,
      "user": 0.26960239999999996,
      "system": 0.21257854000000004,
      "min": 0.1582166529,
      "max": 0.3055346909
    },
    {
      "command": "pnpr@main",
      "mean": 0.17189800917272732,
      "stddev": 0.017317508845371886,
      "median": 0.16902870190000002,
      "user": 0.2044103090909091,
      "system": 0.16581149454545455,
      "min": 0.15591382890000002,
      "max": 0.22073501190000003
    }
  ]
}

@zkochan
zkochan force-pushed the fix/version-skip-store-probe branch 2 times, most recently from 405a73d to 1ffe611 Compare September 22, 2026 13:20
When running commands that do not use the store (such as `pnpm --version`),
pnpm 12 previously performed a store linkability probe by creating and
deleting a temporary probe file in the current working directory to detect
whether the store could be linked to pnpm home. This modified the directory
timestamp and caused file watchers like Nx to detect changes and enter an
infinite rebuild loop.

Add `skip_store_dir_resolution` to `Config` so commands that do not touch
the store skip the filesystem linkability probe. Defer full store dir
resolution during pre-command execution until version switching or
package manager dependency syncing actually requires the store.
@zkochan
zkochan force-pushed the fix/version-skip-store-probe branch from 1ffe611 to 8b71a0e Compare September 22, 2026 13:31
@zkochan
zkochan marked this pull request as ready for review September 22, 2026 13:31
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Avoid package store probes during pre-command version checks

🐞 Bug fix 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Skip store linkability probes for pre-command checks that do not access the package store.
• Resolve the store only for version switching or dependency synchronization.
• Verify version flags leave project directory timestamps unchanged.
Diagram

graph TD
  A["CLI Input"] --> B["Lightweight Config"] --> C{"Store Action?"}
  C -- "No" --> D["Continue Command"]
  C -- "Yes" --> E["Store Resolution"] --> F["Switch or Sync"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Lazy in-place store resolution
  • ➕ Avoids reloading the complete configuration when a store action is selected.
  • ➕ Makes deferred store initialization an explicit configuration capability.
  • ➖ Requires a broader Config API and lifecycle refactor.
  • ➖ Risks store consumers accidentally using an unresolved default path.
2. Special-case version flags
  • ➕ Produces a smaller change limited to the reported command.
  • ➕ Avoids restructuring pre-command pin planning.
  • ➖ Does not protect other store-independent pre-command checks.
  • ➖ Duplicates command-specific policy instead of tying probing to actual store usage.

Recommendation: Keep the PR's two-phase configuration strategy. It defers filesystem probing based on actual store demand, covers more than version flags, and preserves existing fully resolved Config behavior for store consumers; the extra configuration reload occurs only on store-dependent paths.

Files changed (8) +152 / -25

Enhancement (1) +5 / -0
settings.rsAdd configuration control for skipping store resolution +5/-0

Add configuration control for skipping store resolution

• Introduces 'skip_store_dir_resolution' on 'Config', documenting that it is intended for checks that do not consume the package store.

pnpm/crates/config/src/settings.rs

Bug fix (2) +63 / -24
pre_command.rsDefer store resolution until a store-dependent pin action +60/-24

Defer store resolution until a store-dependent pin action

• Loads lightweight pre-command configuration with store probing disabled, then reloads resolved configuration only for package-manager switching or dependency synchronization. Extracts directory canonicalization, pin-action planning, and runtime checking into focused helpers.

pnpm/crates/cli/src/cli_args/pre_command.rs

layout.rsBypass default store resolution when explicitly skipped +3/-0

Bypass default store resolution when explicitly skipped

• Returns before resolving the default store path or running its linkability probe when lightweight configuration loading enables the skip flag.

pnpm/crates/config/src/layout.rs

Tests (4) +79 / -1
tests.rsAdapt pre-command configuration test to deferred resolution +1/-1

Adapt pre-command configuration test to deferred resolution

• Passes the new store-resolution mode argument when loading pre-command configuration in the existing store-dir flag test.

pnpm/crates/cli/src/cli_args/pre_command/tests.rs

version.rsVerify version flags do not modify project directories +35/-0

Verify version flags do not modify project directories

• Adds a Unix regression test covering long and short version flags, including an empty store-dir override. The test preserves a fixed directory modification timestamp and verifies that pnpm home is not created.

pnpm/crates/cli/tests/suite/version.rs

behavior.rsEnsure skipped store resolution never invokes the link probe +42/-0

Ensure skipped store resolution never invokes the link probe

• Adds a custom test host whose link probe panics, proving configuration loads successfully without probing when store resolution is disabled.

pnpm/crates/config/src/tests/behavior.rs

tests.rsInitialize store-resolution behavior in dependency restorer tests +1/-0

Initialize store-resolution behavior in dependency restorer tests

• Sets the new Config field to false in the dependency-restorer test fixture so registry installation retains normal store resolution.

pnpm/crates/deps-restorer/src/install_package_from_registry/tests.rs

Documentation (1) +5 / -0
quiet-version-store-probe.mdDocument the version-check filesystem probe fix +5/-0

Document the version-check filesystem probe fix

• Adds a patch changeset for pacquet explaining that version checks no longer create temporary store-detection files or trigger watcher rebuild loops.

.changeset/quiet-version-store-probe.md

@qodo-code-review

qodo-code-review Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Release note conflates old behavior ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
.changeset/quiet-version-store-probe.md uses Fixed ... creating ... to place the prior
temporary-file behavior inside the sentence announcing the correction. Readers must infer the direct
new behavior instead of receiving a separate past-tense account of the defect followed by what the
command does now.
Code

.changeset/quiet-version-store-probe.md[5]

+Fixed `pnpm --version` creating a temporary file in the project directory during store detection. This prevents file watchers such as Nx from repeatedly rebuilding their project graph.
Relevance

●●● Strong

Recent changeset precedent accepts separating previous behavior into a distinct past-tense sentence.

PR-#15239

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The rule requires previous buggy behavior to appear in a separate past-tense sentence. The added
changeset instead folds that behavior into the Fixed sentence.

Rule 3058498: Describe previous buggy behavior in a separate past-tense sentence
.changeset/quiet-version-store-probe.md[5-5]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The bug-fix changeset combines the prior temporary-file behavior with the fix rather than describing the old behavior in its own past-tense sentence.

## Fix Focus Areas
- .changeset/quiet-version-store-probe.md[5-5]

## Recommended Fix
Rewrite the entry as separate sentences, for example: `Previously, pnpm --version created a temporary file in the project directory during store detection. It no longer modifies the project directory, preventing file watchers such as Nx from repeatedly rebuilding the project graph.`

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Windows link behavior goes untested ✓ Resolved 📜 Skill insight ▣ Testability
Description
version_flags_do_not_modify_the_project_directory is guarded by #[cfg(unix)], so its end-to-end
assertion never exercises Windows. Because the fix changes whether a filesystem linkability probe
runs, regressions in Windows store selection or directory side effects can pass CI.
Code

pnpm/crates/cli/tests/suite/version.rs[29]

+#[cfg(unix)]
Relevance

●●● Strong

Recent precedent favors retaining Windows coverage for tests that can run there, including
regression tests.

PR-#15110

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The compliance rule requires an explicit Windows case when hardlink behavior changes. The production
change bypasses store linkability resolution, while the corresponding end-to-end regression test is
compiled only on Unix.

pnpm/crates/cli/tests/suite/version.rs[28-30]
pnpm/crates/config/src/layout.rs[465-467]
Skill: review-code

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The regression test for avoiding the store linkability probe is Unix-only, leaving the changed hardlink-related behavior untested on Windows.

## Fix Focus Areas
- pnpm/crates/cli/tests/suite/version.rs[28-61]

## Recommended Fix
Add an explicit Windows end-to-end case that runs the version flags and asserts that the project directory receives no probe side effects. Reuse the timestamp assertion if Windows preserves it reliably, or add an equivalent watcher-visible directory-change assertion.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 64 rules
✅ Skills: review-code
✅ Cross-repo context — repo relationships
  Explored: repo: pnpm/update (sha: fcaa952e)
  Explored: repo: pnpm/setup (sha: fbda4c85)
  Explored: repo: pnpm/logger (sha: 3c7188c0)
  Explored: repo: pnpm/cmd-shim (sha: 83f9b944)
  Explored: repo: pnpm/npm-lifecycle (sha: 178f3d50)
Review mode: 🚀 Fast: The push only updates release-note wording and adds a localized Windows regression test, with no runtime logic or high-risk behavior changes.

Grey Divider

Tip of the day
💡 Did you know, you can route each action level your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

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

@greptile-apps

greptile-apps Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The implementation appears safe to merge; the remaining non-blocking concern is that the Windows test does not actually detect recurrence of the temporary-file probe.

Reviews (2) · Last reviewed commit: "fix(pacquet): update changeset wording a..."

Comment thread .changeset/quiet-version-store-probe.md Resolved
@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Sep 22, 2026
State what pnpm does now in the changeset without extra rationale.
Add Windows coverage in version_flags_do_not_modify_the_project_directory
to ensure the project directory remains empty.
@qodo-code-review

Copy link
Copy Markdown

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

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

format!("{}\n", pnpm_config::PNPM_VERSION),
);
assert!(!root.path().join("pnpm-home").exists());
assert_eq!(fs::read_dir(&workspace).unwrap().count(), 0);

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.

P2 Windows Probe Test Is Ineffective

The Windows test only checks that the workspace is empty after the command. The store-link probe creates and then deletes its temporary file, so the workspace is still empty afterward. Reintroducing the exact filesystem write this test is meant to prevent would therefore still pass on Windows, leaving that platform without effective regression coverage.

@zkochan
zkochan merged commit 09f29cf into main Sep 22, 2026
54 checks passed
@zkochan
zkochan deleted the fix/version-skip-store-probe branch September 22, 2026 13:58
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.52%. Comparing base (16b6898) to head (d8ccf2e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15264   +/-   ##
=======================================
  Coverage   91.52%   91.52%           
=======================================
  Files        1381     1381           
  Lines      185685   185712   +27     
=======================================
+ Hits       169942   169980   +38     
+ Misses      15743    15732   -11     

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

zkochan added a commit that referenced this pull request Sep 23, 2026
…tore (#15373)

Every command's own config load still placed the default store, which
creates and deletes `_tmp_<pid>_<hex>` in the project directory to test
hardlink support. `pnpm view`, `config`, `root` and `exec` therefore
touched the directory's timestamp on every run, and the Nx daemon, which
runs `pnpm view nx@latest` from the workspace root on start, rebuilt its
graph in response.

Classify each command by how it uses the store. `view`, `config`, `get`,
`set`, `root`, `prefix` and `bin` never touch it and load their config
without placing the store. `exec`, `run` and the script shortcuts touch
it only to install `configDependencies` before the `updateConfig` hooks,
so they skip placement unless the loaded config declares some, in which
case the config is loaded again with the store placed. Every other
command keeps placing it. The `verify-deps-before-run` install is a
separate child process and places its own store.

Related to #15264.
u9g pushed a commit to u9g/pnpm that referenced this pull request Sep 25, 2026
Avoid probing store linkability in pre-command checks when no store is required.

Running commands like `pnpm --version` previously performed a filesystem linkability
probe in the current working directory to test hardlink support against pnpm home.
The temporary file creation and deletion modified directory timestamps, causing
file watchers like Nx to detect changes and enter an infinite loop.

Add `skip_store_dir_resolution` to `Config` to bypass the probe during pre-command
checks and version flag handling, resolving store directory only when switching
pnpm versions or syncing dependencies.

Also query the active Node version in the workspace with the manifest in place in
the `no_runtime_checks_the_active_node_instead_of_the_manifest_runtime` test.
u9g pushed a commit to u9g/pnpm that referenced this pull request Sep 25, 2026
…tore (pnpm#15373)

Every command's own config load still placed the default store, which
creates and deletes `_tmp_<pid>_<hex>` in the project directory to test
hardlink support. `pnpm view`, `config`, `root` and `exec` therefore
touched the directory's timestamp on every run, and the Nx daemon, which
runs `pnpm view nx@latest` from the workspace root on start, rebuilt its
graph in response.

Classify each command by how it uses the store. `view`, `config`, `get`,
`set`, `root`, `prefix` and `bin` never touch it and load their config
without placing the store. `exec`, `run` and the script shortcuts touch
it only to install `configDependencies` before the `updateConfig` hooks,
so they skip placement unless the loaded config declares some, in which
case the config is loaded again with the store placed. Every other
command keeps placing it. The `verify-deps-before-run` install is a
separate child process and places its own store.

Related to pnpm#15264.
ttt43ttt pushed a commit to NoDevelopers/ts-monorepo that referenced this pull request Nov 22, 2026
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | pnpm    | 12.5.1 | 12.6.0 |


## [v12.6.0](https://github.com/pnpm/pnpm/releases/tag/v12.6.0)

pnpm 12.6.0 ships with automatic dependency deduplication, relocatable node_modules, package.yaml manifest editing, and --save-types support.

##### Minor Changes

- `autoDedupe` deduplicates compatible dependency versions during installation [#7258](pnpm/pnpm#7258). Enable it in `pnpm-workspace.yaml` or use `pnpm install --auto-dedupe` or `pnpm add --auto-dedupe`. Frozen installs leave the lockfile unchanged.

- `pnpm install`, `pnpm run`, and `pnpm exec` on macOS and Linux now reuse a `node_modules` directory and bin shims that moved or were copied together with their project [#6937](pnpm/pnpm#6937). The first command after the move checks the tree and records its new location, so project commands in `node_modules/.bin` keep working.

- `pnpm add --save-types` saves available `@types/*` packages in `devDependencies` alongside registry dependencies [#3868](pnpm/pnpm#3868). Packages that declare bundled TypeScript types are skipped. Set `saveTypes: true` in `pnpm-workspace.yaml` to enable this by default.

- `package.yaml` manifests can now be updated by `pnpm add`, `pnpm update`, `pnpm remove`, `pnpm pkg`, `pnpm link`, `pnpm set-script`, and `pnpm version` [#2008](pnpm/pnpm#2008). Existing comments and key order are preserved.

- Catalog entries can now use the `file:` and `link:` protocols [#8642](pnpm/pnpm#8642). A relative path or bare path in an entry, such as `./tarballs/foo.tgz`, is measured from the directory holding `pnpm-workspace.yaml`.

- `pnpm tasks status` lists running and waiting tasks in each concurrency group, and waiting tasks now take available slots in arrival order with higher `priority` tasks going first [#15208](pnpm/pnpm#15208). If workspaces use different limits for the same group, a later task can take a free slot that earlier tasks cannot use. A package script named `tasks` takes precedence; use `pnpm pm tasks status` when that script exists.

- `pnpm cache prune` deletes registry metadata cache directories that this version of pnpm can no longer read [#15046](pnpm/pnpm#15046). `pnpm cache prune --dry-run` lists what it would delete without removing anything.

- `macosBackup.excludeModulesDir` and `macosBackup.excludeStoreDir` on macOS can now exclude newly created modules, virtual-store, and package-store directories from Time Machine [#6440](pnpm/pnpm#6440). Set either to `true` in global configuration or using the `PNPM_CONFIG_MACOS_BACKUP_EXCLUDE_MODULES_DIR` and `PNPM_CONFIG_MACOS_BACKUP_EXCLUDE_STORE_DIR` environment variables.

- `pnpm add --tilde` is now an alias for `--save-prefix=~` [#12863](pnpm/pnpm#12863). The Yarn `-T` shorthand is not supported.

- `progress` setting and `--no-progress` option now turn off dependency and download progress lines [#14065](pnpm/pnpm#14065). Warnings, lifecycle output, and the dependency summary are still printed.

##### Patch Changes

##### Security

- POSIX bin shims now take `cygpath` and `wslpath` from the system default path on Cygwin, MSYS2, and WSL2 so a dependency cannot redirect another package's shim [#14866](pnpm/pnpm#14866).

- `pnpm install` warnings no longer carry the text of a package's deprecation notice, naming only the deprecated package and version [#15099](pnpm/pnpm#15099). A deprecation warning names the newest non-deprecated version when one exists, and control characters and line separators are stripped from package identifiers and warnings.

- `pnpm install` and other commands that report configuration warnings now warn when environment variables in project `.npmrc` credentials are ignored [#15051](pnpm/pnpm#15051).

##### Installing packages

- `pnpm install --frozen-lockfile` now succeeds when an optional dependency was unresolvable and skipped by the install that wrote the lockfile [#3960](pnpm/pnpm#3960).

- `pnpm install --frozen-lockfile` no longer installs dependencies of projects removed from `pnpm-workspace.yaml` [#15248](pnpm/pnpm#15248). Missing local tarballs used only by those projects no longer fail the install.

- `pnpm ci` now empties `node_modules` before installing in a project that declares a `clean` script [#15276](pnpm/pnpm#15276).

- `pnpm install --force` now re-imports every package into the virtual store [#15030](pnpm/pnpm#15030) and removes obsolete dependency links inside virtual-store packages when their dependencies change [#15039](pnpm/pnpm#15039).

- `preinstall` script for the root project now runs before dependencies are resolved and linked [#3760](pnpm/pnpm#3760).

- `pnpm install` now runs `pnpm:devPreinstall` when the root project uses `package.yaml` [#15168](pnpm/pnpm#15168).

- `pnpm install` now enforces the root project's `engines.node` range when `engineStrict` is enabled [#3016](pnpm/pnpm#3016).

- `pnpm install` now uses the running Node.js when `devEngines.runtime` declares a range without `onFail: download` [#15230](pnpm/pnpm#15230).

- `pnpm install` no longer hangs when a git dependency is fetched over SSH and ssh prompts for a passphrase or host key confirmation, running ssh in batch mode instead [#2227](pnpm/pnpm#2227).

- `pnpm install` now installs git-hosted dependencies without preparing them when their builds are explicitly denied by `allowBuilds` [#10522](pnpm/pnpm#10522).

- `pnpm install` now reuses an in-flight tarball download when another resolution of the same archive still needs its `package.json` [#15037](pnpm/pnpm#15037).

- `pnpm install --prod` no longer downloads registry packages that only a devDependency reaches [#881](pnpm/pnpm#881).

- `pnpm install --no-runtime --frozen-lockfile` with `nodeLinker: hoisted` no longer fails on repeated runs with a broken lockfile [#15212](pnpm/pnpm#15212).

##### Resolving and linking dependencies

- `pnpm install` and `pnpm update` now resolve a dependency range to the newest matching version that is not deprecated [#15128](pnpm/pnpm#15128).

- `pnpm add <pkg>` without a version now uses the catalog entry when the workspace already catalogs that package [#14865](pnpm/pnpm#14865).

- `pnpm install` now links workspace dependencies declared with plain version ranges when `excludeLinksFromLockfile` and `linkWorkspacePackages` are enabled [#15133](pnpm/pnpm#15133).

- `pnpm install` now resolves local tarball dependencies whose absolute `file:` paths contain `..` consistently and skips reinstallation on repeat installs [#15190](pnpm/pnpm#15190).

- `pnpm install` now installs dependencies when a custom resolver returns a local or git-hosted tarball without a manifest [#15016](pnpm/pnpm#15016).

- `pnpm.overrides` entries written as a bare path, such as `./local-dep`, are now measured from the directory holding `pnpm-workspace.yaml` [#11131](pnpm/pnpm#11131).

- `pnpm update --no-save` no longer bypasses version-scoped overrides when a dependency selector specifies a version [#14923](pnpm/pnpm#14923).

- `pnpm peers check` and strict peer dependency checks no longer reject compatible versions from named registries [#15225](pnpm/pnpm#15225).

- `pnpm outdated` and `pnpm update --interactive --latest` now include named-registry dependencies such as `work:2.1.0` and preserve their registry prefix [#15226](pnpm/pnpm#15226).

- Workspace projects selected by `hoistPattern` or `publicHoistPattern` are now hoisted on every install [#3642](pnpm/pnpm#3642).

- Workspace packages with SemVer build metadata are no longer skipped when they match the requested range and have the same version precedence as the registry package [#2812](pnpm/pnpm#2812).

- Sped up `pnpm dedupe` and `pnpm install` in projects with many convergence overrides by checking overrides concurrently [#15175](pnpm/pnpm#15175).

- `minimumReleaseAge` is no longer skipped for packages served by registries returning matching ETags for abbreviated and full package metadata [#14925](pnpm/pnpm#14925).

##### Running scripts and tasks

- `pnpm run` signal handling no longer delivers a redundant second `SIGINT` to child scripts on `Ctrl+C` in a terminal, and properly forwards termination signals when running non-interactively without a terminal [#7374](pnpm/pnpm#7374).

- `pnpm run` and `pnpm exec` in workspaces with `sharedWorkspaceLockfile: false` now verify dependencies in the selected projects rather than expecting a root workspace state [#15272](pnpm/pnpm#15272).

- `pnpm test` now forwards `--filter` arguments to the test script when the option follows the shortcut [#15217](pnpm/pnpm#15217).

- Recursive runs now start scripts matched by a `/pattern/` selector in parallel within `workspaceConcurrency` [#14933](pnpm/pnpm#14933).

- `pnpm deploy`, `pnpm rebuild`, `pnpm rb`, and `pnpm setup` now prefer a `package.json` script of the same name [#14976](pnpm/pnpm#14976).

- `modulesDir` custom directory names now support executable lookup and CommonJS plugin resolution across `pnpm run`, `pnpm exec`, `pnpm version` hooks, and lifecycle scripts [#3604](pnpm/pnpm#3604).

- `pnpm install-test` now accepts `--no-bail` directly and in recursive runs [#3777](pnpm/pnpm#3777).

##### Workspace and project configuration

- `pnpm` commands run in a project not included in the workspace now act on that project alone [#3561](pnpm/pnpm#3561).

- `pnpm-workspace.yaml` edits now preserve scalar YAML anchors and aliases [#8245](pnpm/pnpm#8245).

- `pnpm-workspace.yaml` now expands environment variable placeholders with fallback syntax in enum-valued settings such as `nodeLinker` [#14914](pnpm/pnpm#14914).

- `pnpmfile` configuration now loads a `.js` file as CommonJS or an ES module, following the nearest `package.json` [#15141](pnpm/pnpm#15141).

- `updateConfig` hook settings are now honored by `pnpm peers check`, `why`, `list`, `ll`, `licenses`, `audit`, `sbom`, `fetch`, `patch`, `patch-commit`, `patch-remove`, `approve-builds`, and `runtime` [#15047](pnpm/pnpm#15047), [#15049](pnpm/pnpm#15049).

- `readPackage` hook changes or removal now take added dependencies out of `pnpm-lock.yaml` and update dependencies when an existing lockfile is present [#3735](pnpm/pnpm#3735), [#15136](pnpm/pnpm#15136).

- `package.yaml` projects now record their pinned pnpm under `packageManagerDependencies` in `pnpm-lock.yaml` [#15167](pnpm/pnpm#15167).

- `packageManagerDependencies` pinning `@pnpm/exe` beside `pnpm` is no longer rewritten in `pnpm-lock.yaml` [#14926](pnpm/pnpm#14926).

- `pnpm` now preserves CRLF line endings when modifying project manifests [#3529](pnpm/pnpm#3529).

- `loglevel` setting is now honored when configured in `pnpm-workspace.yaml`, global configuration, or `PNPM_CONFIG_LOGLEVEL` [#3122](pnpm/pnpm#3122).

- `storeDir` values loaded from global configuration or `PNPM_CONFIG_STORE_DIR` now expand a leading `~/` to the user's home directory [#6560](pnpm/pnpm#6560).

- `--shared-workspace-lockfile` now produces a warning when passed on the command line outside a workspace [#1617](pnpm/pnpm#1617).

##### Windows

- `pnpm install` on Windows now runs dependency build scripts from long global virtual store paths and normalizes scoped package paths in lifecycle script `PATH` entries [#15111](pnpm/pnpm#15111).

- `pnpm install` across projects sharing a global virtual store on Windows no longer fails with `Access is denied`, file-exists errors, or transient sharing violations [#15114](pnpm/pnpm#15114), [#15176](pnpm/pnpm#15176), [#15171](pnpm/pnpm#15171).

- `pn`, `pnpx`, `pnx`, and `pnpm` now run when Git Bash, MSYS2, or Cygwin launches them through a Windows path [#14884](pnpm/pnpm#14884).

- `pnpm dlx` now reuses cached packages when Windows creates directory junctions for its cache links [#15171](pnpm/pnpm#15171).

- `pnpm pipeline --watch` now resolves Windows short paths so multiple path representations share the build cache [#15105](pnpm/pnpm#15105).

##### CLI commands and output

- `pnpm remove` now runs the project's own `preuninstall`, `uninstall`, and `postuninstall` scripts [#3276](pnpm/pnpm#3276).

- `pnpm remove -r` now fails before modifying manifests if any requested dependency is absent from all selected projects [#2319](pnpm/pnpm#2319).

- `pnpm update --peer` now updates ranges in `peerDependencies` [#8081](pnpm/pnpm#8081).

- `pnpm update` now moves `devEngines.runtime` and `engines.runtime` version ranges to the resolved Node.js version [#14988](pnpm/pnpm#14988).

- `pnpm update -g` no longer reinstalls unchanged packages [#12002](pnpm/pnpm#12002).

- `pnpm add -g`, `pnpm update -g`, and `pnpm remove -g` now recover a global package group whose `node_modules` directory was deleted [#15093](pnpm/pnpm#15093).

- `pnpm add -g` now installs local tarballs when `PNPM_HOME` contains `..` path segments [#15118](pnpm/pnpm#15118).

- `pnpm version` now reads `tagVersionPrefix` from `pnpm-workspace.yaml`, global config, or `PNPM_CONFIG_TAG_VERSION_PREFIX` when creating and reading Git tags [#15044](pnpm/pnpm#15044).

- `pnpm publish` now allows a detached Git HEAD in CI environments [#5894](pnpm/pnpm#5894).

- `pnpm store prune` now removes unreferenced files and packages from the content-addressable store [#3635](pnpm/pnpm#3635), as well as expired or superseded `pnpm dlx` cache data [#15171](pnpm/pnpm#15171).

- `pnpm cache list-registries` now prints decoded registry URLs [#15046](pnpm/pnpm#15046).

- `pnpm deploy` no longer triggers an install when running scripts in a read-only deployed filesystem [#11617](pnpm/pnpm#11617).

- `pnpm -r list --json` now outputs a single JSON array when `sharedWorkspaceLockfile` is `false`, and `--long` and `--parseable` read each project's own modules directory [#15011](pnpm/pnpm#15011).

- `pnpm sbom` now validates SPDX identifiers and expressions before emitting them as CycloneDX license IDs or expressions, falling back to a license name for non-SPDX values such as `UNLICENSED` [#14786](pnpm/pnpm#14786).

- `pnpm change check` now validates pending change intents in `.changeset/` [#15183](pnpm/pnpm#15183).

- `pnpm --filter` and `pnpm -F` shell completion now suggests workspace package names [#15216](pnpm/pnpm#15216). Completion candidates containing control or invisible formatting characters are omitted so package and script names cannot inject terminal escape sequences.

- `pnpm run` and `pnpm run-script` shell completion now suggests package scripts [#15034](pnpm/pnpm#15034).

- `pnpm --version` no longer creates a temporary file in the project directory during store detection [#15264](pnpm/pnpm#15264).

- `pnpm setup` now describes displayed configuration changes as "The following configuration changes were made" [#15100](pnpm/pnpm#15100).

- `minimumReleaseAge` approval prompts in `pnpm install` and `pnpm update -g` now count and display each package version once [#15083](pnpm/pnpm#15083), [#15091](pnpm/pnpm#15091).

- `.npmrc` authentication warnings now report when an empty environment variable removes an auth token and name the affected key [#4806](pnpm/pnpm#4806).

- The install summary now names the version each dependency resolved to when `node-linker` is `hoisted` [#15161](pnpm/pnpm#15161).

- `pnpm install` now re-links a package's global virtual store slot after `allowBuilds` changes [#15117](pnpm/pnpm#15117).

<!-- sponsors -->

#### Platinum Sponsors

<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
        <a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
      </td>
      <td align="center" valign="middle">
        <a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
            <img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"></a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
        <a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
            <img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
          </picture>
        </a>
      </td>
    </tr>
  </tbody>
</table>
#### Gold Sponsors

<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
        <a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
            <img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
            <img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
        <a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
            <img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
            <img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
            <img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
          </picture>
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
        <a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
            <img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
      </td>
    </tr>
  </tbody>
</table>

<!-- sponsors end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants