npm / liquidjs
liquidjs
What changed in liquidjs 9 to 10, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
22 breaking15 security13 new APIs and options2 performance1 behavior and defaults27 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initliquidjs 1066 changes
Breaking changes 16
The filter throws on invalid input in every build.
The cycle tag now applies outputEscape to its output.
The echo tag now applies outputEscape to its output.
Modulo now follows the divisor sign when operands are negative.
Blocks Object.prototype filter and tag lookups to address RCE.
A null date now returns an empty value.
File lookups enforce root containment, preventing parseFile from resolving paths outside the configured root.
File lookups enforce root containment, preventing renderFile from resolving paths outside the configured root.
Negative values at halfway points now round away from zero.
evalToken now returns a generator, changing how callers handle its result.
evalValue no longer accepts Context as its second argument.
Filter keys are now in snake case instead of camel case, matching their names in Liquid templates.
The main entry now requires Node.js 14 or later; LiquidJS can be built by users who need to use the ESM entry.
Use operators instead of operatorsTrie as the Tokenizer constructor argument.
The default value of ownPropertyOnly is now true.
The toThenable export was removed; use toPromise instead.
Security 15
The join filter is charged according to its produced output size.
LiquidJS: ownPropertyOnly bypass for inherited array indices in first/last/join/reverse/slice/compact,
.first/.last, negative index, and for-loop iterationLiquidJS has an infinite loop vulnerability in its
strip_htmlfilterLiquidJS:
popfilter bypassesmemoryLimitaccounting that its array-filter siblings enforceLiquidJS has a renderLimit DoS guard bypass via empty
{% for %}bodyLiquidJS's strip_html filter bypass via newline characters in HTML tags enables XSS
LiquidJS Vulnerable to ReDoS via Quadratic Backtracking in
strip_htmlFilter RegexPropagates ownPropertyOnly into Context.spawn() for {% render %}.
Caps strftime widths and accounts for padding in memoryLimit, limiting memory use when formatting dates.
liquidjs has a Denial of Service via circular block reference in layout
LiquidJS: ownPropertyOnly bypass via sort_natural filter — prototype property information disclosure through sorting side-channel
Filesystem containment checks use realpath.
Memory limits are applied more precisely during string replacement.
Treats arguments for replace_first as literal.
Fixes a path traversal vulnerability.
New APIs and options 9
Adds the squish filter.
Adds the unregisterFilter method for removing a filter.
Provides null-prototype scope frames via createScope.
Adds an hmac_sha256 filter for cryptographic operations.
Adds a sha256 filter for cryptographic operations.
Error types are now exported, allowing developers to access them through the package API.
Adds the base64_decode filter for Shopify compatibility.
Adds the base64_encode filter for Shopify compatibility.
Specific tokens are now exported as types, making them available to TypeScript consumers.
Behavior and default changes 1
Expressions enclosed by parentheses are now supported.
Fixes and other changes 25
The filter coerces non-array input with toArray.
The filter uses English day and month names.
The filter no longer alters large or high-precision numbers.
The filter no longer splits surrogate pairs.
The %Y date format is padded to 4 digits like Ruby.
Encodes large input in browser builds.
Computes %C and %y from the numeric year.
Computes %U and %W week numbers like strftime.
Awaits promises returned by Drop.valueOf().
Trims custom characters by Unicode code point.
Ignores leading whitespace when counting words.
Keeps %2B as a literal plus when decoding.
The %s date format returns the Unix epoch regardless of display timezone.
Formatting %N fractional seconds now zero-pads milliseconds.
The inspect filter is charged according to its produced output size.
The json filter is charged according to its produced output size.
The ownPropertyOnly setting is enforced for inherited array indices.
The slice filter returns empty for an out-of-range begin or a negative length.
Improves the round function.
Enforces renderLimit for empty renderTemplates calls.
Strips HTML newline tags.
Supports Buffer input to prevent binary data corruption.
Fixes a bug involving nested blocks for layouts.
Handles an undefined replacement argument in the replace filter.
Fixes the memory limiter for invalid ranges.
liquidjs 914 changes
Breaking changes 6
The break tag no longer omits output before it.
The continue tag no longer omits output before it.
LiquidJS no longer has a default export; import Liquid as a named export instead.
Removes the duplicate static method; use the instance method liquid.evalValue instead.
The CJS bundle no longer supports Node.js 6 or earlier; ESM and UMD bundles are unaffected.
The UMD bundle global changes to window.liquidjs.Liquid.
New APIs and options 4
Adds Expression as a new utility.
Adds synchronous parsing and rendering with parseAndRenderSync.
Adds synchronous file rendering with renderFileSync.
Adds synchronous rendering with renderSync.
Performance 2
Memory footprint is reduced by 57.5%.
Render performance is improved by 100.3%.
Fixes and other changes 2
Boolean expression evaluation order is rewritten.
Fixes cases where Promise typed Drops are not awaited.