Hacker News Discussion · Edit on Github · Website
Pragmatic versioning optimizes for communicating changes to a package to package consumers, while retaining simple semantics for package maintainers.
Given a version number BIGRELEASE.ANNOUNCE.INCREMENT, increment the:
Effective package authors must maintain old versions of software as well as release new versions, while efficiently communicating expectations and changes to their package consuemrs. Existing versioning schemes like semver are excellent at informing end users on how to upgrade software, but do not allow package authors to efficiently communicate what will be maintained, how to get the most appropriate version for the end user, and automatically release software without worrying about explicitly labeling each change.
Pragmatic versioning looks at the issues that package authors face and addresses these first:
BIGRELEASE
- This is a "brand" number, meaning it is mostly used for marketing purposes. It indicates
a substantial release that can be accompanied with a maintenance period.ANNOUNCE
- Major feature(s) or changes in behavior that may facilitate an announcement. This can be done
on a scheduled basis (e.g. weekly) or after a substantial number of contributions are made that indicate
it's time to release a changelog to package consumers.INCREMENT
- Any contribution will increment by default.Package consumers can still have the majority of the benefits of semantic versioning through the usage
of tagged or computed versions. For example, npm add somepackage@lts
, npm add somepackage@latest-unstable
, npm add somepackage@canary
more accurately represents the intent of the user.
These tagged releases can be also be computed using commit analysis or explicit cutting. In this way, package authors have the flexibility to serve users with different risk and upgrade tolerances.
In practice, package consumers want to stay up to date/compatible with the latest BIGRELEASE, consuming some breaking changes in their upgrade process. It is necessary for package consumers to take some breaking changes as part of their upgrade process, because in practice only large releases are best maintained for security.
Furthermore, the introduction of static analysis tools to many previously
NodeJS has created a timed release versioning system as described below:
Major Node.js versions enter Current release status for six months, which gives library authors time to add support for them. After six months, odd-numbered releases (9, 11, etc.) become unsupported, and even-numbered releases (10, 12, etc.) move to Active LTS status and are ready for general use. LTS release status is "long-term support", which typically guarantees that critical bugs will be fixed for a total of 30 months. Production applications should only use Active LTS or Maintenance LTS releases.
This mode of versioning gives great expectations to their users and is compatible with a Pragmatic Versioning system, but incompatible with Semantic Versioning.
NextJS uses pragmatic versioning scheme in combination with a semantic release scheme.
v14.0.4-canary.27