Repository navigation
fix(package-manager): purge directory links on windows - #14798
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe purge path now removes module entries with ChangesWindows directory-link purge
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Assessment against linked issues
Suggested labels: Merge Risk: ⚪ Minimal · up to The Windows purge now removes directory links without deleting their targets, with no current merge-blocking risk identified. ✨ Finishing Touches🧪 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14798 +/- ##
==========================================
+ Coverage 90.90% 90.91% +0.01%
==========================================
Files 1265 1265
Lines 169561 169710 +149
==========================================
+ Hits 154146 154299 +153
+ Misses 15415 15411 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time). Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.3288735905199998,
"stddev": 0.11997394192812798,
"median": 2.28378820132,
"user": 1.26953054,
"system": 1.4310260199999998,
"min": 2.22012866782,
"max": 2.52229090782
},
{
"command": "pacquet@main",
"mean": 2.36539566392,
"stddev": 0.13815750434877544,
"median": 2.30437387382,
"user": 1.1460502399999999,
"system": 1.4743536199999998,
"min": 2.21960030082,
"max": 2.60994745982
},
{
"command": "pnpr@HEAD",
"mean": 1.3764851709200001,
"stddev": 0.11746618531667773,
"median": 1.3224433593199998,
"user": 1.0597176400000001,
"system": 1.2979957199999999,
"min": 1.2787567848199999,
"max": 1.61871080282
},
{
"command": "pnpr@main",
"mean": 1.3890055409199997,
"stddev": 0.11278004520316753,
"median": 1.3739392828199999,
"user": 1.08515024,
"system": 1.2431946199999997,
"min": 1.27960248082,
"max": 1.64704241082
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.20455314908000002,
"stddev": 0.012354648974161893,
"median": 0.20131047968000002,
"user": 0.21891926,
"system": 0.49425011999999996,
"min": 0.19024204368,
"max": 0.22500150168
},
{
"command": "pacquet@main",
"mean": 0.21238745608,
"stddev": 0.015483412701924815,
"median": 0.21160136318,
"user": 0.21959716,
"system": 0.5274176199999999,
"min": 0.18912830968,
"max": 0.24048582668000001
},
{
"command": "pnpr@HEAD",
"mean": 0.22968094758,
"stddev": 0.007561343431055922,
"median": 0.23163955168,
"user": 0.23664505999999993,
"system": 0.54199682,
"min": 0.21394527568000002,
"max": 0.23987197668000002
},
{
"command": "pnpr@main",
"mean": 0.23377574118000002,
"stddev": 0.009032845795195607,
"median": 0.23699374468,
"user": 0.24636856,
"system": 0.53724702,
"min": 0.21567780868,
"max": 0.24493543168
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.00635651160389262,
"stddev": 0.00031644793480040936,
"median": 0.00631972852,
"user": 0.004126983221476513,
"system": 0.002607523221476511,
"min": 0.005811534520000001,
"max": 0.008996690520000001
},
{
"command": "pacquet@main",
"mean": 0.006430695417435895,
"stddev": 0.0004556653073455884,
"median": 0.006378633520000001,
"user": 0.003793158974358973,
"system": 0.003046997641025642,
"min": 0.005606189520000001,
"max": 0.00860269152
},
{
"command": "pnpr@HEAD",
"mean": 0.006491011040725384,
"stddev": 0.0003998696372855715,
"median": 0.0064497170200000006,
"user": 0.003959826424870471,
"system": 0.0029475586528497403,
"min": 0.005813778520000001,
"max": 0.00906420852
},
{
"command": "pnpr@main",
"mean": 0.006468315408040716,
"stddev": 0.0003157007489760411,
"median": 0.00647018052,
"user": 0.003972629770992367,
"system": 0.0029664831552162884,
"min": 0.00581141352,
"max": 0.00853830052
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.008887302170825695,
"stddev": 0.0016817623407526588,
"median": 0.00875929618,
"user": 0.005400047828746176,
"system": 0.003994139204892967,
"min": 0.00592052218,
"max": 0.015397202180000001
},
{
"command": "pacquet@main",
"mean": 0.00807559759666667,
"stddev": 0.001474927236707184,
"median": 0.0075405296800000006,
"user": 0.004750453333333334,
"system": 0.003815195333333333,
"min": 0.00596871218,
"max": 0.013056871180000002
},
{
"command": "pnpr@HEAD",
"mean": 0.006991271350967744,
"stddev": 0.0005731663926740166,
"median": 0.00692194618,
"user": 0.0042137780645161325,
"system": 0.003200398967741936,
"min": 0.00579721118,
"max": 0.009275762180000001
},
{
"command": "pnpr@main",
"mean": 0.006669953119297127,
"stddev": 0.00036570433978948746,
"median": 0.0066390571800000004,
"user": 0.004057773674121406,
"system": 0.002957801150159743,
"min": 0.0058238911800000005,
"max": 0.00820255318
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.44468295936,
"stddev": 0.060228695277514635,
"median": 2.42689131986,
"user": 1.6234037000000001,
"system": 1.5111661399999998,
"min": 2.40064726036,
"max": 2.61183324436
},
{
"command": "pacquet@main",
"mean": 2.42619709686,
"stddev": 0.02301876064525038,
"median": 2.42743700486,
"user": 1.5916485999999999,
"system": 1.5179523400000001,
"min": 2.38841196436,
"max": 2.45943594036
},
{
"command": "pnpr@HEAD",
"mean": 1.5168546905600002,
"stddev": 0.11678296398624739,
"median": 1.52382437786,
"user": 1.0081923,
"system": 1.1784194399999999,
"min": 1.36617522036,
"max": 1.64879426336
},
{
"command": "pnpr@main",
"mean": 1.45778703076,
"stddev": 0.10739673989599238,
"median": 1.4054966068599999,
"user": 1.0096124,
"system": 1.24437894,
"min": 1.35670359536,
"max": 1.63472887536
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.33106532454000004,
"stddev": 0.01679952093259483,
"median": 0.32858914034,
"user": 0.5061542800000001,
"system": 0.7715857599999999,
"min": 0.30466297034,
"max": 0.36004117334
},
{
"command": "pacquet@main",
"mean": 0.32912047344,
"stddev": 0.011141242667664482,
"median": 0.32832894584,
"user": 0.5024805800000001,
"system": 0.7707156599999999,
"min": 0.31382728334,
"max": 0.35538835834
},
{
"command": "pnpr@HEAD",
"mean": 0.29779935534,
"stddev": 0.05977787064690212,
"median": 0.26873254084,
"user": 0.24896948000000005,
"system": 0.57402876,
"min": 0.25449504934,
"max": 0.41275343934000003
},
{
"command": "pnpr@main",
"mean": 0.25473452354000004,
"stddev": 0.010190836162756216,
"median": 0.25119186634,
"user": 0.19963238,
"system": 0.49106096,
"min": 0.24210815634,
"max": 0.27382120734
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.6083034132000003,
"stddev": 0.10003234960454413,
"median": 1.5584901173,
"user": 0.9243144799999999,
"system": 1.0710800800000002,
"min": 1.5212209378000001,
"max": 1.7899662558000002
},
{
"command": "pacquet@main",
"mean": 1.5366176996000003,
"stddev": 0.012866380877659714,
"median": 1.5338610983,
"user": 0.76044588,
"system": 0.9138235800000001,
"min": 1.5173046188000001,
"max": 1.5568412498
},
{
"command": "pnpr@HEAD",
"mean": 0.2810947327,
"stddev": 0.00828171582549073,
"median": 0.2794058283,
"user": 0.22821248,
"system": 0.53377908,
"min": 0.2702996878,
"max": 0.2999598208
},
{
"command": "pnpr@main",
"mean": 0.26135051400000003,
"stddev": 0.009934824983795344,
"median": 0.2624247983,
"user": 0.20032158,
"system": 0.49028397999999995,
"min": 0.23948896880000003,
"max": 0.27464154080000003
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2438354586218182,
"stddev": 0.014045658888137717,
"median": 0.24076849644,
"user": 0.2620207618181818,
"system": 0.09359582181818182,
"min": 0.22169282844000002,
"max": 0.26736375244
},
{
"command": "pacquet@main",
"mean": 0.24036042794,
"stddev": 0.014679776042061249,
"median": 0.23868426194000003,
"user": 0.24701732999999995,
"system": 0.10211113999999999,
"min": 0.22172421944,
"max": 0.26154500844
},
{
"command": "pnpr@HEAD",
"mean": 0.09854494511857141,
"stddev": 0.002308066503507741,
"median": 0.09837289544000001,
"user": 0.045957758571428566,
"system": 0.014813211428571426,
"min": 0.09405989144000002,
"max": 0.10234380844000002
},
{
"command": "pnpr@main",
"mean": 0.09858239354000002,
"stddev": 0.0025062794725023607,
"median": 0.09853069244000001,
"user": 0.040969146666666664,
"system": 0.020051339999999994,
"min": 0.09195761844000001,
"max": 0.10419536944
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6400330249355555,
"stddev": 0.02791765551951298,
"median": 0.64652356538,
"user": 0.6869650533333334,
"system": 0.17582687555555554,
"min": 0.58182556238,
"max": 0.67465104538
},
{
"command": "pacquet@main",
"mean": 0.6264218782688888,
"stddev": 0.05297321237758546,
"median": 0.61882568738,
"user": 0.6797390533333333,
"system": 0.16073420888888887,
"min": 0.53014018638,
"max": 0.72971638238
},
{
"command": "pnpm@HEAD",
"mean": 3.468579621268889,
"stddev": 0.116551371485737,
"median": 3.49298866338,
"user": 5.5321526088888895,
"system": 0.22736432,
"min": 3.28535352938,
"max": 3.65002565138
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.380427899600001,
"stddev": 0.12164066176160356,
"median": 4.339783989800001,
"user": 1.3041399200000001,
"system": 1.4259961399999999,
"min": 4.2769937728,
"max": 4.661413088800001
},
{
"command": "pacquet@main",
"mean": 4.371059754799999,
"stddev": 0.15917602841181835,
"median": 4.3037587963,
"user": 1.2128584199999999,
"system": 1.4234160399999995,
"min": 4.2524680318,
"max": 4.746759183800001
},
{
"command": "pnpr@HEAD",
"mean": 3.3836058049,
"stddev": 0.05476834352959173,
"median": 3.3689317993,
"user": 1.16240672,
"system": 1.33189994,
"min": 3.3308857248,
"max": 3.4987300748
},
{
"command": "pnpr@main",
"mean": 3.3822515569000005,
"stddev": 0.0794230905693952,
"median": 3.3443312038,
"user": 1.16019172,
"system": 1.31468144,
"min": 3.3270177518,
"max": 3.5352751468
}
]
}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.11737820700444446,
"stddev": 0.007599712532989971,
"median": 0.11549567306,
"user": 0.14141576666666666,
"system": 0.12771035111111112,
"min": 0.10802116406000001,
"max": 0.14109601606000002
},
{
"command": "pacquet@main",
"mean": 0.11824517486952384,
"stddev": 0.007939633440253177,
"median": 0.11868475406000001,
"user": 0.1466871476190476,
"system": 0.13396283523809524,
"min": 0.10363644106,
"max": 0.13500072406000002
},
{
"command": "pnpr@HEAD",
"mean": 0.12767508142842104,
"stddev": 0.006409140310656865,
"median": 0.12798867406000003,
"user": 0.14584688947368418,
"system": 0.1353585294736842,
"min": 0.11562753006,
"max": 0.13776233406000002
},
{
"command": "pnpr@main",
"mean": 0.12170628077428576,
"stddev": 0.0027926920252034477,
"median": 0.12127411106000001,
"user": 0.1442533380952381,
"system": 0.1299574066666667,
"min": 0.11821902006,
"max": 0.12826794706000003
}
]
} |
On Windows, the purge of an inconsistent `node_modules` sent every entry that `FileType::is_dir()` rejects to `std::fs::remove_file`. std reports a junction or a directory symlink as a symlink rather than a directory, and `DeleteFileW` refuses a directory link with `ERROR_ACCESS_DENIED`. The purge therefore failed with ERR_PNPM_PACKAGE_MANAGER_REMOVE_MODULES_DIR at the first linked dependency. Any layout change that purges a tree holding links hits it, such as switching `nodeLinker`, and on 12.3.4 so did the first install after upgrading from pnpm 11. Directory-shaped entries now go through `remove_modules_dir`, which already unlinks them with `pnpm_fs::remove_symlink_dir` on Windows. Other platforms are unchanged, because the symlink check only runs on Windows and `remove_file` unlinks a symlink everywhere else. Closes pnpm#14790
`pnpm_fs::remove_dirent` already removes whatever occupies a path without following links, including the Windows directory symlinks and junctions `std::fs::remove_file` refuses, and it is covered by junction, dangling-link and file-symlink tests. Calling it from `purge_modules_entry` drops the local dispatch this PR had grown a predicate for. `remove_modules_dir` and `remove_modules_file` go with it. The purge was their only caller and both already reported `InstallError::RemoveModulesDir`, so no error code or message changes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019YSqokw1VRnqKoh5SyS8tT
dfa9e0a to
15dc97b
Compare
|
Rebased onto Rebase. The branch was 30 commits behind, and Reuse instead of a new predicate. That also lets One deliberate behavior difference worth flagging: Changeset rewritten to one idea per sentence, with the issue link last. Checks on Linux: Written by an agent (Claude Code, claude-opus-5). |
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
The entry named the trigger for the bug but not what pnpm did, leaving the reader to infer the failure from `no longer fails`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019YSqokw1VRnqKoh5SyS8tT
|
Qodo's rule 3058498 finding is fair, so it is fixed in Qodo reported no bugs and no code suggestions. Written by an agent (Claude Code, claude-opus-5). |
|
Code review by qodo was updated up to the latest commit 71c4473 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
| Project | pnpm's project |
| Branch | pr/14798 |
| Testbed | pnpr |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| gvs-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 115.63 ms |
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,366.18 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 270.30 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 254.50 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 94.06 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,278.76 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,330.89 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 213.95 ms |
| isolated-linker.repeat-install.cold-cache.hot-store | 📈 view plot | 5.80 ms |
| isolated-linker.repeat-install.hot-cache.hot-store | 📈 view plot | 5.81 ms |
`remove_dirent` called `fs::remove_dir` directly, so a link unlink was the one removal in the crate that gave up on the first sharing violation. Every other directory-link unlink goes through `remove_symlink_dir`, which retries a transient Windows file lock; this one now does too. It matters most for the `node_modules` purge, where an isolated layout makes almost every entry a link, and an antivirus or indexer scan holding one open would abort the install. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019YSqokw1VRnqKoh5SyS8tT
|
Correcting something I said earlier in this thread. I claimed the Windows-only branch in Where that branch came from. It was written in #12536, the same commit as the if entry.file_type().is_ok_and(|t| t.is_dir()) {
#[cfg(windows)]
let is_removed = pacquet_fs::remove_symlink_dir(&entry.path()).is_ok();
...It is an attempt at exactly this bug, placed inside the But it did carry something real: the retry. The fix is one line in Worth noting the original
Written by an agent (Claude Code, claude-opus-5). |
|
Code review by qodo was updated up to the latest commit 45460a1 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
On Windows, the purge of an inconsistent `node_modules` sent every entry that `FileType::is_dir()` rejects to `std::fs::remove_file`. std reports a junction or a directory symlink as a symlink rather than a directory, and `DeleteFileW` refuses a directory link with `ERROR_ACCESS_DENIED`. The purge therefore failed with ERR_PNPM_PACKAGE_MANAGER_REMOVE_MODULES_DIR at the first linked dependency. Any layout change that purges a tree holding links hits it, such as switching `nodeLinker`, and on 12.3.4 so did the first install after upgrading from pnpm 11. `purge_modules_entry` now removes each entry with `pnpm_fs::remove_dirent`, which unlinks a directory-shaped link without following it, and which `pnpm clean`, `pnpm deploy`, the injected-deps syncer and the virtual-store prune already use. The local `remove_modules_dir` and `remove_modules_file` helpers go with the old dispatch: the purge was their only caller and both already reported `InstallError::RemoveModulesDir`. `remove_dirent` unlinked such a link with a bare `fs::remove_dir`, the one removal in `pnpm-fs` that did not retry a transient Windows file lock. It now uses `remove_symlink_dir`, as every other directory-link unlink in the crate does. Closes pnpm#14790 --------- Co-authored-by: Zoltan Kochan <[email protected]>
On Windows, the purge of an inconsistent `node_modules` sent every entry that `FileType::is_dir()` rejects to `std::fs::remove_file`. std reports a junction or a directory symlink as a symlink rather than a directory, and `DeleteFileW` refuses a directory link with `ERROR_ACCESS_DENIED`. The purge therefore failed with ERR_PNPM_PACKAGE_MANAGER_REMOVE_MODULES_DIR at the first linked dependency. Any layout change that purges a tree holding links hits it, such as switching `nodeLinker`, and on 12.3.4 so did the first install after upgrading from pnpm 11. `purge_modules_entry` now removes each entry with `pnpm_fs::remove_dirent`, which unlinks a directory-shaped link without following it, and which `pnpm clean`, `pnpm deploy`, the injected-deps syncer and the virtual-store prune already use. The local `remove_modules_dir` and `remove_modules_file` helpers go with the old dispatch: the purge was their only caller and both already reported `InstallError::RemoveModulesDir`. `remove_dirent` unlinked such a link with a bare `fs::remove_dir`, the one removal in `pnpm-fs` that did not retry a transient Windows file lock. It now uses `remove_symlink_dir`, as every other directory-link unlink in the crate does. Closes pnpm#14790 --------- Co-authored-by: Zoltan Kochan <[email protected]>
Summary
Closes #14790.
On Windows, purging an inconsistent
node_modulesfails withERR_PNPM_PACKAGE_MANAGER_REMOVE_MODULES_DIR("Access is denied (os error 5)") as soon as it reaches a linked dependency. SwitchingnodeLinkerfromisolatedtohoistedin an installed project reproduces it on 12.4.0 and 12.3.4. On 12.3.4 it is also the failure on the first install after upgrading from pnpm 11, which #14605 reproduced without a mechanism.purge_modules_entrysent every entry thatFileType::is_dir()rejects tostd::fs::remove_file. On Windows, std counts a junction or a directory symlink as a symlink, andDeleteFileWcannot unlink a directory link.pnpm_fs::remove_direntalready removes whatever occupies a path without following links, and is whatpnpm clean,pnpm deploy, the injected-deps syncer and the virtual-store prune all use. The purge now calls it too, rather than growing a second copy of the platform dispatch. The localremove_modules_dirandremove_modules_filehelpers go with the old dispatch: the purge was their only caller, and both already reportedInstallError::RemoveModulesDir, so no error code or message changes. Other platforms take the same branches as before.remove_direntunlinked a Windows directory link with a barefs::remove_dir, making it the one removal inpnpm-fsthat gave up on the first sharing violation. It now goes throughremove_symlink_dirlike every other directory-link unlink in the crate, so an antivirus or indexer scan holding an entry open no longer aborts the purge. That matters here because an isolated layout makes almost everynode_modulesentry a link.The TypeScript pnpm v11 CLI is not affected. It removes each entry with
rimraf, which unlinks a directory link, and the samenodeLinkerswitch with pnpm 11.3.0 on Windows succeeds.Verification
purge_removes_directory_links_without_following_thempurges a directory that holds a link created bypnpm_fs::symlink_dir, a plain directory and a file. It asserts that all three are gone and that the link target is untouched. The Windows-specific dispatch itself is covered where it lives, byremove_dirent's junction, dangling-junction and file-symlink tests inpnpm/crates/fs/src/remove_dirent/tests.rs.Rebased onto main, which had split
prepare_modules_state.rsinto submodules. The change now lives inprepare_modules_state/purge.rs.On Linux:
cargo nextest run -p pnpm-package-manager(697 passed), clippy, dylint, rustfmt and typos are all clean. Windows behavior is not exercised locally;Rust CI / Test / windowscovers it.Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Claude Code, claude-opus-5).
🤖 Generated with Claude Code
https://claude.ai/code/session_019YSqokw1VRnqKoh5SyS8tT
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
node_modulesdirectories containing linked dependencies.node_modules.