np
np copied to clipboard
Warn about new dependencies
Description
It'd be nice if np
would ask me if I deliberately added a dependency (as opposed to forgetting to use yarn add --dev
). Similar to the new files check.
Is the feature request related to a problem?
I accidentally published a version of my package with a non production-ready and unnecessary dependency, and I'm looking for something to blame other than my own stupidity.
Possible implementation
I assume, very similarly to the new files feature. I haven't looked at the implementation of this package.
Alternatives
Always remember to use --dev
when using yarn add
. That is completely impossible though. There is a 100% chance that I will forget again at some point.
@mmkal I like this idea :) I'm not sure how I feel about adding another confirmation step though (as opposed to a simple notice message).
Maybe it could be bundled into the same confirmation step as "new files"? A notice message that doesn't stop the process sounds stressful - is the user supposed to be really fast with their ctrl-c hand?