New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

croc-deps

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

croc-deps - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

11

deps.js

@@ -9,3 +9,4 @@ import graphlib from 'graphlib';

packages.forEach((pkg) => {
Object.keys(packages).forEach((key) => {
const pkg = packages[key];
const info = require(pkg.file);

@@ -16,4 +17,4 @@ const pkgDeps = info.dependencies || {};

Object.keys(pkgDeps)
.filter(dName => packages.has(dName))
.filter(dName => lenient || semver.satisfies(packages.get(dName).version, pkgDeps[dName]))
.filter(dName => packages[dName])
.filter(dName => lenient || semver.satisfies(packages[dName].version, pkgDeps[dName]))
.forEach(dName => graph.setEdge(pkg.name, dName, pkgDeps[dName]));

@@ -26,5 +27,5 @@ });

pName,
packages.get(pName).version,
packages[pName].version,
graph.successors(pName).map(dName => dName + '#' + graph.edge(pName, dName)),
packages.get(pName).file
packages[pName].file
]);

@@ -31,0 +32,0 @@ };

@@ -30,3 +30,4 @@ 'use strict';

packages.forEach(function (pkg) {
Object.keys(packages).forEach(function (key) {
var pkg = packages[key];
var info = require(pkg.file);

@@ -37,5 +38,5 @@ var pkgDeps = info.dependencies || {};

Object.keys(pkgDeps).filter(function (dName) {
return packages.has(dName);
return packages[dName];
}).filter(function (dName) {
return lenient || _semver2.default.satisfies(packages.get(dName).version, pkgDeps[dName]);
return lenient || _semver2.default.satisfies(packages[dName].version, pkgDeps[dName]);
}).forEach(function (dName) {

@@ -47,5 +48,5 @@ return graph.setEdge(pkg.name, dName, pkgDeps[dName]);

return _graphlib2.default.alg.topsort(graph).reverse().map(function (pName) {
return [pName, packages.get(pName).version, graph.successors(pName).map(function (dName) {
return [pName, packages[pName].version, graph.successors(pName).map(function (dName) {
return dName + '#' + graph.edge(pName, dName);
}), packages.get(pName).file];
}), packages[pName].file];
});

@@ -52,0 +53,0 @@ };

{
"name": "croc-deps",
"version": "0.0.1",
"version": "0.0.2",
"description": "",

@@ -15,6 +15,6 @@ "main": "dist/deps-es5.js",

"dependencies": {
"croc-list": "0.0.1",
"graphlib": "^1.0.7",
"semver": "^5.0.3"
"croc-list": "~0.0.2",
"graphlib": "~1.0.7",
"semver": "~5.0.3"
}
}
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