Unverified Commit e754c2d4 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

next-upgrade: Only run React 19 codemods when we upgrade to React 19 (#71389)

parent 22eff625
......@@ -178,7 +178,8 @@ export async function runUpgrade(
// The following React codemods are for React 19
if (
!shouldStayOnReact18 &&
compareVersions(targetReactVersion, '19.0.0-beta.0') >= 0
compareVersions(targetReactVersion, '18.9999.9999') > 0 &&
compareVersions(installedReactVersion, '18.9999.9999') <= 0
) {
shouldRunReactCodemods = await suggestReactCodemods()
shouldRunReactTypesCodemods = await suggestReactTypesCodemods()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment