This package is used to test the "peerDependencies" keyword in package.json. If package A lists package B as a peer dependency, it means any package that uses A must install B.
If we are currently in package ROOT, and we run npm i @hwbdev/peer-dependency
, two things can happen:
- In node v16 (and npm v8), npm will also install
@hwbdev/say-something
since it's listed as a peer dependency. - in node v14 (npm 6), npm will give a warning and not install
@hwbdev/say-something
If we run npm i @hwbdev/peer-dependency @hwbdev/peer-dependency-two
, npm will give an error since both package list @hwbdev/say-something
as a peer dependency, but their versions mismatch.