Skip to content

Commit 9101887

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

File tree

5 files changed

+11
-135
lines changed

5 files changed

+11
-135
lines changed

docs/release-notes/16.0.0.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# React on Rails 16.0.0 Release Notes
2-
3-
Also see the Changelog for 16.0.0 (TODO: insert link once released).
4-
5-
## Breaking Changes
6-
7-
- Support for React 16 and 17 is dropped.
1+
# React on Rails 16.0.0 Release Notes
2+
3+
Also see the Changelog for 16.0.0 (TODO: insert link once released).
4+
5+
## Breaking Changes
6+
7+
- Support for React 16 and 17 is dropped.

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)