Transpiled JS

This commit is contained in:
Lewis Jones
2025-07-09 12:16:42 +01:00
parent 6d25ae13f5
commit 4e2fbd91ff
2 changed files with 9 additions and 7 deletions
Generated Vendored
+8 -6
View File
@@ -36128,23 +36128,25 @@ class ComponentDetection {
packages.forEach((pkg) => { packages.forEach((pkg) => {
pkg.locationsFoundAt.forEach((location) => { pkg.locationsFoundAt.forEach((location) => {
var _a, _b; var _a, _b;
if (!manifests.find((manifest) => manifest.name == location)) { // Use the normalized path (remove leading slash if present)
const manifest = new dependency_submission_toolkit_1.Manifest(location, location); const normalizedLocation = location.startsWith('/') ? location.substring(1) : location;
if (!manifests.find((manifest) => manifest.name == normalizedLocation)) {
const manifest = new dependency_submission_toolkit_1.Manifest(normalizedLocation, normalizedLocation);
manifests.push(manifest); manifests.push(manifest);
} }
const depGraphEntry = dependencyGraphs[location]; const depGraphEntry = dependencyGraphs[normalizedLocation];
if (!depGraphEntry) { if (!depGraphEntry) {
core.warning(`No dependency graph entry found for manifest location: ${location}`); core.warning(`No dependency graph entry found for manifest location: ${normalizedLocation}`);
return; // Skip this location if not found in dependencyGraphs return; // Skip this location if not found in dependencyGraphs
} }
const directDependencies = depGraphEntry.explicitlyReferencedComponentIds; const directDependencies = depGraphEntry.explicitlyReferencedComponentIds;
if (directDependencies.includes(pkg.id)) { if (directDependencies.includes(pkg.id)) {
(_a = manifests (_a = manifests
.find((manifest) => manifest.name == location)) === null || _a === void 0 ? void 0 : _a.addDirectDependency(pkg, ComponentDetection.getDependencyScope(pkg)); .find((manifest) => manifest.name == normalizedLocation)) === null || _a === void 0 ? void 0 : _a.addDirectDependency(pkg, ComponentDetection.getDependencyScope(pkg));
} }
else { else {
(_b = manifests (_b = manifests
.find((manifest) => manifest.name == location)) === null || _b === void 0 ? void 0 : _b.addIndirectDependency(pkg, ComponentDetection.getDependencyScope(pkg)); .find((manifest) => manifest.name == normalizedLocation)) === null || _b === void 0 ? void 0 : _b.addIndirectDependency(pkg, ComponentDetection.getDependencyScope(pkg));
} }
}); });
}); });
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long