@@ -32,10 +32,10 @@ gsub_file_content("../package.json", %r{"@testing-library/[^"]*": "[^"]*",}, "")
3232gsub_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",' )
3939gsub_file_content (
4040 "../package.json" ,
4141 "jest node_package/tests" ,
@@ -46,10 +46,6 @@ gsub_file_content("../tsconfig.json", "react-jsx", "react")
4646gsub_file_content ( "../spec/dummy/babel.config.js" , "runtime: 'automatic'" , "runtime: 'classic'" )
4747# https://rescript-lang.org/docs/react/latest/migrate-react#configuration
4848gsub_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
5450gsub_file_content ( "../spec/dummy/config/webpack/commonWebpackConfig.js" , /generateWebpackConfig(\( \) )?/ ,
5551 "webpackConfig" )
0 commit comments