Skip to content

Latest commit

 

History

History

magic-zero

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Magic-Zero Plugin

A plugin that closely adheres to semver versioning for 0.0.x and 0.x.y releases.

In the default auto experience the patch, minor, and major only increment the corresponding digit in the version. The rules for incrementing version < 1.0.0 are not as intuitive or agreed upon. This plugin adds a new label (graduate) and changes auto's behavior to do the following:

0.0.x:

Starting version: 0.0.1

patch => 0.0.2
minor => 0.0.2
major => 0.0.2
graduate => 0.1.0

0.x.y:

Starting version: 0.1.0

patch => 0.1.1
minor => 0.1.1
major => 0.2.0
graduate => 1.0.0

Once you're project is >= 1.0.0 this plugin effectively does nothing.

Installation

This plugin is not included with the auto CLI installed via NPM. To install:

npm i --save-dev @auto-it/magic-zero
# or
yarn add -D @auto-it/magic-zero

Usage

{
  "plugins": [
    "magic-zero"
    // other plugins
  ]
}

Options

label

The label to graduate a version to the next left 0 digit.

{
  "plugins": [
    ["magic-zero", { "label": "super major" }]
    // other plugins
  ]
}

If you want to customize the label color/description you must define the label in your .autorc.

{
  "plugins": [
    ["magic-zero", { "label": "super major" }]
    // other plugins
  ],
  "labels": [
    {
      "name": "super major",
      "description": "Graduate a version to the next left 0 digit",
      "releaseType": "major",
      "color": "#000"
    }
  ]
}