diff --git a/lib/config/definitions.js b/lib/config/definitions.js index 8888c81a8bc448c8ab2530816f936738aa1cf27b..096acc68dcfe191b9b430f857792ab8666c322a6 100644 --- a/lib/config/definitions.js +++ b/lib/config/definitions.js @@ -317,7 +317,7 @@ const options = [ packageRules: [ { packageNames: ['node'], - groupName: 'node.js', + groupName: 'Node.js', lazyGrouping: false, }, ], @@ -775,7 +775,7 @@ const options = [ stage: 'repository', type: 'json', default: { - groupName: 'node.js', + groupName: 'Node.js', lazyGrouping: false, }, mergeable: true, diff --git a/test/manager/__snapshots__/resolve.spec.js.snap b/test/manager/__snapshots__/resolve.spec.js.snap index 643d46f1b717183c71939924e5c798f6ae08a26c..7c59c549d520ad11717ced9e0cbf52f1ceb78e4b 100644 --- a/test/manager/__snapshots__/resolve.spec.js.snap +++ b/test/manager/__snapshots__/resolve.spec.js.snap @@ -272,7 +272,7 @@ This PR has been generated by [Renovate Bot](https://renovateapp.com).", Object { "content": "# travis", "enabled": false, - "groupName": "node.js", + "groupName": "Node.js", "lazyGrouping": false, "manager": "travis", "packageFile": ".travis.yml", @@ -287,7 +287,7 @@ This PR has been generated by [Renovate Bot](https://renovateapp.com).", "content": "8.9 ", "enabled": true, - "groupName": "node.js", + "groupName": "Node.js", "lazyGrouping": false, "manager": "nvm", "packageFile": ".nvmrc", diff --git a/website/docs/_posts/2017-10-05-configuration-options.md b/website/docs/_posts/2017-10-05-configuration-options.md index e2f4c661821cef8ce05cc6fa7808ec3b0a999977..74ba01f3cb47280f92cba01d801f674e936b75e2 100644 --- a/website/docs/_posts/2017-10-05-configuration-options.md +++ b/website/docs/_posts/2017-10-05-configuration-options.md @@ -511,14 +511,16 @@ Set this to true if you wish to receive one PR for every separate major version ## node -Configuration specific for all node.js version updates (e.g. `.travis.yml`). +Configuration specific for all Node.js version updates (e.g. `engines` field in `package.json`). | name | value | | ------- | --------------------------------------------- | | type | object | -| default | { groupName: 'node.js', lazyGrouping: false } | +| default | { groupName: 'Node.js', lazyGrouping: false } | -Using this configuration option allows you to apply common config and policies across all node.js version updates even if done by different package managers. +Using this configuration option allows you to apply common configuration and policies across all Node.js version updates even if managed by different package managers (`npm`, `yarn`, etc.). + +Check out our [Node.js documentation](https://renovateapp.com/docs/language-support/node) for a comprehsneive explanation of how the `node` option can be used. ## npm @@ -1006,13 +1008,17 @@ This feature is added for people migrating from alternative services who are use ## supportPolicy -Dependency support policy, e.g. used for LTS vs non-LTS etc (node-only) +Dependency support policy, e.g. used for deciding whether to use a [Long-term Support](https://en.wikipedia.org/wiki/Long-term_support) version vs non-LTS version, a combination, etc. | name | value | | ------- | ----- | | type | list | | default | [] | +Language support is limited to those listed below: + +* **Node.js** - [Read our Node.js documentation](https://renovateapp.com/docs/language-support/node#configuring-support-policy) + ## timezone [IANA Time Zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for the repository. diff --git a/website/docs/_posts/2017-12-05-node.md b/website/docs/_posts/2017-12-05-node.md index 46f93c932e6ebdbdc0a48e5d16e70898f3464cd0..2cdfb0495a3f3502f68a832bb5ee1ea73d23bb99 100644 --- a/website/docs/_posts/2017-12-05-node.md +++ b/website/docs/_posts/2017-12-05-node.md @@ -8,19 +8,32 @@ type: Document order: 3 --- -Renovate supports upgrading Node.js versions in `.travis.yml` files. +Renovate can upgrade the [Node.js](https://nodejs.org/en/) runtime used by your project so that you're using the latest bug fixes, performance improvements, security mitigations, etc. that meet your project's unique needs. + +## File Support + +Renovate is capable of managing the Node.js version in the following files: + +* The [`engines`](https://docs.npmjs.com/files/package.json#engines) field in [`package.json`](https://docs.npmjs.com/files/package.json). +* The [`.nvmrc`](https://github.com/creationix/nvm#nvmrc) file for the [Node Version Manager](https://github.com/creationix/nvm). +* The [`node_js`](https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Specifying-Node.js-versions) field in [`.travis.yml`](https://docs.travis-ci.com/user/customizing-the-build/). ## How It Works -1. You must enable Node renovation explicitly in your `renovate.json`: `"node": { "enabled": true }` -2. Optionally, configure a `supportPolicy` (otherwise, the default is LTS): `"supportPolicy": ["lts_latest", "current"]` -3. Renovate will search repositories for a `.travis.yml` in the root directory -4. Existing Node.js versions will be extracted from the `node_js` array if it exists -5. Renovate will replace this with the correct versions array based on your configured `supportPolicy` (defaults to `"lts"`) +Node.js renovation in `package.json > engines` and in `.nvmrc` is enabled by default, if your existing version is pinned. + +To enable `.travis.yml` renovation, you must: + +1. Enable Travis renovation explicitly by setting the following Renovate configuration: `"travis": { "enabled": true }` +2. Optionally, configure a support policy (As documented below). + +When Renovate processes your project's repository it will look for the files listed above and submit a single pull request that upgrades all Node.js versions simulteniously. -## Support Policies +## Configuring Support Policy -Renovate supports the following `supportPolicy` values and associated versions (current as of December 2017): +Renovate supports a [`supportPolicy`](https://renovateapp.com/docs/configuration-reference/configuration-options#supportpolicy) option that can be passed the following values and associated versions (current as of December 2017): + +**Default:** `lts` | supportPolicy | versions | description | | ------------- | -------- | --------------------------------------------------------- | @@ -31,3 +44,13 @@ Renovate supports the following `supportPolicy` values and associated versions ( | lts_latest | 8 | The latest LTS release | The version numbers associated with each support policy will be updated as new versions of Node.js are released, moved to LTS or maintenance, etc. + +For example, to instruct Renovate to upgrade your project to the latest [Long-term Support](https://github.com/nodejs/Release#release-plan) release, you can use the following configuration: + +```json +"supportPolicy": ["lts_latest"] +``` + +It's best to define this support policy inside the `node` configuration object so that it is applied to all Node.js-related files. + +For additional language support see the [`supportPolicy` documentation](https://renovateapp.com/docs/configuration-reference/configuration-options#supportpolicy).