From 62f70308c2a78be7be9555cd5db1d095879e6280 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 10 Jan 2018 17:00:24 +0000 Subject: [PATCH 1/3] Use latest npm in e2e tests --- tasks/e2e-installs.sh | 5 +---- tasks/e2e-kitchensink.sh | 5 +---- tasks/e2e-simple.sh | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/tasks/e2e-installs.sh b/tasks/e2e-installs.sh index 489cadb37c9..b80b07cec68 100755 --- a/tasks/e2e-installs.sh +++ b/tasks/e2e-installs.sh @@ -93,10 +93,7 @@ fi if hash npm 2>/dev/null then - # npm 5 is too buggy right now - if [ $(npm -v | head -c 1) -eq 5 ]; then - npm i -g npm@^4.x - fi; + npm i -g npm@latest npm cache clean || npm cache verify fi diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 547821b652a..26c2ed08385 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -110,10 +110,7 @@ fi if hash npm 2>/dev/null then - # npm 5 is too buggy right now - if [ $(npm -v | head -c 1) -eq 5 ]; then - npm i -g npm@^4.x - fi; + npm i -g npm@latest npm cache clean || npm cache verify fi diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index 34203407716..f1835d45a24 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -122,10 +122,7 @@ fi if hash npm 2>/dev/null then - # npm 5 is too buggy right now - if [ $(npm -v | head -c 1) -eq 5 ]; then - npm i -g npm@^4.x - fi; + npm i -g npm@latest npm cache clean || npm cache verify fi From 9198d61afc1ff4400bc901ca624c5f657995933c Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 10 Jan 2018 17:26:31 +0000 Subject: [PATCH 2/3] Keep default npm version in "simple" test --- tasks/e2e-simple.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index f1835d45a24..bb8f9b123b1 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -122,7 +122,6 @@ fi if hash npm 2>/dev/null then - npm i -g npm@latest npm cache clean || npm cache verify fi From ff99c18193de486faef11aaefbc9eda6f36de442 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 10 Jan 2018 17:40:14 +0000 Subject: [PATCH 3/3] Try to fix CI by using a version that supports Yarn --- tasks/e2e-installs.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/e2e-installs.sh b/tasks/e2e-installs.sh index b80b07cec68..8cd3c0ef6e3 100755 --- a/tasks/e2e-installs.sh +++ b/tasks/e2e-installs.sh @@ -134,12 +134,12 @@ npm install "$cli_path" # ****************************************************************************** cd "$temp_app_path" -create_react_app --scripts-version=0.4.0 test-app-version-number +create_react_app --scripts-version=1.0.17 test-app-version-number cd test-app-version-number # Check corresponding scripts version is installed. exists node_modules/react-scripts -grep '"version": "0.4.0"' node_modules/react-scripts/package.json +grep '"version": "1.0.17"' node_modules/react-scripts/package.json checkDependencies # ****************************************************************************** @@ -147,13 +147,13 @@ checkDependencies # ****************************************************************************** cd "$temp_app_path" -create_react_app --use-npm --scripts-version=0.4.0 test-use-npm-flag +create_react_app --use-npm --scripts-version=1.0.17 test-use-npm-flag cd test-use-npm-flag # Check corresponding scripts version is installed. exists node_modules/react-scripts [ ! -e "yarn.lock" ] && echo "yarn.lock correctly does not exist" -grep '"version": "0.4.0"' node_modules/react-scripts/package.json +grep '"version": "1.0.17"' node_modules/react-scripts/package.json checkDependencies # ****************************************************************************** @@ -161,12 +161,12 @@ checkDependencies # ****************************************************************************** cd "$temp_app_path" -create_react_app --scripts-version=https://registry.npmjs.org/react-scripts/-/react-scripts-0.4.0.tgz test-app-tarball-url +create_react_app --scripts-version=https://registry.npmjs.org/react-scripts/-/react-scripts-1.0.17.tgz test-app-tarball-url cd test-app-tarball-url # Check corresponding scripts version is installed. exists node_modules/react-scripts -grep '"version": "0.4.0"' node_modules/react-scripts/package.json +grep '"version": "1.0.17"' node_modules/react-scripts/package.json checkDependencies # ******************************************************************************