[BUG] npm install @version removes the dep from peerDeps if dep is in devDeps as well (original) (raw)
Current Behavior:
running npm install on a dependency that is in both dev and peer deps removes the dep from peer. (note: this even happens if installing with the --legacy-peer-deps flag)
Expected Behavior:
if anything the peer dep should be kept over the dev dep, as the peer dep is part of the package's outward facing contract. preferably both are kept while legacy-peer-deps is an option.
Steps To Reproduce:
- create a package.json with a dep in both dev and peer
- run
npm install <depname>@latestin the package - notice that the dep is no longer in peer deps