Skip to content

v0.1.8

This release significantly improves React ergonomics and fixes critical bugs in the cyclic dependency detection logic.

  • Fixed Cyclic Dependency Detection: The detection logic has been completely overhauled. It now correctly identifies true cycles (A -> A) without false positives for nested guard compositions (e.g., guard.all reading children).
  • GuardReason Interface: The GuardReason interface now includes a toString() signature. This ensures that reason objects can be safely converted to strings in all environments.
  • formatReason Helper: A new utility function to easily render guard failure reasons in JSX.
    import { formatReason } from "@pulse-js/react";
    // ...
    <p>{formatReason(reason)}</p>;
  • Improved Types: Internal improvements to how types are exported to prevent circular dependencies during builds.
  • Tabbed Interface: New split view with “Inspector” (list) and “Pulse Tree” (dependency graph).
  • Pulse Tree Visualization: Recursive tree view showing the entire dependency graph of your guards.
    • Expand/Collapse nodes to trace logic flows.
    • View status and failure reasons at every level of the tree.
  • Editable Sources: Click on any Source value in the inspector to edit it directly. Supports JSON syntax for objects/arrays.
  • Enhanced UI: Improved “Pill” design, better colors, and drag-and-drop mechanics.