From 3c7af4f96b18d57cf5a52b9222bb9b10078d1646 Mon Sep 17 00:00:00 2001 From: "Sebastian \"Sebbie\" Silbermann" Date: Fri, 23 Aug 2024 01:39:34 +0200 Subject: [PATCH] sync-react: Print to console what should go into PR description (#69195) --- scripts/sync-react.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/sync-react.js b/scripts/sync-react.js index ce6ed4126435c..4119aff3fabe0 100644 --- a/scripts/sync-react.js +++ b/scripts/sync-react.js @@ -212,7 +212,16 @@ Or, run this command with no arguments to use the most recently published versio console.log() } + if (useAsPeerDependency) { + console.log( + `**breaking change for canary users: Bumps peer dependency of React from \`${baseVersionStr}\` to \`${newVersionStr}\`**` + ) + } + // Fetch the changelog from GitHub and print it to the console. + console.log( + `[diff facebook/react@${baseSha}...${newSha}](https://github.com/facebook/react/compare/${baseSha}...${newSha})` + ) try { const changelog = await getChangelogFromGitHub(baseSha, newSha) if (changelog === null) { @@ -252,10 +261,7 @@ 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` + `Successfully updated React from \`${baseSha}-${baseDateString}\` to \`${newSha}-${newDateString}\`` ) }