Skip to content

Commit a2fb505

Browse files
committed
Label React syncs in GitHub
by keeping the version in a dedicated file that we can use to label PRs via `labeler.json`. Makes it easier to search for React syncs in GitHub. Since PRs are created manually, using the PR title for searching may not work all the time. There's still a possibility that people don't use the sync script but why would you do that? Even on manual updates they may stumble over `.react-version` and update it.
1 parent eb23134 commit a2fb505

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/labeler.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"packages/next-swc/**",
7272
"packages/next/**",
7373
"packages/react-refresh-utils/**"
74-
]
74+
],
75+
"type: react-sync": [".react-version"]
7576
}
7677
}

.react-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
19.0.0-rc-6230622a1a-20240610

scripts/sync-react.js

+2
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ Or run this command again without the --no-install flag to do both automatically
177177
)
178178
}
179179

180+
await fsp.writeFile(path.join(cwd, '.react-version'), newVersionStr)
181+
180182
console.log(
181183
`Successfully updated React from ${baseSha} to ${newSha}.\n` +
182184
`Don't forget to find & replace all references to the React version '${baseVersionStr}' with '${newVersionStr}':\n` +

0 commit comments

Comments
 (0)