@@ -13,21 +13,31 @@ new_config = File.expand_path("../spec/dummy/config/webpacker.yml", __dir__)
13
13
14
14
File . rename ( old_config , new_config )
15
15
16
+ # Shakapacker
16
17
gsub_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",' )
17
19
18
20
# The below packages don't work on the oldest supported Node version and aren't needed there anyway
19
21
gsub_file_content ( "../package.json" , /"eslint": "[^"]*",/ , "" )
20
22
gsub_file_content ( "../package.json" , /"globals": "[^"]*",/ , "" )
21
23
gsub_file_content ( "../package.json" , /"knip": "[^"]*",/ , "" )
24
+ gsub_file_content ( "../package.json" , /"publint": "[^"]*",/ , "" )
22
25
gsub_file_content ( "../package.json" , /"typescript-eslint": "[^"]*",/ , "" )
23
26
gsub_file_content ( "../package.json" , %r{"@arethetypeswrong/cli": "[^"]*",} , "" )
24
27
gsub_file_content ( "../package.json" , %r{"@eslint/compat": "[^"]*",} , "" )
25
28
gsub_file_content ( "../package.json" , %r{"@testing-library/dom": "[^"]*",} , "" )
26
29
gsub_file_content ( "../package.json" , %r{"@testing-library/react": "[^"]*",} , "" )
27
- gsub_file_content ( "../package.json" , /"knip": "[^"]*",/ , "" )
28
- gsub_file_content ( "../package.json" , /"publint": "[^"]*",/ , "" )
29
30
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).*\" --testNamePattern=\"^(?!.*#react>16).*\"'
39
+ )
40
+ gsub_file_content ( "../tsconfig.json" , "react-jsx" , "react" )
31
41
32
42
gsub_file_content ( "../spec/dummy/config/webpack/commonWebpackConfig.js" , /generateWebpackConfig(\( \) )?/ ,
33
43
"webpackConfig" )
0 commit comments