From a9add5eef57d754303fe75f2fc7dc79aca2a38a0 Mon Sep 17 00:00:00 2001 From: Mikhail Novikov Date: Thu, 23 Apr 2020 15:55:28 +0300 Subject: [PATCH] chore(all): Improve renovate (#23411) --- renovate.json5 | 116 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 105 insertions(+), 11 deletions(-) diff --git a/renovate.json5 b/renovate.json5 index c6f5408f60228..29f82c289ec98 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -1,5 +1,16 @@ { - extends: ["config:base", ":disablePeerDependencies"], + extends: [ + ":separateMajorReleases", + ":combinePatchMinorReleases", + ":ignoreUnstable", + ":prImmediately", + ":semanticPrefixFixDepsChoreOthers", + ":updateNotScheduled", + ":automergeDisabled", + ":disablePeerDependencies", + ":maintainLockFilesDisabled", + ":disableRateLimiting", + ], includePaths: [ "package.json", "packages/**", @@ -7,19 +18,40 @@ "starters/**", "examples/**", ], + ignorePaths: [ + "**/node_modules/**", + "**/bower_components/**", + "**/vendor/**", + "**/__tests__/**", + "**/test/**", + "**/tests/**", + "**/__fixtures__/**", + ], major: { masterIssueApproval: true, }, masterIssue: true, - rebaseStalePrs: false, ignoreDeps: ["react", "react-dom"], rangeStrategy: "bump", bumpVersion: null, semanticCommitScope: null, prHourlyLimit: 0, packageRules: [ + // these rules define group names + { + groupName: "packages", + paths: ["package.json", "packages/**"], + }, + { + groupName: "www", + paths: ["www/package.json"], + }, + { + groupName: "starters and examples", + paths: ["starters/**", "examples/**"], + }, + // these rules define dependencies that we have special handling for { - groupName: "minor updates in packages", updateTypes: ["minor"], excludePackageNames: [ // below is list of packages that use 0.X version range, any minor bump there can contain breaking changes, so we just ignore minor bumps for those packages and will need to bump them manually @@ -47,9 +79,12 @@ "react-docgen", ], }, + // we need to replicate this so that it goes to a separate group { // minor updates in packages <1.0.0 - need master issue approval // not grouped + groupName: "packages (<1.0.0 minor)", + paths: ["package.json", "packages/**"], masterIssueApproval: true, updateTypes: ["minor"], packageNames: [ @@ -79,21 +114,80 @@ ], }, { - groupName: "patch updates in packages", - updateTypes: ["patch"], + // minor updates in packages <1.0.0 - need master issue approval + // not grouped + groupName: "www (<1.0.0 minor)", + paths: ["www/package.json"], + masterIssueApproval: true, + updateTypes: ["minor"], + packageNames: [ + // below is list of packages that use 0.X version range, any minor bump there can contain breaking changes, so we just ignore minor bumps for those packages and will need to bump them manually + "@reach/skip-nav", + "@theme-ui/prism", + "@theme-ui/typography", + "axios", + "babel-preset-gatsby", + "sharp", + "gatsby-plugin-theme-ui", + "graphiql-explorer", + "guess-webpack", + "jest-silent-reporter", + "js-combinatorics", + "jscodeshift", + "mini-css-extract-plugin", + "react-refresh", + "scroll-behavior", + "theme-ui", + "webpack-stats-plugin", + "xlsx", + "zipkin", + "zipkin-transport-http", + // below is list of packages that we use alpha/beta/next/canary, where it's not really safe to bump automatically and need extra caution + "react-docgen", + ], }, { - depTypeList: ["engines"], - enabled: false, + // minor updates in packages <1.0.0 - need master issue approval + // not grouped + groupName: "starters and examples (<1.0.0 minor)", + paths: ["starters/**", "examples/**"], + masterIssueApproval: true, + updateTypes: ["minor"], + packageNames: [ + // below is list of packages that use 0.X version range, any minor bump there can contain breaking changes, so we just ignore minor bumps for those packages and will need to bump them manually + "@reach/skip-nav", + "@theme-ui/prism", + "@theme-ui/typography", + "axios", + "babel-preset-gatsby", + "sharp", + "gatsby-plugin-theme-ui", + "graphiql-explorer", + "guess-webpack", + "jest-silent-reporter", + "js-combinatorics", + "jscodeshift", + "mini-css-extract-plugin", + "react-refresh", + "scroll-behavior", + "theme-ui", + "webpack-stats-plugin", + "xlsx", + "zipkin", + "zipkin-transport-http", + // below is list of packages that we use alpha/beta/next/canary, where it's not really safe to bump automatically and need extra caution + "react-docgen", + ], }, { - groupName: "updates in starters", - paths: ["starters/**"], - updateTypes: ["patch"], + depTypeList: ["engines"], + enabled: false, }, { - groupName: "type updates", + groupName: "types", packagePatterns: ["^@types"], + // only upgrade types with approval as they can break transitives + masterIssueApproval: true, }, ], timezone: "GMT",