shell-operator
shell-operator copied to clipboard
feat: refactor filter
Overview
Major refactoring of the shell-operator filter system: replaced complex interface-based architecture with simplified functional approach, consolidated jq filtering logic, and added comprehensive test coverage.
What this PR does / why we need it
Key Changes:
- 🔄 Architecture Overhaul: Replaced
Filterinterface with functionalRun()API - 📁 Consolidation: Removed
pkg/filter/jq/subdirectory, merged logic into main package - 🎯 API Simplification: Single function with clear precedence (custom filter > JQ expression > no filter)
- ✅ Enhanced Testing: Added 614 lines of comprehensive unit tests
- 🔧 Integration: Updated 15+ files across codebase for new API
Benefits:
- Simplified architecture and maintenance
- Clear filter precedence rules
- Consolidated codebase
- 100% backward compatibility maintained
- All tests pass with no performance regression
Special notes for your reviewer
Internal refactoring only - no breaking changes for external consumers. Major code simplification while preserving all existing functionality.