renovate.json5 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. {
  2. $schema: 'https://docs.renovatebot.com/renovate-schema.json',
  3. extends: [
  4. 'config:recommended',
  5. ':labels(dependencies)',
  6. ':maintainLockFilesMonthly', // update non-direct dependencies monthly
  7. ':prConcurrentLimitNone', // Remove limit for open PRs at any time.
  8. ':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour.
  9. ],
  10. minimumReleaseAge: '3', // Wait 3 days after the package has been published before upgrading it
  11. // packageRules order is important, they are applied from top to bottom and are merged,
  12. // meaning the most important ones must be at the bottom, for example grouping rules
  13. // If we do not want a package to be grouped with others, we need to set its groupName
  14. // to `null` after any other rule set it to something.
  15. 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).',
  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. '@types/webpack',
  25. 'babel-loader',
  26. 'compression-webpack-plugin',
  27. 'css-loader',
  28. 'imports-loader',
  29. 'mini-css-extract-plugin',
  30. 'postcss-loader',
  31. 'sass-loader',
  32. 'terser-webpack-plugin',
  33. 'webpack',
  34. 'webpack-assets-manifest',
  35. 'webpack-bundle-analyzer',
  36. 'webpack-dev-server',
  37. 'webpack-cli',
  38. // react-router: Requires manual upgrade
  39. 'history',
  40. 'react-router-dom',
  41. ],
  42. matchUpdateTypes: ['major'],
  43. dependencyDashboardApproval: true,
  44. },
  45. {
  46. // Require Dependency Dashboard Approval for major version bumps of these Ruby packages
  47. matchManagers: ['bundler'],
  48. matchPackageNames: [
  49. 'rack', // Needs to be synced with Rails version
  50. 'sprockets', // Requires manual upgrade https://github.com/rails/sprockets/blob/master/UPGRADING.md#guide-to-upgrading-from-sprockets-3x-to-4x
  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. // Update @types/* packages every week, with one grouped PR
  102. matchPackagePrefixes: '@types/',
  103. matchUpdateTypes: ['patch', 'minor'],
  104. groupName: 'DefinitelyTyped types (non-major)',
  105. extends: ['schedule:weekly'],
  106. addLabels: ['typescript'],
  107. },
  108. {
  109. // We want those packages to always have their own PR
  110. matchManagers: ['npm'],
  111. matchPackageNames: [
  112. 'typescript', // Typescript has code-impacting changes in minor versions
  113. ],
  114. groupName: null, // We dont want them to belong to any group
  115. },
  116. // Add labels depending on package manager
  117. { matchManagers: ['npm', 'nvm'], addLabels: ['javascript'] },
  118. { matchManagers: ['bundler', 'ruby-version'], addLabels: ['ruby'] },
  119. { matchManagers: ['docker-compose', 'dockerfile'], addLabels: ['docker'] },
  120. { matchManagers: ['github-actions'], addLabels: ['github_actions'] },
  121. ],
  122. }