np icon indicating copy to clipboard operation
np copied to clipboard

Warn about new dependencies

Open mmkal opened this issue 2 years ago • 2 comments

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 avatar Sep 17 '21 14:09 mmkal

@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).

itaisteinherz avatar Sep 17 '21 15:09 itaisteinherz

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?

mmkal avatar Sep 21 '21 11:09 mmkal