From 632ff4b9f1e9522d21d965916d1c1e6ccf43b1a3 Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Thu, 30 May 2024 09:58:40 +0200 Subject: [PATCH] docs: improve creating/editing Renovate presets (#29331) Co-authored-by: Sebastian Poxhofer --- .../creating-editing-renovate-presets.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/development/creating-editing-renovate-presets.md b/docs/development/creating-editing-renovate-presets.md index 1d4e59ad8f87bf..52779b6fd85c05 100644 --- a/docs/development/creating-editing-renovate-presets.md +++ b/docs/development/creating-editing-renovate-presets.md @@ -8,7 +8,7 @@ Follow the rules below to increase the chance that your pull request gets merged ## General rules 1. Avoid creating presets for problems which can be fixed upstream -1. The internal preset should be helpful for a significant number of Renovate users +1. The internal preset should help a significant number of Renovate users ### Specific rules @@ -22,24 +22,23 @@ We have multiple kinds of `group:` presets, with different rules. ##### Rules for `group:recommended` presets -1. The `group:recommended` preset is for related dependencies which aren't from a monorepo but which usually need to be updated together as separate PRs may each break +1. The `group:recommended` preset 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 1. Finally, any other `group:*` presets can be added if they are beneficial to a wide number of users -1. 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 from `config:recommended`, which includes `group:monorepo` and `group:recommended` +1. 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 from `config:recommended`, which includes `group:monorepo` and `group:recommended` -#### Replacement presets - -Rules: +#### Rules for replacement presets 1. Replacement PRs should ideally propose a replacement only once the user is on a compatible version, by specifying a compatible `matchCurrentVersion` constraint 1. If no compatible replacement upgrade is possible, it's acceptable to propose an incompatible one (e.g. a major version upgrade) -1. 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 +1. 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 -#### Monorepo presets +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: +#### Rules for monorepo presets 1. The primary use case of monorepo presets is finding packages from the same origin source repository which should be updated together 1. 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