From c10df1dd2a73c10cca825511046e90021346f02c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 08:46:03 +0000 Subject: [PATCH 1/3] build(deps): Bump d3-dag from 0.11.5 to 1.1.0 Bumps [d3-dag](https://github.com/erikbrinkman/d3-dag) from 0.11.5 to 1.1.0. - [Changelog](https://github.com/erikbrinkman/d3-dag/blob/main/CHANGELOG.md) - [Commits](https://github.com/erikbrinkman/d3-dag/commits) --- updated-dependencies: - dependency-name: d3-dag dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 64 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 50 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index e2841a8a06..bf2b459738 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@types/styled-components": "^5.1.34", "ansi-styles": "^6.2.1", "d3": "^7.9.0", - "d3-dag": "^0.11.5", + "d3-dag": "^1.1.0", "history": "^5.3.0", "http-proxy-middleware": "^3.0.3", "install": "^0.13.0", diff --git a/yarn.lock b/yarn.lock index 217e94bdb2..a56e8e3312 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4366,7 +4366,7 @@ __metadata: babel-plugin-styled-components: "npm:^2.1.4" buffer: "npm:^6.0.3" d3: "npm:^7.9.0" - d3-dag: "npm:^0.11.5" + d3-dag: "npm:^1.1.0" eslint: "npm:9.17.0" eslint-plugin-import: "npm:^2.31.0" history: "npm:^5.3.0" @@ -5551,7 +5551,7 @@ __metadata: languageName: node linkType: hard -"d3-array@npm:2 - 3, d3-array@npm:2.10.0 - 3, d3-array@npm:2.5.0 - 3, d3-array@npm:3, d3-array@npm:^3.1.6, d3-array@npm:^3.2.0": +"d3-array@npm:2 - 3, d3-array@npm:2.10.0 - 3, d3-array@npm:2.5.0 - 3, d3-array@npm:3, d3-array@npm:^3.2.0": version: 3.2.0 resolution: "d3-array@npm:3.2.0" dependencies: @@ -5560,6 +5560,15 @@ __metadata: languageName: node linkType: hard +"d3-array@npm:^3.2.4": + version: 3.2.4 + resolution: "d3-array@npm:3.2.4" + dependencies: + internmap: "npm:1 - 2" + checksum: 10c0/08b95e91130f98c1375db0e0af718f4371ccacef7d5d257727fe74f79a24383e79aba280b9ffae655483ffbbad4fd1dec4ade0119d88c4749f388641c8bf8c50 + languageName: node + linkType: hard + "d3-axis@npm:3": version: 3.0.0 resolution: "d3-axis@npm:3.0.0" @@ -5605,15 +5614,15 @@ __metadata: languageName: node linkType: hard -"d3-dag@npm:^0.11.5": - version: 0.11.5 - resolution: "d3-dag@npm:0.11.5" +"d3-dag@npm:^1.1.0": + version: 1.1.0 + resolution: "d3-dag@npm:1.1.0" dependencies: - d3-array: "npm:^3.1.6" - fastpriorityqueue: "npm:0.7.2" + d3-array: "npm:^3.2.4" javascript-lp-solver: "npm:0.4.24" quadprog: "npm:^1.6.1" - checksum: 10c0/bdcfd673a56830e297f228919bc38f44aefd104c13f3ee1962bb0c3fa084ab3881844bdfaa9e5024fabf679b536d33052c5a9f05fdf1d28882035767e22b7538 + stringify-object: "npm:^5.0.0" + checksum: 10c0/e4590fe88fc3bb34cf7c9629059b1378da501bfce244e1d3012e123ddf9c413bc7dd9cb77a6737e78d853e1c53a7d3961dbd2d130552a32001bae54da8190f48 languageName: node linkType: hard @@ -6825,13 +6834,6 @@ __metadata: languageName: node linkType: hard -"fastpriorityqueue@npm:0.7.2": - version: 0.7.2 - resolution: "fastpriorityqueue@npm:0.7.2" - checksum: 10c0/21ce7c0c25a27f8d266de044aa7a2a755640e7db1419dbd49a744ecd7e949e3074540321008dfc91832f0b16b6db21ed103d5aeab40add28f087b4ebe8526ade - languageName: node - linkType: hard - "fastq@npm:^1.6.0": version: 1.13.0 resolution: "fastq@npm:1.13.0" @@ -7090,6 +7092,13 @@ __metadata: languageName: node linkType: hard +"get-own-enumerable-keys@npm:^1.0.0": + version: 1.0.0 + resolution: "get-own-enumerable-keys@npm:1.0.0" + checksum: 10c0/3e14fbcf7cbb27a09f4335b3fe28ec4ac73254cd5007c141ff8e248c854fb1f4b44271fcc707c9aec1de7ae889eb28ffbd5b8a82f6abd9adb91df926fb7cec44 + languageName: node + linkType: hard + "get-package-type@npm:^0.1.0": version: 0.1.0 resolution: "get-package-type@npm:0.1.0" @@ -7909,6 +7918,13 @@ __metadata: languageName: node linkType: hard +"is-obj@npm:^3.0.0": + version: 3.0.0 + resolution: "is-obj@npm:3.0.0" + checksum: 10c0/48d678fa15c56fd38353634ae2106a538827af9050211b18df13540dba0b38aa25c5cb498648a01311bf493a99ac3ce416576649b8cace10bcce7344611fa56a + languageName: node + linkType: hard + "is-plain-obj@npm:^4.0.0": version: 4.1.0 resolution: "is-plain-obj@npm:4.1.0" @@ -7942,6 +7958,13 @@ __metadata: languageName: node linkType: hard +"is-regexp@npm:^3.1.0": + version: 3.1.0 + resolution: "is-regexp@npm:3.1.0" + checksum: 10c0/99dbaea41bddee2205db468c0946f5fee25cc4ae486333cb4d2b8095ab4b0a500e74ba61afd9e6e4f63ececcd55b4df5ae2a555b1c3e26308e516ff53c9533cd + languageName: node + linkType: hard + "is-set@npm:^2.0.3": version: 2.0.3 resolution: "is-set@npm:2.0.3" @@ -11848,6 +11871,17 @@ __metadata: languageName: node linkType: hard +"stringify-object@npm:^5.0.0": + version: 5.0.0 + resolution: "stringify-object@npm:5.0.0" + dependencies: + get-own-enumerable-keys: "npm:^1.0.0" + is-obj: "npm:^3.0.0" + is-regexp: "npm:^3.1.0" + checksum: 10c0/f955bb0b41edb0a200bf5ba24d516a2d409c749a01224e14a088ecf07fec3d930ec90da3a681f6798b9d6a1b187cb3bb57f0d17525190006ef3bd609d0300bb9 + languageName: node + linkType: hard + "strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": version: 6.0.1 resolution: "strip-ansi@npm:6.0.1" From b6ffd02b40d237791b313c8d22e1e3f9fed18540 Mon Sep 17 00:00:00 2001 From: Dmitry Gusev Date: Sat, 11 Jan 2025 19:27:25 +0300 Subject: [PATCH 2/3] Use new API methods of d3-dag library --- ui/components/DagGraph.tsx | 12 +++++++----- ui/components/ReconciliationGraph.tsx | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/components/DagGraph.tsx b/ui/components/DagGraph.tsx index 3593085a27..2936098b57 100644 --- a/ui/components/DagGraph.tsx +++ b/ui/components/DagGraph.tsx @@ -83,17 +83,19 @@ function DagGraph({ className, nodes }: Props) { const linkStrokeWidth = 5; //use d3 to create DAG structure - const stratify = d3d.dagStratify(); - const root = stratify(nodes); + const builder = d3d.graphStratify(); + const graph = builder(nodes); const makeDag = d3d .sugiyama() .nodeSize(() => [ nodeSize.width + nodeSize.horizontalSeparation, nodeSize.height + nodeSize.verticalSeparation, ]); - const { width } = makeDag(root); - const descendants = root.descendants(); - const links = root.links(); + const { width } = makeDag(graph); + const root = [...graph.roots()][0]; + + const descendants = root ? [...root.descendants()] : []; + const links = [...graph.links()]; const graphOffsetX = zoomBox / 2 - width / 2; const verticalSeparationHalf = nodeSize.verticalSeparation / 2; diff --git a/ui/components/ReconciliationGraph.tsx b/ui/components/ReconciliationGraph.tsx index 39bad5df98..fed06a6a6d 100644 --- a/ui/components/ReconciliationGraph.tsx +++ b/ui/components/ReconciliationGraph.tsx @@ -137,6 +137,7 @@ export const Graph = ({ const handleMouseUp = () => { setIsPanning(false); }; + console.log('ReconciliationGraph'); return ( Date: Sun, 12 Jan 2025 22:56:12 +0300 Subject: [PATCH 3/3] Remove console.log statement --- ui/components/ReconciliationGraph.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/components/ReconciliationGraph.tsx b/ui/components/ReconciliationGraph.tsx index fed06a6a6d..39bad5df98 100644 --- a/ui/components/ReconciliationGraph.tsx +++ b/ui/components/ReconciliationGraph.tsx @@ -137,7 +137,6 @@ export const Graph = ({ const handleMouseUp = () => { setIsPanning(false); }; - console.log('ReconciliationGraph'); return (