Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 2.32 KB

node-version.md

File metadata and controls

52 lines (31 loc) · 2.32 KB

Node version requirement

semantic-release is written using the latest ECMAScript 2017 features, without transpilation which requires requires Node version 8 or higher.

semantic-release is meant to be used in a CI environment as a development support tool, not as a production dependency. Therefore the only constraint is to run the semantic-release in a CI environment providing Node 8 or higher.

See our Node Support Policy for our long-term promise regarding Node version support.

Recommended solution

Run at least one CI job with Node >= 8

The recommended approach is to run the semantic-release command from a CI job running on Node 8 or higher. This can either be a job used by your project to test on Node 8 or a dedicated job for the release steps.

See CI configuration and CI configuration recipes for more details.

Alternative solutions

Use npx

npx is a CLI to execute npm binaries. It is bundled with npm >= 5.4, or can be installed via npm install -g npx.

npx can be used to download the Node 8 package published on npm and use it to execute the semantic-release command.

If you are using a local semantic-release installation:

$ npm install -g npx && npx -p node@8 -c "npm run semantic-release"

If you are using a global semantic-release installation:

# For global semantic-release install
$ npm install -g semantic-release npx && npx -p node@8 -c "semantic-release"

Use nvm

If your CI environment provides nvm you can use it to switch to Node 8 before running the semantic-release command.

If you are using a local semantic-release installation:

$ nvm install 8 && npm run semantic-release

If you are using a global semantic-release installation:

$ nvm install 8 && npm install -g semantic-release && semantic-release