snyk-gradle-plugin
Advanced tools
Comparing version 1.3.1 to 2.0.0
@@ -7,6 +7,5 @@ var cloneDeep = require('clone-deep'); | ||
function parse(text, from) { | ||
function parse(text) { | ||
var data = processGradleOutput(text); | ||
var depArray = createTree( | ||
data.lines, data.omittedDeps, {from: [from]}); | ||
var depArray = createTree(data.lines, data.omittedDeps); | ||
fillOmittedDependencies(depArray, data.omittedDeps); | ||
@@ -90,4 +89,2 @@ var depTree = convertNodeArrayToObject(depArray); | ||
return { | ||
groupId: groupId, | ||
artifactId: artifactId, | ||
version: version, | ||
@@ -124,3 +121,3 @@ name: groupId + ':' + artifactId, | ||
function createTree(lines, omittedDeps, parentElement) { | ||
function createTree(lines, omittedDeps) { | ||
if (lines.length === 0) { | ||
@@ -132,3 +129,3 @@ return []; | ||
var currentIndent = getIndent(currentLine); | ||
var current = getElementAsObject(currentLine, parentElement); | ||
var current = getElementAsObject(currentLine); | ||
array.push(current); | ||
@@ -142,10 +139,10 @@ | ||
if (nextIndent === currentIndent) { | ||
next = getElementAsObject(lines[0], parentElement); | ||
next = getElementAsObject(lines[0]); | ||
array.push(next); | ||
lines.shift(); | ||
} else if (nextIndent > currentIndent) { | ||
next = getElementAsObject(lines[0], current); | ||
next = getElementAsObject(lines[0]); | ||
var subTreeLines = getSubTreeLines(lines, currentIndent); | ||
lines.splice(0, subTreeLines.length); | ||
current.dependencies = createTree(subTreeLines, omittedDeps, current); | ||
current.dependencies = createTree(subTreeLines, omittedDeps); | ||
} | ||
@@ -152,0 +149,0 @@ if (omittedDeps[current.name] === true) { |
@@ -32,3 +32,3 @@ { | ||
}, | ||
"version": "1.3.1" | ||
"version": "2.0.0" | ||
} |
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
18576
315