Merged
Conversation
# Conflicts: # Directory.Packages.props # Fluid.Tests/StringFiltersTests.cs # Fluid/Filters/ArrayFilters.cs # Fluid/Filters/MiscFilters.cs # Fluid/Values/ObjectValueBase.cs
# Conflicts: # Directory.Packages.props # Fluid.Tests/Fluid.Tests.csproj # Fluid/ParseException.cs
# Conflicts: # Fluid.Tests/ArrayFiltersTests.cs # Fluid/Ast/IncrementStatement.cs # Fluid/Filters/ArrayFilters.cs # Fluid/Values/BooleanValue.cs # Fluid/Values/NumberValue.cs
- Handle nil/undefined arguments by returning empty array - Support objects/hashes as input (treat as single-element array) - Throw error for non-array/non-object inputs - Throw error when array contains non-objects - Flatten nested arrays before property extraction - Use ArrayValue.Empty singleton for empty results
- Add argument count validation (min: 1, max: 2) - Implement substring matching for string values in arrays - Add support for string inputs (converted to single-element arrays) - Implement nested array flattening for array inputs - Add special handling for nil values (returns empty array) - Implement truthiness checking when no target value is provided - Add support for undefined first argument - Distinguish between nil errors (non-throwing) and number errors (throwing) - Skip array flattening for dictionary inputs to preserve key-value pairs This fixes 17 out of 23 reject filter tests in the Golden Liquid test suite. Remaining failures: - 1 test with int in array (needs exception throwing) - 5 tests with hash/dictionary inputs (need special key matching logic)
- Add support for string input with substring matching - Add support for hash/object input (treated as single-element arrays) - Fix default value behavior (when target value is nil) - Fix nil handling in arrays (return nil immediately when encountered) - Add proper substring matching for array elements - All 27 find/find_index golden tests now pass - All existing ArrayFiltersTests continue to pass
- Rewrite Has filter to match Golden Liquid specification - Support single-argument mode: direct value/key/substring checks - Support two-argument mode: property-value matching - Add proper argument count validation - Add special handling for nil values and type mismatches - All 22 'has' filter golden tests now pass - Updated ArrayFiltersTests to remove invalid 0-argument test case
- Modified Sort and SortNatural filters to handle edge cases properly - Added LiquidSortComparer for consistent sorting behavior - Non-array inputs now return as-is instead of empty - Nil/null values sort to the end (not beginning) - Missing object keys sort to the end - Numbers are compared numerically when sorting arrays directly - Property values from objects are always compared as strings - Added incompatible type checking to throw errors appropriately - All 21 golden sort tests now pass - All existing array filter unit tests continue to pass
- Return empty array for non-array inputs instead of passing through - Return empty array when first argument is nil/undefined - Properly distinguish between no second argument (truthy check) vs explicit nil/false (exact match) - Return empty array when no matches found instead of null array
- Fixed strip_html filter to properly remove script and style tag contents - Fixed default filter to handle keyword arguments before positional arguments - Added GetFirstPositional() method to FilterArguments - Fixed DictionaryValue.ToNumberValue() to return count instead of 0 - Removed synthetic .last property from DictionaryValue (kept .first per Shopify Liquid spec) Fixes 5 golden liquid tests: - filters_default_false_keyword_argument_before_positional - filters_default_not_empty_object - special_last_of_a_object - filters_strip_html_script_block - filters_strip_html_style_block
- Fixed newline_to_br: Normalize line endings before replacing to avoid double-processing - Fixed join filter: Skip empty strings when joining arrays to match Liquid behavior
- uniq: Support optional property argument for deduplication by property - uniq: Return input as-is when not an array - compact: Return input as-is when not an array - modulo: Preserve decimal format (0.0) when divisor has decimal point
- Split filter: Change StringSplitOptions.RemoveEmptyEntries to None to preserve empty strings - Sum filter: Add default case to handle non-hash items when property argument is provided
added 23 commits
January 2, 2026 11:02
# Conflicts: # Directory.Packages.props
Owner
Author
|
@jg-rp what's interesting for you is probably the list of tests that I had to skip, for good or bad reasons https://github.com/sebastienros/fluid/pull/909/changes#diff-555225c1c9a46c85711cd81838627218ddc83ecdaf7e127298300ccbe3b00297R27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.