From c901e5f7c39b5b232d3537f1d5f11890663b2e2e Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Wed, 4 Jan 2023 12:34:56 +0100 Subject: [PATCH] Migrate from d3 v3.5.17 to d3-collection v1.0.7 --- package.json | 3 ++- public/milestones_visualization.tsx | 5 ++--- yarn.lock | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 7d6c53b..22aab45 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "test": "yarn jest" }, "dependencies": { - "d3": "3.5.17", + "d3-collection": "^1.0.7", "react": "^16.12.0", "react-dom": "^16.12.0", "react-milestones-vis": "^0.5.0" @@ -34,6 +34,7 @@ "minimist": "^1.2.6" }, "devDependencies": { + "@types/d3-collection": "^1.0.7", "@types/jest": "^26.0.14", "jest": "^26.6.3", "ts-jest": "^26.5.6", diff --git a/public/milestones_visualization.tsx b/public/milestones_visualization.tsx index 5fe3e23..773b5c8 100644 --- a/public/milestones_visualization.tsx +++ b/public/milestones_visualization.tsx @@ -1,5 +1,5 @@ import React, { FC } from 'react'; -import d3 from 'd3'; +import { nest } from 'd3-collection'; import { Milestones } from 'react-milestones-vis'; import { MilestonesVisParams } from './types'; @@ -76,8 +76,7 @@ export const MilestonesVisualization: FC = (props) >() + ? nest>() .key((d) => d.category) .entries(data) : data diff --git a/yarn.lock b/yarn.lock index bc232cd..3997524 100644 --- a/yarn.lock +++ b/yarn.lock @@ -526,6 +526,11 @@ dependencies: "@babel/types" "^7.3.0" +"@types/d3-collection@^1.0.7": + version "1.0.10" + resolved "https://registry.yarnpkg.com/@types/d3-collection/-/d3-collection-1.0.10.tgz#bca161e336156968f267c077f7f2bfa8ff224e58" + integrity sha512-54Fdv8u5JbuXymtmXm2SYzi1x/Svt+jfWBU5junkhrCewL92VjqtCBDn97coBRVwVFmYNnVTNDyV8gQyPYfm+A== + "@types/graceful-fs@^4.1.2": version "4.1.5" resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz" @@ -1062,9 +1067,9 @@ d3-array@^1.2.0: resolved "https://registry.npmjs.org/d3-array/-/d3-array-1.2.4.tgz" integrity sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw== -d3-collection@1, d3-collection@^1.0.4: +d3-collection@1, d3-collection@^1.0.4, d3-collection@^1.0.7: version "1.0.7" - resolved "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.7.tgz" + resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.7.tgz#349bd2aa9977db071091c13144d5e4f16b5b310e" integrity sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A== d3-color@1: @@ -1125,11 +1130,6 @@ d3-time@1: resolved "https://registry.npmjs.org/d3-time/-/d3-time-1.1.0.tgz" integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA== -d3@3.5.17: - version "3.5.17" - resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz#bc46748004378b21a360c9fc7cf5231790762fb8" - integrity sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g= - data-urls@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz"