2.4 KiB
title | description |
---|---|
Node.js Versions | Node.js versions support in Renovate |
Node.js Versions
Renovate can upgrade the Node.js runtime used by your project. This way you're using the latest bug fixes, performance improvements, security mitigations, etc.
LTS codenames
Renovate understands codenames for Node.js LTS releases and will offer upgrades for them (e.g. from fermium
to gallium
) as long as the node
versioning scheme is being used.
File Support
Renovate can manage the Node.js version in the following files:
- The
engines
field inpackage.json
- The
volta
field inpackage.json
- The
.nvmrc
file for the Node Version Manager - The
.node-version
file for the nodenv environment manager - The
.tool-versions
file for the asdf version manager - The
.mise.toml
file for the mise version manager - The
node_js
field in.travis.yml
Configuring which version of npm Renovate uses
When binarySource=docker
or binarySource=install
, such as in the Mend Renovate App, Renovate will choose and install an npm
version dynamically.
To control which version or constraint is installed, you should use the engines.npm
property in your package.json
file.
Renovate bot will then use that version constraint for npm when it creates a pull request.
For example, if you want to use at least npm 8.1.0
and also allow newer versions of npm in the 8.x
range, you would put this in your package.json
file:
{
"engines": {
"npm": "^8.1.0"
}
}
Alternatively, the npm version can also be configured via the constraints
option.