Skip to content

build(deps): Bump d3-dag from 0.11.5 to 1.1.0 #4407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 7 additions & 5 deletions ui/components/DagGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
64 changes: 49 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4399,7 +4399,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.18.0"
eslint-plugin-import: "npm:^2.31.0"
history: "npm:^5.3.0"
Expand Down Expand Up @@ -5605,7 +5605,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:
Expand All @@ -5614,6 +5614,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"
Expand Down Expand Up @@ -5659,15 +5668,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

Expand Down Expand Up @@ -6895,13 +6904,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"
Expand Down Expand Up @@ -7167,6 +7169,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"
Expand Down Expand Up @@ -8042,6 +8051,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"
Expand Down Expand Up @@ -8075,6 +8091,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"
Expand Down Expand Up @@ -12039,6 +12062,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"
Expand Down
Loading