Course contentsShow
← JavaScript
Lesson 2522 of 2,72351. Package ManagementFree lesson

Pre-release Versions

Using alpha, beta, and rc suffixes like 1.0.0-alpha.1 to indicate unstable or testing versions.

Pre-release Versions

What you'll learn: How to use pre-release suffixes like alpha, beta, and rc to signal that a package version is unstable or still in testing.


When you're developing a new feature or major change, you often want to release it for testing before making it official. Semantic Versioning handles this with pre-release identifiers—labels appended to version numbers using a hyphen.

The Pre-release Format

A pre-release version looks like this:

1.0.0-alpha.1

The pattern is MAJOR.MINOR.PATCH-prerelease.number. Common pre-release labels include:

  • alpha: Very early, unstable code. Expect bugs and breaking changes.
  • beta: More stable than alpha, feature-complete but still being tested.
  • rc (release candidate): Nearly ready for production. Final testing phase.

You can also append a number (.1, .2, etc.) to indicate iterations within that pre-release phase.

Why This Matters

Pre-release versions are treated as less stable than their base version. In NPM, if you install a package without specifying a version:

npm install some-package

...you'll never get a pre-release version by default. You must explicitly request it:

npm install some-package@1.0.0-beta.3

This protects users from accidentally installing unstable code while letting early adopters and testers opt in.

Ordering Example

Versions sort like this:

  1. 1.0.0-alpha.1
  2. 1.0.0-alpha.2
  3. 1.0.0-beta.1
  4. 1.0.0-rc.1
  5. 1.0.0 (the stable release)

Each pre-release comes before the actual 1.0.0 release.

Key Takeaway: Pre-release versions use suffixes like -alpha.1, -beta.2, or -rc.1 to mark unstable versions that won't be installed by default, keeping experimental code separate from production releases.