# Version Number

Key: `technology.development.version`

Software or document version in semantic versioning format (e.g., 1.2.3) or variant formats (e.g., v1.2.3, 1.2.3-alpha, 1.2.3+build). Resolves to VARCHAR.

Page: <https://meridian.online/docs/projects/finetype/types/technology/development/version>

Samples: `1.2.3`, `v1.2.3`, `1.2.3-alpha`, `1.2.3-beta.1`, `1.2.3+build.123`

## Background

### Origin

The Semantic Versioning specification was originally authored by Tom Preston-Werner.[[1]](https://semver.org/) Semantic Versioning was proposed as a solution to what its specification calls dependency hell, where version lock or version promiscuity stop a project moving forward safely.[[1]](https://semver.org/) The Semantic Versioning specification says its rules are based on pre-existing widespread common practices in both closed and open-source software.[[1]](https://semver.org/)

Under Semantic Versioning, the major version is incremented for incompatible API changes.[[1]](https://semver.org/) Under Semantic Versioning, the minor version is incremented for functionality added in a backward compatible manner.[[1]](https://semver.org/) Under Semantic Versioning, the patch version is incremented for backward compatible bug fixes.[[1]](https://semver.org/) Semantic Versioning reserves major version zero (0.y.z) for initial development, when anything may change at any time.[[1]](https://semver.org/)

Semantic Versioning 2.0.0 lets a pre-release version be marked by appending a hyphen and a series of dot-separated identifiers after the patch version, as in 1.0.0-alpha.1.[[1]](https://semver.org/) Semantic Versioning 2.0.0 lets build metadata be marked by appending a plus sign and a series of dot-separated identifiers, as in 1.0.0+20130313144700.[[1]](https://semver.org/) The Semantic Versioning FAQ says v1.2.3 is not a semantic version, though prefixing a version with v is a common way in English to show that it is a version number.[[1]](https://semver.org/) Wikipedia describes semantic versioning as a commonly adopted scheme for version numbers.[[2]](https://en.wikipedia.org/wiki/Software_versioning)

### Use

Cargo, Rust's package manager, formats a package's version field according to the SemVer specification.[[3]](https://doc.rust-lang.org/cargo/reference/manifest.html) npm recommends that package owners publish new versions with a version number that follows the semantic versioning spec.[[4]](https://docs.npmjs.com/about-semantic-versioning/) In Go modules, each version starts with the letter v, followed by a semantic version.[[5]](https://go.dev/ref/mod) The Python packaging version specification says semantic versions containing a hyphen or a plus sign are not permitted in the public version field.[[6]](https://packaging.python.org/en/latest/specifications/version-specifiers/) The Python packaging version specification allows a version to be preceded by a single literal v, which must be ignored.[[6]](https://packaging.python.org/en/latest/specifications/version-specifiers/) Check which ecosystem a version column came from before you assume the full SemVer grammar applies to every value in it. (Meridian's view)

Semantic Versioning requires each element to increase numerically, so 1.9.0 is followed by 1.10.0.[[1]](https://semver.org/) Semantic Versioning compares major, minor and patch versions numerically when ordering versions.[[1]](https://semver.org/) Under Semantic Versioning, a pre-release version has lower precedence than the normal version, so 1.0.0-alpha comes before 1.0.0.[[1]](https://semver.org/) Semantic Versioning says build metadata must be ignored when determining version precedence.[[1]](https://semver.org/) Keep a version column as text, and sort or compare it by splitting out the three numbers rather than ordering the strings or reading them as decimals. (Meridian's view) Strip a leading v into a separate step when you parse, but keep the original string alongside the parsed parts. (Meridian's view)

The Semantic Versioning specification publishes two suggested regular expressions for checking a SemVer string, one with named groups and one with numbered groups.[[1]](https://semver.org/) The Semantic Versioning FAQ says the specification sets no size limit on the version string, though specific systems may impose their own.[[1]](https://semver.org/) If you validate strictly, start from the specification's own regular expression rather than a hand-written one. (Meridian's view)

### Where you'll meet it

Kubernetes expresses its versions as x.y.z, following Semantic Versioning terminology.[[7]](https://kubernetes.io/releases/version-skew-policy/)

## Sources

1. [Semantic Versioning 2.0.0 \| Semantic Versioning](https://semver.org/) — standard
2. [Software versioning - Wikipedia](https://en.wikipedia.org/wiki/Software_versioning) — secondary source
3. [The Manifest Format - The Cargo Book](https://doc.rust-lang.org/cargo/reference/manifest.html) — documentation
4. [About semantic versioning \| npm Docs](https://docs.npmjs.com/about-semantic-versioning/) — documentation
5. [Go Modules Reference - The Go Programming Language](https://go.dev/ref/mod) — documentation
6. [Version specifiers - Python Packaging User Guide](https://packaging.python.org/en/latest/specifications/version-specifiers/) — documentation
7. [Version Skew Policy \| Kubernetes](https://kubernetes.io/releases/version-skew-policy/) — organisation
