@@ -13,21 +13,31 @@ new_config = File.expand_path("../spec/dummy/config/webpacker.yml", __dir__)
1313
1414File . rename ( old_config ,  new_config ) 
1515
16+ # Shakapacker 
1617gsub_file_content ( "../Gemfile.development_dependencies" ,  /gem "shakapacker", "[^"]*"/ ,  'gem "shakapacker", "6.6.0"' ) 
18+ gsub_file_content ( "../spec/dummy/package.json" ,  /"shakapacker": "[^"]*",/ ,  '"shakapacker": "6.6.0",' ) 
1719
1820# The below packages don't work on the oldest supported Node version and aren't needed there anyway 
1921gsub_file_content ( "../package.json" ,  /"eslint": "[^"]*",/ ,  "" ) 
2022gsub_file_content ( "../package.json" ,  /"globals": "[^"]*",/ ,  "" ) 
2123gsub_file_content ( "../package.json" ,  /"knip": "[^"]*",/ ,  "" ) 
24+ gsub_file_content ( "../package.json" ,  /"publint": "[^"]*",/ ,  "" ) 
2225gsub_file_content ( "../package.json" ,  /"typescript-eslint": "[^"]*",/ ,  "" ) 
2326gsub_file_content ( "../package.json" ,  %r{"@arethetypeswrong/cli": "[^"]*",} ,  "" ) 
2427gsub_file_content ( "../package.json" ,  %r{"@eslint/compat": "[^"]*",} ,  "" ) 
2528gsub_file_content ( "../package.json" ,  %r{"@testing-library/dom": "[^"]*",} ,  "" ) 
2629gsub_file_content ( "../package.json" ,  %r{"@testing-library/react": "[^"]*",} ,  "" ) 
27- gsub_file_content ( "../package.json" ,  /"knip": "[^"]*",/ ,  "" ) 
28- gsub_file_content ( "../package.json" ,  /"publint": "[^"]*",/ ,  "" ) 
2930
30- gsub_file_content ( "../spec/dummy/package.json" ,  /"shakapacker": "[^"]*",/ ,  '"shakapacker": "6.6.0",' ) 
31+ # Switch to the oldest supported React version 
32+ gsub_file_content ( "../package.json" ,  /"react": "[^"]*",/ ,  '"react": "16.0.0",' ) 
33+ gsub_file_content ( "../package.json" ,  /"react-dom": "[^"]*",/ ,  '"react-dom": "16.0.0",' ) 
34+ # TODO: can't change React version in spec/dummy as well, would need a separate react-16-dummy instead 
35+ gsub_file_content ( 
36+   "../package.json" , 
37+   "jest node_package/tests" , 
38+   'jest node_package/tests --testPathIgnorePatterns=\".*(RSC|stream|serverRenderReactComponent).*\"' 
39+ ) 
40+ gsub_file_content ( "../tsconfig.json" ,  "react-jsx" ,  "react" ) 
3141
3242gsub_file_content ( "../spec/dummy/config/webpack/commonWebpackConfig.js" ,  /generateWebpackConfig(\( \) )?/ , 
3343                  "webpackConfig" ) 
0 commit comments