Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
3445a562
Unverified
Commit
3445a562
authored
Jun 05, 2024
by
Sebastian Silbermann
Committed by
GitHub
Jun 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hint that sync-react doesn't automate everything (#66531)
parent
ff366ed0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
sync-react.js
scripts/sync-react.js
+11
-6
No files found.
scripts/sync-react.js
View file @
3445a562
...
@@ -145,8 +145,6 @@ Or, run this command with no arguments to use the most recently published versio
...
@@ -145,8 +145,6 @@ Or, run this command with no arguments to use the most recently published versio
console
.
log
()
console
.
log
()
}
}
console
.
log
(
`Successfully updated React from
${
baseSha
}
to
${
newSha
}
.\n`
)
// Fetch the changelog from GitHub and print it to the console.
// Fetch the changelog from GitHub and print it to the console.
try
{
try
{
const
changelog
=
await
getChangelogFromGitHub
(
baseSha
,
newSha
)
const
changelog
=
await
getChangelogFromGitHub
(
baseSha
,
newSha
)
...
@@ -178,6 +176,13 @@ Or run this command again without the --no-install flag to do both automatically
...
@@ -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
)
{
function
readBoolArg
(
argv
,
argName
)
{
...
@@ -189,8 +194,8 @@ function readStringArg(argv, argName) {
...
@@ -189,8 +194,8 @@ function readStringArg(argv, argName) {
return
argIndex
===
-
1
?
null
:
argv
[
argIndex
+
1
]
return
argIndex
===
-
1
?
null
:
argv
[
argIndex
+
1
]
}
}
function
extractInfoFromReactVersion
(
react
Canary
Version
)
{
function
extractInfoFromReactVersion
(
reactVersion
)
{
const
match
=
react
Canary
Version
.
match
(
const
match
=
reactVersion
.
match
(
/
(?<
semverVersion>.*
)
-
(?<
releaseLabel>.*
)
-
(?<
sha>.*
)
-
(?<
dateString>.*
)
$/
/
(?<
semverVersion>.*
)
-
(?<
releaseLabel>.*
)
-
(?<
sha>.*
)
-
(?<
dateString>.*
)
$/
)
)
return
match
?
match
.
groups
:
null
return
match
?
match
.
groups
:
null
...
@@ -251,8 +256,8 @@ async function getChangelogFromGitHub(baseSha, newSha) {
...
@@ -251,8 +256,8 @@ async function getChangelogFromGitHub(baseSha, newSha) {
return
changelog
.
length
>
0
?
changelog
.
join
(
'
\
n'
)
:
null
return
changelog
.
length
>
0
?
changelog
.
join
(
'
\
n'
)
:
null
}
}
sync
(
'
rc
'
)
sync
(
'
experimental
'
)
.
then
(()
=>
sync
(
'
experimental
'
))
.
then
(()
=>
sync
(
'
rc
'
))
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
error
(
error
)
console
.
error
(
error
)
process
.
exit
(
1
)
process
.
exit
(
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment