From 61121c7f5aae81247d9dc261468e0d3ddad60c38 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 10 Jan 2018 23:17:07 +0000 Subject: [PATCH] Always use Yarn on CI --- .travis.yml | 6 ------ tasks/e2e-installs.sh | 7 ------- tasks/e2e-kitchensink.sh | 14 +------------- tasks/e2e-simple.sh | 14 +------------- tasks/local-test.sh | 6 ------ 5 files changed, 2 insertions(+), 45 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2afbfa97f3..e970cf01cdb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,6 @@ script: - 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi' - 'if [ $TEST_SUITE = "kitchensink" ]; then tasks/e2e-kitchensink.sh; fi' env: - global: - - USE_YARN=no matrix: - TEST_SUITE=simple - TEST_SUITE=installs @@ -25,7 +23,3 @@ matrix: include: - node_js: 0.10 env: TEST_SUITE=simple -# There's a weird Yarn/Lerna bug related to prerelease versions. -# TODO: reenable after we ship 1.0. -# - node_js: 6 -# env: USE_YARN=yes TEST_SUITE=simple diff --git a/tasks/e2e-installs.sh b/tasks/e2e-installs.sh index 8cd3c0ef6e3..402ab7bc288 100755 --- a/tasks/e2e-installs.sh +++ b/tasks/e2e-installs.sh @@ -103,13 +103,6 @@ grep -v "postinstall" package.json > temp && mv temp package.json npm install mv package.json.bak package.json -if [ "$USE_YARN" = "yes" ] -then - # Install Yarn so that the test can use it to install packages. - npm install -g yarn - yarn cache clean -fi - # We removed the postinstall, so do it manually node bootstrap.js diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 26c2ed08385..ddcd4873f67 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -58,12 +58,7 @@ function install_package { # Install `dependencies` cd node_modules/$pkg/ - if [ "$USE_YARN" = "yes" ] - then - yarn install --production - else - npm install --only=production - fi + npm install --only=production # Remove our packages to ensure side-by-side versions are used (which we link) rm -rf node_modules/{babel-preset-react-app,eslint-config-react-app,react-dev-utils,react-error-overlay,react-scripts} cd ../.. @@ -120,13 +115,6 @@ grep -v "postinstall" package.json > temp && mv temp package.json npm install mv package.json.bak package.json -if [ "$USE_YARN" = "yes" ] -then - # Install Yarn so that the test can use it to install packages. - npm install -g yarn - yarn cache clean -fi - # We removed the postinstall, so do it manually node bootstrap.js diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index bb8f9b123b1..15a74e13ad0 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -57,12 +57,7 @@ function install_package { # Install `dependencies` cd node_modules/$pkg/ - if [ "$USE_YARN" = "yes" ] - then - yarn install --production - else - npm install --only=production - fi + npm install --only=production # Remove our packages to ensure side-by-side versions are used (which we link) rm -rf node_modules/{babel-preset-react-app,eslint-config-react-app,react-dev-utils,react-error-overlay,react-scripts} cd ../.. @@ -147,13 +142,6 @@ then [[ $err_output =~ You\ are\ running\ Node ]] && exit 0 || exit 1 fi -if [ "$USE_YARN" = "yes" ] -then - # Install Yarn so that the test can use it to install packages. - npm install -g yarn - yarn cache clean -fi - # We removed the postinstall, so do it manually here node bootstrap.js diff --git a/tasks/local-test.sh b/tasks/local-test.sh index 8ce44b64057..0416fb5d9cc 100755 --- a/tasks/local-test.sh +++ b/tasks/local-test.sh @@ -11,7 +11,6 @@ function print_help { echo " --node-version the node version to use while testing [6]" echo " --git-branch the git branch to checkout for testing [the current one]" echo " --test-suite which test suite to use ('simple', installs', 'kitchensink', 'all') ['all']" - echo " --yarn if present, use yarn as the package manager" echo " --interactive gain a bash shell after the test run" echo " --help print this message and exit" echo "" @@ -22,7 +21,6 @@ cd $(dirname $0) node_version=6 current_git_branch=`git rev-parse --abbrev-ref HEAD` git_branch=${current_git_branch} -use_yarn=no test_suite=all interactive=false @@ -36,9 +34,6 @@ while [ "$1" != "" ]; do shift git_branch=$1 ;; - "--yarn") - use_yarn=yes - ;; "--test-suite") shift test_suite=$1 @@ -107,7 +102,6 @@ CMD docker run \ --env CI=true \ --env NPM_CONFIG_QUIET=true \ - --env USE_YARN=${use_yarn} \ --tty \ --user node \ --volume ${PWD}/..:/var/create-react-app \