Repository navigation
RFC: Opt out of auto-installing peer dependencies - #926
Open
manzoorwanijk wants to merge 1 commit into
Open
manzoorwanijk wants to merge 1 commit into
manzoorwanijk wants to merge 1 commit into
Conversation
manzoorwanijk
marked this pull request as ready for review
September 29, 2026 10:59
manzoorwanijk
force-pushed
the
rfc-auto-install-peers-opt-out
branch
from
September 29, 2026 11:09
151de87 to
3faff9d
Compare
Contributor
Author
|
CC: @reggi @martinrrm @nkolev92 I will create a draft implementation for you to look at. |
Contributor
Author
|
Here is the draft implementation - npm/cli#10049 |
manzoorwanijk
force-pushed
the
rfc-auto-install-peers-opt-out
branch
from
October 2, 2026 08:18
3faff9d to
6fcd15c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an RFC for an
auto-install-peersconfig that lets a project stop npm from auto-installing required peers and report any package that forgets to declare a peer it consumes. A package author who depends onB(peerreact) but never declaresreactgets no signal today, because npm installs it onB's behalf. The mistake then ships, and consumers on Yarn Plug'n'Play hit it at runtime.Notable semantics
true, so nothing changes unless opted in.strict-peer-deps, root and workspace violations fail, third-party ones warn.npm cifails as out of sync.legacy-peer-deps.Related:
npm installdoes not repair invalid or missing lockfile deps behind a workspace, sostrict-peer-depspasses cli#9977