rfcs
rfcs copied to clipboard
[RRFC] `npm explain` should accept `--only`
Motivation ("The Why")
I want to know if and how a dep foo came to be in my tree - but, i want to ignore dev deps.
Example
A transitive dep published a breaking change in a non-major, causing my tests for fail. I wanted to figure out whether this would break consumers, or, whether it was only breaking my tests.
How
Current Behaviour
I was able to simulate what I wanted with npm prune --production && npm explain foo, but then i had to reinstall after, which is annoying.
Desired Behaviour
npm explain foo --only=production should work.
(this should work in concert with #523)