Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Oct 12, 2023
1 parent 25802e7 commit 6475d62
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4804,11 +4804,12 @@ export const parseCsProjAssetsData = async function (csProjData) {
null
).toString();
const pkgBomRef = decodeURIComponent(ppurl);
// If the same package is was already seen, we track the replacement by comparing the version numbers
// If the same package was already seen, we track the replacement by comparing the version numbers
if (pkgAddedMap[name]) {
const versionComparison = compare(pkgNameVersionMap[name], version);
if (version && pkgNameVersionMap[name] !== version) {
switch (versionComparison) {
// We already have the newer version so continue
case 1:
if (DEBUG_MODE) {
console.log(
Expand All @@ -4820,6 +4821,7 @@ export const parseCsProjAssetsData = async function (csProjData) {
);
}
continue;
// We have the old version so let's remove
case -1:
if (DEBUG_MODE) {
console.log(
Expand All @@ -4842,12 +4844,13 @@ export const parseCsProjAssetsData = async function (csProjData) {
).toString()
)
];
pkgNameVersionMap[name] = version;
break;
// We have the same version so continue
default:
continue;
}
} else {
// unknown state, continue to filter
continue;
}
}
Expand Down

0 comments on commit 6475d62

Please sign in to comment.