Skip to content

install: warn when a link: dependency declares peerDependencies - #35602

Open
robobun wants to merge 9 commits into
mainfrom
farm/b1695740/link-peer-deps-warning
Open

install: warn when a link: dependency declares peerDependencies#35602
robobun wants to merge 9 commits into
mainfrom
farm/b1695740/link-peer-deps-warning

install: warn when a link: dependency declares peerDependencies

c383d4c
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 25, 2026 in 21m 50s

Code review found 1 potential issue

Found 3 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/lockfile/Package.rs:2178-2195 Warning does not filter optional peer dependencies

Annotations

Check warning on line 2195 in src/install/lockfile/Package.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Warning does not filter optional peer dependencies

This warning enumerates every key in `peerDependencies` without consulting `peerDependenciesMeta` for `optional: true` entries. A linked package that declares only optional peers (a common plugin-host pattern) will get the full warning + `--preserve-symlinks` remedy even though absence of those peers is contractually fine. Consider reading `peerDependenciesMeta` here (the block just below at line ~2219 already shows how) and either annotating optional peers or suppressing the warning entirely wh