Skip to content

Commit

Permalink
sync-react: Print to console what should go into PR description (#69195)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Aug 22, 2024
1 parent ead41db commit 3c7af4f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/sync-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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}\``
)
}

Expand Down

0 comments on commit 3c7af4f

Please sign in to comment.