deprecate support for react-router beta

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-11-23 16:43:19 +01:00
parent 9a0bb13e29
commit 3e358b0dff
3 changed files with 31 additions and 1 deletions
+14
View File
@@ -72,6 +72,20 @@ export async function serveBundle(options: ServeOptions) {
),
);
}
if (
targetPkg.dependencies?.['react-router']?.includes('beta') ||
targetPkg.dependencies?.['react-router-dom']?.includes('beta')
) {
// eslint-disable-next-line no-console
console.warn(
chalk.yellow(`
DEPRECATION WARNING: React Router Beta is deprecated and support for it will be removed in a future release.
Please migrate to use React Router v6 stable.
See https://backstage.io/docs/tutorials/react-router-stable-migration
`),
);
}
}
checkReactVersion();