From c94f3a4fae7c33c8f018cd777ca714334b1880eb Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 4 Jun 2024 15:47:11 +0200 Subject: [PATCH] Add hint that sync-react doesn't automate everything --- scripts/sync-react.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/sync-react.js b/scripts/sync-react.js index 1bcd2efb4bf2d..493054f5c070e 100644 --- a/scripts/sync-react.js +++ b/scripts/sync-react.js @@ -145,8 +145,6 @@ Or, run this command with no arguments to use the most recently published versio console.log() } - console.log(`Successfully updated React from ${baseSha} to ${newSha}.\n`) - // Fetch the changelog from GitHub and print it to the console. try { const changelog = await getChangelogFromGitHub(baseSha, newSha) @@ -178,6 +176,13 @@ Or run this command again without the --no-install flag to do both automatically ` ) } + + console.log( + `Successfully updated React from ${baseSha} to ${newSha}.\n` + + `Don't forget to find & replace all references to the React version '${baseVersionStr}' with '${newVersionStr}':\n` + + `-${baseVersionStr}\n` + + `+${newVersionStr}\n` + ) } function readBoolArg(argv, argName) { @@ -189,8 +194,8 @@ function readStringArg(argv, argName) { return argIndex === -1 ? null : argv[argIndex + 1] } -function extractInfoFromReactVersion(reactCanaryVersion) { - const match = reactCanaryVersion.match( +function extractInfoFromReactVersion(reactVersion) { + const match = reactVersion.match( /(?.*)-(?.*)-(?.*)-(?.*)$/ ) return match ? match.groups : null @@ -251,8 +256,8 @@ async function getChangelogFromGitHub(baseSha, newSha) { return changelog.length > 0 ? changelog.join('\n') : null } -sync('rc') - .then(() => sync('experimental')) +sync('experimental') + .then(() => sync('rc')) .catch((error) => { console.error(error) process.exit(1)