From 8547ae85e948b5d85df480cf899b4c8096fa11d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 10 Dec 2021 01:52:03 +0100 Subject: [PATCH 1/2] Pin `jest-worker` in CRA e2e tests --- scripts/integration-tests/e2e-create-react-app.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/integration-tests/e2e-create-react-app.sh b/scripts/integration-tests/e2e-create-react-app.sh index 0076fa3dbfd9..d642ddf69ffb 100755 --- a/scripts/integration-tests/e2e-create-react-app.sh +++ b/scripts/integration-tests/e2e-create-react-app.sh @@ -45,9 +45,24 @@ if [[ "$(node --version)" == v17.* ]]; then export NODE_OPTIONS=--openssl-legacy-provider fi +# Remove this when https://github.com/facebook/jest/pull/12128 is fixed +node -e " + var pkg = require('./package.json'); + + pkg.resolutions = { + 'jest-worker': '27.3.1' + }; + + fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2)); +" + startLocalRegistry "$PWD"/../../verdaccio-config.yml npm install +# Remove these when https://github.com/facebook/jest/pull/12128 is fixed +npx npm-force-resolutions +npm install + # Test CI=true npm run test From 48c0dfad1cc2b645048ffb3f7e8b094247231d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 10 Dec 2021 01:58:56 +0100 Subject: [PATCH 2/2] Fix --- scripts/integration-tests/e2e-create-react-app.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/integration-tests/e2e-create-react-app.sh b/scripts/integration-tests/e2e-create-react-app.sh index d642ddf69ffb..92e561535704 100755 --- a/scripts/integration-tests/e2e-create-react-app.sh +++ b/scripts/integration-tests/e2e-create-react-app.sh @@ -57,10 +57,11 @@ node -e " " startLocalRegistry "$PWD"/../../verdaccio-config.yml -npm install # Remove these when https://github.com/facebook/jest/pull/12128 is fixed +npm install --ignore-scripts npx npm-force-resolutions + npm install # Test