Skip to content

Commit 8bba48b

Browse files
committed
chore(travis): use bundled npm for node 8/9
There is a bug in Node version 9 that means one has to use the bundled npm version, as it includes some compatibility patch to keep it working with Node version 9. Node version 8 and 9 come with a reasonable version of npm bundled (8.9.0 now has npm 5.5.1 bundled), while versions 7 and below have older npms, as such this change ensures that when running node 8 or 9, to use the bundled npm, and for older versions manually install npm@5 before executing
1 parent 46eeb5b commit 8bba48b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ cache:
99
- node_modules
1010
- ~/.npm
1111

12-
before_install:
13-
- npm i -g npm@5
14-
1512
node_js: 8
1613

1714
jobs:
@@ -46,12 +43,15 @@ jobs:
4643
script: npm run test:node
4744
- stage: test
4845
node_js: 7 # to be removed 2017-06-30
46+
before_install: npm i -g npm@5
4947
script: npm run test:node
5048
- stage: test
5149
node_js: 6 # to be removed 2019-04-01
50+
before_install: npm i -g npm@5
5251
script: npm run test:node
5352
- stage: test
5453
node_js: 4 # to be removed 2018-04-01
54+
before_install: npm i -g npm@5
5555
script: npm run test:node
5656
- stage: test
5757
node_js: lts/* # safety net; don't remove

0 commit comments

Comments
 (0)