Skip to content

Commit

Permalink
chore: Allow Renovate to update npm tests (#2081)
Browse files Browse the repository at this point in the history
The Renovate `config:base` preset includes the
[`:ignoreModulesAndTests`](https://docs.renovatebot.com/presets-default/#ignoremodulesandtests)
preset, which means that it's ignoring packages under `npm/test`.

This PR

- removes the `config:base` preset (which has been replaced by
[`config:recommended`](https://docs.renovatebot.com/presets-config/#configrecommended)
anyway) and inlines the only preset included in it that we actually need
([`:dependencyDashboard`](https://docs.renovatebot.com/presets-default/#dependencydashboard));
- enables the
[`configMigration`](https://docs.renovatebot.com/configuration-options/#configmigration)
setting so that we get PRs to keep the file up-to-date; and
- adds `packageRules` to configure the Node.js/npm updates.

Signed-off-by: Andrew Haines <haines@cerbos.dev>
  • Loading branch information
haines committed Apr 5, 2024
1 parent 36891ac commit d0c6c46
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"configMigration": true,
"extends": [
"config:base",
"group:allNonMajor",
"schedule:weekly",
":automergeDisabled",
":combinePatchMinorReleases",
":dependencyDashboard",
":gitSignOff",
":renovatePrefix",
":semanticCommitTypeAll(chore)",
Expand Down Expand Up @@ -44,6 +45,25 @@
},
"groupName": "Docker deps",
"groupSlug": "docker-deps"
},
{
"matchManagers": ["nodenv", "npm"],
"groupName": "Node.js deps",
"groupSlug": "node-deps",
"rangeStrategy": "pin"
},
{
"description": "Don't update dependencies for npm test cases (they should be kept set to 'latest' because they're pulled from the private registry)",
"matchFileNames": ["npm/test/cases/*/package.json"],
"matchDepTypes": ["dependencies"],
"enabled": false
},
{
"description": "Don't do major version updates for package managers in npm test cases (each test case targets a specific major version)",
"matchFileNames": ["npm/test/cases/*/package.json"],
"matchDepTypes": ["packageManager"],
"matchUpdateTypes": ["major"],
"enabled": false
}
],
"labels": [
Expand Down

0 comments on commit d0c6c46

Please sign in to comment.