graph_explorer 1.1.2
graph_explorer: ^1.1.2 copied to clipboard
A versatile library for generating and analyzing graphs with support for JSON and ASCIIArtTree.
1.1.2 #
GraphWalker:- Fix
maxDepth: a step beyondmaxDepthwas counted as processed, so a DFS walk could skip a node reached first beyondmaxDepthand then again within it. Affectswalk,walkAsync,walkByNodes,walkByNodesAsyncandwalkOrder, and soNode.outputsInDepth/inputsInDepth/sideRootswithmaxDepth(e.g.outputsInDepth(maxDepth: 1)now returns every direct output). A DFS withmaxDepth >= 2can still miss a node whose ancestor was reached first at a deeper level; usebfs: truefor an exact depth limit.
- Fix
- New tests: coverage 98.4% -> 99.4%.
- Property tests over seeded random graphs (DAGs, cycles, self-loops, diamonds,
long chains, disconnected components): scanner paths vs. brute-force path
enumeration, shortest/longest path invariants, reachability, BFS/DFS walk
orders,
toJson/fromJsonround-trips (Stringandintnodes), sync vs. async APIs. - Integration test querying a package dependency graph loaded from JSON.
- Pins of current behaviour: tied siblings reversed with
sortByInputDependency,Node.rootdepth, scan paths resolved back to the graph roots,shortestPathToRootfollowing the 1st input, DFSmaxDepth >= 2.
- Property tests over seeded random graphs (DAGs, cycles, self-loops, diamonds,
long chains, disconnected components): scanner paths vs. brute-force path
enumeration, shortest/longest path invariants, reachability, BFS/DFS walk
orders,
1.1.1 #
Graph:- Fix
toTree/toTreeFrom: thekeyCastargument was silently ignored (it was not forwarded toGraphWalker.toTreeFrom). - Fix
Graph.fromJsonfor non-Stringnode types (e.g.Graph<int>.fromJsonwith anodeValueMapper): JSON nodes were looked up by node value instead of by theirStringkey, so only the roots were created. JSON keys are now tracked per parent. A string reference is also accepted when it maps to the same node value.
- Fix
- Tests for
keyCastand forfromJsonwithintnodes (merged definitions, references).
1.1.0 #
-
sdk: ^3.13.0
-
Node:- Fix
isAlwaysRoot: nowtrueonly for nodes created withNode.root(Graph.root), even after outputs are added, andfalsefor ordinary root nodes.
- Fix
-
IterableOfListNodeExtension.longestPaths:- Fix: was returning shorter paths too when more than one path was shorter than the longest.
-
Replaced deprecated
whereNotNullwithnonNulls. -
Dart 3 lints and formatting (initializing formals for private named parameters; public parameter names are unchanged).
-
New tests for the public API (
test/graph_explorer_api_test.dart): coverage 84% -> 98%. -
GitHub Actions:
actions/checkout@v7,codecov/codecov-action@v7. -
collection: ^1.19.1
-
lints: ^6.1.0
-
dependency_validator: ^5.1.0
-
test: ^1.33.0
-
coverage: ^1.16.0
1.0.2 #
GraphWalker:- Added
extractAllEntries.
- Added
Graph.fromJson:maxExpansioncomputed fromGraphWalker.extractAllEntries.
1.0.1 #
-
Added
AnyNodeandNoneNode. -
Graph:- Added
populateandpopulateAsync. - Added
walkOutputsFromandwalkInputsFrom. - Added
walkOutputsOrderFromandwalkInputsOrderFrom. - Added
rootValues,valuesToNodes. - Added
getNodesandgetNodesNullable.
- Added
-
Node:- Added field
attachment. - Added
roots,sideRoots,dependencies,missingDependencies.
- Added field
-
IterableNodeExtension:- Added
mergeandcomplement. - Added
inputsInDepthIntersection,sortedByOutputDependencyandsortedByInputDependency.
- Added
-
New
GraphWalker. -
Removed
ascii_art_treedependency:- Package
ascii_art_tree 1.0.6now usesgraph_explorerinternally (avoid dependency loop).- The
Graphintegration was moved to packageascii_art_treeas an extension.
- The
- Package
-
Improved tests coverage (80%+).
1.0.0 #
- Initial version.