From 938507994a11b4084caea35b889e8a5f7205c249 Mon Sep 17 00:00:00 2001 From: Kaspar Lyngsie Date: Sat, 18 Nov 2023 18:36:46 +0100 Subject: [PATCH] chore: renaming projectName => rootPkgName --- lib/graph.ts | 4 ++-- lib/index.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/graph.ts b/lib/graph.ts index 0d85354..c01e58f 100644 --- a/lib/graph.ts +++ b/lib/graph.ts @@ -17,7 +17,7 @@ interface QueueItem { export async function buildGraph( snykGraph: SnykGraph, - projectName: string, + rootPkgName: string, projectVersion: string, coordinateMap?: CoordinateMap, ) { @@ -25,7 +25,7 @@ export async function buildGraph( const isEmptyGraph = !snykGraph || Object.keys(snykGraph).length === 0; const depGraphBuilder = new DepGraphBuilder(pkgManager, { - name: projectName, + name: rootPkgName, version: projectVersion || '0.0.0', }); diff --git a/lib/index.ts b/lib/index.ts index 742fc72..d6e7047 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -623,14 +623,14 @@ export async function processProjectsInExtractedJSON( const isSubProject = projectId !== defaultProjectKey; - let projectName = defaultProject; + let rootPkgName = defaultProject; if (isSubProject) { - projectName = `${defaultProject}/${projectId}`; + rootPkgName = `${defaultProject}/${projectId}`; } extractedJSON.projects[projectId].depGraph = await buildGraph( snykGraph, - projectName, + rootPkgName, projectVersion, coordinateMap, );