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

snyk-go-plugin

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-go-plugin - npm Package Compare versions

Comparing version 1.20.0 to 1.21.0

17

dist/index.js

@@ -102,4 +102,5 @@ "use strict";

if (packageManager === 'gomodules') {
const dependencyGraph = await buildDepGraphFromImportsAndModules(root, targetFile, additionalArgs);
return {
dependencyGraph: await buildDepGraphFromImportsAndModules(root, targetFile, additionalArgs),
dependencyGraph,
};

@@ -380,6 +381,7 @@ }

}
function buildGraph(depGraphBuilder, depPackages, packagesByName, currentParent, childrenChain, ancestorsChain) {
function buildGraph(depGraphBuilder, depPackages, packagesByName, currentParent, childrenChain, ancestorsChain, visited) {
var _a;
const depPackagesLen = depPackages.length;
for (let i = depPackagesLen - 1; i >= 0; i--) {
visited = visited || new Set();
const packageImport = depPackages[i];

@@ -413,4 +415,13 @@ let version = 'unknown';

}
if (visited.has(packageImport)) {
const prunedId = `${packageImport}:pruned`;
depGraphBuilder.addPkgNode(newNode, prunedId, {
labels: { pruned: 'true' },
});
depGraphBuilder.connectDep(currentParent, prunedId);
continue;
}
depGraphBuilder.addPkgNode(newNode, packageImport);
depGraphBuilder.connectDep(currentParent, packageImport);
visited.add(packageImport);
childrenChain.set(currentParent, [...currentChildren, packageImport]);

@@ -420,3 +431,3 @@ ancestorsChain.set(packageImport, [...currentAncestors, currentParent]);

if (transitives.length > 0) {
buildGraph(depGraphBuilder, transitives, packagesByName, packageImport, childrenChain, ancestorsChain);
buildGraph(depGraphBuilder, transitives, packagesByName, packageImport, childrenChain, ancestorsChain, visited);
}

@@ -423,0 +434,0 @@ }

24

lib/index.ts

@@ -156,8 +156,9 @@ import * as fs from 'fs';

if (packageManager === 'gomodules') {
const dependencyGraph = await buildDepGraphFromImportsAndModules(
root,
targetFile,
additionalArgs,
);
return {
dependencyGraph: await buildDepGraphFromImportsAndModules(
root,
targetFile,
additionalArgs,
),
dependencyGraph,
};

@@ -601,2 +602,3 @@ }

ancestorsChain: Map<string, string[]>,
visited?: Set<string>,
) {

@@ -606,2 +608,3 @@ const depPackagesLen = depPackages.length;

for (let i = depPackagesLen - 1; i >= 0; i--) {
visited = visited || new Set<string>();
const packageImport = depPackages[i];

@@ -642,4 +645,14 @@ let version = 'unknown';

if (visited.has(packageImport)) {
const prunedId = `${packageImport}:pruned`;
depGraphBuilder.addPkgNode(newNode, prunedId, {
labels: { pruned: 'true' },
});
depGraphBuilder.connectDep(currentParent, prunedId);
continue;
}
depGraphBuilder.addPkgNode(newNode, packageImport);
depGraphBuilder.connectDep(currentParent, packageImport);
visited.add(packageImport);

@@ -658,2 +671,3 @@ childrenChain.set(currentParent, [...currentChildren, packageImport]);

ancestorsChain,
visited,
);

@@ -660,0 +674,0 @@ }

@@ -51,3 +51,3 @@ {

},
"version": "1.20.0"
"version": "1.21.0"
}

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