Skip to content

Latest commit

 

History

History
72 lines (60 loc) · 2.93 KB

File metadata and controls

72 lines (60 loc) · 2.93 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Added

  • Init Action - New action type for field initialization
    • Initialize field state and/or value before other rules
    • Support for conditional initialization based on context
    • Merge or replace behavior with default states
    • Priority-based ordering for multiple init rules
    • Comprehensive validation and warnings

[1.0.0] - 2025-07-29

Added

  • Initial Release - Complete rule engine implementation
  • RuleEngine - Core rule evaluation and management system
  • LogicResolver - 25+ built-in logic operators with extensibility
  • ActionHandler - 6 action types for field manipulation
  • DependencyGraph - Automatic dependency tracking and resolution
  • FieldStateManager - Intelligent field state management with caching
  • LookupManager - Lookup table integration for relational data
  • RuleValidator - Comprehensive rule validation and conflict detection
  • DefaultDependencyVisitor - Refactored with Strategy pattern for maintainability

Features

  • Condition-Action Rules - Define when conditions trigger specific actions
  • Automatic Dependency Tracking - Intelligent evaluation order and caching
  • Performance Optimized - Smart caching with dependency-based invalidation
  • Extensible Architecture - Custom operators, actions, and field state properties
  • Debug-Friendly - Comprehensive validation and evaluation tracing
  • Rich Logic System - Variable access, arithmetic, comparisons, arrays, lookups
  • Type-Safe - Full TypeScript support with comprehensive type definitions

Operators

  • Variable Access: var, fieldState
  • Arithmetic: +, -, *, /, sqrt, floor, abs
  • Comparison: >, <, >=, <=, ==, !=
  • Logical: and, or, not
  • Conditional: if
  • Array: some, every, map
  • Lookup: lookup, varTable
  • Shared Rules: $ref

Actions

  • Field Values: set, copy, calculate
  • Field State: setState, calculateState
  • Events: trigger
  • Batch Operations: batch

Architecture

  • Strategy Pattern - Operator handlers for maintainability
  • Dependency Injection - Clean separation of concerns
  • Visitor Pattern - Extensible dependency extraction
  • Observer Pattern - Event system for custom integrations

Testing

  • 308 test cases with comprehensive coverage
  • Integration tests for real-world scenarios
  • Edge case handling for robust operation
  • Performance tests for optimization validation

Documentation

  • Comprehensive README with API documentation
  • Practical examples for all major features
  • TypeScript definitions for full IDE support
  • Migration guides for version updates