Am pretty sure that by NPM standard every update below version 1.0.0 is considered to be able to carry breaking change. So when using ^ in it’s version it won’t have effect
<1.0.0 versions are allowed breaking changes in the minor part according to semver, and npm resolution won’t match new minor versions with the caret symbol with <1.0.0 versions
<1.0.0 versions are allowed breaking changes in the minor part according to semver
To be perfectly clear, SemVer essentially makes no provision for what anything <1.0.0 actually means. And, yes, that does imply that 99% of software packages out there have a completely meaningless version string.
We did this for many years but eventually got tired of the somewhat arbitrary increments and settled on YYYY.MM.DD.RR (RR = revision# in case we had multiple releases in a day)
The problem with just using the date is that it makes it harder to backtrack to a previous version with a specific feature in mind. It's easy to separate in your mind what changed between 1.0.0, 2.0.0, and 3.0.0, but not three arbitrary dates. Of course if all anyone cares about is the latest version go ahead and just use the date.
My usual structure is [Complete rewrite/major overhaul/large change in functionality/second number reached 3 digits].[any other update not covered/third number reached 4 digits].[single line changes/typo fixes/extremely niche bug fixes]
I don't like when my version numbers have too many digits 😅
1.6k
u/lOo_ol Mar 03 '25
I think this is how everyone does it, but never truly put it into words like that, like second nature.