snyk-go-parser
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -6,2 +6,4 @@ "use strict"; | ||
const types_1 = require("../types"); | ||
// Modules can be of shape `modules/snyk/inner/v2` or `modules/snyk/v2/inner` | ||
const GO_SEMVER_PREFIXED_MODULES_REGEX = /(.*)\/v[0-9]+(.*)/; | ||
const GO_MODULES = 'gomodules'; | ||
@@ -12,3 +14,7 @@ function parseGoModGraphLine(line) { | ||
.split(/\s/) | ||
.map((item) => item.split('@')); | ||
.map((item) => item.split('@')) | ||
.map(([name, v]) => { | ||
// Handle cases for prefixed-semver, see https://golang.org/ref/mod#major-version-suffixes | ||
return [name.replace(GO_SEMVER_PREFIXED_MODULES_REGEX, '$1$2'), v]; | ||
}); | ||
} | ||
@@ -15,0 +21,0 @@ function parseGoModGraph(goModGraphOutput, projectName, projectVersion = types_1.DEFAULT_INITIAL_VERSION) { |
@@ -50,3 +50,3 @@ { | ||
}, | ||
"version": "1.6.0" | ||
"version": "1.7.0" | ||
} |
Sorry, the diff of this file is not supported yet
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
68054
351