Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync-react: Print to console what should go into PR description #69195

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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` +
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manual updates are obsolete as of #69194

`-${baseVersionStr}\n` +
`+${newVersionStr}\n`
`Successfully updated React from \`${baseSha}-${baseDateString}\` to \`${newSha}-${newDateString}\``
)
}

Expand Down
Loading