debian-mirror-gitlab/debian/patches/0770-bump-node-d3.patch
2020-02-23 19:47:58 +05:30

47 lines
1.6 KiB
Diff

From fd28d39ac35ec6123272d20ade21025403b38b78 Mon Sep 17 00:00:00 2001
From: Pirate Praveen <praveen@debian.org>
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(-)
Index: gitlab/app/assets/javascripts/vue_shared/components/bar_chart.vue
===================================================================
--- gitlab.orig/app/assets/javascripts/vue_shared/components/bar_chart.vue
+++ gitlab/app/assets/javascripts/vue_shared/components/bar_chart.vue
@@ -124,9 +124,7 @@ export default {
},
},
mounted() {
- if (!this.allValuesEmpty) {
- this.draw();
- }
+ this.draw();
},
methods: {
draw() {
@@ -153,7 +151,7 @@ export default {
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
Index: gitlab/package.json
===================================================================
--- gitlab.orig/package.json
+++ gitlab/package.json
@@ -58,7 +58,7 @@
"compression-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.0.4",
"cropper": "^2.3.0",
- "d3": "^4.13.0",
+ "d3": "^5.12.0",
"diff": "^3.4.0",
"document-register-element": "1.13.1",
"dropzone": "^4.2.0",