From 874b4089f0dfbeea026b786a71c6abb057ccae66 Mon Sep 17 00:00:00 2001 From: secustor Date: Mon, 9 Dec 2024 15:26:38 +0100 Subject: [PATCH] feat: add unsupported framework upgrades preset --- README.md | 3 ++ app.json5 | 1 + presets/unsupported-framework-upgrades.json | 38 +++++++++++++++++++++ self-hosted.json5 | 1 + 4 files changed, 43 insertions(+) create mode 100644 presets/unsupported-framework-upgrades.json diff --git a/README.md b/README.md index d0a95e0..80d7749 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,9 @@ This means that [`allowedPostUpgradeCommands`](https://docs.renovatebot.com/self ## Feature presets +### Unsupported Framework Upgrades +Prevent upgrades to frameworks that are not supported by Backstage. + ### Group by plugin Groups all PRs based on the plugin. Therefore, all updates of the `catalog` are grouped together including `catalog`, `catalog-backend` and so on. diff --git a/app.json5 b/app.json5 index 24873cd..8fd6214 100644 --- a/app.json5 +++ b/app.json5 @@ -2,6 +2,7 @@ $schema: "https://docs.renovatebot.com/renovate-schema.json", extends: [ "github>secustor/backstage-renovate-config//presets/no-esm", + "github>secustor/backstage-renovate-config//presets/unsupported-framework-upgrades", "github>secustor/backstage-renovate-config//presets/update-backstage-json" ], diff --git a/presets/unsupported-framework-upgrades.json b/presets/unsupported-framework-upgrades.json new file mode 100644 index 0000000..d85a665 --- /dev/null +++ b/presets/unsupported-framework-upgrades.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "packageRules": [ + { + "description": [ + "Do not upgrade to React Router v7", + "https://github.com/backstage/backstage/issues/27927" + ], + "matchSourceUrls": [ + "https://github.com/remix-run/react-router" + ], + "allowedVersions": "<7.0.0" + }, + { + "description": [ + "Do not upgrade to Express v5", + "https://github.com/backstage/backstage/issues/27808" + ], + "matchDatasources": [ + "npm" + ], + "matchPackageNames": [ + "express", + "@types/express", + "@types/express-serve-static-core" + ], + "allowedVersions": "<5.0.0" + }, + { + "description": [ + "Do not upgrade to React 19", + "https://github.com/backstage/backstage/issues/24554" + ], + "extends": ["packages:react"], + "allowedVersions": "<19.0.0" + } + ] +} \ No newline at end of file diff --git a/self-hosted.json5 b/self-hosted.json5 index 47af526..2baa570 100644 --- a/self-hosted.json5 +++ b/self-hosted.json5 @@ -2,6 +2,7 @@ $schema: "https://docs.renovatebot.com/renovate-schema.json", extends: [ "github>secustor/backstage-renovate-config//presets/no-esm", + "github>secustor/backstage-renovate-config//presets/unsupported-framework-upgrades", "github>secustor/backstage-renovate-config//presets/update-backstage-json" ],