dependency-graph

A simple dependency graph for Node.js

MIT License

Downloads
23.7M
Stars
333
Committers
11

Bot releases are hidden (Show)

dependency-graph - 1.0.0 Latest Release

Published by jriecken 11 months ago

  • Switched to use Map/Set rather than using raw objects as pseudo-Maps/Sets. (Fixes #46)
    • This is also the reason for the major version bump. While there are no functional changes, this library previously did not have any special requirements of the runtime. It now requires a runtime that supports Map/Set (which should be almost everything now in 2023).
  • Ensure circular property is cloned during clone - thanks andrew-healey and tintinthong!
dependency-graph - 0.11.0

Published by jriecken over 3 years ago

  • Add entryNodes method that returns the nodes that nothing depends on - thanks amcdnl!
dependency-graph - 0.10.0

Published by jriecken almost 4 years ago

  • Add directDependenciesOf and directDependantsOf methods for retrieving direct dependency information. (Fixes #40)
  • Add aliases dependentsOf and directDependentsOf.
dependency-graph - 0.9.0

Published by jriecken over 4 years ago

  • Rewrite the topological sort DFS to be more efficient (and work!) on large graphs.
    • No longer uses recursion to avoid stack overflows with large/deep graphs
    • No longer is accidentally O(N^2) (thanks willtennien for pointing this out!)
dependency-graph - 0.8.1

Published by jriecken almost 5 years ago

  • Ensure all nodes are included in overallOrder when cycles are allowed. (Fixes #33)
dependency-graph - 0.8.0

Published by jriecken almost 6 years ago

  • Add a DepGraphCycleError with cyclePath property - thanks jhugman!
dependency-graph - 0.7.2

Published by jriecken about 6 years ago

  • Make constructor parameter optional in Typescript definition. (Fixes #26)
dependency-graph - 0.7.1

Published by jriecken about 6 years ago

  • Fix Typescript definition to include the new constructor arguments added in 0.7.0 - thanks tbranyen!
dependency-graph - 0.7.0

Published by jriecken almost 7 years ago

  • Allow circular dependencies by passing in {circular: true} into the constructor - thanks tbranyen!
dependency-graph - 0.6.0

Published by jriecken almost 7 years ago

  • Add a size method that will return the number of nodes in the graph.
  • Add a clone method that will clone the graph. Any custom node data will only be shallow-copied. (Fixes #14)
dependency-graph - 0.5.2

Published by jriecken almost 7 years ago

  • Add missing parameter in TypeScript definition. (Fixes #19)
dependency-graph - 0.5.1

Published by jriecken about 7 years ago

  • Now exposes Typescript type definition - thanks vangorra!
dependency-graph - 0.5.0

Published by jriecken over 8 years ago

  • Add optional data parameter for the addNode method. (Fixes #12)
  • Add methods getNodeData and setNodeData to manipulate the data associated with a node name. (Fixes #12)
  • Change the hasNode method to be able to cope with falsy node data. (Fixes #12)
dependency-graph - 0.4.1

Published by jriecken about 9 years ago

  • Check all nodes for potential cycles when calculating overall order. (Fixes #8)
dependency-graph - 0.4.0

Published by jriecken about 9 years ago

  • Better error messages
    • When a cycle is detected, the error message will now include the cycle in it. E.g Dependency Cycle Found: a -> b -> c -> a (Fixes #7)
    • When calling addDependency if one of the nodes does not exist, the error will say which one it was (instead of saying that "one" of the two nodes did not exist and making you manually determine which one)
  • Calling overallOrder on an empty graph will no longer throw an error about a dependency cycle. It will return an empty array.
dependency-graph - 0.3.0

Published by jriecken about 9 years ago

  • Fix issue where if you call addNode twice with the same name, it would clear all edges for that node. Now it will do nothing if a node with the specified name already exists. (Fixes #3)
dependency-graph - 0.2.1

Published by jriecken over 9 years ago

  • Fixed removeNode leaving references in outgoingEdges and reference to non-existent var edges - thanks juhoha! (Fixes #2)
dependency-graph - 0.2.0

Published by jriecken over 9 years ago

  • Removed dependency on Underscore - thanks myndzi! (Fixes #1)
dependency-graph - 0.1.0

Published by jriecken over 9 years ago

Initial Release - extracted out of asset-smasher