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

dependency-graph

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dependency-graph - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Dependency Graph Changelog

## 0.2.1 (July 3, 2015)
- Fixed removeNode leaving references in outgoingEdges and reference to non-existent var edges - thanks [juhoha](https://github.com/juhoha)! (Fixes #2)
## 0.2.0 (May 1, 2015)

@@ -7,0 +11,0 @@

14

lib/dep_graph.js

@@ -53,8 +53,10 @@ /**

delete this.incomingEdges[name];
Object.keys(this.incomingEdges).forEach(function (key) {
var idx = this.incomingEdges[key].indexOf(name);
if (idx >= 0) {
edges.splice(idx, 1);
}
}, this);
[this.incomingEdges, this.outgoingEdges].forEach(function (edgeList) {
Object.keys(edgeList).forEach(function (key) {
var idx = edgeList[key].indexOf(name);
if (idx >= 0) {
edgeList[key].splice(idx, 1);
}
}, this);
});
},

@@ -61,0 +63,0 @@ hasNode:function (name) {

{
"name": "dependency-graph",
"description": "Simple dependency graph.",
"version": "0.2.0",
"version": "0.2.1",
"author": "Jim Riecken <jriecken@gmail.com>",

@@ -6,0 +6,0 @@ "keywords": [

@@ -117,2 +117,18 @@ var DepGraph = require('../lib/dep_graph').DepGraph;

it('should still work after nodes are removed', function () {
var graph = new DepGraph();
graph.addNode('a');
graph.addNode('b');
graph.addNode('c');
graph.addDependency('a', 'b');
graph.addDependency('b', 'c');
expect(graph.dependenciesOf('a')).toEqual(['c', 'b']);
graph.removeNode('c');
expect(graph.dependenciesOf('a')).toEqual(['b']);
});
});

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