v0.1.7
This release focuses on hardening the core engine for large-scale applications with improved failure tracking, cyclic dependency detection, and enterprise-grade metadata.
Core Improvements (@pulse-js/core 0.1.7)
Section titled “Core Improvements (@pulse-js/core 0.1.7)”- Cyclic Dependency Detection: Added a robust stack-based detection mechanism that catches infinite reactive loops (A -> B -> A) and reports them as descriptive failure reasons instead of causing stack overflows.
- Persistent Dependency Insights: The
.explain()graph now persists even after a failure. Previously, failing early would clear downstream dependencies; now it remembers the last known graph for better debugging. - Structured Reason Metadata: Introduced the
GuardReasoninterface. Evaluators can now throw objects withcode,message, andmetato provide rich error context to the UI. - Semantic State Preservation: When a failed Guard re-evaluates, its
lastReasonis preserved whilepending, preventing UI flickering and allowing users to see the previous error while the next attempt is in progress. - Flexible Pending State: Returning
undefinedfrom a Guard evaluator now explicitly marks it aspending, simplifying data fetching and “not ready” patterns.
DevTools Improvements (@pulse-js/tools 0.1.4)
Section titled “DevTools Improvements (@pulse-js/tools 0.1.4)”- Metadata Rendering: The inspector now renders structured failure reasons, including error codes and JSON metadata snippets.
- Evaluation State Tracking: Visual indicators for
lastReasonwhen a guard is in apendingstate after a failure. - Dependency Status: Dependency lists now show the status of each dependent guard for faster troubleshooting.
React Integration (@pulse-js/react 0.1.4)
Section titled “React Integration (@pulse-js/react 0.1.4)”- Updated Dependencies: Bumped to use
@pulse-js/core@0.1.7and@pulse-js/tools@0.1.4.