Unverified Commit a03524c5 authored by Dan Abramov's avatar Dan Abramov Committed by GitHub
Browse files

Use latest npm in e2e tests (#3735)

* Use latest npm in e2e tests

* Keep default npm version in "simple" test

* Try to fix CI by using a version that supports Yarn
parent 7b881f12
Showing with 8 additions and 18 deletions
+8 -18
...@@ -93,10 +93,7 @@ fi ...@@ -93,10 +93,7 @@ fi
if hash npm 2>/dev/null if hash npm 2>/dev/null
then then
# npm 5 is too buggy right now npm i -g npm@latest
if [ $(npm -v | head -c 1) -eq 5 ]; then
npm i -g npm@^4.x
fi;
npm cache clean || npm cache verify npm cache clean || npm cache verify
fi fi
...@@ -137,12 +134,12 @@ npm install "$cli_path" ...@@ -137,12 +134,12 @@ npm install "$cli_path"
# ****************************************************************************** # ******************************************************************************
cd "$temp_app_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 cd test-app-version-number
# Check corresponding scripts version is installed. # Check corresponding scripts version is installed.
exists node_modules/react-scripts 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 checkDependencies
# ****************************************************************************** # ******************************************************************************
...@@ -150,13 +147,13 @@ checkDependencies ...@@ -150,13 +147,13 @@ checkDependencies
# ****************************************************************************** # ******************************************************************************
cd "$temp_app_path" 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 cd test-use-npm-flag
# Check corresponding scripts version is installed. # Check corresponding scripts version is installed.
exists node_modules/react-scripts exists node_modules/react-scripts
[ ! -e "yarn.lock" ] && echo "yarn.lock correctly does not exist" [ ! -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 checkDependencies
# ****************************************************************************** # ******************************************************************************
...@@ -164,12 +161,12 @@ checkDependencies ...@@ -164,12 +161,12 @@ checkDependencies
# ****************************************************************************** # ******************************************************************************
cd "$temp_app_path" 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 cd test-app-tarball-url
# Check corresponding scripts version is installed. # Check corresponding scripts version is installed.
exists node_modules/react-scripts 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 checkDependencies
# ****************************************************************************** # ******************************************************************************
......
...@@ -110,10 +110,7 @@ fi ...@@ -110,10 +110,7 @@ fi
if hash npm 2>/dev/null if hash npm 2>/dev/null
then then
# npm 5 is too buggy right now npm i -g npm@latest
if [ $(npm -v | head -c 1) -eq 5 ]; then
npm i -g npm@^4.x
fi;
npm cache clean || npm cache verify npm cache clean || npm cache verify
fi fi
......
...@@ -122,10 +122,6 @@ fi ...@@ -122,10 +122,6 @@ fi
if hash npm 2>/dev/null if hash npm 2>/dev/null
then 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 cache clean || npm cache verify npm cache clean || npm cache verify
fi fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment