diff --git a/.travis.yml b/.travis.yml index 6dbea3e4ee5..a014151cf6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,20 +3,23 @@ dist: trusty language: node_js node_js: - 8 - - 9 + - 10 cache: directories: - node_modules - packages/create-react-app/node_modules - packages/react-scripts/node_modules +before_install: + - curl -o- -L https://yarnpkg.com/install.sh | bash + - export PATH="$HOME/.yarn/bin:$PATH" install: true script: - 'if [ $TEST_SUITE = "simple" ]; then tasks/e2e-simple.sh; fi' - 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi' - 'if [ $TEST_SUITE = "kitchensink" ]; then tasks/e2e-kitchensink.sh; fi' - 'if [ $TEST_SUITE = "kitchensink-eject" ]; then tasks/e2e-kitchensink-eject.sh; fi' - - 'if [ $TEST_SUITE = "old-node" ]; then tasks/e2e-old-node.sh; fi' - 'if [ $TEST_SUITE = "monorepos" ]; then tasks/e2e-monorepos.sh; fi' + - 'if [ $TEST_SUITE = "old-node" ]; then tasks/e2e-old-node.sh; fi' env: matrix: - TEST_SUITE=simple @@ -26,9 +29,5 @@ env: - TEST_SUITE=monorepos matrix: include: - - node_js: 0.10 + - node_js: 4 env: TEST_SUITE=old-node - - node_js: 6 - env: TEST_SUITE=kitchensink - - node_js: 6 - env: TEST_SUITE=kitchensink-eject diff --git a/appveyor.yml b/appveyor.yml index 9cb7b58f8a4..a4315250399 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,25 +2,25 @@ image: Visual Studio 2017 environment: matrix: - - nodejs_version: 8 + - nodejs_version: 10 test_suite: "simple" - - nodejs_version: 8 + - nodejs_version: 10 test_suite: "installs" - - nodejs_version: 8 + - nodejs_version: 10 test_suite: "kitchensink" - - nodejs_version: 8 + - nodejs_version: 10 test_suite: "kitchensink-eject" - - nodejs_version: 8 + - nodejs_version: 10 test_suite: "monorepos" - - nodejs_version: 6 + - nodejs_version: 8 test_suite: "simple" - - nodejs_version: 6 + - nodejs_version: 8 test_suite: "installs" - - nodejs_version: 6 + - nodejs_version: 8 test_suite: "kitchensink" - - nodejs_version: 6 + - nodejs_version: 8 test_suite: "kitchensink-eject" - - nodejs_version: 6 + - nodejs_version: 8 test_suite: "monorepos" cache: - node_modules -> appveyor.cleanup-cache.txt @@ -36,6 +36,9 @@ platform: install: - ps: Install-Product node $env:nodejs_version $env:platform + - ps: | + (New-Object Net.WebClient).DownloadFile("https://yarnpkg.com/latest.msi", "$env:temp\yarn.msi") + cmd /c start /wait msiexec.exe /i $env:temp\yarn.msi /quiet /qn /norestart build: off @@ -46,4 +49,5 @@ skip_commits: test_script: - node --version - npm --version + - yarn --version - bash tasks/e2e-%test_suite%.sh diff --git a/packages/create-react-app/index.js b/packages/create-react-app/index.js index a093636609e..808ebcfe69c 100755 --- a/packages/create-react-app/index.js +++ b/packages/create-react-app/index.js @@ -42,13 +42,13 @@ var currentNodeVersion = process.versions.node; var semver = currentNodeVersion.split('.'); var major = semver[0]; -if (major < 4) { +if (major < 8) { console.error( chalk.red( 'You are running Node ' + currentNodeVersion + '.\n' + - 'Create React App requires Node 4 or higher. \n' + + 'Create React App requires Node 8 or higher. \n' + 'Please update your version of Node.' ) ); diff --git a/tasks/e2e-kitchensink-eject.sh b/tasks/e2e-kitchensink-eject.sh index 76a50f1b8be..ef7a511dc23 100755 --- a/tasks/e2e-kitchensink-eject.sh +++ b/tasks/e2e-kitchensink-eject.sh @@ -159,7 +159,7 @@ E2E_URL="http://localhost:3002" \ CI=true NODE_PATH=src \ NODE_ENV=development \ BABEL_ENV=test \ - node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js + node_modules/.bin/mocha --timeout 30000 --compilers js:@babel/register --require @babel/polyfill integration/*.test.js # Test "production" environment E2E_FILE=./build/index.html \ @@ -168,7 +168,7 @@ E2E_FILE=./build/index.html \ BABEL_ENV=test \ NODE_PATH=src \ PUBLIC_URL=http://www.example.org/spa/ \ - node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js + node_modules/.bin/mocha --timeout 30000 --compilers js:@babel/register --require @babel/polyfill integration/*.test.js # Cleanup cleanup diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index c79f9f77a10..c001a01e4da 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -151,7 +151,7 @@ E2E_URL="http://localhost:3001" \ CI=true NODE_PATH=src \ NODE_ENV=development \ BABEL_ENV=test \ - node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js + node_modules/.bin/mocha --timeout 30000 --compilers js:@babel/register --require @babel/polyfill integration/*.test.js # Test "production" environment E2E_FILE=./build/index.html \ CI=true \ @@ -159,7 +159,7 @@ E2E_FILE=./build/index.html \ NODE_ENV=production \ BABEL_ENV=test \ PUBLIC_URL=http://www.example.org/spa/ \ - node_modules/.bin/mocha --compilers js:@babel/register --require @babel/polyfill integration/*.test.js + node_modules/.bin/mocha --timeout 30000 --compilers js:@babel/register --require @babel/polyfill integration/*.test.js # Cleanup cleanup diff --git a/tasks/local-test.sh b/tasks/local-test.sh index 877c6709717..222630f2170 100755 --- a/tasks/local-test.sh +++ b/tasks/local-test.sh @@ -8,7 +8,7 @@ function print_help { echo "Usage: ${0} [OPTIONS]" echo "" echo "OPTIONS:" - echo " --node-version <version> the node version to use while testing [6]" + echo " --node-version <version> the node version to use while testing [8]" echo " --git-branch <branch> the git branch to checkout for testing [the current one]" echo " --test-suite <suite> which test suite to use ('simple', installs', 'kitchensink', 'all') ['all']" echo " --interactive gain a bash shell after the test run" @@ -18,7 +18,7 @@ function print_help { cd $(dirname $0) -node_version=6 +node_version=8 current_git_branch=`git rev-parse --abbrev-ref HEAD` git_branch=${current_git_branch} test_suite=all