Skip to content

Commit 42819f1

Browse files
committed
Switch to React 18 instead of React 16 in CI with oldest
1 parent 6e0f41c commit 42819f1

File tree

4 files changed

+4
-128
lines changed

4 files changed

+4
-128
lines changed

script/convert

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ gsub_file_content("../package.json", %r{"@testing-library/[^"]*": "[^"]*",}, "")
3232
gsub_file_content("../package.json", /,(\s*})/, "\\1")
3333

3434
# Switch to the oldest supported React version
35-
gsub_file_content("../package.json", /"react": "[^"]*",/, '"react": "16.14.0",')
36-
gsub_file_content("../package.json", /"react-dom": "[^"]*",/, '"react-dom": "16.14.0",')
37-
gsub_file_content("../spec/dummy/package.json", /"react": "[^"]*",/, '"react": "16.14.0",')
38-
gsub_file_content("../spec/dummy/package.json", /"react-dom": "[^"]*",/, '"react-dom": "16.14.0",')
35+
gsub_file_content("../package.json", /"react": "[^"]*",/, '"react": "18.0.0",')
36+
gsub_file_content("../package.json", /"react-dom": "[^"]*",/, '"react-dom": "18.0.0",')
37+
gsub_file_content("../spec/dummy/package.json", /"react": "[^"]*",/, '"react": "18.0.0",')
38+
gsub_file_content("../spec/dummy/package.json", /"react-dom": "[^"]*",/, '"react-dom": "18.0.0",')
3939
gsub_file_content(
4040
"../package.json",
4141
"jest node_package/tests",
@@ -46,10 +46,6 @@ gsub_file_content("../tsconfig.json", "react-jsx", "react")
4646
gsub_file_content("../spec/dummy/babel.config.js", "runtime: 'automatic'", "runtime: 'classic'")
4747
# https://rescript-lang.org/docs/react/latest/migrate-react#configuration
4848
gsub_file_content("../spec/dummy/rescript.json", '"version": 4', '"version": 4, "mode": "classic"')
49-
# Find all files under app-react16 and replace the React 19 versions
50-
Dir.glob(File.expand_path("../spec/dummy/**/app-react16/**/*.*", __dir__)).each do |file|
51-
move(file, file.gsub("-react16", ""))
52-
end
5349

5450
gsub_file_content("../spec/dummy/config/webpack/commonWebpackConfig.js", /generateWebpackConfig(\(\))?/,
5551
"webpackConfig")

spec/dummy/client/app-react16/startup/ManualRenderApp.jsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

spec/dummy/client/app-react16/startup/ReduxApp.client.jsx

Lines changed: 0 additions & 57 deletions
This file was deleted.

spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)