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
2
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.6 to 0.0.7

27

deps.js

@@ -6,15 +6,7 @@ var dag = require('croc-dag')

var _includePackage = function (name, packages) {
return packages.indexOf(name) >= 0 || packages.length === 0
}
exports.packages = function packages (opts) {
var options = opts || {}
exports.packages = function packages (strict) {
var graph = new dag.DAG()
var pkgs = list.packages(options.since)
var pkgs = list.packages()
Object.keys(pkgs)
.filter(function (key) {
return _includePackage(key, options.packages)
})
.forEach(function (key) {

@@ -32,7 +24,4 @@ var pkg = pkgs[key]

.filter(function (dName) {
return !options.strict || semver.satisfies(pkgs[dName].version, pkgDeps[dName])
return !strict || semver.satisfies(pkgs[dName].version, pkgDeps[dName])
})
.filter(function (dName) {
return _includePackage(dName, options.packages)
})
.forEach(function (dName) {

@@ -48,1 +37,11 @@ graph.addEdge(pkg.name, dName, pkgDeps[dName])

}
exports.getPredecessors = function (graph, packages) {
var included = []
packages.forEach(function (name) {
dag.alg.reverseDfs(graph, name).forEach(function (name) {
included.push(name)
})
})
return included
}
{
"name": "croc-deps",
"version": "0.0.6",
"version": "0.0.7",
"description": "",

@@ -5,0 +5,0 @@ "main": "deps.js",

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