Skip to content

Commit 3445a56

Browse files
authored
Add hint that sync-react doesn't automate everything (#66531)
1 parent ff366ed commit 3445a56

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

scripts/sync-react.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@ Or, run this command with no arguments to use the most recently published versio
145145
console.log()
146146
}
147147

148-
console.log(`Successfully updated React from ${baseSha} to ${newSha}.\n`)
149-
150148
// Fetch the changelog from GitHub and print it to the console.
151149
try {
152150
const changelog = await getChangelogFromGitHub(baseSha, newSha)
@@ -178,6 +176,13 @@ Or run this command again without the --no-install flag to do both automatically
178176
`
179177
)
180178
}
179+
180+
console.log(
181+
`Successfully updated React from ${baseSha} to ${newSha}.\n` +
182+
`Don't forget to find & replace all references to the React version '${baseVersionStr}' with '${newVersionStr}':\n` +
183+
`-${baseVersionStr}\n` +
184+
`+${newVersionStr}\n`
185+
)
181186
}
182187

183188
function readBoolArg(argv, argName) {
@@ -189,8 +194,8 @@ function readStringArg(argv, argName) {
189194
return argIndex === -1 ? null : argv[argIndex + 1]
190195
}
191196

192-
function extractInfoFromReactVersion(reactCanaryVersion) {
193-
const match = reactCanaryVersion.match(
197+
function extractInfoFromReactVersion(reactVersion) {
198+
const match = reactVersion.match(
194199
/(?<semverVersion>.*)-(?<releaseLabel>.*)-(?<sha>.*)-(?<dateString>.*)$/
195200
)
196201
return match ? match.groups : null
@@ -251,8 +256,8 @@ async function getChangelogFromGitHub(baseSha, newSha) {
251256
return changelog.length > 0 ? changelog.join('\n') : null
252257
}
253258

254-
sync('rc')
255-
.then(() => sync('experimental'))
259+
sync('experimental')
260+
.then(() => sync('rc'))
256261
.catch((error) => {
257262
console.error(error)
258263
process.exit(1)

0 commit comments

Comments
 (0)