npm Community Forum (Archive)

The npm community forum has been discontinued.

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

Using 4 digit as version

Recently discovered that 4 digits cannot be used as a version of our package.
Is there however some (safe) way to by pass it?

My case:

0aLfb


npm expects versions following the SemVer syntax (and preferably the guidelines as well, but that can’t be checked), and that syntax doesn’t allow for 4 numbers like that. The closest you can come to that would be 1.1.1-1, I think, assuming the last digit has significance. I recommend reading the pre-release and precedence sections for drawbacks in your situation.