Fixing circular reference issues

This commit is contained in:
Justin Hutchings
2023-01-22 08:11:28 +00:00
parent 5a1af8472e
commit 5f373a4ba7
3 changed files with 2 additions and 6 deletions
+1 -3
View File
@@ -69,7 +69,7 @@ export default class ComponentDetection {
const packageUrl = ComponentDetection.makePackageUrl(component.component.packageUrl);
if (!packageCache.hasPackage(packageUrl)) {
const pkg = new ComponentDetectionPackage(packageUrl, component.component.id,
const pkg = new ComponentDetectionPackage(packageUrl, component.component.id,
component.isDevelopmentDependency,component.topLevelReferrers,component.locationsFoundAt, component.containerDetailIds, component.containerLayerIds);
packageCache.addPackage(pkg);
packages.push(pkg);
@@ -86,7 +86,6 @@ export default class ComponentDetection {
}
});
});
core.debug(JSON.stringify(packages));
// Create manifests
const manifests: Array<Manifest> = [];
@@ -104,7 +103,6 @@ export default class ComponentDetection {
manifests.find((manifest: Manifest) => manifest.file == location.filePath)?.addIndirectDependency(pkg, ComponentDetection.getDependencyScope(pkg)); }
});
});
core.debug(JSON.stringify(manifests));
return manifests;
} catch (error: any) {
core.error(error);