Socket
Socket
Sign inDemoInstall

madge

Package Overview
Dependencies
80
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

12

lib/analysis/circular.js

@@ -5,8 +5,14 @@ 'use strict';

* Get path to the circular dependency.
* @param {String} parent
* @param {Object} unresolved
* @return {Array}
*/
function getPath(unresolved) {
function getPath(parent, unresolved) {
var parentVisited = false;
return Object.keys(unresolved).filter(function (module) {
return unresolved[module];
if (module === parent) {
parentVisited = true;
}
return parentVisited && unresolved[module];
});

@@ -31,3 +37,3 @@ }

if (unresolved[dependency]) {
circular.push(getPath(unresolved));
circular.push(getPath(dependency, unresolved));
return;

@@ -34,0 +40,0 @@ }

{
"name": "madge",
"version": "0.1.0",
"version": "0.1.1",
"author": "Patrik Henningsson <patrik.henningsson@gmail.com>",

@@ -5,0 +5,0 @@ "repository": "git://github.com/pahen/node-madge",

@@ -135,2 +135,5 @@ # MaDGe - Module Dependency Graph

## v0.1.1 (September 3, 2012)
Tweaked circular dependency path output.
## v0.1.0 (September 3, 2012)

@@ -137,0 +140,0 @@ Complete path in circular dependencies is now printed (and marked as red in image graphs).

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc