Releases: Shopify/liquid
Releases · Shopify/liquid
v5.6.0
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
v5.6.0.rc1
What's Changed
- 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
New Contributors
- @alexcoco made their first contribution in #1818
- @graygilmore made their first contribution in #1831
Full Changelog: v5.5.1...v5.6.0.rc1
v5.5.1
Full Changelog: v5.5.1...v5.5.1
What's Changed
- Centralize Ruby Version to
.ruby-version
by @jenshenny in #1792 - Add named? method to Cycle class for checking if the cycle is named by @Maaarcocr in #1811
- Bump to v5.5.1 by @ianks in #1817
New Contributors
- @jenshenny made their first contribution in #1792
Full Changelog: v5.5.0...v5.5.1
v5.5.0
What's Changed
- Migrate off probot-CLA to new GitHub Action by @cursedcoder in #1597
- Increase performance in Liquid::Lexer#tokenize by @Watson1978 in #1606
- Raise Liquid::SyntaxError instead of NoMethodError for invalid range by @dylanahsmith in #1607
- Add a variable_name method Increment and Decrement tags objects by @dylanahsmith in #1609
- Stop using Liquid::Expression.parse for integration testing by @dylanahsmith in #1610
- Reserve keyword arguments for new options in assert_template_result by @dylanahsmith in #1612
- Use assert_template_result & assert_match_syntax_error in more places by @dylanahsmith in #1611
- Add partials, error_mode and render_errors options to assert_template_result by @dylanahsmith in #1614
- Expose alias_name and for_loop? in render tag by @Maaarcocr in #1615
- Use assert_template_result partials option to specify file system state by @dylanahsmith in #1620
- Stop freezing the static environment hashes to allow Proc memoization by @dylanahsmith in #1623
- Stop using assert_template_result in some tests depending on language extension by @dylanahsmith in #1622
- Add a test and improve one for testing break by @dylanahsmith in #1616
- Update escape filter reference summary by @liamgriffin in #1628
- Clarifying description for {% comment %} by @Jan0707 in #1636
- fix tablerow drop's last attribute with missing cols param by @ggmichaelgo in #1633
- Support big integers in truncatewords and slice filters by @dylanahsmith in #1617
- tablerow: Avoid accidental special case for constant nil cols by @dylanahsmith in #1644
- Remove Usage.increment calls that have been shown to in fact be used by @dylanahsmith in #1645
- Update link paths in docs markup by @erinmorrissey in #1635
- Fix missing inheritance of disabled tags by @dylanahsmith in #1646
- Prevent an internal error in include tag from non-string template_name by @dylanahsmith in #1648
- Fix tags in comment by @peterzhu2118 in #1345
- Use static environment assert_template_result input values by @dylanahsmith in #1641
- refactor: Advance tokenizer array offset instead of using Array#shift by @dylanahsmith in #1653
- clarify inline_comment by @shainaraskas in #1656
- Allow commas to separate
for
tag attributes by @dylanahsmith in #1658 - [Liquid reference docs] Adding more content to divided_by filter by @liamgriffin in #1665
- Use cache built into
ruby/setup-ruby
action by @ashmaroli in #1671 - Provide another assertion for to_liquid_value unless tag test by @dylanahsmith in #1672
- Instrument usage of bug with iteration of String with offset or 0 limit by @dylanahsmith in #1667
- Initialize context to nil on the Drop class by @jemmaissroff in #1673
- Improve test coverage of the to_liquid_value feature. by @dylanahsmith in #1674
- raise invalid integer argument error from tablerow by @ggmichaelgo in #1676
- recursively parse brackets on variable lookup by @ggmichaelgo in #1680
- Allow raw tag to be used with whitespace control by @Maaarcocr in #1683
- Avoid a couple of duplicate assertions by @dylanahsmith in #1675
- fix variable lookup parse timing out with missing closing bracket by @ggmichaelgo in #1684
- Fix CI (as it installs RuboCop 1.45.1 and fails) by @karreiro in #1686
- Update link paths in docs markup by @erinmorrissey in #1685
- Update
rubocop-shopify
(2.7.0 -> 2.12.0) by @karreiro in #1687 - Revert "Instrument usage of bug with iteration of String with offset or 0 limit" by @dylanahsmith in #1677
- set context's template_name with template's name by @ggmichaelgo in #1692
- render template name with Liquid Syntax errors by @ggmichaelgo in #1695
- Update Liquid Documentation from Shopify URL by @JLoppert in #1712
- Fix broken documentantion link in README by @robertasg in #1688
- [trim] Fix trimming at end of raw block when specified in the opening tag by @gmalette in #1717
- Add
sum
filter to standard filters by @adamklingbaum in #1722 - Ensure
sum
filter callsto_liquid
on evaluated property value by @adamklingbaum in #1726 - include parse mode to partial cache key by @ggmichaelgo in #1727
- [Liquid reference]: Update description of
capitalize
by @mcvinci in #1730 - Allow liquid tag inside liquid tag by @Maaarcocr in #1731
- Call to_liquid_value when short circuiting conditions by @Maaarcocr in #1735
- Fix
BigDecimal
output insum
filter by @adamklingbaum in #1739 - [base64] Respect string encoding of input in base64_decode filters by @gmalette in #1746
- Update CI status badge by @atesgoral in #1748
- Don't parse nodes inside a comment tag by @ggmichaelgo in #1755
- fix parsing comment tag delimiter by @ggmichaelgo in #1763
- implement whitespace control to comment tag by @ggmichaelgo in #1764
- Fix for custom tag rendering by @IevaGraz in #1750
- fix parsing comment tag with extra string by @ggmichaelgo in #1769
- don't allow invalid syntax inside comment tag by @ggmichaelgo in #1770
- don't reset Liquid tag's whitespace control from comment tag by @ggmichaelgo in #1773
- check template UTF8 validity before parsing by @ggmichaelgo in #1774
- allow non-string template source by @ggmichaelgo in #1775
- add new TemplateEncodingError by @ggmichaelgo in #1776
- Fallback to binary comparison when
contains
RHS is UTF8 encoded by @ianks in #1783 - update variable's context before invoking its to_liquid by @ggmichaelgo in #1781
- change: make nil_safe_casecmp judge compatible for nil-nil comparison by @mtasaka in #1760
- Bump to v5.5.0 by @ianks in #1791
New Contributors
- @cursedcoder made their first contribution in #1597
- @Maaarcocr made their first contribution in #1615
- @Jan0707 made their first contribution in #1636
- @erinmorrissey made their first contribution in #1635
- @jemmaissroff made their first contribution in #1673
- @karreiro made their first contribution in #1686
- @JLoppert made their first contribution in #1712
- @robertasg made their first contribution in #1688
- @adamklingbaum made their first contribution in #1722
- @mcvinci made their first contribution in #1730
- @atesgoral made their first contribution in #1748
- @IevaGraz made their first contribution in #1750
- @ianks made their first contribution in #1783
- @mtasaka made their first contribution in #1760
Full Changelog: v5.4.0...v5.5.0