From 864e554db9e7b48f8c67bd4fc702cf57d120cd5f Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Fri, 7 Feb 2020 18:25:27 +0000
Subject: [PATCH] feat: dynamic manager config (#5392)

---
 lib/config/definitions.ts              | 535 +------------------------
 lib/{types.d.ts => globals.d.ts}       |   4 +
 lib/manager/ansible/index.ts           |   4 +
 lib/manager/bazel/index.ts             |   4 +
 lib/manager/buildkite/index.ts         |   8 +
 lib/manager/bundler/index.ts           |   6 +
 lib/manager/cargo/index.ts             |   9 +
 lib/manager/cdnurl/index.ts            |   6 +
 lib/manager/circleci/index.ts          |   4 +
 lib/manager/common.ts                  |   3 +-
 lib/manager/composer/index.ts          |   6 +
 lib/manager/deps-edn/index.ts          |   6 +
 lib/manager/docker-compose/index.ts    |   4 +
 lib/manager/dockerfile/index.ts        |   4 +
 lib/manager/droneci/index.ts           |   4 +
 lib/manager/git-submodules/index.ts    |   8 +
 lib/manager/github-actions/index.ts    |   8 +
 lib/manager/gitlabci-include/index.ts  |   4 +
 lib/manager/gitlabci/index.ts          |   4 +
 lib/manager/gomod/index.ts             |   4 +
 lib/manager/gradle-wrapper/index.ts    |   4 +
 lib/manager/gradle/index.ts            |   7 +
 lib/manager/helm-requirements/index.ts |   8 +
 lib/manager/helm-values/index.ts       |   5 +
 lib/manager/helmfile/index.ts          |   8 +
 lib/manager/homebrew/index.ts          |   6 +
 lib/manager/index.ts                   |   7 +-
 lib/manager/kubernetes/index.ts        |   4 +
 lib/manager/leiningen/index.ts         |   7 +
 lib/manager/maven/index.ts             |   6 +
 lib/manager/meteor/index.ts            |   4 +
 lib/manager/mix/index.ts               |   6 +
 lib/manager/npm/index.ts               |  11 +
 lib/manager/nuget/index.ts             |   4 +
 lib/manager/nvm/index.ts               |   6 +
 lib/manager/pip_requirements/index.ts  |   4 +
 lib/manager/pip_setup/index.ts         |   4 +
 lib/manager/pipenv/index.ts            |   4 +
 lib/manager/poetry/index.ts            |   6 +
 lib/manager/pub/index.ts               |   7 +
 lib/manager/ruby-version/index.ts      |   6 +
 lib/manager/sbt/index.ts               |   8 +
 lib/manager/swift/index.ts             |   8 +
 lib/manager/terraform/index.ts         |   9 +
 lib/manager/travis/index.ts            |   6 +
 lib/types/index.ts                     |   1 +
 lib/types/versioning.ts                |   8 +
 lib/versioning/common.ts               |  13 +-
 renovate-schema.json                   |  82 ++--
 49 files changed, 327 insertions(+), 567 deletions(-)
 rename lib/{types.d.ts => globals.d.ts} (95%)
 create mode 100644 lib/types/index.ts
 create mode 100644 lib/types/versioning.ts

diff --git a/lib/config/definitions.ts b/lib/config/definitions.ts
index 55c368b5bf..ec45d23f9c 100644
--- a/lib/config/definitions.ts
+++ b/lib/config/definitions.ts
@@ -1,25 +1,15 @@
 import { RenovateConfigStage } from './common';
 import {
-  VERSION_SCHEME_CARGO,
-  VERSION_SCHEME_COMPOSER,
   VERSION_SCHEME_DOCKER,
-  VERSION_SCHEME_GIT,
-  VERSION_SCHEME_HEX,
-  VERSION_SCHEME_HASHICORP,
-  VERSION_SCHEME_IVY,
-  VERSION_SCHEME_MAVEN,
-  VERSION_SCHEME_NODE,
-  VERSION_SCHEME_NPM,
   VERSION_SCHEME_PEP440,
-  VERSION_SCHEME_POETRY,
-  VERSION_SCHEME_RUBY,
   VERSION_SCHEME_SEMVER,
-  VERSION_SCHEME_SWIFT,
 } from '../constants/version-schemes';
 import { getVersionSchemeList } from '../versioning';
 import { PLATFORM_TYPE_GITHUB } from '../constants/platforms';
 import { platformList } from '../platform';
 
+import { getManagers } from '../manager';
+
 export interface RenovateOptionBase {
   admin?: boolean;
 
@@ -1398,56 +1388,6 @@ const options: RenovateOptions[] = [
     default: {},
     mergeable: true,
   },
-  {
-    name: 'npm',
-    description: 'Configuration object for npm package.json renovation',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)package.json$'],
-      rollbackPrs: true,
-      versionScheme: VERSION_SCHEME_NPM,
-      prBodyDefinitions: {
-        Change:
-          '[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}](https://renovatebot.com/diffs/npm/{{{depNameEscaped}}}/{{{fromVersion}}}/{{{toVersion}}})',
-      },
-    },
-    mergeable: true,
-  },
-  {
-    name: 'meteor',
-    description: 'Configuration object for meteor package.js renovation',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)package.js$'],
-    },
-    mergeable: true,
-  },
-  {
-    name: 'bazel',
-    description: 'Configuration object for bazel WORKSPACE renovation',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)WORKSPACE$', '\\.bzl$'],
-    },
-    mergeable: true,
-  },
-  {
-    name: 'buildkite',
-    description: 'Configuration object for buildkite pipeline renovation',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['buildkite\\.ya?ml', '\\.buildkite/.+\\.ya?ml$'],
-      commitMessageTopic: 'buildkite plugin {{depName}}',
-      commitMessageExtra:
-        'to {{#if isMajor}}v{{{newMajor}}}{{else}}{{{newValue}}}{{/if}}',
-      managerBranchPrefix: 'buildkite-',
-    },
-    mergeable: true,
-  },
   {
     name: 'golang',
     description: 'Configuration object for Go language',
@@ -1459,16 +1399,6 @@ const options: RenovateOptions[] = [
     mergeable: true,
     cli: false,
   },
-  {
-    name: 'gomod',
-    description: 'Configuration object for Go modules renovation',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)go.mod$'],
-    },
-    mergeable: true,
-  },
   {
     name: 'postUpdateOptions',
     description:
@@ -1494,53 +1424,6 @@ const options: RenovateOptions[] = [
     mergeable: true,
     cli: false,
   },
-  {
-    name: 'bundler',
-    description: 'Configuration object for bundler Gemfiles',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)Gemfile$'],
-      versionScheme: VERSION_SCHEME_RUBY,
-    },
-    mergeable: true,
-  },
-  {
-    name: 'ruby-version',
-    description: 'Configuration object for .ruby-version updating',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)\\.ruby-version$'],
-      versionScheme: VERSION_SCHEME_RUBY,
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'terraform',
-    description: 'Configuration object for Terraform dependencies renovation',
-    stage: 'repository',
-    type: 'object',
-    default: {
-      commitMessageTopic:
-        'Terraform {{managerData.terraformDependencyType}} {{depNameShort}}',
-      fileMatch: ['\\.tf$'],
-      versionScheme: VERSION_SCHEME_HASHICORP,
-    },
-    mergeable: true,
-  },
-  {
-    name: 'mix',
-    description: 'Configuration object for Mix module renovation',
-    stage: 'repository',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)mix\\.exs$'],
-      versionScheme: VERSION_SCHEME_HEX,
-    },
-    mergeable: true,
-  },
   {
     name: 'rust',
     description: 'Configuration option for Rust package management.',
@@ -1550,31 +1433,6 @@ const options: RenovateOptions[] = [
     mergeable: true,
     cli: false,
   },
-  {
-    name: 'cargo',
-    description: 'Configuration object for Cargo crate renovation.',
-    stage: 'repository',
-    type: 'object',
-    default: {
-      commitMessageTopic: 'Rust crate {{depName}}',
-      managerBranchPrefix: 'rust-',
-      fileMatch: ['(^|/)Cargo.toml$'],
-      versionScheme: VERSION_SCHEME_CARGO,
-      rangeStrategy: 'bump',
-    },
-    mergeable: true,
-  },
-  {
-    name: 'cdnurl',
-    description: 'Configuration object for CDN assets',
-    stage: 'repository',
-    type: 'object',
-    default: {
-      fileMatch: [],
-      versionScheme: VERSION_SCHEME_SEMVER,
-    },
-    mergeable: true,
-  },
   {
     name: 'supportPolicy',
     description:
@@ -1598,42 +1456,6 @@ const options: RenovateOptions[] = [
     mergeable: true,
     cli: false,
   },
-  {
-    name: 'travis',
-    description: 'Configuration object for .travis.yml node version renovation',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['^.travis.yml$'],
-      versionScheme: VERSION_SCHEME_NODE,
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'nvm',
-    description: 'Configuration object for .nvmrc files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['^.nvmrc$'],
-      versionScheme: VERSION_SCHEME_NODE,
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'pub',
-    description: 'Configuration object for when renovating Dart pubspec files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)pubspec\\.ya?ml$'],
-      versionScheme: VERSION_SCHEME_NPM,
-    },
-    mergeable: true,
-    cli: false,
-  },
   {
     name: 'docker',
     description: 'Configuration object for Docker language',
@@ -1671,160 +1493,6 @@ const options: RenovateOptions[] = [
     mergeable: true,
     cli: false,
   },
-  {
-    name: 'docker-compose',
-    description:
-      'Configuration object for Docker Compose renovation. Also inherits settings from `docker` object.',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)docker-compose[^/]*\\.ya?ml$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'dockerfile',
-    description: 'Configuration object for Dockerfile renovation',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)Dockerfile$', '(^|/)Dockerfile\\.[^/]*$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'kubernetes',
-    description:
-      'Configuration object for Kubernetes renovation. Also inherits settings from `docker` object.',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: [],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'helm-requirements',
-    description: 'Configuration object for helm requirements.yaml files.',
-    stage: 'package',
-    type: 'object',
-    default: {
-      aliases: {
-        stable: 'https://kubernetes-charts.storage.googleapis.com/',
-      },
-      commitMessageTopic: 'helm chart {{depName}}',
-      fileMatch: ['(^|/)requirements.yaml$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'helm-values',
-    description: 'Configuration object for helm values.yaml files.',
-    stage: 'package',
-    type: 'object',
-    default: {
-      commitMessageTopic: 'helm values {{depName}}',
-      fileMatch: ['(^|/)values.yaml$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'helmfile',
-    description: 'Configuration object for helmfile helmfile.yaml files.',
-    stage: 'package',
-    type: 'object',
-    default: {
-      aliases: {
-        stable: 'https://kubernetes-charts.storage.googleapis.com/',
-      },
-      commitMessageTopic: 'helm chart {{depName}}',
-      fileMatch: ['(^|/)helmfile.yaml$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'circleci',
-    description:
-      'Configuration object for CircleCI yml renovation. Also inherits settings from `docker` object.',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/).circleci/config.yml$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'droneci',
-    description:
-      'Configuration object for DroneCI yml renovation. Also inherits settings from `docker` object.',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/).drone.yml$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'ansible',
-    description:
-      'Configuration object for Ansible yaml renovation. Also inherits settings from `docker` object.',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)tasks/[^/]+\\.ya?ml$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'github-actions',
-    description:
-      'Configuration object for GitHub Actions workflow renovation. Also inherits settings from `docker` object.',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: [
-        '^\\.github/main.workflow$',
-        '^\\.github/workflows/[^/]+\\.ya?ml$',
-      ],
-      pinDigests: true,
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'composer',
-    description: 'Configuration object for composer.json files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)([\\w-]*)composer.json$'],
-      versionScheme: VERSION_SCHEME_COMPOSER,
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'git-submodules',
-    description: 'Configuration object for git submodule files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      enabled: false,
-      versionScheme: VERSION_SCHEME_GIT,
-      fileMatch: ['(^|/).gitmodules$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
   {
     name: 'php',
     description: 'Configuration object for php',
@@ -1834,50 +1502,6 @@ const options: RenovateOptions[] = [
     mergeable: true,
     cli: false,
   },
-  {
-    name: 'pip_requirements',
-    description: 'Configuration object for requirements.txt files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)([\\w-]*)requirements.(txt|pip)$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'pip_setup',
-    description: 'Configuration object for setup.py files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)setup.py$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'pipenv',
-    description: 'Configuration object for Pipfile files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)Pipfile$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'poetry',
-    description: 'Configuration object for pyproject.toml files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      versionScheme: VERSION_SCHEME_POETRY,
-      fileMatch: ['(^|/)pyproject\\.toml$'],
-    },
-    mergeable: true,
-  },
   {
     name: 'python',
     description: 'Configuration object for python',
@@ -1889,45 +1513,6 @@ const options: RenovateOptions[] = [
     mergeable: true,
     cli: false,
   },
-  {
-    name: 'sbt',
-    description: 'Configuration object for *.sbt files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['\\.sbt$', 'project/[^/]*.scala$'],
-      timeout: 300,
-      versionScheme: VERSION_SCHEME_IVY,
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'leiningen',
-    description:
-      'Configuration object for renovating Clojure leiningen projects',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)project\\.clj$'],
-      versionScheme: VERSION_SCHEME_MAVEN,
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'deps-edn',
-    description:
-      'Configuration object for renovating Clojure CLI-based projects (deps.edn)',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)deps\\.edn$'],
-      versionScheme: VERSION_SCHEME_MAVEN,
-    },
-    mergeable: true,
-    cli: false,
-  },
   {
     name: 'compatibility',
     description: 'Configuration object for compatibility',
@@ -1945,66 +1530,6 @@ const options: RenovateOptions[] = [
     mergeable: true,
     cli: false,
   },
-  {
-    name: 'gradle',
-    description: 'Configuration object for build.gradle files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['\\.gradle(\\.kts)?$', '(^|/)gradle.properties$'],
-      timeout: 600,
-      versionScheme: VERSION_SCHEME_MAVEN,
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'gradle-wrapper',
-    description: 'Configuration object for gradle-wrapper.properties files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)gradle/wrapper/gradle-wrapper.properties$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'maven',
-    description: 'Configuration object for when renovating Maven pom.xml files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['\\.pom\\.xml$', '(^|/)pom\\.xml$'],
-      versionScheme: VERSION_SCHEME_MAVEN,
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'gitlabci',
-    description:
-      'Configuration object for GitLab CI yml renovation. Also inherits settings from `docker` object.',
-    stage: 'repository',
-    type: 'object',
-    default: {
-      fileMatch: ['^\\.gitlab-ci\\.yml$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'gitlabci-include',
-    description:
-      'Configuration object for GitLab CI yml renovation for include.',
-    stage: 'repository',
-    type: 'object',
-    default: {
-      fileMatch: ['^\\.gitlab-ci\\.yml$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
   {
     name: 'dotnet',
     description: 'Configuration object for .NET language',
@@ -2014,30 +1539,6 @@ const options: RenovateOptions[] = [
     mergeable: true,
     cli: false,
   },
-  {
-    name: 'nuget',
-    description: 'Configuration object for C#/Nuget',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['\\.(?:cs|fs|vb)proj$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
-  {
-    name: 'homebrew',
-    description: 'Configuration object for homebrew',
-    stage: 'package',
-    type: 'object',
-    default: {
-      commitMessageTopic: 'Homebrew Formula {{depName}}',
-      managerBranchPrefix: 'homebrew-',
-      fileMatch: ['^Formula/[^/]+[.]rb$'],
-    },
-    mergeable: true,
-    cli: false,
-  },
   {
     name: 'hostRules',
     description: 'Host rules/configuration including credentials',
@@ -2160,19 +1661,6 @@ const options: RenovateOptions[] = [
     env: false,
     mergeable: true,
   },
-  {
-    name: 'swift',
-    description: 'Configuration for Package.swift files',
-    stage: 'package',
-    type: 'object',
-    default: {
-      fileMatch: ['(^|/)Package\\.swift'],
-      versionScheme: VERSION_SCHEME_SWIFT,
-      rangeStrategy: 'bump',
-    },
-    mergeable: true,
-    cli: false,
-  },
   {
     name: 'pruneStaleBranches',
     description: `Enable or disable pruning of stale branches`,
@@ -2196,3 +1684,22 @@ const options: RenovateOptions[] = [
 export function getOptions(): any {
   return options;
 }
+
+function loadManagerOptions(): void {
+  for (const [name, config] of Object.entries(getManagers())) {
+    if (config.defaultConfig) {
+      const managerConfig: RenovateOptions = {
+        name,
+        description: `Configuration object for the ${name} manager`,
+        stage: 'package',
+        type: 'object',
+        default: config.defaultConfig,
+        mergeable: true,
+        cli: false,
+      };
+      options.push(managerConfig);
+    }
+  }
+}
+
+loadManagerOptions();
diff --git a/lib/types.d.ts b/lib/globals.d.ts
similarity index 95%
rename from lib/types.d.ts
rename to lib/globals.d.ts
index eab3130d35..b8d91df810 100644
--- a/lib/types.d.ts
+++ b/lib/globals.d.ts
@@ -1,3 +1,7 @@
+/*
+ * This file should be removed in future.
+ */
+
 declare namespace Renovate {
   interface Cache {
     get<T = any>(namespace: string, key: string): Promise<T>;
diff --git a/lib/manager/ansible/index.ts b/lib/manager/ansible/index.ts
index f7021b8eda..d917798c52 100644
--- a/lib/manager/ansible/index.ts
+++ b/lib/manager/ansible/index.ts
@@ -5,3 +5,7 @@ import { LANGUAGE_DOCKER } from '../../constants/languages';
 const language = LANGUAGE_DOCKER;
 
 export { extractPackageFile, language, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)tasks/[^/]+\\.ya?ml$'],
+};
diff --git a/lib/manager/bazel/index.ts b/lib/manager/bazel/index.ts
index c8e0095e4c..932f3c1897 100644
--- a/lib/manager/bazel/index.ts
+++ b/lib/manager/bazel/index.ts
@@ -2,3 +2,7 @@ import { extractPackageFile } from './extract';
 import { updateDependency } from './update';
 
 export { extractPackageFile, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)WORKSPACE$', '\\.bzl$'],
+};
diff --git a/lib/manager/buildkite/index.ts b/lib/manager/buildkite/index.ts
index c8e0095e4c..08878c505a 100644
--- a/lib/manager/buildkite/index.ts
+++ b/lib/manager/buildkite/index.ts
@@ -2,3 +2,11 @@ import { extractPackageFile } from './extract';
 import { updateDependency } from './update';
 
 export { extractPackageFile, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: ['buildkite\\.ya?ml', '\\.buildkite/.+\\.ya?ml$'],
+  commitMessageTopic: 'buildkite plugin {{depName}}',
+  commitMessageExtra:
+    'to {{#if isMajor}}v{{{newMajor}}}{{else}}{{{newValue}}}{{/if}}',
+  managerBranchPrefix: 'buildkite-',
+};
diff --git a/lib/manager/bundler/index.ts b/lib/manager/bundler/index.ts
index 626d12621a..1d5ae7812d 100644
--- a/lib/manager/bundler/index.ts
+++ b/lib/manager/bundler/index.ts
@@ -3,6 +3,7 @@ import { updateDependency } from './update';
 import { updateArtifacts } from './artifacts';
 import { getRangeStrategy } from './range';
 import { LANGUAGE_RUBY } from '../../constants/languages';
+import { VERSION_SCHEME_RUBY } from '../../constants/version-schemes';
 
 const language = LANGUAGE_RUBY;
 
@@ -18,3 +19,8 @@ export {
   language, // Optional
   updateDependency, // Mandatory
 };
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)Gemfile$'],
+  versionScheme: VERSION_SCHEME_RUBY,
+};
diff --git a/lib/manager/cargo/index.ts b/lib/manager/cargo/index.ts
index 0fed878b98..52fd710fca 100644
--- a/lib/manager/cargo/index.ts
+++ b/lib/manager/cargo/index.ts
@@ -2,9 +2,18 @@ import { extractPackageFile } from './extract';
 import { updateDependency } from './update';
 import { updateArtifacts } from './artifacts';
 import { LANGUAGE_RUST } from '../../constants/languages';
+import { VERSION_SCHEME_CARGO } from '../../constants/version-schemes';
 
 const language = LANGUAGE_RUST;
 // TODO: Support this
 export const supportsLockFileMaintenance = false;
 
 export { extractPackageFile, updateArtifacts, language, updateDependency };
+
+export const defaultConfig = {
+  commitMessageTopic: 'Rust crate {{depName}}',
+  managerBranchPrefix: 'rust-',
+  fileMatch: ['(^|/)Cargo.toml$'],
+  versionScheme: VERSION_SCHEME_CARGO,
+  rangeStrategy: 'bump',
+};
diff --git a/lib/manager/cdnurl/index.ts b/lib/manager/cdnurl/index.ts
index c8e0095e4c..a067cdf276 100644
--- a/lib/manager/cdnurl/index.ts
+++ b/lib/manager/cdnurl/index.ts
@@ -1,4 +1,10 @@
+import { VERSION_SCHEME_SEMVER } from '../../constants/version-schemes';
 import { extractPackageFile } from './extract';
 import { updateDependency } from './update';
 
 export { extractPackageFile, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: [],
+  versionScheme: VERSION_SCHEME_SEMVER,
+};
diff --git a/lib/manager/circleci/index.ts b/lib/manager/circleci/index.ts
index fd8a85a4bc..3ed943c315 100644
--- a/lib/manager/circleci/index.ts
+++ b/lib/manager/circleci/index.ts
@@ -5,3 +5,7 @@ import { LANGUAGE_DOCKER } from '../../constants/languages';
 const language = LANGUAGE_DOCKER;
 
 export { extractPackageFile, language, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: ['(^|/).circleci/config.yml$'],
+};
diff --git a/lib/manager/common.ts b/lib/manager/common.ts
index 46e0f496ba..a6b6aca793 100644
--- a/lib/manager/common.ts
+++ b/lib/manager/common.ts
@@ -1,5 +1,5 @@
 import { ReleaseType } from 'semver';
-import { RangeStrategy } from '../versioning';
+import { RangeStrategy } from '../types';
 import { ValidationMessage } from '../config/common';
 
 export type Result<T> = T | Promise<T>;
@@ -187,6 +187,7 @@ export interface UpdateDependencyConfig {
 }
 
 export interface ManagerApi {
+  defaultConfig: object;
   language?: string;
   supportsLockFileMaintenance?: boolean;
 
diff --git a/lib/manager/composer/index.ts b/lib/manager/composer/index.ts
index 4da24f5413..26e19fff4b 100644
--- a/lib/manager/composer/index.ts
+++ b/lib/manager/composer/index.ts
@@ -3,6 +3,7 @@ import { updateDependency } from '../npm/update';
 import { updateArtifacts } from './artifacts';
 import { getRangeStrategy } from './range';
 import { LANGUAGE_PHP } from '../../constants/languages';
+import { VERSION_SCHEME_COMPOSER } from '../../constants/version-schemes';
 
 const language = LANGUAGE_PHP;
 export const supportsLockFileMaintenance = true;
@@ -14,3 +15,8 @@ export {
   updateDependency,
   getRangeStrategy,
 };
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)([\\w-]*)composer.json$'],
+  versionScheme: VERSION_SCHEME_COMPOSER,
+};
diff --git a/lib/manager/deps-edn/index.ts b/lib/manager/deps-edn/index.ts
index c8e0095e4c..8b66511f36 100644
--- a/lib/manager/deps-edn/index.ts
+++ b/lib/manager/deps-edn/index.ts
@@ -1,4 +1,10 @@
+import { VERSION_SCHEME_MAVEN } from '../../constants/version-schemes';
 import { extractPackageFile } from './extract';
 import { updateDependency } from './update';
 
 export { extractPackageFile, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)deps\\.edn$'],
+  versionScheme: VERSION_SCHEME_MAVEN,
+};
diff --git a/lib/manager/docker-compose/index.ts b/lib/manager/docker-compose/index.ts
index fd8a85a4bc..d669d93c62 100644
--- a/lib/manager/docker-compose/index.ts
+++ b/lib/manager/docker-compose/index.ts
@@ -5,3 +5,7 @@ import { LANGUAGE_DOCKER } from '../../constants/languages';
 const language = LANGUAGE_DOCKER;
 
 export { extractPackageFile, language, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)docker-compose[^/]*\\.ya?ml$'],
+};
diff --git a/lib/manager/dockerfile/index.ts b/lib/manager/dockerfile/index.ts
index fd8a85a4bc..490077c851 100644
--- a/lib/manager/dockerfile/index.ts
+++ b/lib/manager/dockerfile/index.ts
@@ -5,3 +5,7 @@ import { LANGUAGE_DOCKER } from '../../constants/languages';
 const language = LANGUAGE_DOCKER;
 
 export { extractPackageFile, language, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)Dockerfile$', '(^|/)Dockerfile\\.[^/]*$'],
+};
diff --git a/lib/manager/droneci/index.ts b/lib/manager/droneci/index.ts
index fd8a85a4bc..1eebd3de01 100644
--- a/lib/manager/droneci/index.ts
+++ b/lib/manager/droneci/index.ts
@@ -5,3 +5,7 @@ import { LANGUAGE_DOCKER } from '../../constants/languages';
 const language = LANGUAGE_DOCKER;
 
 export { extractPackageFile, language, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: ['(^|/).drone.yml$'],
+};
diff --git a/lib/manager/git-submodules/index.ts b/lib/manager/git-submodules/index.ts
index 6b14bdeab3..3fab0be73a 100644
--- a/lib/manager/git-submodules/index.ts
+++ b/lib/manager/git-submodules/index.ts
@@ -1,3 +1,11 @@
+import { VERSION_SCHEME_GIT } from '../../constants/version-schemes';
+
 export { default as extractPackageFile } from './extract';
 export { default as updateDependency } from './update';
 export { default as updateArtifacts } from './artifacts';
+
+export const defaultConfig = {
+  enabled: false,
+  versionScheme: VERSION_SCHEME_GIT,
+  fileMatch: ['(^|/).gitmodules$'],
+};
diff --git a/lib/manager/github-actions/index.ts b/lib/manager/github-actions/index.ts
index fd8a85a4bc..a88cc79e19 100644
--- a/lib/manager/github-actions/index.ts
+++ b/lib/manager/github-actions/index.ts
@@ -5,3 +5,11 @@ import { LANGUAGE_DOCKER } from '../../constants/languages';
 const language = LANGUAGE_DOCKER;
 
 export { extractPackageFile, language, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: [
+    '^\\.github/main.workflow$',
+    '^\\.github/workflows/[^/]+\\.ya?ml$',
+  ],
+  pinDigests: true,
+};
diff --git a/lib/manager/gitlabci-include/index.ts b/lib/manager/gitlabci-include/index.ts
index c8e0095e4c..052527e005 100644
--- a/lib/manager/gitlabci-include/index.ts
+++ b/lib/manager/gitlabci-include/index.ts
@@ -2,3 +2,7 @@ import { extractPackageFile } from './extract';
 import { updateDependency } from './update';
 
 export { extractPackageFile, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: ['^\\.gitlab-ci\\.yml$'],
+};
diff --git a/lib/manager/gitlabci/index.ts b/lib/manager/gitlabci/index.ts
index fd8a85a4bc..049a65d665 100644
--- a/lib/manager/gitlabci/index.ts
+++ b/lib/manager/gitlabci/index.ts
@@ -5,3 +5,7 @@ import { LANGUAGE_DOCKER } from '../../constants/languages';
 const language = LANGUAGE_DOCKER;
 
 export { extractPackageFile, language, updateDependency };
+
+export const defaultConfig = {
+  fileMatch: ['^\\.gitlab-ci\\.yml$'],
+};
diff --git a/lib/manager/gomod/index.ts b/lib/manager/gomod/index.ts
index 0c057325c2..f797946b81 100644
--- a/lib/manager/gomod/index.ts
+++ b/lib/manager/gomod/index.ts
@@ -5,3 +5,7 @@ import { LANGUAGE_GOLANG } from '../../constants/languages';
 
 export const language = LANGUAGE_GOLANG;
 export { extractPackageFile, updateDependency, updateArtifacts };
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)go.mod$'],
+};
diff --git a/lib/manager/gradle-wrapper/index.ts b/lib/manager/gradle-wrapper/index.ts
index 730b5b60ba..4a38d0400b 100644
--- a/lib/manager/gradle-wrapper/index.ts
+++ b/lib/manager/gradle-wrapper/index.ts
@@ -1,2 +1,6 @@
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)gradle/wrapper/gradle-wrapper.properties$'],
+};
diff --git a/lib/manager/gradle/index.ts b/lib/manager/gradle/index.ts
index 97db521cb0..4538edb7d6 100644
--- a/lib/manager/gradle/index.ts
+++ b/lib/manager/gradle/index.ts
@@ -4,6 +4,7 @@ import upath from 'upath';
 import { exec } from '../../util/exec';
 import { logger } from '../../logger';
 import { DATASOURCE_FAILURE } from '../../constants/error-messages';
+import { VERSION_SCHEME_MAVEN } from '../../constants/version-schemes';
 
 import {
   init,
@@ -181,3 +182,9 @@ export function updateDependency({
 }
 
 export const language = LANGUAGE_JAVA;
+
+export const defaultConfig = {
+  fileMatch: ['\\.gradle(\\.kts)?$', '(^|/)gradle.properties$'],
+  timeout: 600,
+  versionScheme: VERSION_SCHEME_MAVEN,
+};
diff --git a/lib/manager/helm-requirements/index.ts b/lib/manager/helm-requirements/index.ts
index 730b5b60ba..85fd5b7692 100644
--- a/lib/manager/helm-requirements/index.ts
+++ b/lib/manager/helm-requirements/index.ts
@@ -1,2 +1,10 @@
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
+
+export const defaultConfig = {
+  aliases: {
+    stable: 'https://kubernetes-charts.storage.googleapis.com/',
+  },
+  commitMessageTopic: 'helm chart {{depName}}',
+  fileMatch: ['(^|/)requirements.yaml$'],
+};
diff --git a/lib/manager/helm-values/index.ts b/lib/manager/helm-values/index.ts
index 730b5b60ba..bb544cc075 100644
--- a/lib/manager/helm-values/index.ts
+++ b/lib/manager/helm-values/index.ts
@@ -1,2 +1,7 @@
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
+
+export const defaultConfig = {
+  commitMessageTopic: 'helm values {{depName}}',
+  fileMatch: ['(^|/)values.yaml$'],
+};
diff --git a/lib/manager/helmfile/index.ts b/lib/manager/helmfile/index.ts
index 730b5b60ba..f1d7f84cd3 100644
--- a/lib/manager/helmfile/index.ts
+++ b/lib/manager/helmfile/index.ts
@@ -1,2 +1,10 @@
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
+
+export const defaultConfig = {
+  aliases: {
+    stable: 'https://kubernetes-charts.storage.googleapis.com/',
+  },
+  commitMessageTopic: 'helm chart {{depName}}',
+  fileMatch: ['(^|/)helmfile.yaml$'],
+};
diff --git a/lib/manager/homebrew/index.ts b/lib/manager/homebrew/index.ts
index 730b5b60ba..9e04159829 100644
--- a/lib/manager/homebrew/index.ts
+++ b/lib/manager/homebrew/index.ts
@@ -1,2 +1,8 @@
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
+
+export const defaultConfig = {
+  commitMessageTopic: 'Homebrew Formula {{depName}}',
+  managerBranchPrefix: 'homebrew-',
+  fileMatch: ['^Formula/[^/]+[.]rb$'],
+};
diff --git a/lib/manager/index.ts b/lib/manager/index.ts
index 2cf55c069c..9a691c0a57 100644
--- a/lib/manager/index.ts
+++ b/lib/manager/index.ts
@@ -10,7 +10,7 @@ import {
   Result,
   PackageUpdateResult,
 } from './common';
-import { RangeStrategy } from '../versioning';
+import { RangeStrategy } from '../types';
 import {
   LANGUAGE_DART,
   LANGUAGE_DOCKER,
@@ -43,8 +43,8 @@ function loadManagers(): void {
     let module = null;
     try {
       module = require(`./${manager}`); // eslint-disable-line
-    } catch (e) /* istanbul ignore next */ {
-      logger.fatal(`Can not load manager "${manager}".`);
+    } catch (err) /* istanbul ignore next */ {
+      logger.fatal({ err }, `Can not load manager "${manager}".`);
       process.exit(1);
     }
 
@@ -76,6 +76,7 @@ export const get = <T extends keyof ManagerApi>(
 ): ManagerApi[T] => managers[manager][name];
 export const getLanguageList = (): string[] => languageList;
 export const getManagerList = (): string[] => managerList;
+export const getManagers = (): Record<string, ManagerApi> => managers;
 
 export function extractAllPackageFiles(
   manager: string,
diff --git a/lib/manager/kubernetes/index.ts b/lib/manager/kubernetes/index.ts
index 2fa3dba3b3..52e995d9a2 100644
--- a/lib/manager/kubernetes/index.ts
+++ b/lib/manager/kubernetes/index.ts
@@ -4,3 +4,7 @@ export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
 
 export const language = LANGUAGE_DOCKER;
+
+export const defaultConfig = {
+  fileMatch: [],
+};
diff --git a/lib/manager/leiningen/index.ts b/lib/manager/leiningen/index.ts
index 730b5b60ba..b4ad8ba27f 100644
--- a/lib/manager/leiningen/index.ts
+++ b/lib/manager/leiningen/index.ts
@@ -1,2 +1,9 @@
+import { VERSION_SCHEME_MAVEN } from '../../constants/version-schemes';
+
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)project\\.clj$'],
+  versionScheme: VERSION_SCHEME_MAVEN,
+};
diff --git a/lib/manager/maven/index.ts b/lib/manager/maven/index.ts
index f66ffe8b6f..17d6cec59b 100644
--- a/lib/manager/maven/index.ts
+++ b/lib/manager/maven/index.ts
@@ -1,6 +1,12 @@
 import { LANGUAGE_JAVA } from '../../constants/languages';
+import { VERSION_SCHEME_MAVEN } from '../../constants/version-schemes';
 
 export { extractAllPackageFiles } from './extract';
 export { updateDependency } from './update';
 
 export const language = LANGUAGE_JAVA;
+
+export const defaultConfig = {
+  fileMatch: ['\\.pom\\.xml$', '(^|/)pom\\.xml$'],
+  versionScheme: VERSION_SCHEME_MAVEN,
+};
diff --git a/lib/manager/meteor/index.ts b/lib/manager/meteor/index.ts
index d98321add2..426b1451e1 100644
--- a/lib/manager/meteor/index.ts
+++ b/lib/manager/meteor/index.ts
@@ -4,3 +4,7 @@ export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
 
 export const language = LANGUAGE_JAVASCRIPT;
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)package.js$'],
+};
diff --git a/lib/manager/mix/index.ts b/lib/manager/mix/index.ts
index 74daad6307..6f7ceb65cc 100644
--- a/lib/manager/mix/index.ts
+++ b/lib/manager/mix/index.ts
@@ -1,7 +1,13 @@
 import { LANGUAGE_ELIXIR } from '../../constants/languages';
+import { VERSION_SCHEME_HEX } from '../../constants/version-schemes';
 
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
 export { updateArtifacts } from './artifacts';
 
 export const language = LANGUAGE_ELIXIR;
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)mix\\.exs$'],
+  versionScheme: VERSION_SCHEME_HEX,
+};
diff --git a/lib/manager/npm/index.ts b/lib/manager/npm/index.ts
index 4a720f6ace..d525196a5a 100644
--- a/lib/manager/npm/index.ts
+++ b/lib/manager/npm/index.ts
@@ -1,4 +1,5 @@
 import { LANGUAGE_JAVASCRIPT } from '../../constants/languages';
+import { VERSION_SCHEME_NPM } from '../../constants/version-schemes';
 
 export { extractAllPackageFiles } from './extract';
 export { updateDependency } from './update';
@@ -6,3 +7,13 @@ export { getRangeStrategy } from './range';
 
 export const language = LANGUAGE_JAVASCRIPT;
 export const supportsLockFileMaintenance = true;
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)package.json$'],
+  rollbackPrs: true,
+  versionScheme: VERSION_SCHEME_NPM,
+  prBodyDefinitions: {
+    Change:
+      '[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}](https://renovatebot.com/diffs/npm/{{{depNameEscaped}}}/{{{fromVersion}}}/{{{toVersion}}})',
+  },
+};
diff --git a/lib/manager/nuget/index.ts b/lib/manager/nuget/index.ts
index 2247443f31..1f72177ac2 100644
--- a/lib/manager/nuget/index.ts
+++ b/lib/manager/nuget/index.ts
@@ -4,3 +4,7 @@ export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
 
 export const language = LANGUAGE_DOT_NET;
+
+export const defaultConfig = {
+  fileMatch: ['\\.(?:cs|fs|vb)proj$'],
+};
diff --git a/lib/manager/nvm/index.ts b/lib/manager/nvm/index.ts
index 5a1a44228c..07648c91d2 100644
--- a/lib/manager/nvm/index.ts
+++ b/lib/manager/nvm/index.ts
@@ -1,6 +1,12 @@
 import { LANGUAGE_NODE } from '../../constants/languages';
+import { VERSION_SCHEME_NODE } from '../../constants/version-schemes';
 
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
 
 export const language = LANGUAGE_NODE;
+
+export const defaultConfig = {
+  fileMatch: ['^.nvmrc$'],
+  versionScheme: VERSION_SCHEME_NODE,
+};
diff --git a/lib/manager/pip_requirements/index.ts b/lib/manager/pip_requirements/index.ts
index e4f823e0cb..545cb990f9 100644
--- a/lib/manager/pip_requirements/index.ts
+++ b/lib/manager/pip_requirements/index.ts
@@ -5,3 +5,7 @@ export { updateDependency } from './update';
 export { getRangeStrategy } from './range';
 
 export const language = LANGUAGE_PYTHON;
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)([\\w-]*)requirements.(txt|pip)$'],
+};
diff --git a/lib/manager/pip_setup/index.ts b/lib/manager/pip_setup/index.ts
index c7d178c520..2fea579e20 100644
--- a/lib/manager/pip_setup/index.ts
+++ b/lib/manager/pip_setup/index.ts
@@ -4,3 +4,7 @@ export { extractPackageFile } from './extract';
 export { updateDependency } from '../pip_requirements/update';
 
 export const language = LANGUAGE_PYTHON;
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)setup.py$'],
+};
diff --git a/lib/manager/pipenv/index.ts b/lib/manager/pipenv/index.ts
index 0141fb6fcc..cdcd7b33ab 100644
--- a/lib/manager/pipenv/index.ts
+++ b/lib/manager/pipenv/index.ts
@@ -5,3 +5,7 @@ export { updateDependency } from './update';
 export { updateArtifacts } from './artifacts';
 
 export const language = LANGUAGE_PYTHON;
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)Pipfile$'],
+};
diff --git a/lib/manager/poetry/index.ts b/lib/manager/poetry/index.ts
index c7622cab76..1d827eaecd 100644
--- a/lib/manager/poetry/index.ts
+++ b/lib/manager/poetry/index.ts
@@ -1,4 +1,5 @@
 import { LANGUAGE_PYTHON } from '../../constants/languages';
+import { VERSION_SCHEME_POETRY } from '../../constants/version-schemes';
 
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
@@ -6,3 +7,8 @@ export { updateArtifacts } from './artifacts';
 
 export const language = LANGUAGE_PYTHON;
 export const supportsLockFileMaintenance = true;
+
+export const defaultConfig = {
+  versionScheme: VERSION_SCHEME_POETRY,
+  fileMatch: ['(^|/)pyproject\\.toml$'],
+};
diff --git a/lib/manager/pub/index.ts b/lib/manager/pub/index.ts
index 730b5b60ba..df8273074e 100644
--- a/lib/manager/pub/index.ts
+++ b/lib/manager/pub/index.ts
@@ -1,2 +1,9 @@
+import { VERSION_SCHEME_NPM } from '../../constants/version-schemes';
+
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)pubspec\\.ya?ml$'],
+  versionScheme: VERSION_SCHEME_NPM,
+};
diff --git a/lib/manager/ruby-version/index.ts b/lib/manager/ruby-version/index.ts
index 8903806a38..303d6c674c 100644
--- a/lib/manager/ruby-version/index.ts
+++ b/lib/manager/ruby-version/index.ts
@@ -1,6 +1,12 @@
 import { LANGUAGE_RUBY } from '../../constants/languages';
+import { VERSION_SCHEME_RUBY } from '../../constants/version-schemes';
 
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
 
 export const language = LANGUAGE_RUBY;
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)\\.ruby-version$'],
+  versionScheme: VERSION_SCHEME_RUBY,
+};
diff --git a/lib/manager/sbt/index.ts b/lib/manager/sbt/index.ts
index 730b5b60ba..474a825545 100644
--- a/lib/manager/sbt/index.ts
+++ b/lib/manager/sbt/index.ts
@@ -1,2 +1,10 @@
+import { VERSION_SCHEME_IVY } from '../../constants/version-schemes';
+
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
+
+export const defaultConfig = {
+  fileMatch: ['\\.sbt$', 'project/[^/]*.scala$'],
+  timeout: 300,
+  versionScheme: VERSION_SCHEME_IVY,
+};
diff --git a/lib/manager/swift/index.ts b/lib/manager/swift/index.ts
index 730b5b60ba..8446047522 100644
--- a/lib/manager/swift/index.ts
+++ b/lib/manager/swift/index.ts
@@ -1,2 +1,10 @@
+import { VERSION_SCHEME_SWIFT } from '../../constants/version-schemes';
+
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
+
+export const defaultConfig = {
+  fileMatch: ['(^|/)Package\\.swift'],
+  versionScheme: VERSION_SCHEME_SWIFT,
+  rangeStrategy: 'bump',
+};
diff --git a/lib/manager/terraform/index.ts b/lib/manager/terraform/index.ts
index 730b5b60ba..4d652ec159 100644
--- a/lib/manager/terraform/index.ts
+++ b/lib/manager/terraform/index.ts
@@ -1,2 +1,11 @@
+import { VERSION_SCHEME_HASHICORP } from '../../constants/version-schemes';
+
 export { extractPackageFile } from './extract';
 export { updateDependency } from './update';
+
+export const defaultConfig = {
+  commitMessageTopic:
+    'Terraform {{managerData.terraformDependencyType}} {{depNameShort}}',
+  fileMatch: ['\\.tf$'],
+  versionScheme: VERSION_SCHEME_HASHICORP,
+};
diff --git a/lib/manager/travis/index.ts b/lib/manager/travis/index.ts
index 1dd505999c..520bdaffd9 100644
--- a/lib/manager/travis/index.ts
+++ b/lib/manager/travis/index.ts
@@ -1,7 +1,13 @@
 import { LANGUAGE_NODE } from '../../constants/languages';
+import { VERSION_SCHEME_NODE } from '../../constants/version-schemes';
 
 export { extractPackageFile } from './extract';
 export { getPackageUpdates } from './package';
 export { updateDependency } from './update';
 
 export const language = LANGUAGE_NODE;
+
+export const defaultConfig = {
+  fileMatch: ['^.travis.yml$'],
+  versionScheme: VERSION_SCHEME_NODE,
+};
diff --git a/lib/types/index.ts b/lib/types/index.ts
new file mode 100644
index 0000000000..668de19dbd
--- /dev/null
+++ b/lib/types/index.ts
@@ -0,0 +1 @@
+export * from './versioning';
diff --git a/lib/types/versioning.ts b/lib/types/versioning.ts
new file mode 100644
index 0000000000..9a5288231f
--- /dev/null
+++ b/lib/types/versioning.ts
@@ -0,0 +1,8 @@
+export type RangeStrategy =
+  | 'auto'
+  | 'bump'
+  | 'future'
+  | 'pin'
+  | 'replace'
+  | 'update-lockfile'
+  | 'widen';
diff --git a/lib/versioning/common.ts b/lib/versioning/common.ts
index c1e3a5aba8..8082832e61 100644
--- a/lib/versioning/common.ts
+++ b/lib/versioning/common.ts
@@ -1,13 +1,10 @@
 import { SemVer, Range } from 'semver';
+import { RangeStrategy as _RangeStrategy } from '../types';
 
-export type RangeStrategy =
-  | 'auto'
-  | 'bump'
-  | 'future'
-  | 'pin'
-  | 'replace'
-  | 'update-lockfile'
-  | 'widen';
+/**
+ * @deprecated import from `lib/types`
+ */
+export type RangeStrategy = _RangeStrategy;
 
 export interface NewValueConfig {
   currentValue: string;
diff --git a/renovate-schema.json b/renovate-schema.json
index 23f5be03ea..2536ef63e7 100644
--- a/renovate-schema.json
+++ b/renovate-schema.json
@@ -29,7 +29,7 @@
       "default": []
     },
     "ansible": {
-      "description": "Configuration object for Ansible yaml renovation. Also inherits settings from `docker` object.",
+      "description": "Configuration object for the ansible manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)tasks/[^/]+\\.ya?ml$"]
@@ -98,7 +98,7 @@
       "type": "string"
     },
     "bazel": {
-      "description": "Configuration object for bazel WORKSPACE renovation",
+      "description": "Configuration object for the bazel manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)WORKSPACE$", "\\.bzl$"]
@@ -132,7 +132,7 @@
       "default": "{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}"
     },
     "buildkite": {
-      "description": "Configuration object for buildkite pipeline renovation",
+      "description": "Configuration object for the buildkite manager",
       "type": "object",
       "default": {
         "fileMatch": ["buildkite\\.ya?ml", "\\.buildkite/.+\\.ya?ml$"],
@@ -148,7 +148,7 @@
       "enum": ["major", "minor", "patch"]
     },
     "bundler": {
-      "description": "Configuration object for bundler Gemfiles",
+      "description": "Configuration object for the bundler manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)Gemfile$"],
@@ -161,7 +161,7 @@
       "type": "string"
     },
     "cargo": {
-      "description": "Configuration object for Cargo crate renovation.",
+      "description": "Configuration object for the cargo manager",
       "type": "object",
       "default": {
         "commitMessageTopic": "Rust crate {{depName}}",
@@ -173,7 +173,7 @@
       "$ref": "#"
     },
     "cdnurl": {
-      "description": "Configuration object for CDN assets",
+      "description": "Configuration object for the cdnurl manager",
       "type": "object",
       "default": {
         "fileMatch": [],
@@ -182,7 +182,7 @@
       "$ref": "#"
     },
     "circleci": {
-      "description": "Configuration object for CircleCI yml renovation. Also inherits settings from `docker` object.",
+      "description": "Configuration object for the circleci manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/).circleci/config.yml$"]
@@ -233,7 +233,7 @@
       "$ref": "#"
     },
     "composer": {
-      "description": "Configuration object for composer.json files",
+      "description": "Configuration object for the composer manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)([\\w-]*)composer.json$"],
@@ -247,7 +247,7 @@
       "default": true
     },
     "deps-edn": {
-      "description": "Configuration object for renovating Clojure CLI-based projects (deps.edn)",
+      "description": "Configuration object for the deps-edn manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)deps\\.edn$"],
@@ -307,7 +307,7 @@
       "$ref": "#"
     },
     "docker-compose": {
-      "description": "Configuration object for Docker Compose renovation. Also inherits settings from `docker` object.",
+      "description": "Configuration object for the docker-compose manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)docker-compose[^/]*\\.ya?ml$"]
@@ -324,7 +324,7 @@
       "type": "string"
     },
     "dockerfile": {
-      "description": "Configuration object for Dockerfile renovation",
+      "description": "Configuration object for the dockerfile manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)Dockerfile$", "(^|/)Dockerfile\\.[^/]*$"]
@@ -338,7 +338,7 @@
       "$ref": "#"
     },
     "droneci": {
-      "description": "Configuration object for DroneCI yml renovation. Also inherits settings from `docker` object.",
+      "description": "Configuration object for the droneci manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/).drone.yml$"]
@@ -418,7 +418,7 @@
       "default": false
     },
     "git-submodules": {
-      "description": "Configuration object for git submodule files",
+      "description": "Configuration object for the git-submodules manager",
       "type": "object",
       "default": {
         "enabled": false,
@@ -441,7 +441,7 @@
       "type": "string"
     },
     "github-actions": {
-      "description": "Configuration object for GitHub Actions workflow renovation. Also inherits settings from `docker` object.",
+      "description": "Configuration object for the github-actions manager",
       "type": "object",
       "default": {
         "fileMatch": [
@@ -453,7 +453,7 @@
       "$ref": "#"
     },
     "gitlabci": {
-      "description": "Configuration object for GitLab CI yml renovation. Also inherits settings from `docker` object.",
+      "description": "Configuration object for the gitlabci manager",
       "type": "object",
       "default": {
         "fileMatch": ["^\\.gitlab-ci\\.yml$"]
@@ -461,7 +461,7 @@
       "$ref": "#"
     },
     "gitlabci-include": {
-      "description": "Configuration object for GitLab CI yml renovation for include.",
+      "description": "Configuration object for the gitlabci-include manager",
       "type": "object",
       "default": {
         "fileMatch": ["^\\.gitlab-ci\\.yml$"]
@@ -477,7 +477,7 @@
       "$ref": "#"
     },
     "gomod": {
-      "description": "Configuration object for Go modules renovation",
+      "description": "Configuration object for the gomod manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)go.mod$"]
@@ -485,7 +485,7 @@
       "$ref": "#"
     },
     "gradle": {
-      "description": "Configuration object for build.gradle files",
+      "description": "Configuration object for the gradle manager",
       "type": "object",
       "default": {
         "fileMatch": ["\\.gradle(\\.kts)?$", "(^|/)gradle.properties$"],
@@ -495,7 +495,7 @@
       "$ref": "#"
     },
     "gradle-wrapper": {
-      "description": "Configuration object for gradle-wrapper.properties files",
+      "description": "Configuration object for the gradle-wrapper manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)gradle/wrapper/gradle-wrapper.properties$"]
@@ -522,7 +522,7 @@
       "default": null
     },
     "helm-requirements": {
-      "description": "Configuration object for helm requirements.yaml files.",
+      "description": "Configuration object for the helm-requirements manager",
       "type": "object",
       "default": {
         "aliases": {
@@ -534,7 +534,7 @@
       "$ref": "#"
     },
     "helm-values": {
-      "description": "Configuration object for helm values.yaml files.",
+      "description": "Configuration object for the helm-values manager",
       "type": "object",
       "default": {
         "commitMessageTopic": "helm values {{depName}}",
@@ -543,7 +543,7 @@
       "$ref": "#"
     },
     "helmfile": {
-      "description": "Configuration object for helmfile helmfile.yaml files.",
+      "description": "Configuration object for the helmfile manager",
       "type": "object",
       "default": {
         "aliases": {
@@ -555,7 +555,7 @@
       "$ref": "#"
     },
     "homebrew": {
-      "description": "Configuration object for homebrew",
+      "description": "Configuration object for the homebrew manager",
       "type": "object",
       "default": {
         "commitMessageTopic": "Homebrew Formula {{depName}}",
@@ -673,7 +673,7 @@
       "$ref": "#"
     },
     "kubernetes": {
-      "description": "Configuration object for Kubernetes renovation. Also inherits settings from `docker` object.",
+      "description": "Configuration object for the kubernetes manager",
       "type": "object",
       "default": {
         "fileMatch": []
@@ -693,7 +693,7 @@
       "default": true
     },
     "leiningen": {
-      "description": "Configuration object for renovating Clojure leiningen projects",
+      "description": "Configuration object for the leiningen manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)project\\.clj$"],
@@ -767,7 +767,7 @@
       "default": "Update Dependencies (Renovate Bot)"
     },
     "maven": {
-      "description": "Configuration object for when renovating Maven pom.xml files",
+      "description": "Configuration object for the maven manager",
       "type": "object",
       "default": {
         "fileMatch": ["\\.pom\\.xml$", "(^|/)pom\\.xml$"],
@@ -776,7 +776,7 @@
       "$ref": "#"
     },
     "meteor": {
-      "description": "Configuration object for meteor package.js renovation",
+      "description": "Configuration object for the meteor manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)package.js$"]
@@ -790,7 +790,7 @@
       "$ref": "#"
     },
     "mix": {
-      "description": "Configuration object for Mix module renovation",
+      "description": "Configuration object for the mix manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)mix\\.exs$"],
@@ -810,7 +810,7 @@
       "$ref": "#"
     },
     "npm": {
-      "description": "Configuration object for npm package.json renovation",
+      "description": "Configuration object for the npm manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)package.json$"],
@@ -831,7 +831,7 @@
       "type": "string"
     },
     "nuget": {
-      "description": "Configuration object for C#/Nuget",
+      "description": "Configuration object for the nuget manager",
       "type": "object",
       "default": {
         "fileMatch": ["\\.(?:cs|fs|vb)proj$"]
@@ -839,7 +839,7 @@
       "$ref": "#"
     },
     "nvm": {
-      "description": "Configuration object for .nvmrc files",
+      "description": "Configuration object for the nvm manager",
       "type": "object",
       "default": {
         "fileMatch": ["^.nvmrc$"],
@@ -1033,7 +1033,7 @@
       "default": false
     },
     "pip_requirements": {
-      "description": "Configuration object for requirements.txt files",
+      "description": "Configuration object for the pip_requirements manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)([\\w-]*)requirements.(txt|pip)$"]
@@ -1041,7 +1041,7 @@
       "$ref": "#"
     },
     "pip_setup": {
-      "description": "Configuration object for setup.py files",
+      "description": "Configuration object for the pip_setup manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)setup.py$"]
@@ -1049,7 +1049,7 @@
       "$ref": "#"
     },
     "pipenv": {
-      "description": "Configuration object for Pipfile files",
+      "description": "Configuration object for the pipenv manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)Pipfile$"]
@@ -1063,7 +1063,7 @@
       "default": "github"
     },
     "poetry": {
-      "description": "Configuration object for pyproject.toml files",
+      "description": "Configuration object for the poetry manager",
       "type": "object",
       "default": {
         "versionScheme": "poetry",
@@ -1207,7 +1207,7 @@
       "default": true
     },
     "pub": {
-      "description": "Configuration object for when renovating Dart pubspec files",
+      "description": "Configuration object for the pub manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)pubspec\\.ya?ml$"],
@@ -1301,7 +1301,7 @@
       "$ref": "#"
     },
     "ruby-version": {
-      "description": "Configuration object for .ruby-version updating",
+      "description": "Configuration object for the ruby-version manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)\\.ruby-version$"],
@@ -1316,7 +1316,7 @@
       "$ref": "#"
     },
     "sbt": {
-      "description": "Configuration object for *.sbt files",
+      "description": "Configuration object for the sbt manager",
       "type": "object",
       "default": {
         "fileMatch": ["\\.sbt$", "project/[^/]*.scala$"],
@@ -1390,7 +1390,7 @@
       "default": ["deprecationWarningIssues"]
     },
     "swift": {
-      "description": "Configuration for Package.swift files",
+      "description": "Configuration object for the swift manager",
       "type": "object",
       "default": {
         "fileMatch": ["(^|/)Package\\.swift"],
@@ -1400,7 +1400,7 @@
       "$ref": "#"
     },
     "terraform": {
-      "description": "Configuration object for Terraform dependencies renovation",
+      "description": "Configuration object for the terraform manager",
       "type": "object",
       "default": {
         "commitMessageTopic": "Terraform {{managerData.terraformDependencyType}} {{depNameShort}}",
@@ -1418,7 +1418,7 @@
       "type": "string"
     },
     "travis": {
-      "description": "Configuration object for .travis.yml node version renovation",
+      "description": "Configuration object for the travis manager",
       "type": "object",
       "default": {
         "fileMatch": ["^.travis.yml$"],
-- 
GitLab