Skip to content

automatically install peerDependencies #827

Description

@paulpflug

The original purpose of peerDependencies with npm@1 was, that a package can define packages to install alongside.
With the flattened dependencies tree with npm@3 this functionally was redundant, as ALL dependencies are getting installed alongside, as a result the automatic installation of peer dependencies was disabled and there is no real use-case for defining peer dependencies anymore..

With pnpm this isn't the case, as you choose to use a npm@1 like package dep tree, you should also use the npm@1 peerDep behaviour and install them automatically.

Say package A needs B,C,D as peerDep I would have to call:

pnpm install A B C D
# instead of
npm install A

if a peerDep conflicts with a normal dep, the normal dep should win and a warning should get printed..
(also peerDeps should get installed when linked)

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions