npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

option to configure .x notation instead of prefix/exact

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:




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: