v1.1.2
π 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
contextparameter fromevaluateConditionfunctioncontextparameter 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
contextparameter fromevaluateConditionfunction - 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 functionssrc/evaluateCondition.test.ts- Updated all test cases and removed context testsREADME.md- Updated examples to match new APIpackage.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)