From 631bb28f09df0fe0be6512f9f5702a8de3b2fd7e Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Fri, 22 Nov 2019 21:25:00 +0530 Subject: [PATCH] Use node-d3 5.12 (required to update rollup to 1.x) --- debian/control | 2 +- debian/patches/0770-bump-node-d3.patch | 43 ++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0770-bump-node-d3.patch diff --git a/debian/control b/debian/control index a3fd63b8b8..e52b14bd36 100644 --- a/debian/control +++ b/debian/control @@ -330,7 +330,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, # need transition (embedded) node-core-js (<< 3~), node-css-loader, - node-d3, + node-d3 (>= 5.12~), node-d3-array, node-d3-axis, node-d3-brush, diff --git a/debian/patches/0770-bump-node-d3.patch b/debian/patches/0770-bump-node-d3.patch new file mode 100644 index 0000000000..5639da884d --- /dev/null +++ b/debian/patches/0770-bump-node-d3.patch @@ -0,0 +1,43 @@ +From fd28d39ac35ec6123272d20ade21025403b38b78 Mon Sep 17 00:00:00 2001 +From: Pirate Praveen +Date: Fri, 18 Oct 2019 11:20:19 +0000 +Subject: [PATCH 1/2] Update d3 node module 4.13 -> 5.12 + +--- + package.json | 2 +- + yarn.lock | 130 +++++++++++++++------------------------------------ + 2 files changed, 38 insertions(+), 94 deletions(-) + +--- a/package.json ++++ b/package.json +@@ -61,7 +61,7 @@ + "core-js": "^3.1.3", + "cropper": "^2.3.0", + "css-loader": "^1.0.0", +- "d3": "^4.13.0", ++ "d3": "^5.12.0", + "d3-array": "^1.2.1", + "d3-axis": "^1.0.8", + "d3-brush": "^1.0.4", +--- a/app/assets/javascripts/vue_shared/components/bar_chart.vue ++++ b/app/assets/javascripts/vue_shared/components/bar_chart.vue +@@ -124,9 +124,7 @@ + }, + }, + mounted() { +- if (!this.allValuesEmpty) { +- this.draw(); +- } ++ this.draw(); + }, + methods: { + draw() { +@@ -153,7 +151,7 @@ + this.yScale = d3.scaleLinear().rangeRound([this.vbHeight, 0]); + + this.xScale.domain(this.graphData.map(d => d.name)); +- this.yScale.domain([0, d3.max(this.graphData.map(d => d.value))]); ++ this.yScale.domain([0, d3.max(this.graphData.map(d => d.value)) || Infinity]); + + // Zoom/Panning Function + this.zoom = d3 diff --git a/debian/patches/series b/debian/patches/series index 35819c830a..11e476f794 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -26,3 +26,4 @@ 0740-use-packaged-modules.patch 0750-fix-relative-paths.patch 0760-bump-rubyzip.patch +0770-bump-node-d3.patch