Repository navigation
Releases: jg-rp/liquidscript
Releases · jg-rp/liquidscript
Release list
Version 2.0.1
Version 2.0.0
LiquidScript has had a complete rewrite for version 2. The result is improved performance, better compatibility with Shopify/liquid, and several breaking API changes.
Other than a few corner cases where we now follow Shopify/liquid more closely, there are no significant changes to template rendering behavior.
Breaking API changes
Template.fromString()andEnvironment.fromString()have been replaced withEnvironment.parse(),Environment.render()and top-level convenience functionsparse()andrender(). See https://jg-rp.github.io/liquidscript/#quick-start.- Resource limits and their environment options have been renamed to better match Shopify/liquid. See https://jg-rp.github.io/liquidscript/environment#resource-limits.
- The "drop" API has changed to give runtime objects better access to the render context and support lazy slicing. See https://jg-rp.github.io/liquidscript/data-types-and-drops#user-defined-types.
- Our token stream interface, template AST and tag interface have changed. See https://jg-rp.github.io/liquidscript/guides/custom-tags. Please open an issue if you need assistance migrating tag implementations.
- The template loader interface has changed. See https://jg-rp.github.io/liquidscript/loaders.
- Removed the non-standard
{% macro %}and{% call %}tags. Please open an issue if you need the{% macro %}tag.
Features
- Instance of
Templatenow have convenience methods for statically inspecting a template's variable, tag a filter usage. See https://jg-rp.github.io/liquidscript/static-analysis. - Added the built-in
squishfilter. - Added diagnostic errors with detailed messages. See https://jg-rp.github.io/liquidscript/api/classes/DetailedLiquidError.
Version 1.8.2
Fixes
- Fixed comparison of strings in logical expressions. Previously we only supported comparing strings for equality with
==and!=, now we support<,>,<=and>=too. - Fixed handling of superfluous expressions in
{% else %}tags. We now silently ignore anything betweenelseand%}, matching the behavior of Shopify/Liquid. - Fixed handling of extra
{% else %}and{% elsif %}blocks after the first{% else %}block. We now silently ignore extraneous blocks, matching the behavior of Shopify/Liquid.
Version 1.8.1
Fixes
- Fixed the
splitfilter. Previously, when thesplitfilter's argument string was equal to its input string, we returned an array with empty strings. Now we return an empty array.
Version 1.8.0
Fixes
- Fixed comparison of simple arrays with
{% if %},{% unless %}and{% case %}tags. Previously, two simple arrays with the same elements would not be considered equal. - Fixed the standard
mapfilters handling of nested input arrays. We now automatically flatten nested input arrays and coerce non-iterable inputs to a single element array, just like Ruby Liquid. - Fixed the
{% liquid %}tag's handling of some corner cases involving nestedliquidtags.
Features
- Added the standard
sumfilter, which returns the sum of any numeric values in its input array (docs, source). - Added optional
{% extends %}and{% block %}tags that add template inheritance features to Liquid templates (docs, source). - Added
filterandtagproperties to the result ofTemplate.analyze(), containing the locations of filters and tags found during static analysis (docs).