Highlights
Architectural Changes
- Added new
Environment
class to manage configuration and state that was previously stored inTemplate
- Moved tag registration from
Template
toEnvironment
- Removed
StrainerFactory
in favor ofEnvironment
-based strainer creation - Consolidated standard tags into a new
Tags
module withSTANDARD_TAGS
constant
Performance Improvements
- Optimized
Lexer
with a newLexer2
implementation using jump tables for faster tokenization, requires Ruby 3.4 - Improved variable rendering with specialized handling for different types
- Reduced array allocations by using frozen empty constants
API Changes
- Deprecated several
Template
class methods in favor ofEnvironment
methods - Added deprecation warnings system
- Changed how filters and tags are registered to use Environment
Bug Fixes:
- Fixed table row handling of break interrupts
- Improved variable output handling for arrays
PRs
- Add concept of
Liquid::Environment
by @ianks in #1815 - Handle interrupts in table row by @alexcoco in #1818
- Bump to v5.6.0.alpha by @ianks in #1819
- Speed up the lexer for Ruby 3.4+ by @ianks in #1832
- Update liquid docs for named parameters by @graygilmore in #1831
- Faster Variable BlockBody Matching by @ggmichaelgo in #1833
- fix lexer parsing comparison without whitespaces by @ggmichaelgo in #1837
- fix parsing Variable blockbody with multibyte character by @ggmichaelgo in #1835
- raise syntax error from lexer parser with UTF-8 character by @ggmichaelgo in #1839
- fix lexer parsing ID 'contains' as comparison by @ggmichaelgo in #1840
- fix parsing quirky incomplete expressions by @ggmichaelgo in #1838
- remove TagRegistry by @ggmichaelgo in #1845
- propagate Environment on new Context creation by @ggmichaelgo in #1846
- avoid allocating new empty array by @ggmichaelgo in #1843
- Remove
Liquid.cache_classes
option by @ianks in #1847 - clean up all warnings by using new Environment by @ggmichaelgo in #1848
- Update homepage url by @tjoyal in #1634
- Write one value at a time for array variables by @ianks in #1863
- Stop testing against
liquid-c
by @ianks in #1868 - Fix bug in tokenizer with nil source value by @bahar-p in #1873
- Bump version patch by @bahar-p in #1874
- Bump to
v5.6.0
by @ianks in #1876
New Contributors
- @alexcoco made their first contribution in #1818
- @graygilmore made their first contribution in #1831
- @bahar-p made their first contribution in #1873
Full Changelog: v5.5.1...v5.6.0