From 657b3fd6c09160930b4cf1bcc32a4ae3b8dd537c Mon Sep 17 00:00:00 2001
From: Dan Abramov <dan.abramov@gmail.com>
Date: Thu, 29 Jun 2017 00:09:13 +0100
Subject: [PATCH] Test Node 8 on Travis (#2659)

* Test Node 8 on Travis

We still test Node 7 on AppVeyor

* Update e2e-installs.sh

* Update e2e-kitchensink.sh

* Update e2e-simple.sh

* Update e2e-installs.sh

* Update e2e-kitchensink.sh

* Update e2e-installs.sh

* Update e2e-simple.sh

* Update e2e-simple.sh

* Update e2e-kitchensink.sh

* Update e2e-installs.sh
---
 .travis.yml              | 2 +-
 tasks/e2e-installs.sh    | 6 +++++-
 tasks/e2e-kitchensink.sh | 6 +++++-
 tasks/e2e-simple.sh      | 6 +++++-
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 2c60bc267..b08d2bf6b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,7 @@
 language: node_js
 node_js:
   - 6
-  - 7
+  - 8
 cache:
   directories:
   - node_modules
diff --git a/tasks/e2e-installs.sh b/tasks/e2e-installs.sh
index 7ea70fac6..073fc8df6 100755
--- a/tasks/e2e-installs.sh
+++ b/tasks/e2e-installs.sh
@@ -95,7 +95,11 @@ fi
 
 if hash npm 2>/dev/null
 then
-  npm cache clean
+  # 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
 fi
 
 # Prevent lerna bootstrap, we only want top-level dependencies
diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh
index fcd687e4b..7f97fdc44 100755
--- a/tasks/e2e-kitchensink.sh
+++ b/tasks/e2e-kitchensink.sh
@@ -87,7 +87,11 @@ fi
 
 if hash npm 2>/dev/null
 then
-  npm cache clean
+  # 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
 fi
 
 # Prevent lerna bootstrap, we only want top-level dependencies
diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh
index 163bec081..cdcf4a63d 100755
--- a/tasks/e2e-simple.sh
+++ b/tasks/e2e-simple.sh
@@ -86,7 +86,11 @@ fi
 
 if hash npm 2>/dev/null
 then
-  npm cache clean
+  # 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
 fi
 
 # Prevent lerna bootstrap, we only want top-level dependencies
-- 
GitLab