Skip to content

Commit f970875

Browse files
committed
Remove unused directDependencyFixedVersion from DependencyGraphNodeProps
1 parent cef2564 commit f970875

2 files changed

Lines changed: 0 additions & 15 deletions

File tree

src/components/DependencyGraphNode.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export interface DependencyGraphNodeProps {
7575
enableContextMenu?: boolean;
7676
onExpansionToggle?: (nodeId: string) => void;
7777
hasPatch?: boolean;
78-
directDependencyFixedVersion?: string | null;
7978
};
8079
id: string;
8180
}

src/utils/dependencyGraphHelpers.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -250,19 +250,6 @@ export const getLayoutedElements = (
250250
{} as { [key: string]: DependencyVuln[] },
251251
);
252252

253-
// Build a map of nodes that are first in a vulnerability path with a fix available
254-
const firstInPathWithFixMap = new Map<string, string>();
255-
vulns.forEach((vuln: DependencyVuln) => {
256-
if (
257-
vuln.directDependencyFixedVersion &&
258-
vuln.vulnerabilityPath &&
259-
vuln.vulnerabilityPath.length > 0
260-
) {
261-
const firstInPath = vuln.vulnerabilityPath[0];
262-
firstInPathWithFixMap.set(firstInPath, vuln.directDependencyFixedVersion);
263-
}
264-
});
265-
266253
dagreGraph.setGraph({
267254
rankdir: direction,
268255
nodesep: 0,
@@ -354,7 +341,6 @@ export const getLayoutedElements = (
354341
: 0,
355342
onExpansionToggle,
356343
hasPatch: directDepsWithPatches?.has(el) ?? false,
357-
directDependencyFixedVersion: firstInPathWithFixMap.get(el) ?? null,
358344
},
359345
};
360346
});

0 commit comments

Comments
 (0)