snyk-go-plugin
Advanced tools
Comparing version 1.7.1 to 1.7.2
@@ -189,4 +189,4 @@ "use strict"; | ||
children.forEach((depName) => { | ||
// We drop branches of overly common pkgs: | ||
// this looses some paths, but avoids explosion in result size | ||
// We drop whole dep tree branches for frequently repeatedpackages: | ||
// this loses some paths, but avoids explosion in result size | ||
if ((totalPackageOccurenceCounter[depName] || 0) > 10) { | ||
@@ -199,4 +199,7 @@ return; | ||
Object.keys(child.dependencies).forEach((grandChildName) => { | ||
// don't merge grandchild if already a child, | ||
// because it was traversed with higher counts and may be more partial | ||
// We merge all the subpackages of the project into the root project, by transplanting dependencies of the | ||
// subpackages one level up. | ||
// This is done to decrease the tree size - and to be similar to other languages, where we are only showing | ||
// dependencies at the project level, not at the level of individual code sub-directories (which Go packages | ||
// are, essentially). | ||
if (!pkg.dependencies[grandChildName]) { | ||
@@ -206,2 +209,5 @@ pkg.dependencies[grandChildName] = child.dependencies[grandChildName]; | ||
}); | ||
// Even though subpackages are not preserved in the result, we still need protection from combinatorial explosion | ||
// while scanning the tree. | ||
totalPackageOccurenceCounter[child.name] = (totalPackageOccurenceCounter[child.name] || 0) + 1; | ||
} | ||
@@ -208,0 +214,0 @@ else { |
@@ -257,4 +257,4 @@ import * as fs from 'fs'; | ||
// We drop branches of overly common pkgs: | ||
// this looses some paths, but avoids explosion in result size | ||
// We drop whole dep tree branches for frequently repeatedpackages: | ||
// this loses some paths, but avoids explosion in result size | ||
if ((totalPackageOccurenceCounter[depName] || 0) > 10) { | ||
@@ -276,4 +276,7 @@ return; | ||
Object.keys(child.dependencies!).forEach((grandChildName) => { | ||
// don't merge grandchild if already a child, | ||
// because it was traversed with higher counts and may be more partial | ||
// We merge all the subpackages of the project into the root project, by transplanting dependencies of the | ||
// subpackages one level up. | ||
// This is done to decrease the tree size - and to be similar to other languages, where we are only showing | ||
// dependencies at the project level, not at the level of individual code sub-directories (which Go packages | ||
// are, essentially). | ||
if (!pkg.dependencies![grandChildName]) { | ||
@@ -283,2 +286,5 @@ pkg.dependencies![grandChildName] = child.dependencies![grandChildName]; | ||
}); | ||
// Even though subpackages are not preserved in the result, we still need protection from combinatorial explosion | ||
// while scanning the tree. | ||
totalPackageOccurenceCounter[child.name] = (totalPackageOccurenceCounter[child.name] || 0) + 1; | ||
} else { | ||
@@ -285,0 +291,0 @@ // in case was already added via a grandchild |
@@ -42,3 +42,3 @@ { | ||
}, | ||
"version": "1.7.1" | ||
"version": "1.7.2" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60125
708