Skip to content

Commit

Permalink
doc: update peerDependencies behavior for npm 7 (nodejs#3759)
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle authored Mar 27, 2021
1 parent 460c740 commit 1acad0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locale/en/blog/npm/peer-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Now, when installing `chai-as-promised`, the `chai` package will come along with
another Chai plugin that only works with 0.x versions of Chai, you'll get an error. Nice!

<div class="highlight-box">
<strong>UPDATE:</strong> npm versions 1 and 2 will automatically install peerDependencies if they are not explicitly depended upon higher in the dependency tree. For all following versions of npm (starting with npm@3), this will no longer be the case. You will receive a warning that the peerDependency is not installed instead.
<strong>UPDATE:</strong> npm versions 1, 2, and 7 will automatically install peerDependencies if they are not explicitly depended upon higher in the dependency tree. For npm versions 3 through 6, you will receive a warning that the peerDependency is not installed instead.
</div>

One piece of advice: peer dependency requirements, unlike those for regular dependencies, *should be lenient*. You
Expand Down

0 comments on commit 1acad0d

Please sign in to comment.