Pre-release and Build Metadata
What you'll learn: How alpha, beta, release candidate, and build identifiers work in semantic versioning schemes.
Beyond Major.Minor.Patch
You already know semantic versioning uses three numbers (like 2.4.1), but production-ready releases aren't the only versions you'll encounter. Software often passes through development stages before becoming stable, and semantic versioning provides optional identifiers to track these phases and build details.
Pre-release Identifiers
Pre-release versions are marked with a hyphen followed by dot-separated identifiers: 1.0.0-alpha, 1.0.0-beta.1, 1.0.0-rc.2.
Common pre-release labels:
- alpha – Early, unstable version for internal testing; features may be incomplete
- beta – Feature-complete but needs testing; bugs expected
- rc (release candidate) – Nearly final; undergoing final validation before release
These versions always precede their base version. For example, 1.0.0-alpha comes before 1.0.0-beta, which comes before 1.0.0.
Think of it like movie production: alpha is rough footage, beta is the director's cut shown to test audiences, rc is the final cut awaiting approval, and the final version is what hits theaters.
Build Metadata
Build metadata appears after a plus sign: 1.0.0+20240115, 1.0.0-beta.2+build.452.
This identifies which specific build produced the artifact—useful for tracking exactly which commit, timestamp, or build number created a particular binary. Importantly, build metadata does not affect version precedence: 1.0.0+build.1 and 1.0.0+build.2 are considered the same version for dependency resolution.
Why This Matters
When declaring dependencies with version ranges, tools know that 1.0.0-beta satisfies different constraints than 1.0.0. Your lock file might capture 1.0.0+build.452 for exact reproducibility while your version specifier accepts any 1.0.0 build.
Key Takeaway: Pre-release identifiers (after -) signal development stage and affect version ordering, while build metadata (after +) provides traceability without affecting version comparison or dependency resolution.