Skip to content

v1.1.2

Choose a tag to compare

@aimidy aimidy released this 05 Sep 07:18
· 5 commits to main since this release

πŸš€ Release v1.1.2 - API Simplification: Remove Context Parameter

πŸ“‹ Overview

This release simplifies the evaluateCondition API by removing the unused context parameter, making the function signature cleaner and more focused on its core functionality.

⚠️ Breaking Changes

Function Signature Change

The evaluateCondition function signature has been simplified:

// Before (v1.1.1)
evaluateCondition(rule, row, context = {}, options = {})

// After (v1.1.2) 
evaluateCondition(rule, row, options = {})

πŸ“ Migration Guide

If you're currently using the context parameter, simply remove it from your function calls:

// Before
evaluateCondition(rule, row, context, options)

// After
evaluateCondition(rule, row, options)

✨ What's Changed

πŸ—‘οΈ Removed

  • context parameter from evaluateCondition function
  • context parameter from internal helper functions
  • All context-related documentation and examples
  • Context functionality tests (8 test cases removed)

οΏ½οΏ½ Updated

  • Function signatures for all evaluation functions
  • JSDoc documentation to reflect new parameter structure
  • All test cases to use simplified function calls
  • README examples to match new API

πŸ§ͺ Testing

  • All 78 existing tests continue to pass
  • No functionality was lost in this simplification
  • Error handling and options configuration remain unchanged

πŸ“Š Impact

  • API Surface: Reduced from 4 parameters to 3 parameters
  • Bundle Size: Slightly reduced due to removed unused code paths
  • Backward Compatibility: Breaking change - requires code updates
  • Performance: No performance impact (context was unused)

πŸ”— Full Changelog

  • Remove unused context parameter from evaluateCondition function
  • Update all internal function signatures to remove context parameter
  • Simplify function documentation and remove context references
  • Update all test cases to use new simplified API
  • Update README examples to match new function signature
  • Maintain full backward compatibility for all other functionality

πŸ“¦ Installation

npm install @aimidy/render-rules@1.1.2

🀝 Contributing

We welcome contributions! Please see our GitHub repository for more information.


Note: This is a breaking change release. Please update your code to remove the context parameter from evaluateCondition function calls.


πŸ“‹ Technical Details

Files Modified

  • src/evaluateCondition.ts - Removed context parameter from all functions
  • src/evaluateCondition.test.ts - Updated all test cases and removed context tests
  • README.md - Updated examples to match new API
  • package.json - Version bump to 1.1.2

Test Results

  • βœ… 78 tests passing
  • βœ… No linting errors
  • βœ… All functionality preserved (except context parameter)

Breaking Change Impact

  • Severity: Medium (requires code changes but no logic changes)
  • Migration Effort: Low (simple parameter removal)
  • Risk: Low (context parameter was unused)