Skip to content

Commit bff736d

Browse files
authored
Merge pull request #2934 from plotly/node10
Use Node 10 and npm 6 for development
2 parents 06d1fc5 + 9b45219 commit bff736d

File tree

6 files changed

+2936
-3269
lines changed

6 files changed

+2936
-3269
lines changed

.circleci/config.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version: 2.0
1010
jobs:
1111
build:
1212
docker:
13-
- image: circleci/node:8.9.4
13+
- image: circleci/node:10.9.0
1414
working_directory: ~/plotly.js
1515
steps:
1616
- checkout
@@ -47,33 +47,25 @@ jobs:
4747
test-jasmine:
4848
docker:
4949
# need '-browsers' version to test in real (xvfb-wrapped) browsers
50-
- image: circleci/node:8.9.4-browsers
50+
- image: circleci/node:10.9.0-browsers
5151
working_directory: ~/plotly.js
5252
steps:
5353
- checkout
5454
- attach_workspace:
5555
at: ~/plotly.js
56-
- run:
57-
name: Set timezone to Alaska time (arbitrary timezone to test date logic)
58-
command: |
59-
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
6056
- run:
6157
name: Run jasmine tests (batch 1)
6258
command: ./.circleci/test.sh jasmine
6359

6460
test-jasmine2:
6561
docker:
6662
# need '-browsers' version to test in real (xvfb-wrapped) browsers
67-
- image: circleci/node:8.9.4-browsers
63+
- image: circleci/node:10.9.0-browsers
6864
working_directory: ~/plotly.js
6965
steps:
7066
- checkout
7167
- attach_workspace:
7268
at: ~/plotly.js
73-
- run:
74-
name: Set timezone to Alaska time (arbitrary timezone to test date logic)
75-
command: |
76-
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
7769
- run:
7870
name: Run jasmine tests (batch 2)
7971
command: ./.circleci/test.sh jasmine2
@@ -118,7 +110,7 @@ jobs:
118110

119111
test-syntax:
120112
docker:
121-
- image: circleci/node:8.9.4
113+
- image: circleci/node:10.9.0
122114
working_directory: ~/plotly.js
123115
steps:
124116
- checkout

.circleci/test.sh

+11
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,27 @@ retry () {
3333
fi
3434
}
3535

36+
# set timezone to Alaska time (arbitrary timezone to test date logic)
37+
set_tz () {
38+
sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime
39+
export TZ='America/Anchorage'
40+
}
41+
3642
case $1 in
3743

3844
jasmine)
45+
set_tz
46+
3947
npm run test-jasmine -- --skip-tags=gl,noCI,flaky || EXIT_STATE=$?
4048
retry npm run test-jasmine -- --tags=flaky --skip-tags=noCI
4149
npm run test-bundle || EXIT_STATE=$?
50+
4251
exit $EXIT_STATE
4352
;;
4453

4554
jasmine2)
55+
set_tz
56+
4657
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=gl))
4758

4859
for s in ${SHARDS[@]}; do

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra
3434
#### Prerequisites
3535

3636
- git
37-
- [node.js](https://nodejs.org/en/). We recommend using node.js v8.x, but all
37+
- [node.js](https://nodejs.org/en/). We recommend using node.js v10.x, but all
3838
versions starting from v6 should work. Upgrading and managing node versions
3939
can be easily done using [`nvm`](https://github.com/creationix/nvm) or its
4040
Windows alternatives.
41-
- [`npm`](https://www.npmjs.com/) v5.x and up (which ships by default with
42-
node.js v8.x) to ensure that the
41+
- [`npm`](https://www.npmjs.com/) v6.x and up (which ships by default with
42+
node.js v10.x) to ensure that the
4343
[`package-lock.json`](https://docs.npmjs.com/files/package-lock.json) file is
4444
used and updated correctly.
4545

0 commit comments

Comments
 (0)