[RRFC] `npm explain` should accept `--only`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 777
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with this RFC and the related #523 discussion; the payload names no files, tests, or implementation entry points. Done means agreeing on and implementing support for npm explain foo --only=production without requiring npm prune, with behavior consistent with the linked proposal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100