Repository navigation
fix(pacquet): avoid store link probe during version check - #15264
Conversation
|
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 configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe 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. ChangesStore resolution control
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to 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
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Micro-Benchmark ResultsLinux |
Same-run regression checkHEAD 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.
Integrated-Benchmark Report (Linux)Commit: 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
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
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
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
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
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
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
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
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
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
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
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 storeSame 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.
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
}
]
} |
405a73d to
1ffe611
Compare
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.
1ffe611 to
8b71a0e
Compare
PR Summary by QodoAvoid package store probes during pre-command version checks
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
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.
|
Code review by qodo was updated up to the latest commit d8ccf2e |
PR Code Suggestions ✨Warning
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); |
There was a problem hiding this comment.
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
…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.
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.
…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.
| 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 -->
Summary
Avoid probing package store linkability during
pnpm --versionand other pre-command checks that do not require store access.Previously,
pnpm --versiontriggered 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
Checklist
pnpm changeset) if this PR changes any published package. Keep it short and written for pnpm users — it becomes a release note.Opened by Antigravity.