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

Add hint that sync-react doesn't automate everything #66531

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
17 changes: 11 additions & 6 deletions scripts/sync-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand All @@ -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(
/(?<semverVersion>.*)-(?<releaseLabel>.*)-(?<sha>.*)-(?<dateString>.*)$/
)
return match ? match.groups : null
Expand Down Expand Up @@ -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)
Expand Down
Loading