Skip to content

Commit

Permalink
chore: renaming projectName => rootPkgName
Browse files Browse the repository at this point in the history
  • Loading branch information
dotkas committed Nov 18, 2023
1 parent f9f59f5 commit 9385079
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ interface QueueItem {

export async function buildGraph(
snykGraph: SnykGraph,
projectName: string,
rootPkgName: string,
projectVersion: string,
coordinateMap?: CoordinateMap,
) {
const pkgManager: PkgManager = { name: 'gradle' };
const isEmptyGraph = !snykGraph || Object.keys(snykGraph).length === 0;

const depGraphBuilder = new DepGraphBuilder(pkgManager, {
name: projectName,
name: rootPkgName,
version: projectVersion || '0.0.0',
});

Expand Down
6 changes: 3 additions & 3 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down

0 comments on commit 9385079

Please sign in to comment.