Skip to content

v0.35.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 17:00
· 21 commits to main since this release
Immutable release. Only release title and notes can be modified.
77c1d05

New: an ErrUndefined carries liquidjs's own error. Error.Path is the keys liquidjs's message names, up to and including the first undefined one, with bracket indexes as their values' JavaScript strings and forloop's property included. Error.Line and Error.Col are Pos as liquidjs counts it: lines split on \n, columns in UTF-16 code units, both from 1. So liquidjs's message is "undefined variable: " + strings.Join(Path, ".") + ", line:Line, col:Col". Path is nil where mist can't vouch for that message, including a template that doesn't pass Check, since liquidjs parses the whole template first and may report a later error instead.

Upgrading: no breaking API changes. ErrUndefined is returned exactly where it was, and Msg still names the whole path as written. Line and Col are set on every *Error. SPEC is v0.35.x.

Inside: TestCorpus requires liquidjs's exact message wherever Path is set, and all 898 undefined errors in the corpus match. Append stays allocation-free.

Changelog

Features