From 8f8a59cc9efda115d7fafb435e241249a7e2d94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Tue, 15 Nov 2016 12:03:21 -0500 Subject: [PATCH 1/2] dep: use topojson-client - 'topojson' pkg is now meant for server-side manipulation as of v2 - 'topojson-client' includes the client-side topology to geojson features methods we need. --- package.json | 2 +- src/lib/topojson_utils.js | 4 ++-- src/plots/geo/geo.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d4f7a961095..9f061bec7a0 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "sane-topojson": "^2.0.0", "superscript-text": "^1.0.0", "tinycolor2": "^1.3.0", - "topojson": "^1.6.20", + "topojson-client": "^2.1.0", "webgl-context": "^2.2.0" }, "devDependencies": { diff --git a/src/lib/topojson_utils.js b/src/lib/topojson_utils.js index eab421aa3dd..2200c98ee2b 100644 --- a/src/lib/topojson_utils.js +++ b/src/lib/topojson_utils.js @@ -11,8 +11,8 @@ var topojsonUtils = module.exports = {}; -var locationmodeToLayer = require('../plots/geo/constants').locationmodeToLayer, - topojsonFeature = require('topojson').feature; +var locationmodeToLayer = require('../plots/geo/constants').locationmodeToLayer; +var topojsonFeature = require('topojson-client').feature; topojsonUtils.getTopojsonName = function(geoLayout) { diff --git a/src/plots/geo/geo.js b/src/plots/geo/geo.js index ceec9eb93fd..ef95546e771 100644 --- a/src/plots/geo/geo.js +++ b/src/plots/geo/geo.js @@ -26,7 +26,7 @@ var constants = require('./constants'); var xmlnsNamespaces = require('../../constants/xmlns_namespaces'); var topojsonUtils = require('../../lib/topojson_utils'); -var topojsonFeature = require('topojson').feature; +var topojsonFeature = require('topojson-client').feature; // add a few projection types to d3.geo addProjectionsToD3(d3); From 3584de3dac610c23eb4ef5b66afa47996e83eaa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Tue, 15 Nov 2016 12:09:40 -0500 Subject: [PATCH 2/2] ci: prune before `npm ls` --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 5919efe0ab5..085c303b25c 100644 --- a/circle.yml +++ b/circle.yml @@ -17,7 +17,7 @@ dependencies: - npm run cibuild - npm run pretest - eval $(node tasks/docker.js setup) - - npm ls + - npm prune && npm ls test: override: