From 227bcfb7f1907ce7ac4c6f70701034c1944e3002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 19 Oct 2016 17:10:13 -0400 Subject: [PATCH 1/5] doc: update prequisites to node.js v6 --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b2d4b6e7f29..ecfc958bc26 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra #### Perequisites - git -- [node.js](https://nodejs.org/en/). We recommend using node.js 4.2.x (LTS). +- [node.js](https://nodejs.org/en/). We recommend using node.js v6.x or v4.x (both LTS). Upgrading and managing node versions can be easily done using [`nvm`](https://github.com/creationix/nvm) or its Windows alternatives. From 65e1ab3219d9ebad5fa8ca614e64012f12287c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 19 Oct 2016 17:10:34 -0400 Subject: [PATCH 2/5] bump node.js dep on CircleCI v6.1.0 --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index ce861e55806..de83f09b7ac 100644 --- a/circle.yml +++ b/circle.yml @@ -5,7 +5,7 @@ general: machine: node: - version: 4.2.1 + version: 6.1.0 services: - docker From 5a9f0ccbf57be245fbddabd4f06a1ee0cec03c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 19 Oct 2016 17:11:15 -0400 Subject: [PATCH 3/5] bump dev deps - update circluar dep test-syntax check for madge v1 --- package.json | 8 ++++---- tasks/test_syntax.js | 23 ++++++++++++----------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index d96ad5800c5..8b13e241ec5 100644 --- a/package.json +++ b/package.json @@ -96,9 +96,9 @@ "browserify": "^13.0.0", "browserify-transform-tools": "^1.5.1", "deep-equal": "^1.0.1", - "ecstatic": "^1.4.0", + "ecstatic": "^2.1.0", "eslint": "^3.5.0", - "falafel": "^1.2.0", + "falafel": "^2.0.0", "fs-extra": "^0.30.0", "fuse.js": "^2.2.0", "glob": "^7.0.0", @@ -107,11 +107,11 @@ "jasmine-core": "^2.4.1", "karma": "^1.1.0", "karma-browserify": "^5.0.1", - "karma-chrome-launcher": "^1.0.1", + "karma-chrome-launcher": "^2.0.0", "karma-coverage": "^1.0.0", "karma-firefox-launcher": "^1.0.0", "karma-jasmine": "^1.0.2", - "madge": "^0.6.0", + "madge": "^1.4.3", "node-sass": "^3.4.1", "npm-link-check": "^1.1.0", "open": "0.0.5", diff --git a/tasks/test_syntax.js b/tasks/test_syntax.js index b1ffa7494a9..8d28447bbe8 100644 --- a/tasks/test_syntax.js +++ b/tasks/test_syntax.js @@ -98,20 +98,21 @@ function assertFileNames() { // check circular dependencies function assertCircularDeps() { - var dependencyObject = madge(constants.pathToSrc); - var circularDeps = dependencyObject.circular().getArray(); - var logs = []; + madge(constants.pathToSrc).then(function(res) { + var circularDeps = res.circular(); + var logs = []; - // as of v1.17.0 - 2016/09/08 - // see https://github.com/plotly/plotly.js/milestone/9 - // for more details - var MAX_ALLOWED_CIRCULAR_DEPS = 34; + // as of v1.17.0 - 2016/09/08 + // see https://github.com/plotly/plotly.js/milestone/9 + // for more details + var MAX_ALLOWED_CIRCULAR_DEPS = 34; - if(circularDeps.length > MAX_ALLOWED_CIRCULAR_DEPS) { - logs.push('some new circular dependencies were added to src/'); - } + if(circularDeps.length > MAX_ALLOWED_CIRCULAR_DEPS) { + logs.push('some new circular dependencies were added to src/'); + } - log('circular dependencies', logs); + log('circular dependencies', logs); + }); } function combineGlobs(arr) { From 27f8c92fcf72e731b13973993b96a0c1b3822eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 19 Oct 2016 17:15:13 -0400 Subject: [PATCH 4/5] add test-image-gl2d to `npm test` command --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b13e241ec5..335bcdd08c1 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "test-export": "node tasks/test_export.js", "test-syntax": "node tasks/test_syntax.js", "test-bundle": "node tasks/test_bundle.js", - "test": "npm run citest-jasmine && npm run test-image && npm run test-syntax && npm run test-bundle", + "test": "npm run citest-jasmine && npm run test-image && npm run test-image-gl2d && npm run test-syntax && npm run test-bundle", "start-test_dashboard": "node devtools/test_dashboard/server.js", "start-image_viewer": "node devtools/image_viewer/server.js", "start": "npm run start-test_dashboard", From 229812534b82bc649e9c5b773ea2e14c39129c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Wed, 19 Oct 2016 17:26:48 -0400 Subject: [PATCH 5/5] test: add tolerance in mapbox tolerance tests --- test/jasmine/tests/mapbox_test.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/jasmine/tests/mapbox_test.js b/test/jasmine/tests/mapbox_test.js index 789ae984efb..5d29754ba3f 100644 --- a/test/jasmine/tests/mapbox_test.js +++ b/test/jasmine/tests/mapbox_test.js @@ -448,11 +448,9 @@ describe('mapbox plots', function() { expect(mapInfo.zoom).toBeCloseTo(zoom); var divStyle = mapInfo.div.style; - var expectedDims = ['left', 'top', 'width', 'height'].map(function(p) { - return parseFloat(divStyle[p]); + ['left', 'top', 'width', 'height'].forEach(function(p, i) { + expect(parseFloat(divStyle[p])).toBeWithin(dims[i], 5); }); - - expect(expectedDims).toBeCloseToArray(dims); } assertLayout('Mapbox Dark', [-4.710, 19.475], 1.234, [80, 100, 908, 270]);