addon-operator
addon-operator copied to clipboard
Feat/cache jq filters
Overview
Architectural overhaul of the shell-operator filter system that introduces pre-compilation of JQ expressions during configuration, eliminating runtime compilation overhead. The refactoring replaces the complex interface-based design with a simplified functional approach and consolidates all filtering logic.
Key changes:
- Performance: JQ expressions now compiled once at configuration time instead of on every filter operation
- Architecture: Replaced
Filterinterface with functionalRun(expression, filterFn, obj)API - Consolidation: Consolidated
pkg/filter/jq/subdirectory into mainpkg/filter/package - Precedence: Implemented explicit filter precedence: custom filter function > JQ expression > no filter
- Testing: Added comprehensive test suite covering all scenarios
Benefits:
- Simplified architecture and maintenance
- Clear filter precedence rules
- Consolidated codebase
- 100% backward compatibility maintained
Special notes for your reviewer
Internal refactoring - no breaking changes. Major code simplification while preserving functionality.