From 8da6ebbce146776f9065145262f482691149e8d3 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Wed, 24 May 2017 11:10:03 -0400 Subject: [PATCH] use package name for node & umd requires this breaks requireJS but fixes webpack - since the community fork of crossfilter has a different package name from its filename, one or the other packaging system is going to be unhappy. requireJS users will need to rename crossfilter.js to crossfilter2.js when copying it into position, or use the requireJS paths or map configuration options to specify that the filename is different from the module name. http://requirejs.org/docs/api.html#config-paths http://requirejs.org/docs/api.html#config-map fixes #1213 fixes #1214 fixes #1261 fixes #1293 fixes #1302 breaks #1304! --- Changelog.md | 1 + index.js | 2 +- package.json | 2 +- src/footer.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index 50bf160d3..016cdd84d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,6 @@ # 2.0 Series ## 2.0.3 +* crossfilter is loaded by its module name (crossfilter2), not its filename (crossfilter). This is intended to help webpack and other automatic module loaders. This is likely to break requireJS configurations; see [#1304](https://github.com/dc-js/dc.js/issues/1304) for details. ([#1213](https://github.com/dc-js/dc.js/issues/1213), [#1214](https://github.com/dc-js/dc.js/issues/1214), [#1261](https://github.com/dc-js/dc.js/issues/1261), [#1293](https://github.com/dc-js/dc.js/issues/1293), [#1302](https://github.com/dc-js/dc.js/issues/1302)) * Do not make the pie chart radius bigger than the chart size, by Sandeep Fatangare ([#1279](https://github.com/dc-js/dc.js/pull/1279)) ## 2.0.2 diff --git a/index.js b/index.js index d56a35c97..c65b97641 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ // Import DC and dependencies d3 = require("d3"); -crossfilter = require("crossfilter"); +crossfilter = require("crossfilter2"); module.exports = require("./dc"); diff --git a/package.json b/package.json index 39b2cdfa7..c8470026f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dc", - "version": "2.0.2", + "version": "2.0.3", "license": "Apache-2.0", "copyright": "2017", "description": "A multi-dimensional charting library built to work natively with crossfilter and rendered using d3.js ", diff --git a/src/footer.js b/src/footer.js index 1f3080303..d546b1435 100644 --- a/src/footer.js +++ b/src/footer.js @@ -15,7 +15,7 @@ dc.crossfilter = crossfilter; return dc;} if(typeof define === "function" && define.amd) { - define(["d3", "crossfilter"], _dc); + define(["d3", "crossfilter2"], _dc); } else if(typeof module === "object" && module.exports) { var _d3 = require('d3'); var _crossfilter = require('crossfilter2');