Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Semantic versioning

semantic versioning, based on conventional commits uses a well defined scheme for versioning software.

A semantic version has the form of <major>.<minor>.<patch>, e.g. 1.4.3, whereas:

  • a major version indicates incompatible API / application changes - in an application project often tied to production releases or to indicate different stages in development.
  • a minor indicates added functionality in a backwards-compatible manner
  • a patch version indicates the addition of backwards-compatible bug fixes.

Tools

Tooling support is provided by standard-version, that aids the generation of standard versions, including related artifacts like changelog,

Getting started

npm install standard-version --save-dev
# or
yarn add standard-version --dev

Configuration

// package.json
{
  "scripts": {
    "release": "standard-version"
  }
}

Usage examples

Running yarn release will automatically:

  1. update the version field in package.json
  2. create a commit (including commit-message following the standard defined commit messages)
  3. create a tag with version
  4. push commit and tag to remote

For version detection semantic-version will consider the following commit types:

  • fix will result in a patch version bump
  • feat will result in a minor version bump
  • adding BREAKING CHANGE: <description of breaking change> will result in a major version bump

If necessary (e.g., for applications that usually do not create breaking changes) it is also possible to use --release-as <major|minor|patch> to force a major bump

ADR

  • ADR-0004 - Use standard-version for versioning