@next/codemod 16.4.0-canary.34 → 16.4.0-canary.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/upgrade.js +8 -1
- package/package.json +1 -1
package/bin/upgrade.js
CHANGED
|
@@ -371,7 +371,14 @@ async function runUpgrade(revision, options) {
|
|
|
371
371
|
// https://github.com/codemod-com/codemod/blob/c0cf00d13161a0ec0965b6cc6bc5d54076839cc8/apps/cli/src/flags.ts#L160
|
|
372
372
|
// `--allow-dirty` is required because the upgrade above modified package.json
|
|
373
373
|
// and the lockfile; the recipe refuses to run on a dirty tree otherwise.
|
|
374
|
-
|
|
374
|
+
try {
|
|
375
|
+
(0, child_process_1.execSync)(`${execCommand} codemod@latest react/19/migration-recipe --no-interactive --allow-dirty`, { stdio: 'inherit' });
|
|
376
|
+
}
|
|
377
|
+
catch (error) {
|
|
378
|
+
// TODO: Remove this fallback once codemod publishes a Linux binary that
|
|
379
|
+
// supports the glibc versions used by our upgrade environments.
|
|
380
|
+
console.warn(new Error(`${picocolors_1.default.yellow('⚠')} The React 19 codemod could not run. Continue the upgrade and review the React 19 migration guide manually.`, { cause: error }));
|
|
381
|
+
}
|
|
375
382
|
}
|
|
376
383
|
if (shouldRunReactTypesCodemods) {
|
|
377
384
|
// https://react.dev/blog/2024/04/25/react-19-upgrade-guide#typescript-changes
|