Skip to content

install: prune stale workspace node_modules in hoisted installs - #29794

Open
robobun wants to merge 8 commits into
mainfrom
farm/a068037a/prune-stale-workspace-node-modules
Open

install: prune stale workspace node_modules in hoisted installs#29794
robobun wants to merge 8 commits into
mainfrom
farm/a068037a/prune-stale-workspace-node-modules

Refuse symlinked @scope entries in the workspace prune

77f1a97
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 15, 2026 in 32m 18s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/install/hoisted_install.rs:811-819 Prune leaves dangling .bin links in workspace node_modules

Annotations

Check warning on line 819 in src/install/hoisted_install.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Prune leaves dangling .bin links in workspace node_modules

`prune_node_modules_at` deletes the stale package directory but skips `.bin` (line 805: `name[0] == b'.'`), so a bin symlink a prior install created there — e.g. `packages/backend/node_modules/.bin/baz-exec → ../baz/bin.js` — is left dangling after `baz` is removed. The sibling deletion path `prune.rs::remove_collapsed_copies` routes every touched folder through `housekeeping` → `prune_bins` for exactly this; calling `crate::prune::prune_bins(&dir)` after a successful `delete_tree` here (make it