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
Upgrades React without prompt Upgrades React without prompt
Does not apply React 19 codemods
Upgrades React without prompt Upgrades React without prompt
Does not apply React 19 codemods
Upgrades React without prompt Upgrades React without prompt
Does not apply React 19 codemods
...@@ -178,7 +178,8 @@ export async function runUpgrade( ...@@ -178,7 +178,8 @@ export async function runUpgrade(
// The following React codemods are for React 19 // The following React codemods are for React 19
if ( if (
!shouldStayOnReact18 && !shouldStayOnReact18 &&
compareVersions(targetReactVersion, '19.0.0-beta.0') >= 0 compareVersions(targetReactVersion, '18.9999.9999') > 0 &&
compareVersions(installedReactVersion, '18.9999.9999') <= 0
) { ) {
shouldRunReactCodemods = await suggestReactCodemods() shouldRunReactCodemods = await suggestReactCodemods()
shouldRunReactTypesCodemods = await suggestReactTypesCodemods() 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