SoloVer is a simple and expressive versioning specification. Unlike SemVer's three-part versioning system, it uses a single number.
<version_number>[<postfix>]
version_number: Single integer number, minimum 0.postfix: Optional. Matching regex[+-][A-Za-z0-9_]+.
Versioning Rules
-
Increments: The version number is incremented for each new release.
-
Postfixes: Additional information can be appended after the version number, separated by a minus or plus character.
Characters other than the regex above mean parsing the version must stop.
-
Precedence:
- Higher version numbers is after a lower number.
+postfix is after no postfix. Hotfixes.-postfix is before no postfix. Pre-releases.- Postfixes are sorted alphanumerically.
- Longer postfix comes after shorter ones.
Commentary
Ordering example: 0 < 1-alpha < 1-beta < 1 < 1+hotfix1 < 1+hotfix2 < 2-preview < 2 < 3.
Think of calculus: "x minus something" is less than x and "x plus something" is greater than x.
Ordering gotchas because "alphanumerically" is stupid simple:
3-alpha2>3-alpha10(should have used3-alpha02maybe)3-rc1>3-beta(becausercomes afterbin the alphabet)3-beta>3-Alpha(becausebcomes afterAin ASCII)1.0=1.2(both are parsed as1)3-alpha-42b8b42=3-alpha-dc31563(both are parsed as3-alpha)2024-01<2024(dates don't work so well)
We intentionally do not try to communicate "backward compatibility" as there is no objective and satisfying definition anyways. As a provider, you should document changes properly. As a user, you should test anyways.
SoloVer is not "semantic" but the semantics of SemVer are limited anyways: API-compatibility is not enough and it is only a promise of unspecified strength.
SoloVer is simple because it uses a single incremented number.
SoloVer is expressive because it offers a way to postfix something after the version number.
Changelog
- Version 2 in 2024-03-16: Fixing a typo and referencing alternatives.
- Version 1 in 2024-03-14: Initial public version.
Users
- Sublime Text just increments "build versions". No postfixes.
Alternatives
- SemVer:
1.2.3, the standard everybody pretends to use. - CalVer:
2024.03, for people who release on time. - ZeroVer:
0.1.98, SemVer for timid people. - effver:
1.2.3, SemVer with more nuance. - RomVer:
1.2.3, SemVer for romanticists. - HashVer:
2019.07.21.3731a8be0f1a8, for people who release every commit. - PragVer:
1.2.3, SemVer but different. - WendtVer:
0.1.7, SoloVer with more dots and zeros. - GitDate:
2021.03.31.44cf59b1, HashVer truncated even more. - BreakVer:
1.2.3, SemVer with more words about breaking changes. - unnamed:
1.2, in between SemVer and SoloVer. - PVP:
1.2.3, Haskell jumping the gun.
Thanks to all the lobste.rs comments collecting the alternatives.