Choose a versioning scheme
This guide shows how to pick the versioning scheme of a scope and set it up.
| Scheme | Version | Next version from | Fits |
|---|---|---|---|
| SemVer | 1.2.3 |
The highest level of the changes | Libraries and packages others depend on |
| CalVer | 2026.01.01.0 |
The date of the release | Apps and services |
Use semantic versioning
Section titled “Use semantic versioning”npm i -D @unirelman/plugin-semverpnpm add -D @unirelman/plugin-semveryarn add -D @unirelman/plugin-semverbun add -d @unirelman/plugin-semverimport { createSemverPlugin } from "@unirelman/plugin-semver";
// ...plugins: [ // ... createSemverPlugin(),],The current version of each scope is a SemVer version, such as "version": "1.0.0" in package.json. See the SemVer plugin reference.
Use calendar versioning
Section titled “Use calendar versioning”npm i -D @unirelman/plugin-calverpnpm add -D @unirelman/plugin-calveryarn add -D @unirelman/plugin-calverbun add -d @unirelman/plugin-calverimport { createCalverPlugin } from "@unirelman/plugin-calver";
// ...plugins: [ // ... createCalverPlugin(),],The current version of each scope is a calendar version from the start, such as "version": "2026.01.01.0" in package.json. To version by month, such as 2026.01.0:
createCalverPlugin({ granularity: "month" });The npm registry accepts SemVer versions only. Mark calendar-versioned packages as private, so the npm plugin manages their version and skips them when publishing:
{ "private": true}See the CalVer plugin reference.