Skip to content
This repository was archived by the owner on Sep 13, 2022. It is now read-only.

Commit 5c89fa5

Browse files
tiffonyurishkuro
authored andcommitted
Fix install / build by using latest LTS node (#364)
* Fix #363 by using latest LTS node Signed-off-by: Joe Farro <joef@uber.com> * Do not test pre-LTS versions of node in travis Signed-off-by: Joe Farro <joef@uber.com> * Do not save prom-client to package.json Signed-off-by: Joe Farro <joef@uber.com>
1 parent a12692c commit 5c89fa5

File tree

6 files changed

+7591
-29
lines changed

6 files changed

+7591
-29
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6
1+
lts/dubnium

.travis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
sudo: required
22

3+
# Travis will use .nvmrc, by default
34
language: node_js
45

5-
node_js:
6-
- '6'
7-
86
cache:
97
directories:
108
- ~/.npm
@@ -19,9 +17,9 @@ matrix:
1917
sudo: required
2018
services:
2119
- docker
22-
- env: TEST_NODE_VERSION=6 LINT=1 COVER=1
2320
- env: TEST_NODE_VERSION=4
24-
- env: TEST_NODE_VERSION=node
21+
- env: TEST_NODE_VERSION=6
22+
- env: TEST_NODE_VERSION=10 LINT=1 COVER=1
2523

2624
env:
2725
global:

Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
-include crossdock/rules.mk
22

33
NODE_VER=$(shell node -v)
4-
ifeq ($(patsubst v6.%,matched,$(NODE_VER)), matched)
5-
NODE_6=true
4+
ifeq ($(patsubst v10.%,matched,$(NODE_VER)), matched)
5+
NODE_LTS=true
66
else
7-
NODE_6=false
7+
NODE_LTS=false
88
endif
99
ifeq ($(patsubst v0.10%,matched,$(NODE_VER)), matched)
1010
NODE_0_10=true
@@ -26,7 +26,7 @@ test: build-node
2626
.PHONY: test-without-build
2727
test-without-build: install-test-deps
2828
npm run flow
29-
ifeq ($(NODE_6),true)
29+
ifeq ($(NODE_LTS),true)
3030
npm run test-all
3131
endif
3232
npm run test-dist
@@ -35,16 +35,16 @@ endif
3535
.PHONY: install-test-deps
3636
install-test-deps:
3737
ifeq ($(NODE_0_10), false)
38-
npm install prom-client@11.0.0
38+
npm install --no-save prom-client@11.0.0
3939
endif
4040

41-
.PHONY: check-node-6
42-
check-node-6:
43-
@$(NODE_6) || echo Build requires Node 6.x
44-
@$(NODE_6) && echo Building using Node 6.x
41+
.PHONY: check-node-lts
42+
check-node-lts:
43+
@$(NODE_LTS) || echo Build requires Node 10.x
44+
@$(NODE_LTS) && echo Building using Node 10.x
4545

4646
.PHONY: build-node
47-
build-node: check-node-6 node-modules
47+
build-node: check-node-lts node-modules
4848
rm -rf ./dist/
4949
node_modules/.bin/babel --presets env --plugins transform-class-properties --source-maps -d dist/src/ src/
5050
node_modules/.bin/babel --presets env --plugins transform-class-properties --source-maps -d dist/test/ test/

0 commit comments

Comments
 (0)