Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 16 Mar 15:45
· 115 commits to main since this release
9c8f875

Minor Changes

  • 3115609 Thanks @davidkpiano! - Make edge.label nullable

  • 54023f4 Thanks @davidkpiano! - Add edge weights, A* pathfinding, subgraph extraction, and graph reversal.

    • weight?: number on edges; algorithms default to (e) => e.weight ?? 1 with BFS fast path when unweighted
    • getAStarPath(graph, { from, to, heuristic }) for heuristic-guided shortest paths
    • getSubgraph(graph, nodeIds) returns induced subgraph with internal edges
    • reverseGraph(graph, filterEdge?) flips edge directions
    • Remove stale TODO for Mermaid sequence blocks (already implemented)
  • 8f9912d Thanks @davidkpiano! - Add walk generators and coverage utilities for model-based testing.

    • genRandomWalk(), genWeightedRandomWalk(), genQuickRandomWalk(), genPredefinedWalk() — step-by-step graph traversal generators that yield GraphStep, with optional seed for deterministic replay
    • Composable stop conditions: takeSteps(), takeUntilNode(), takeUntilEdge(), takeUntilNodeCoverage(), takeUntilEdgeCoverage()
    • getCoverage() computes node/edge coverage stats from a walk
    • filter option for edge guards, onStep callback for actions — keeps graph JSON-serializable

Patch Changes

  • 22f77a5 Thanks @davidkpiano! - Fix schema and GraphML serialization drift, optimize weighted graph algorithms, and make genSimplePaths() truly lazy.

    • add weight to EdgeSchema and tighten schema drift tests against the runtime graph types
    • preserve graph, node, and edge metadata in GraphML round-trips, including initialNodeId, direction, style, geometry, and edge weight
    • use a heap-backed priority queue for weighted shortest paths, A*, and Prim MST
    • refactor genSimplePaths() to yield incrementally instead of collecting all paths before returning