snyk-go-plugin
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -111,8 +111,18 @@ var fs = require('fs'); | ||
pkg.from = fromPath.concat(pkg.name + '@' + pkg.version) | ||
pkg.from = fromPath; | ||
if (!isInternalPackage(pkg.name)) { | ||
pkg.from = pkg.from.concat(pkg.name + '@' + pkg.version) | ||
} | ||
goDepsTree.Deps && goDepsTree.Deps.forEach(function (dep) { | ||
var child = recursivelyBuildPkgTree( | ||
dep, depLocks, projectRootPath, pkg.from) | ||
pkg.dependencies[child.name] = child; | ||
dep, depLocks, projectRootPath, pkg.from); | ||
if (isInternalPackage(child.name)) { | ||
Object.keys(child.dependencies).forEach(function (grandChildName) { | ||
pkg.dependencies[grandChildName] = child.dependencies[grandChildName]; | ||
}); | ||
} else { | ||
pkg.dependencies[child.name] = child; | ||
} | ||
}) | ||
@@ -123,2 +133,6 @@ | ||
function isInternalPackage(importPath) { | ||
return (importPath.indexOf('/internal/') != -1) | ||
} | ||
function parseDepLock(root, targetFile) { | ||
@@ -125,0 +139,0 @@ var lock = fs.readFileSync(path.join(root, targetFile)); |
@@ -27,3 +27,3 @@ { | ||
}, | ||
"version": "1.2.2" | ||
"version": "1.2.3" | ||
} |
12676
389