Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @semabit/release-it-bumper with all npm packages installed. Try it out:

var releaseItBumper = require("@semabit/release-it-bumper")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@semabit/release-it-bumper v1.3.0

Version read/write plugin for release-it

Version read/write plugin for release-it

This plugin reads and/or writes version/manifest files.

# npm
npm install --save-dev @semabit/release-it-bumper

# yarn
yarn add --dev @semabit/release-it-bumper

In release-it config:

"plugins": {
  "@semabit/release-it-bumper": {
    "out": "manifest.json"
  }
}

for .yaml file:

"plugins": {
  "@semabit/release-it-bumper": {
    "out": { "file": "version.yaml", "type": "application/x-yaml" }
  }
}

In case the in option is used, the version from this file will take precedence over the version from package.json or the latest Git tag (which release-it uses by default).

The default type is application/json, but text/plain and application/x-yaml are also supported. In that case the whole file is used to read and/or write the version.

"plugins": {
  "@semabit/release-it-bumper": {
    "in": { "file": "VERSION", "type": "text/plain" },
    "out": { "file": "VERSION", "type": "text/plain" }
  }
}
"plugins": {
  "@semabit/release-it-bumper": {
    "in": { "file": "version.yaml", "type": "application/x-yaml" },
    "out": { "file": "version.yaml", "type": "application/x-yaml" }
  }
}

The out option can also be an array of files:

"plugins": {
  "@semabit/release-it-bumper": {
    "out": ["manifest.json", "bower.json", { "file": "version.yaml", "type": "application/x-yaml" }]
  }
}

The path option (default: "version") can be used to change a different property. the following example will set the deeper.current property to the new version in manifest.json. Also possible to define the path for yaml files:

"plugins": {
  "@semabit/release-it-bumper": {
    "out": [
      { "file": "manifest.json", "path": "deeper.current" },
      { "file": "version.yaml", "type": "application/x-yaml", "path": "parameters['app.version']" }
    ]
  }
}
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free