feat: group:Nodejs (#9469)

Remove hardcoded Node.js rules from docker extract and instead add group:nodeJs to group:recommended

BREAKING CHANGE: node images founds in Dockerfiles will no longer have hardcoded commitMessageTopic. Add group:Nodejs or config:base to extends for backwards compatibility.
This commit is contained in:
Rhys Arkins 2021-04-09 16:15:43 +02:00
parent b22a0355aa
commit 3a1980811c
9 changed files with 14 additions and 39 deletions

View file

@ -29,10 +29,24 @@ const staticGroups = {
}, },
], ],
}, },
nodeJs: {
description:
"Group anything that looks like Node.js together so that it's updated together",
packageRules: [
{
matchDatasources: ['docker'],
matchPackageNames: ['node'],
matchPackagePatterns: ['/node$'],
excludePackageNames: ['calico/node'],
commitMessageTopic: 'Node.js',
},
],
},
recommended: { recommended: {
description: description:
'Use curated list of recommended non-monorepo package groupings', 'Use curated list of recommended non-monorepo package groupings',
extends: [ extends: [
'group:nodeJs',
'group:allApollographql', 'group:allApollographql',
'group:fortawesome', 'group:fortawesome',
'group:fusionjs', 'group:fusionjs',

View file

@ -4,7 +4,6 @@ exports[`manager/circleci/extract extractPackageFile() extracts image without le
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "14.8.0", "currentValue": "14.8.0",
"datasource": "docker", "datasource": "docker",
@ -20,7 +19,6 @@ exports[`manager/circleci/extract extractPackageFile() extracts multiple image l
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": undefined, "currentValue": undefined,
"datasource": "docker", "datasource": "docker",
@ -31,7 +29,6 @@ Array [
}, },
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "4", "currentValue": "4",
"datasource": "docker", "datasource": "docker",
@ -42,7 +39,6 @@ Array [
}, },
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "6", "currentValue": "6",
"datasource": "docker", "datasource": "docker",
@ -53,7 +49,6 @@ Array [
}, },
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "8.9.0", "currentValue": "8.9.0",
"datasource": "docker", "datasource": "docker",

View file

@ -12,7 +12,6 @@ Array [
}, },
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "12", "currentValue": "12",
"datasource": "docker", "datasource": "docker",

View file

@ -12,7 +12,6 @@ Array [
}, },
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "10.0.0", "currentValue": "10.0.0",
"datasource": "docker", "datasource": "docker",
@ -148,7 +147,6 @@ Array [
}, },
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "10.0.0", "currentValue": "10.0.0",
"datasource": "docker", "datasource": "docker",

View file

@ -4,7 +4,6 @@ exports[`manager/dockerfile/extract extractPackageFile() detects ["stage"] and [
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "8.15.1-alpine", "currentValue": "8.15.1-alpine",
"datasource": "docker", "datasource": "docker",
@ -123,7 +122,6 @@ exports[`manager/dockerfile/extract extractPackageFile() extracts images on adja
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": "sha256:d743b4141b02fcfb8beb68f92b4cd164f60ee457bf2d053f36785bf86de16b0d", "currentDigest": "sha256:d743b4141b02fcfb8beb68f92b4cd164f60ee457bf2d053f36785bf86de16b0d",
"currentValue": "8.11.3-alpine", "currentValue": "8.11.3-alpine",
"datasource": "docker", "datasource": "docker",
@ -147,7 +145,6 @@ exports[`manager/dockerfile/extract extractPackageFile() extracts multiple FROM
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "6.12.3", "currentValue": "6.12.3",
"datasource": "docker", "datasource": "docker",
@ -185,7 +182,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles abnormal spacin
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "8.7.0", "currentValue": "8.7.0",
"datasource": "docker", "datasource": "docker",
@ -214,7 +210,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles comments 1`] =
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": undefined, "currentValue": undefined,
"datasource": "docker", "datasource": "docker",
@ -229,7 +224,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles custom hosts 1`
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "8", "currentValue": "8",
"datasource": "docker", "datasource": "docker",
@ -244,7 +238,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles custom hosts an
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "8-alpine", "currentValue": "8-alpine",
"datasource": "docker", "datasource": "docker",
@ -259,7 +252,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles custom hosts wi
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "8", "currentValue": "8",
"datasource": "docker", "datasource": "docker",
@ -274,7 +266,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles custom hosts wi
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "8", "currentValue": "8",
"datasource": "docker", "datasource": "docker",
@ -289,7 +280,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles custom hosts wi
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": undefined, "currentValue": undefined,
"datasource": "docker", "datasource": "docker",
@ -304,7 +294,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles digest 1`] = `
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": "sha256:eb85fc5b1198f5e1ec025ea07586bdbbf397e7d82df66c90d7511f533517e063", "currentDigest": "sha256:eb85fc5b1198f5e1ec025ea07586bdbbf397e7d82df66c90d7511f533517e063",
"currentValue": undefined, "currentValue": undefined,
"datasource": "docker", "datasource": "docker",
@ -319,7 +308,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles from as 1`] = `
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "8.9.0-alpine", "currentValue": "8.9.0-alpine",
"datasource": "docker", "datasource": "docker",
@ -334,7 +322,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles naked dep 1`] =
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": undefined, "currentValue": undefined,
"datasource": "docker", "datasource": "docker",
@ -349,7 +336,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles namespaced imag
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "8", "currentValue": "8",
"datasource": "docker", "datasource": "docker",
@ -364,7 +350,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles tag 1`] = `
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "8.9.0-alpine", "currentValue": "8.9.0-alpine",
"datasource": "docker", "datasource": "docker",
@ -379,7 +364,6 @@ exports[`manager/dockerfile/extract extractPackageFile() handles tag and digest
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": "sha256:eb85fc5b1198f5e1ec025ea07586bdbbf397e7d82df66c90d7511f533517e063", "currentDigest": "sha256:eb85fc5b1198f5e1ec025ea07586bdbbf397e7d82df66c90d7511f533517e063",
"currentValue": "8.9.0", "currentValue": "8.9.0",
"datasource": "docker", "datasource": "docker",
@ -409,7 +393,6 @@ exports[`manager/dockerfile/extract extractPackageFile() is case insensitive 1`]
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": undefined, "currentValue": undefined,
"datasource": "docker", "datasource": "docker",
@ -424,7 +407,6 @@ exports[`manager/dockerfile/extract extractPackageFile() skips index reference C
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "6.12.3", "currentValue": "6.12.3",
"datasource": "docker", "datasource": "docker",
@ -439,7 +421,6 @@ exports[`manager/dockerfile/extract extractPackageFile() skips named multistage
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "6.12.3", "currentValue": "6.12.3",
"datasource": "docker", "datasource": "docker",
@ -454,7 +435,6 @@ exports[`manager/dockerfile/extract extractPackageFile() skips named multistage
Array [ Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "6.12.3", "currentValue": "6.12.3",
"datasource": "docker", "datasource": "docker",

View file

@ -48,14 +48,6 @@ export function getDep(
'{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}'; '{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}';
} }
dep.datasource = datasourceDocker.id; dep.datasource = datasourceDocker.id;
if (
dep.depName &&
(dep.depName === 'node' || dep.depName.endsWith('/node')) &&
dep.depName !== 'calico/node'
) {
dep.commitMessageTopic = 'Node.js';
}
if (dep.depName === 'ubuntu') { if (dep.depName === 'ubuntu') {
dep.versioning = ubuntuVersioning.id; dep.versioning = ubuntuVersioning.id;
} }

View file

@ -13,7 +13,6 @@ Array [
}, },
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": "sha256:36adc17e9cceab32179d3314da9cb9c737ffb11f0de4e688f407ad6d9ca32201", "currentDigest": "sha256:36adc17e9cceab32179d3314da9cb9c737ffb11f0de4e688f407ad6d9ca32201",
"currentValue": "10.0.0", "currentValue": "10.0.0",
"datasource": "docker", "datasource": "docker",

View file

@ -67,7 +67,6 @@ Array [
}, },
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": "sha256:7b65413af120ec5328077775022c78101f103258a1876ec2f83890bce416e896", "currentDigest": "sha256:7b65413af120ec5328077775022c78101f103258a1876ec2f83890bce416e896",
"currentValue": "6", "currentValue": "6",
"datasource": "docker", "datasource": "docker",

View file

@ -148,7 +148,6 @@ Array [
"deps": Array [ "deps": Array [
Object { Object {
"autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}", "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
"commitMessageTopic": "Node.js",
"currentDigest": undefined, "currentDigest": undefined,
"currentValue": "12", "currentValue": "12",
"datasource": "docker", "datasource": "docker",