Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

snyk-go-parser

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-go-parser - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

14

dist/parsers/gomod-graph-parser.js

@@ -14,15 +14,11 @@ "use strict";

function parseGoModGraph(goModGraphOutput, projectName, projectVersion = types_1.DEFAULT_INITIAL_VERSION) {
var _a;
const iterationReadyGraph = goModGraphOutput.trim().split('\n');
const moduleName = iterationReadyGraph[0].split(/\s/)[0];
const rootPkgInfo = {
name: projectName.length ? projectName : '',
name: projectName || moduleName,
version: projectVersion,
};
let depGraph = new dep_graph_1.DepGraphBuilder({ name: GO_MODULES }, rootPkgInfo);
for (const line of goModGraphOutput.trim().split('\n')) {
const depGraph = new dep_graph_1.DepGraphBuilder({ name: GO_MODULES }, rootPkgInfo);
for (const line of iterationReadyGraph) {
const [[parentName, parentVersion = types_1.DEFAULT_INITIAL_VERSION], [childName, childVersion],] = parseGoModGraphLine(line);
if (!((_a = rootPkgInfo.name) === null || _a === void 0 ? void 0 : _a.length)) {
rootPkgInfo.name = parentName; // On first iteration we populate w/ the module name
// If we updated the package name, we should update to a new DepGraphBuilder
depGraph = new dep_graph_1.DepGraphBuilder({ name: GO_MODULES }, rootPkgInfo);
}
const parentPkg = { name: parentName, version: parentVersion };

@@ -29,0 +25,0 @@ const childPkg = {

@@ -50,3 +50,3 @@ {

},
"version": "1.5.1"
"version": "1.5.2"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc