Skip to content

Commit 2178266

Browse files
committed
Add tests for React 16 to CI
1 parent db43f02 commit 2178266

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

script/convert

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,27 @@ new_config = File.expand_path("../spec/dummy/config/webpacker.yml", __dir__)
1313

1414
File.rename(old_config, new_config)
1515

16+
# Shakapacker
1617
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",')
1719

1820
# The below packages don't work on the oldest supported Node version and aren't needed there anyway
1921
gsub_file_content("../package.json", /"eslint": "[^"]*",/, "")
2022
gsub_file_content("../package.json", /"globals": "[^"]*",/, "")
2123
gsub_file_content("../package.json", /"knip": "[^"]*",/, "")
24+
gsub_file_content("../package.json", /"publint": "[^"]*",/, "")
2225
gsub_file_content("../package.json", /"typescript-eslint": "[^"]*",/, "")
2326
gsub_file_content("../package.json", %r{"@arethetypeswrong/cli": "[^"]*",}, "")
2427
gsub_file_content("../package.json", %r{"@eslint/compat": "[^"]*",}, "")
2528
gsub_file_content("../package.json", %r{"@testing-library/dom": "[^"]*",}, "")
2629
gsub_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+
gsub_file_content("../package.json", /"react": "[^"]*",/, '"react": "16.0.0"')
35+
gsub_file_content("../package.json", /"react-dom": "[^"]*",/, '"react-dom": "16.0.0"')
36+
gsub_file_content("../package.json", "jest node_package/tests", 'jest node_package/tests --testPathIgnorePatterns=".*RSC.*" --testNamePattern="^(?!.*#react19).*"')
3137

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

0 commit comments

Comments
 (0)