renovate.json5 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. {
  2. $schema: 'https://docs.renovatebot.com/renovate-schema.json',
  3. extends: [
  4. 'config:recommended',
  5. ':labels(dependencies)',
  6. ':prConcurrentLimitNone', // Remove limit for open PRs at any time.
  7. ':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour.
  8. ],
  9. minimumReleaseAge: '3', // Wait 3 days after the package has been published before upgrading it
  10. // packageRules order is important, they are applied from top to bottom and are merged,
  11. // meaning the most important ones must be at the bottom, for example grouping rules
  12. // If we do not want a package to be grouped with others, we need to set its groupName
  13. // to `null` after any other rule set it to something.
  14. dependencyDashboardHeader: 'This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more. Before approving any upgrade: read the description and comments in the [`renovate.json5` file](https://github.com/mastodon/mastodon/blob/main/.github/renovate.json5).',
  15. postUpdateOptions: ['yarnDedupeHighest'],
  16. packageRules: [
  17. {
  18. // Require Dependency Dashboard Approval for major version bumps of these node packages
  19. matchManagers: ['npm'],
  20. matchPackageNames: [
  21. 'tesseract.js', // Requires code changes
  22. 'react-hotkeys', // Requires code changes
  23. // Requires Webpacker upgrade or replacement
  24. '@svgr/webpack',
  25. '@types/webpack',
  26. 'babel-loader',
  27. 'compression-webpack-plugin',
  28. 'css-loader',
  29. 'imports-loader',
  30. 'mini-css-extract-plugin',
  31. 'postcss-loader',
  32. 'sass-loader',
  33. 'terser-webpack-plugin',
  34. 'webpack',
  35. 'webpack-assets-manifest',
  36. 'webpack-bundle-analyzer',
  37. 'webpack-dev-server',
  38. 'webpack-cli',
  39. // react-router: Requires manual upgrade
  40. 'history',
  41. 'react-router-dom',
  42. ],
  43. matchUpdateTypes: ['major'],
  44. dependencyDashboardApproval: true,
  45. },
  46. {
  47. // Require Dependency Dashboard Approval for major version bumps of these Ruby packages
  48. matchManagers: ['bundler'],
  49. matchPackageNames: [
  50. 'rack', // Needs to be synced with Rails version
  51. 'strong_migrations', // Requires manual upgrade
  52. 'sidekiq', // Requires manual upgrade
  53. 'sidekiq-unique-jobs', // Requires manual upgrades and sync with Sidekiq version
  54. 'redis', // Requires manual upgrade and sync with Sidekiq version
  55. ],
  56. matchUpdateTypes: ['major'],
  57. dependencyDashboardApproval: true,
  58. },
  59. {
  60. // Update Github Actions and Docker images weekly
  61. matchManagers: ['github-actions', 'dockerfile', 'docker-compose'],
  62. extends: ['schedule:weekly'],
  63. },
  64. {
  65. // Require Dependency Dashboard Approval for major & minor bumps for the ruby image, this needs to be synced with .ruby-version
  66. matchManagers: ['dockerfile'],
  67. matchPackageNames: ['moritzheiber/ruby-jemalloc'],
  68. matchUpdateTypes: ['minor', 'major'],
  69. dependencyDashboardApproval: true,
  70. },
  71. {
  72. // Require Dependency Dashboard Approval for major bumps for the node image, this needs to be synced with .nvmrc
  73. matchManagers: ['dockerfile'],
  74. matchPackageNames: ['node'],
  75. matchUpdateTypes: ['major'],
  76. dependencyDashboardApproval: true,
  77. },
  78. {
  79. // Require Dependency Dashboard Approval for major postgres bumps in the docker-compose file, as those break dev environments
  80. matchManagers: ['docker-compose'],
  81. matchPackageNames: ['postgres'],
  82. matchUpdateTypes: ['major'],
  83. dependencyDashboardApproval: true,
  84. },
  85. {
  86. // Update devDependencies every week, with one grouped PR
  87. matchDepTypes: 'devDependencies',
  88. matchUpdateTypes: ['patch', 'minor'],
  89. groupName: 'devDependencies (non-major)',
  90. extends: ['schedule:weekly'],
  91. },
  92. {
  93. // Group all eslint-related packages with `eslint` in the same PR
  94. matchManagers: ['npm'],
  95. matchPackageNames: ['eslint'],
  96. matchPackagePrefixes: ['eslint-', '@typescript-eslint/'],
  97. matchUpdateTypes: ['patch', 'minor'],
  98. groupName: 'eslint (non-major)',
  99. },
  100. {
  101. // Group actions/*-artifact in the same PR
  102. matchManagers: ['github-actions'],
  103. matchPackageNames: [
  104. 'actions/download-artifact',
  105. 'actions/upload-artifact',
  106. ],
  107. matchUpdateTypes: ['major'],
  108. groupName: 'artifact actions (major)',
  109. },
  110. {
  111. // Update @types/* packages every week, with one grouped PR
  112. matchPackagePrefixes: '@types/',
  113. matchUpdateTypes: ['patch', 'minor'],
  114. groupName: 'DefinitelyTyped types (non-major)',
  115. extends: ['schedule:weekly'],
  116. addLabels: ['typescript'],
  117. },
  118. {
  119. // We want those packages to always have their own PR
  120. matchManagers: ['npm'],
  121. matchPackageNames: [
  122. 'typescript', // Typescript has code-impacting changes in minor versions
  123. ],
  124. groupName: null, // We dont want them to belong to any group
  125. },
  126. // Add labels depending on package manager
  127. { matchManagers: ['npm', 'nvm'], addLabels: ['javascript'] },
  128. { matchManagers: ['bundler', 'ruby-version'], addLabels: ['ruby'] },
  129. { matchManagers: ['docker-compose', 'dockerfile'], addLabels: ['docker'] },
  130. { matchManagers: ['github-actions'], addLabels: ['github_actions'] },
  131. ],
  132. }