option to configure .x notation instead of prefix/exact


(BB) #1

Currently .npmrc allows you to configure either save-exact or save-prefix, which is great. However we find most people can’t remember what ~ and ^ do (ie. have to look it up every time) so we prefer the more-readable 1.2.x notation.

Using save-prefix puts us in a situation where we have to break a convention people quite like, which is hardly the end of the world… but it would be nice to be able to configure .x notation in .npmrc so new dependences get added equivalent to ~ but set with .x

Since the functionality is already there for save-prefix, this could be save-xnotation and just control the format of the version number. So you could combine it like this:

save-prefix="~"
save-xnotation=true

…or

save-format="x" 
(x|prefix)

Any interest in this idea? It is a relatively minor ergonomics improvement, but I do believe encouraging .x notation would make things a lot less confusing for a lot of people :slight_smile: