Renovate
Creating Editing Renovate Presets
Creating/editing Renovate presets
Renovate comes with default presets that you can find in the lib/config/presets/internal directory.
You can suggest changes to the presets with a pull request.
Follow the rules below to increase the chance that your pull request gets merged.
General rules
- Avoid creating presets for problems which can be fixed upstream
- The internal preset should help a significant number of Renovate users
Specific rules
Group presets
We have multiple kinds of group: presets, with different rules.
Rules for group:monorepos preset
- Only group dependencies that must be updated together
Rules for group:recommended presets
- The
group:recommendedpreset is for related dependencies which aren’t from a monorepo but which usually need to be updated together (as separate PRs may each break)
Rules for group:* presets
- Finally, any other
group:*presets can be added if they are beneficial to a wide number of users - They don’t need to be added to
group:recommended, meaning that users will “opt in” to them one-by-one and not get them automatically fromconfig:recommended, which includesgroup:monoreposandgroup:recommended
Rules for replacement presets
- Replacement PRs should ideally propose a replacement only once the user is on a compatible version, by specifying a compatible
matchCurrentVersionconstraint - If no compatible replacement upgrade is possible, it’s acceptable to propose an incompatible one (e.g. a major version upgrade)
- Replacements should update the user to the first recommended version of the new dependency and not include any new changes - whether breaking or not - if they can be avoided, in short: pin the new version
If possible, replacement presets should give the user a replacement version that is functionally identical to the last version under the old name. We only want a user’s tests to fail because of broken references to the old package name, and not because the maintainer(s) changed the behavior of the package.
Rules for monorepo presets
- The primary use case of monorepo presets is finding packages from the same origin source repository which should be updated together
- Packages from the same repository which are developed and versioned independently do not need to be grouped as a monorepo, but in many cases we still do
- Packages from separate repositories but which are released together and dependent on each other may also be added to the “monorepo” definitions even if not strictly true
Rules for migrating presets
- Removing a preset: Add the preset name to the
removedPresetsobject inpresets/commonand set its value tonull - Renaming a preset: Add the old preset name to the
removedPresetsobject inpresets/commonand set its value to the new preset name - Renaming a monorepo preset: Add the old monorepo name to the
renamedMonoreposobject inpresets/commonand set its value to the new monorepo name