diff --git a/lib/config/presets/internal/compatibility.ts b/lib/config/presets/internal/compatibility.ts index 46879ef3f47f4c042cb918206e496d61ce87fb97..57e12a8d82fb2e45af2cc8cf51dd818a3a0a0e25 100644 --- a/lib/config/presets/internal/compatibility.ts +++ b/lib/config/presets/internal/compatibility.ts @@ -1,15 +1,17 @@ import type { Preset } from '../types'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const presets: Record<string, Preset> = { additionalBranchPrefix: { - description: - 'Backwards-compatibility preset to restore `additionalBranchPrefix` settings for multiple managers which were removed in Renovate `v25`.', buildkite: { additionalBranchPrefix: 'buildkite-', }, cargo: { additionalBranchPrefix: 'rust-', }, + description: + 'Backwards-compatibility preset to restore `additionalBranchPrefix` settings for multiple managers which were removed in Renovate `v25`.', docker: { additionalBranchPrefix: 'docker-', }, @@ -18,8 +20,8 @@ export const presets: Record<string, Preset> = { }, packageRules: [ { - matchDatasources: ['helm'], additionalBranchPrefix: 'helm-', + matchDatasources: ['helm'], }, ], }, diff --git a/lib/config/presets/internal/config.ts b/lib/config/presets/internal/config.ts index eb37e783a39f13e9e14ca21833e266f83a4871fc..70463f1e0397fbe9e912f4acf4854299b833b1a5 100644 --- a/lib/config/presets/internal/config.ts +++ b/lib/config/presets/internal/config.ts @@ -1,5 +1,7 @@ import type { Preset } from '../types'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const presets: Record<string, Preset> = { base: { description: 'Default base configuration for all languages.', @@ -26,7 +28,6 @@ export const presets: Record<string, Preset> = { semverAllMonthly: { description: 'Preserve SemVer ranges and update everything together once a month.', - separateMajorMinor: false, extends: [ ':preserveSemverRanges', 'group:all', @@ -34,8 +35,9 @@ export const presets: Record<string, Preset> = { ':maintainLockFilesMonthly', ], lockFileMaintenance: { - extends: ['group:all'], commitMessageAction: 'Update', + extends: ['group:all'], }, + separateMajorMinor: false, }, }; diff --git a/lib/config/presets/internal/docker.ts b/lib/config/presets/internal/docker.ts index 52eca84284a7f46867d50a0fd0b3ff5ff2fb9af1..3709be75a3f8a2c487a99b65ae37d526fd6d829a 100644 --- a/lib/config/presets/internal/docker.ts +++ b/lib/config/presets/internal/docker.ts @@ -1,7 +1,12 @@ import type { Preset } from '../types'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const presets: Record<string, Preset> = { disable: { + circleci: { + enabled: false, + }, description: 'Disable Docker updates.', docker: { enabled: false, @@ -9,27 +14,24 @@ export const presets: Record<string, Preset> = { 'docker-compose': { enabled: false, }, - circleci: { - enabled: false, - }, }, - enableMajor: { - description: 'Enable Docker `major` updates.', + disableMajor: { + description: 'Disable Docker `major` updates.', packageRules: [ { + enabled: false, matchDatasources: ['docker'], matchUpdateTypes: ['major'], - enabled: true, }, ], }, - disableMajor: { - description: 'Disable Docker `major` updates.', + enableMajor: { + description: 'Enable Docker `major` updates.', packageRules: [ { + enabled: true, matchDatasources: ['docker'], matchUpdateTypes: ['major'], - enabled: false, }, ], }, diff --git a/lib/config/presets/internal/group.ts b/lib/config/presets/internal/group.ts index 4cebf93d9795393acde4d713e91e907ee9508968..6cba5a2e767f45fa33355a1d927f8f19979be3cd 100644 --- a/lib/config/presets/internal/group.ts +++ b/lib/config/presets/internal/group.ts @@ -3,107 +3,43 @@ import * as monorepos from './monorepo'; const nonPinUpdateTypes = ['digest', 'patch', 'minor', 'major']; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + const staticGroups = { all: { description: 'Group all updates together.', groupName: 'all dependencies', - separateMajorMinor: false, groupSlug: 'all', - packageRules: [ - { - matchPackagePatterns: ['*'], - groupName: 'all dependencies', - groupSlug: 'all', - }, - ], lockFileMaintenance: { enabled: false, }, - }, - allNonMajor: { - description: 'Group all `minor` and `patch` updates together.', packageRules: [ { + groupName: 'all dependencies', + groupSlug: 'all', matchPackagePatterns: ['*'], - matchUpdateTypes: ['minor', 'patch'], - groupName: 'all non-major dependencies', - groupSlug: 'all-minor-patch', }, ], + + separateMajorMinor: false, }, - nodeJs: { - description: - "Group anything that looks like Node.js together so that it's updated together.", + allApollographql: { + description: 'Group all packages published by Apollo GraphQL together.', packageRules: [ { - matchDatasources: ['docker'], - matchPackageNames: ['node'], - matchPackagePatterns: ['/node$'], - excludePackageNames: ['calico/node', 'kindest/node'], - commitMessageTopic: 'Node.js', + extends: 'packages:apollographql', + groupName: 'Apollo GraphQL packages', }, ], }, - recommended: { - description: - 'Use curated list of recommended non-monorepo package groupings.', - extends: [ - 'group:nodeJs', - 'group:allApollographql', - 'group:codemirror', - 'group:fortawesome', - 'group:fusionjs', - 'group:glimmer', - 'group:goOpenapi', - 'group:hibernateCore', - 'group:hibernateValidator', - 'group:hibernateOgm', - 'group:hibernateCommons', - 'group:illuminate', - 'group:jekyllEcosystem', - 'group:jestPlusTSJest', - 'group:jestPlusTypes', - 'group:jwtFramework', - 'group:kubernetes', - 'group:phpstan', - 'group:polymer', - 'group:resilience4j', - 'group:rubyOnRails', - 'group:rubyOmniauth', - 'group:socketio', - 'group:springAmqp', - 'group:springAndroid', - 'group:springBatch', - 'group:springBoot', - 'group:springCloud', - 'group:springCore', - 'group:springData', - 'group:springHateoas', - 'group:springIntegration', - 'group:springKafka', - 'group:springLdap', - 'group:springMobile', - 'group:springOsgi', - 'group:springRestDocs', - 'group:springRoo', - 'group:springScala', - 'group:springSecurity', - 'group:springSession', - 'group:springShell', - 'group:springSocial', - 'group:springStatemachine', - 'group:springWebflow', - 'group:springWs', - 'group:symfony', - ], - ignoreDeps: [], - }, - allApollographql: { - description: 'Group all packages published by Apollo GraphQL together.', + allNonMajor: { + description: 'Group all `minor` and `patch` updates together.', packageRules: [ { - extends: 'packages:apollographql', - groupName: 'Apollo GraphQL packages', + groupName: 'all non-major dependencies', + groupSlug: 'all-minor-patch', + matchPackagePatterns: ['*'], + matchUpdateTypes: ['minor', 'patch'], }, ], }, @@ -129,9 +65,9 @@ const staticGroups = { description: '.NET Core Docker containers.', packageRules: [ { + groupName: '.NET Core Docker containers', matchDatasources: ['docker'], matchPackagePrefixes: ['mcr.microsoft.com/dotnet/'], - groupName: '.NET Core Docker containers', }, ], }, @@ -164,23 +100,211 @@ const staticGroups = { }, ], }, + googleapis: { + description: 'Group `googleapis` packages together.', + packageRules: [ + { + extends: 'packages:googleapis', + groupName: 'googleapis packages', + }, + ], + }, + goOpenapi: { + description: 'Group `go-openapi` packages together.', + packageRules: [ + { + groupName: 'go-openapi packages', + groupSlug: 'go-openapi', + matchDatasources: ['go'], + matchPackagePrefixes: ['github.com/go-openapi/'], + }, + ], + }, + hibernateCommons: { + description: 'Group Java Hibernate Commons packages.', + packageRules: [ + { + groupName: 'hibernate commons', + matchPackagePrefixes: ['org.hibernate.common:'], + }, + ], + }, + hibernateCore: { + description: 'Group Java Hibernate Core packages.', + packageRules: [ + { + groupName: 'hibernate core', + matchPackagePrefixes: ['org.hibernate:'], + }, + ], + }, + hibernateOgm: { + description: 'Group Java Hibernate OGM packages.', + packageRules: [ + { + groupName: 'hibernate ogm', + matchPackagePrefixes: ['org.hibernate.ogm:'], + }, + ], + }, + hibernateValidator: { + description: 'Group Java Hibernate Validator packages.', + packageRules: [ + { + groupName: 'hibernate validator', + matchPackagePrefixes: ['org.hibernate.validator:'], + }, + ], + }, illuminate: { description: 'Group PHP Illuminate packages together.', packageRules: [ { - matchPackagePrefixes: ['illuminate/'], groupName: 'illuminate packages', groupSlug: 'illuminate', + matchPackagePrefixes: ['illuminate/'], }, ], }, - symfony: { - description: 'Group PHP Symfony packages together.', + jekyllEcosystem: { + description: 'Group Jekyll and related Ruby packages together.', packageRules: [ { - matchPackagePrefixes: ['symfony/'], - groupName: 'symfony packages', - groupSlug: 'symfony', + groupName: 'jekyll ecosystem packages', + matchSourceUrlPrefixes: [ + 'https://github.com/jekyll/', + 'https://github.com/github/pages-gem', + ], + }, + ], + }, + jestPlusTSJest: { + description: 'Add `ts-jest` `major` update to Jest monorepo.', + packageRules: [ + { + groupName: 'jest monorepo', + matchSourceUrls: ['https://github.com/kulshekhar/ts-jest'], + matchUpdateTypes: ['major'], + }, + ], + }, + jestPlusTypes: { + description: 'Add `@types/jest` update to Jest monorepo.', + packageRules: [ + { + groupName: 'jest monorepo', + matchPackageNames: ['@types/jest'], + matchUpdateTypes: nonPinUpdateTypes, + }, + ], + }, + jsTest: { + description: 'Group JS test packages together.', + packageRules: [ + { + extends: 'packages:jsTest', + groupName: 'JS test packages', + }, + ], + }, + jsTestMonMajor: { + description: 'Group non-major JS test package updates together.', + packageRules: [ + { + extends: 'packages:jsTest', + groupName: 'JS test packages', + matchUpdateTypes: ['minor', 'patch'], + }, + ], + }, + jsUnitTest: { + description: 'Group JavaScript unit test packages together.', + packageRules: [ + { + extends: 'packages:jsUnitTest', + groupName: 'JS unit test packages', + }, + ], + }, + jsUnitTestNonMajor: { + description: + 'Group JavaScipt unit test packages together for non-major updates.', + packageRules: [ + { + extends: 'packages:jsUnitTest', + groupName: 'JS unit test packages', + matchUpdateTypes: ['minor', 'patch'], + }, + ], + }, + jwtFramework: { + description: 'Group JWT Framework packages together.', + packageRules: [ + { + groupName: 'JWT Framework packages', + matchDatasources: ['packagist'], + matchPackagePrefixes: ['web-token/'], + }, + ], + }, + kubernetes: { + description: 'Group Kubernetes packages together.', + packageRules: [ + { + groupName: 'kubernetes packages', + groupSlug: 'kubernetes-go', + matchDatasources: ['go'], + matchPackagePrefixes: [ + 'k8s.io/api', + 'k8s.io/apiextensions-apiserver', + 'k8s.io/apimachinery', + 'k8s.io/apiserver', + 'k8s.io/cli-runtime', + 'k8s.io/client-go', + 'k8s.io/cloud-provider', + 'k8s.io/cluster-bootstrap', + 'k8s.io/code-generator', + 'k8s.io/component-base', + 'k8s.io/controller-manager', + 'k8s.io/cri-api', + // 'k8s.io/csi-api', has not go.mod set up and does not follow the versioning of other repos + 'k8s.io/csi-translation-lib', + 'k8s.io/kube-aggregator', + 'k8s.io/kube-controller-manager', + 'k8s.io/kube-proxy', + 'k8s.io/kube-scheduler', + 'k8s.io/kubectl', + 'k8s.io/kubelet', + 'k8s.io/legacy-cloud-providers', + 'k8s.io/metrics', + 'k8s.io/mount-utils', + 'k8s.io/pod-security-admission', + 'k8s.io/sample-apiserver', + 'k8s.io/sample-cli-plugin', + 'k8s.io/sample-controller', + ], + }, + ], + }, + linters: { + description: 'Group various lint packages together.', + packageRules: [ + { + extends: 'packages:linters', + groupName: 'linters', + }, + ], + }, + nodeJs: { + description: + "Group anything that looks like Node.js together so that it's updated together.", + packageRules: [ + { + commitMessageTopic: 'Node.js', + excludePackageNames: ['calico/node', 'kindest/node'], + matchDatasources: ['docker'], + matchPackageNames: ['node'], + matchPackagePatterns: ['/node$'], }, ], }, @@ -188,9 +312,9 @@ const staticGroups = { description: 'Group PHPStan packages together.', packageRules: [ { + groupName: 'PHPStan packages', matchDatasources: ['packagist'], matchPackagePatterns: ['^phpstan\\/phpstan$', '\\/phpstan-'], - groupName: 'PHPStan packages', }, ], }, @@ -203,48 +327,118 @@ const staticGroups = { }, ], }, - hibernateCore: { - description: 'Group Java Hibernate Core packages.', + postcss: { + description: 'Group PostCSS packages together.', packageRules: [ { - matchPackagePrefixes: ['org.hibernate:'], - groupName: 'hibernate core', + extends: 'packages:postcss', + groupName: 'postcss packages', }, ], }, - hibernateValidator: { - description: 'Group Java Hibernate Validator packages.', + recommended: { + description: + 'Use curated list of recommended non-monorepo package groupings.', + extends: [ + 'group:nodeJs', + 'group:allApollographql', + 'group:codemirror', + 'group:fortawesome', + 'group:fusionjs', + 'group:glimmer', + 'group:goOpenapi', + 'group:hibernateCore', + 'group:hibernateValidator', + 'group:hibernateOgm', + 'group:hibernateCommons', + 'group:illuminate', + 'group:jekyllEcosystem', + 'group:jestPlusTSJest', + 'group:jestPlusTypes', + 'group:jwtFramework', + 'group:kubernetes', + 'group:phpstan', + 'group:polymer', + 'group:resilience4j', + 'group:rubyOnRails', + 'group:rubyOmniauth', + 'group:socketio', + 'group:springAmqp', + 'group:springAndroid', + 'group:springBatch', + 'group:springBoot', + 'group:springCloud', + 'group:springCore', + 'group:springData', + 'group:springHateoas', + 'group:springIntegration', + 'group:springKafka', + 'group:springLdap', + 'group:springMobile', + 'group:springOsgi', + 'group:springRestDocs', + 'group:springRoo', + 'group:springScala', + 'group:springSecurity', + 'group:springSession', + 'group:springShell', + 'group:springSocial', + 'group:springStatemachine', + 'group:springWebflow', + 'group:springWs', + 'group:symfony', + ], + ignoreDeps: [], + }, + resilience4j: { + description: 'Group Java Resilience4j packages.', packageRules: [ { - matchPackagePrefixes: ['org.hibernate.validator:'], - groupName: 'hibernate validator', + groupName: 'resilience4j', + matchPackagePrefixes: ['io.github.resilience4j:'], }, ], }, - hibernateOgm: { - description: 'Group Java Hibernate OGM packages.', + rubyOmniauth: { + description: 'Group OmniAuth packages together.', packageRules: [ { - matchPackagePrefixes: ['org.hibernate.ogm:'], - groupName: 'hibernate ogm', + groupName: 'omniauth packages', + matchDatasources: ['rubygems'], + matchPackagePrefixes: ['omniauth'], }, ], }, - hibernateCommons: { - description: 'Group Java Hibernate Commons packages.', + rubyOnRails: { + description: 'Group Ruby on Rails packages together.', packageRules: [ { - matchPackagePrefixes: ['org.hibernate.common:'], - groupName: 'hibernate commons', + groupName: 'Ruby on Rails packages', + matchDatasources: ['rubygems'], + matchPackageNames: [ + 'actioncable', + 'actionmailbox', + 'actionmailer', + 'actionpack', + 'actiontext', + 'actionview', + 'activejob', + 'activemodel', + 'activerecord', + 'activestorage', + 'activesupport', + 'railties', + 'rails', + ], }, ], }, - resilience4j: { - description: 'Group Java Resilience4j packages.', + socketio: { + description: 'Group socket.io packages.', packageRules: [ { - matchPackagePrefixes: ['io.github.resilience4j:'], - groupName: 'resilience4j', + groupName: 'socket.io packages', + matchPackagePrefixes: ['socket.io'], }, ], }, @@ -280,8 +474,8 @@ const staticGroups = { packageRules: [ { groupName: 'spring boot', - matchPackagePrefixes: ['org.springframework.boot:'], matchPackageNames: ['org.springframework.boot'], + matchPackagePrefixes: ['org.springframework.boot:'], }, ], }, @@ -456,155 +650,32 @@ const staticGroups = { }, ], }, - socketio: { - description: 'Group socket.io packages.', - packageRules: [ - { - groupName: 'socket.io packages', - matchPackagePrefixes: ['socket.io'], - }, - ], - }, - postcss: { - description: 'Group PostCSS packages together.', - packageRules: [ - { - extends: 'packages:postcss', - groupName: 'postcss packages', - }, - ], - }, - jekyllEcosystem: { - description: 'Group Jekyll and related Ruby packages together.', - packageRules: [ - { - matchSourceUrlPrefixes: [ - 'https://github.com/jekyll/', - 'https://github.com/github/pages-gem', - ], - groupName: 'jekyll ecosystem packages', - }, - ], - }, - rubyOnRails: { - description: 'Group Ruby on Rails packages together.', - packageRules: [ - { - matchDatasources: ['rubygems'], - matchPackageNames: [ - 'actioncable', - 'actionmailbox', - 'actionmailer', - 'actionpack', - 'actiontext', - 'actionview', - 'activejob', - 'activemodel', - 'activerecord', - 'activestorage', - 'activesupport', - 'railties', - 'rails', - ], - groupName: 'Ruby on Rails packages', - }, - ], - }, - rubyOmniauth: { - description: 'Group OmniAuth packages together.', - packageRules: [ - { - matchDatasources: ['rubygems'], - matchPackagePrefixes: ['omniauth'], - groupName: 'omniauth packages', - }, - ], - }, - goOpenapi: { - description: 'Group `go-openapi` packages together.', - packageRules: [ - { - matchDatasources: ['go'], - groupName: 'go-openapi packages', - groupSlug: 'go-openapi', - matchPackagePrefixes: ['github.com/go-openapi/'], - }, - ], - }, - kubernetes: { - description: 'Group Kubernetes packages together.', - packageRules: [ - { - matchDatasources: ['go'], - groupName: 'kubernetes packages', - groupSlug: 'kubernetes-go', - matchPackagePrefixes: [ - 'k8s.io/api', - 'k8s.io/apiextensions-apiserver', - 'k8s.io/apimachinery', - 'k8s.io/apiserver', - 'k8s.io/cli-runtime', - 'k8s.io/client-go', - 'k8s.io/cloud-provider', - 'k8s.io/cluster-bootstrap', - 'k8s.io/code-generator', - 'k8s.io/component-base', - 'k8s.io/controller-manager', - 'k8s.io/cri-api', - // 'k8s.io/csi-api', has not go.mod set up and does not follow the versioning of other repos - 'k8s.io/csi-translation-lib', - 'k8s.io/kube-aggregator', - 'k8s.io/kube-controller-manager', - 'k8s.io/kube-proxy', - 'k8s.io/kube-scheduler', - 'k8s.io/kubectl', - 'k8s.io/kubelet', - 'k8s.io/legacy-cloud-providers', - 'k8s.io/metrics', - 'k8s.io/mount-utils', - 'k8s.io/pod-security-admission', - 'k8s.io/sample-apiserver', - 'k8s.io/sample-cli-plugin', - 'k8s.io/sample-controller', - ], - }, - ], - }, - googleapis: { - description: 'Group `googleapis` packages together.', - packageRules: [ - { - extends: 'packages:googleapis', - groupName: 'googleapis packages', - }, - ], - }, - linters: { - description: 'Group various lint packages together.', + symfony: { + description: 'Group PHP Symfony packages together.', packageRules: [ { - extends: 'packages:linters', - groupName: 'linters', + groupName: 'symfony packages', + groupSlug: 'symfony', + matchPackagePrefixes: ['symfony/'], }, ], }, - jsUnitTest: { - description: 'Group JavaScript unit test packages together.', + test: { + description: 'Group all test packages together.', packageRules: [ { - extends: 'packages:jsUnitTest', - groupName: 'JS unit test packages', + extends: 'packages:test', + groupName: 'test packages', }, ], }, - jsUnitTestNonMajor: { - description: - 'Group JavaScipt unit test packages together for non-major updates.', + testNonMajor: { + description: 'Group all non-major test package updates together.', packageRules: [ { - extends: 'packages:jsUnitTest', + extends: 'packages:test', + groupName: 'test packages', matchUpdateTypes: ['minor', 'patch'], - groupName: 'JS unit test packages', }, ], }, @@ -622,76 +693,8 @@ const staticGroups = { packageRules: [ { extends: 'packages:unitTest', - matchUpdateTypes: ['minor', 'patch'], groupName: 'unit test packages', - }, - ], - }, - jsTest: { - description: 'Group JS test packages together.', - packageRules: [ - { - extends: 'packages:jsTest', - groupName: 'JS test packages', - }, - ], - }, - jsTestMonMajor: { - description: 'Group non-major JS test package updates together.', - packageRules: [ - { - extends: 'packages:jsTest', - matchUpdateTypes: ['minor', 'patch'], - groupName: 'JS test packages', - }, - ], - }, - test: { - description: 'Group all test packages together.', - packageRules: [ - { - extends: 'packages:test', - groupName: 'test packages', - }, - ], - }, - testNonMajor: { - description: 'Group all non-major test package updates together.', - packageRules: [ - { - extends: 'packages:test', matchUpdateTypes: ['minor', 'patch'], - groupName: 'test packages', - }, - ], - }, - jestPlusTSJest: { - description: 'Add `ts-jest` `major` update to Jest monorepo.', - packageRules: [ - { - matchSourceUrls: ['https://github.com/kulshekhar/ts-jest'], - matchUpdateTypes: ['major'], - groupName: 'jest monorepo', - }, - ], - }, - jestPlusTypes: { - description: 'Add `@types/jest` update to Jest monorepo.', - packageRules: [ - { - matchPackageNames: ['@types/jest'], - matchUpdateTypes: nonPinUpdateTypes, - groupName: 'jest monorepo', - }, - ], - }, - jwtFramework: { - description: 'Group JWT Framework packages together.', - packageRules: [ - { - matchDatasources: ['packagist'], - matchPackagePrefixes: ['web-token/'], - groupName: 'JWT Framework packages', }, ], }, @@ -708,16 +711,16 @@ for (const monorepo of Object.keys(monorepos.presets)) { { description: `Group packages from ${monorepo} monorepo together.`, extends: `monorepo:${monorepo}`, - matchUpdateTypes: nonPinUpdateTypes, groupName: `${monorepo} monorepo`, + matchUpdateTypes: nonPinUpdateTypes, }, ], }; } config.monorepos = { description: 'Group known monorepo packages together.', - ignoreDeps: [], extends: monorepoNames, + ignoreDeps: [], }; export const presets: Record<string, Preset> = config; diff --git a/lib/config/presets/internal/helpers.ts b/lib/config/presets/internal/helpers.ts index bb79bcabcdefb164c6dc41fdcb4a08bcad3f749b..805d0de92de292b524eca529864cec5e75627f35 100644 --- a/lib/config/presets/internal/helpers.ts +++ b/lib/config/presets/internal/helpers.ts @@ -1,13 +1,15 @@ import type { Preset } from '../types'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const presets: Record<string, Preset> = { disableTypesNodeMajor: { description: 'Disable `major` updates to `@types/node`.', packageRules: [ { + enabled: false, matchPackageNames: ['@types/node'], matchUpdateTypes: ['major'], - enabled: false, }, ], }, diff --git a/lib/config/presets/internal/index.ts b/lib/config/presets/internal/index.ts index 36c8b1a48c2d27f4ba8c9f26f4ff238980afbe82..63765664558b69522f60c429f208350ceaa1b9d6 100644 --- a/lib/config/presets/internal/index.ts +++ b/lib/config/presets/internal/index.ts @@ -14,6 +14,8 @@ import * as replacements from './replacements'; import * as schedulePreset from './schedule'; import * as workaroundsPreset from './workarounds'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const groups: Record<string, Record<string, Preset>> = { compatibility: compatibilityPreset.presets, config: configPreset.presets, diff --git a/lib/config/presets/internal/monorepo.ts b/lib/config/presets/internal/monorepo.ts index 3eeed1ca2717a0369ed7e0ae3ee008b72840ad10..a68f5f0accd76f45eb4f9f296c3cb8bf7c33c0eb 100644 --- a/lib/config/presets/internal/monorepo.ts +++ b/lib/config/presets/internal/monorepo.ts @@ -249,6 +249,8 @@ const orgGroups = { 'semantic-release': 'https://github.com/semantic-release/', }; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + const patternGroups = { angularmaterial: ['^@angular/material', '^@angular/cdk'], 'apache-camel': '^org.apache.camel:', diff --git a/lib/config/presets/internal/npm.ts b/lib/config/presets/internal/npm.ts index 0c8aa01735db49b82202c95b08736fe398547293..57552b194e38e99e479f1bc5ca885764cf90e945 100644 --- a/lib/config/presets/internal/npm.ts +++ b/lib/config/presets/internal/npm.ts @@ -1,5 +1,7 @@ import type { Preset } from '../types'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const presets: Record<string, Preset> = { unpublishSafe: { description: diff --git a/lib/config/presets/internal/packages.ts b/lib/config/presets/internal/packages.ts index 03295cc9bb20e9eb95fa60043dbc36d5ce692864..d0708de3ecf2f943aac46ac9beb58d053b114ef4 100644 --- a/lib/config/presets/internal/packages.ts +++ b/lib/config/presets/internal/packages.ts @@ -1,5 +1,7 @@ import type { Preset } from '../types'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const presets: Record<string, Preset> = { angularJs: { description: 'All AngularJS packages.', @@ -10,19 +12,10 @@ export const presets: Record<string, Preset> = { 'angular-sanitize', ], }, - react: { - description: 'All React packages.', - matchPackageNames: ['@types/react'], - matchPackagePrefixes: ['react'], - }, apollographql: { description: 'All packages published by Apollo GraphQL.', matchSourceUrlPrefixes: ['https://github.com/apollographql/'], }, - mapbox: { - description: 'All Mapbox-related packages.', - matchPackagePrefixes: ['leaflet', 'mapbox'], - }, emberTemplateLint: { description: 'All ember-template-lint packages.', matchPackagePrefixes: ['ember-template-lint'], @@ -32,29 +25,18 @@ export const presets: Record<string, Preset> = { matchPackageNames: ['@types/eslint', 'babel-eslint'], matchPackagePrefixes: ['@typescript-eslint/', 'eslint'], }, - stylelint: { - description: 'All Stylelint packages.', - matchPackagePrefixes: ['stylelint'], - }, - tslint: { - description: 'All TSLint packages.', - matchPackageNames: ['codelyzer'], - matchPackagePatterns: ['\\btslint\\b'], + gatsby: { + description: 'All packages published by Gatsby.', + extends: ['monorepo:gatsby'], }, - linters: { - description: 'All lint-related packages.', - extends: [ - 'packages:emberTemplateLint', - 'packages:eslint', - 'packages:stylelint', - 'packages:tslint', - ], - matchPackageNames: ['remark-lint'], + googleapis: { + description: 'All `googleapis` packages.', + matchDatasources: ['npm'], + matchPackagePrefixes: ['@google-cloud/'], }, - postcss: { - description: 'All PostCSS packages.', - matchPackageNames: ['postcss'], - matchPackagePrefixes: ['postcss-'], + jsTest: { + description: 'JavaScript test packages.', + extends: ['packages:jsUnitTest'], }, jsUnitTest: { description: 'Unit test packages for JavaScript.', @@ -94,25 +76,45 @@ export const presets: Record<string, Preset> = { 'sinon', ], }, - unitTest: { - description: 'All unit test packages.', - extends: ['packages:jsUnitTest'], + linters: { + description: 'All lint-related packages.', + extends: [ + 'packages:emberTemplateLint', + 'packages:eslint', + 'packages:stylelint', + 'packages:tslint', + ], + matchPackageNames: ['remark-lint'], }, - jsTest: { - description: 'JavaScript test packages.', - extends: ['packages:jsUnitTest'], + mapbox: { + description: 'All Mapbox-related packages.', + matchPackagePrefixes: ['leaflet', 'mapbox'], + }, + postcss: { + description: 'All PostCSS packages.', + matchPackageNames: ['postcss'], + matchPackagePrefixes: ['postcss-'], + }, + react: { + description: 'All React packages.', + matchPackageNames: ['@types/react'], + matchPackagePrefixes: ['react'], + }, + stylelint: { + description: 'All Stylelint packages.', + matchPackagePrefixes: ['stylelint'], }, test: { description: 'Test packages.', extends: ['packages:unitTest'], }, - gatsby: { - description: 'All packages published by Gatsby.', - extends: ['monorepo:gatsby'], + tslint: { + description: 'All TSLint packages.', + matchPackageNames: ['codelyzer'], + matchPackagePatterns: ['\\btslint\\b'], }, - googleapis: { - matchDatasources: ['npm'], - description: 'All `googleapis` packages.', - matchPackagePrefixes: ['@google-cloud/'], + unitTest: { + description: 'All unit test packages.', + extends: ['packages:jsUnitTest'], }, }; diff --git a/lib/config/presets/internal/preview.ts b/lib/config/presets/internal/preview.ts index 61ecd13189389dfd69bbbad902ffd0d04df74694..513412af5ee824bdd21e7cf4cada539cb0fcbdbe 100644 --- a/lib/config/presets/internal/preview.ts +++ b/lib/config/presets/internal/preview.ts @@ -1,6 +1,14 @@ import type { Preset } from '../types'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const presets: Record<string, Preset> = { + buildkite: { + buildkite: { + enabled: true, + }, + description: 'Enable Buildkite functionality.', + }, dockerCompose: { description: 'Enable Docker Compose image updating.', 'docker-compose': { @@ -18,10 +26,4 @@ export const presets: Record<string, Preset> = { }, }, }, - buildkite: { - description: 'Enable Buildkite functionality.', - buildkite: { - enabled: true, - }, - }, }; diff --git a/lib/config/presets/internal/regex-managers.ts b/lib/config/presets/internal/regex-managers.ts index cc489836c80c9af411ea902a5597708be9670e23..5dd72d6ba4ae20d0efd34d6d4cfc8b1bffe3df2d 100644 --- a/lib/config/presets/internal/regex-managers.ts +++ b/lib/config/presets/internal/regex-managers.ts @@ -1,5 +1,7 @@ import type { Preset } from '../types'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const presets: Record<string, Preset> = { dockerfileVersions: { description: 'Update `_VERSION` variables in Dockerfiles.', diff --git a/lib/config/presets/internal/schedule.ts b/lib/config/presets/internal/schedule.ts index 5ea22a6021df50ff7ef415009289c4f196178ac3..cf79931c5f54fc19ec91afe1b4f28de87ac3d3f1 100644 --- a/lib/config/presets/internal/schedule.ts +++ b/lib/config/presets/internal/schedule.ts @@ -1,45 +1,47 @@ import type { Preset } from '../types'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const presets: Record<string, Preset> = { - earlyMondays: { - description: 'Weekly schedule on early Monday mornings.', - schedule: ['before 3am on Monday'], - }, daily: { description: 'Schedule daily.', schedule: ['before 2am'], }, - weekly: { - description: 'Schedule weekly.', - extends: ['schedule:earlyMondays'], + earlyMondays: { + description: 'Weekly schedule on early Monday mornings.', + schedule: ['before 3am on Monday'], }, monthly: { description: 'Schedule monthly.', schedule: ['before 3am on the first day of the month'], }, + nonOfficeHours: { + description: + 'Schedule for typical non-office hours (night time and weekends).', + schedule: [ + 'after 10pm every weekday', + 'before 5am every weekday', + 'every weekend', + ], + }, quarterly: { description: 'Schedule quarterly.', schedule: ['every 3 months on the first day of the month'], }, - yearly: { - description: 'Schedule once a year (not recommended).', - schedule: ['every 12 months on the first day of the month'], + weekdays: { + description: 'Schedule for weekdays.', + schedule: ['every weekday'], }, weekends: { description: 'Schedule for weekends.', schedule: ['every weekend'], }, - weekdays: { - description: 'Schedule for weekdays.', - schedule: ['every weekday'], + weekly: { + description: 'Schedule weekly.', + extends: ['schedule:earlyMondays'], }, - nonOfficeHours: { - description: - 'Schedule for typical non-office hours (night time and weekends).', - schedule: [ - 'after 10pm every weekday', - 'before 5am every weekday', - 'every weekend', - ], + yearly: { + description: 'Schedule once a year (not recommended).', + schedule: ['every 12 months on the first day of the month'], }, }; diff --git a/lib/config/presets/internal/workarounds.ts b/lib/config/presets/internal/workarounds.ts index f4c2ea587c31c19cdff4a81c9353133092ce0f26..29abe850c90e1b1fb927a7a6387c250b893cab00 100644 --- a/lib/config/presets/internal/workarounds.ts +++ b/lib/config/presets/internal/workarounds.ts @@ -1,5 +1,7 @@ import type { Preset } from '../types'; +/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */ + export const presets: Record<string, Preset> = { all: { description: [ @@ -19,13 +21,35 @@ export const presets: Record<string, Preset> = { ], ignoreDeps: [], }, - mavenCommonsAncientVersion: { - description: 'Fix some problems with very old Maven commons versions.', + disableMavenParentRoot: { + description: + 'Avoid version fetching for Maven packages detected as project root.', packageRules: [ { - matchDatasources: ['maven', 'sbt-package'], - matchPackagePrefixes: ['commons-'], - allowedVersions: '!/^200\\d{5}(\\.\\d+)?/', + enabled: false, + matchDepTypes: ['parent-root'], + matchManagers: ['maven'], + }, + ], + }, + doNotUpgradeFromAlpineStableToEdge: { + description: 'Do not upgrade from Alpine stable to edge.', + packageRules: [ + { + allowedVersions: '<20000000', + matchCurrentVersion: '<20000000', + matchDatasources: ['docker'], + matchPackageNames: ['alpine'], + }, + ], + }, + ignoreHttp4sDigestMilestones: { + description: 'Ignore `http4s` digest-based `1.x` milestones.', + packageRules: [ + { + allowedVersions: `!/^1\\.0-\\d+-[a-fA-F0-9]{7}$/`, + matchManagers: ['sbt'], + matchPackagePrefixes: ['org.http4s:'], }, ], }, @@ -33,11 +57,11 @@ export const presets: Record<string, Preset> = { description: 'Ignore spring cloud `1.x` releases.', packageRules: [ { + allowedVersions: '/^[A-Z]/', matchDatasources: ['maven'], matchPackageNames: [ 'org.springframework.cloud:spring-cloud-starter-parent', ], - allowedVersions: '/^[A-Z]/', }, ], }, @@ -45,29 +69,41 @@ export const presets: Record<string, Preset> = { description: 'Ignore `web3j` `5.0.0` release.', packageRules: [ { + allowedVersions: '!/^5\\.0\\.0/', matchDatasources: ['maven'], matchPackageNames: ['org.web3j:core'], - allowedVersions: '!/^5\\.0\\.0/', }, ], }, - ignoreHttp4sDigestMilestones: { - description: 'Ignore `http4s` digest-based `1.x` milestones.', + javaLTSVersions: { + description: 'Limit Java runtime versions to LTS releases', packageRules: [ { - matchManagers: ['sbt'], - matchPackagePrefixes: ['org.http4s:'], - allowedVersions: `!/^1\\.0-\\d+-[a-fA-F0-9]{7}$/`, + allowedVersions: '/^(?:8|11|17|21|25|29)(?:\\.|$)/', + description: + 'Limit Java runtime versions to LTS releases. To receive all major releases add `workarounds:javaLTSVersions` to the `ignorePresets` array.', + matchDatasources: ['docker', 'adoptium-java'], + matchPackageNames: [ + 'eclipse-temurin', + 'amazoncorretto', + 'adoptopenjdk', + 'openjdk', + 'java', + 'java-jre', + 'sapmachine', + ], + versioning: + 'regex:^(?<major>\\d+)?(\\.(?<minor>\\d+))?(\\.(?<patch>\\d+))?([\\._+](?<build>\\d+))?(-(?<compatibility>.*))?$', }, ], }, - typesNodeVersioning: { - description: 'Use node versioning for `@types/node`.', + mavenCommonsAncientVersion: { + description: 'Fix some problems with very old Maven commons versions.', packageRules: [ { - matchManagers: ['npm'], - matchPackageNames: ['@types/node'], - versioning: `node`, + allowedVersions: '!/^200\\d{5}(\\.\\d+)?/', + matchDatasources: ['maven', 'sbt-package'], + matchPackagePrefixes: ['commons-'], }, ], }, @@ -76,19 +112,8 @@ export const presets: Record<string, Preset> = { 'Limit concurrent requests to reduce load on Repology servers until we can fix this properly, see issue `#10133`.', hostRules: [ { - matchHost: 'repology.org', concurrentRequestLimit: 1, - }, - ], - }, - doNotUpgradeFromAlpineStableToEdge: { - description: 'Do not upgrade from Alpine stable to edge.', - packageRules: [ - { - matchDatasources: ['docker'], - matchPackageNames: ['alpine'], - matchCurrentVersion: '<20000000', - allowedVersions: '<20000000', + matchHost: 'repology.org', }, ], }, @@ -98,6 +123,12 @@ export const presets: Record<string, Preset> = { packageRules: [ { matchDatasources: ['docker'], + matchPackageNames: [ + 'registry.access.redhat.com/rhel', + 'registry.access.redhat.com/rhel-atomic', + 'registry.access.redhat.com/rhel-init', + 'registry.access.redhat.com/rhel-minimal', + ], matchPackagePrefixes: [ 'registry.access.redhat.com/rhceph/', 'registry.access.redhat.com/rhgs3/', @@ -110,46 +141,17 @@ export const presets: Record<string, Preset> = { 'registry.access.redhat.com/ubi9', 'redhat/', ], - matchPackageNames: [ - 'registry.access.redhat.com/rhel', - 'registry.access.redhat.com/rhel-atomic', - 'registry.access.redhat.com/rhel-init', - 'registry.access.redhat.com/rhel-minimal', - ], versioning: 'redhat', }, ], }, - javaLTSVersions: { - description: 'Limit Java runtime versions to LTS releases', - packageRules: [ - { - description: - 'Limit Java runtime versions to LTS releases. To receive all major releases add `workarounds:javaLTSVersions` to the `ignorePresets` array.', - matchDatasources: ['docker', 'adoptium-java'], - matchPackageNames: [ - 'eclipse-temurin', - 'amazoncorretto', - 'adoptopenjdk', - 'openjdk', - 'java', - 'java-jre', - 'sapmachine', - ], - versioning: - 'regex:^(?<major>\\d+)?(\\.(?<minor>\\d+))?(\\.(?<patch>\\d+))?([\\._+](?<build>\\d+))?(-(?<compatibility>.*))?$', - allowedVersions: '/^(?:8|11|17|21|25|29)(?:\\.|$)/', - }, - ], - }, - disableMavenParentRoot: { - description: - 'Avoid version fetching for Maven packages detected as project root.', + typesNodeVersioning: { + description: 'Use node versioning for `@types/node`.', packageRules: [ { - matchManagers: ['maven'], - matchDepTypes: ['parent-root'], - enabled: false, + matchManagers: ['npm'], + matchPackageNames: ['@types/node'], + versioning: `node`, }, ], },