Skip to content

Releases: CloudyKit/jet

v5.0.0

29 Jul 08:36
Compare
Choose a tag to compare

With version 5, Jet gets Go-like discard syntax (_ := stillRuns(), #168) and allows you to specify the argument slot of the piped value when pipelining (2 | repeat("foo", _), #169).

This means that _ is now a reserved symbol, as noted in v5's breaking changes: https://github.com/CloudyKit/jet/blob/master/docs/changes.md#v5.

v4.1.0

20 Jul 09:22
Compare
Choose a tag to compare

Allows concatenating string and []byte.

This is useful for using the return value of the built-in json() function, for example:

{{ "{foo:"+json("asd")+"}" }}

This would previously render as {foo:[34 97 115 100 34]} but will now render as {foo:"asd"}).

v4.0.2

14 Jul 14:13
Compare
Choose a tag to compare

Fixes absolute path detection on Windows.

v4.0.1

14 Jul 14:12
Compare
Choose a tag to compare

Allows using parentheses syntax for function calls in pipelines, for example "foo" | repeat(2) | upper is now valid, when only "foo" | repeat: 2 | upper would work previously.

v4.0.0

03 Jul 14:13
Compare
Choose a tag to compare

Version 4 brings a lot of bug fixes and improvements as well as updated documentation, but make sure to read through the breaking changes before making the jump.

Feel free to update and report any bugs (or undocumented breaking changes). I'm quite sure this release won't be perfect since there went a lot of work into it and the tests still leave a lot to be desired (and also because it's my first release).

Minor behind the scenes improvements

04 Nov 07:06
Compare
Choose a tag to compare

This release contains:

  • testing via TravisCI in the latest 2 Go versions (#69, #70)
  • aid in debugging when a template is included via the includeIfExists where the template is found but fails to render properly; the error is now bubbled up (#67) – thanks to @diogogmt

v2.1.1

10 May 22:31
Compare
Choose a tag to compare
Fix errors in the visitor, add an test/example in how to extract exte…

v2.1.0

01 May 22:36
Compare
Choose a tag to compare
Fixes #58

v2.0.1

29 Aug 12:21
Compare
Choose a tag to compare
  • fixed negative numbers in the template throwing an error – this happened, for example, when using {{ replace("My Name Is", " ", "_", -1) }} which would error (the last parameter of Go's replace function denotes the maximum number of replacements to perform, -1 being unlimited) – fixed in fd3b9c0
  • added {{ includeIfExists(templateName) }} function that doesn't throw an error if the template to include doesn't exist (useful for dynamic template files to include); it also has a second form where you can use the boolean return value to print something else if the template couldn't be found – documented here, added in 9a0ef3b

Release v2.0

14 Aug 11:47
Compare
Choose a tag to compare
  • much more powerful {{block}} and {{yield}} constructs, allowing local variables, default variables as well as wrapping (read more)
  • fast functions that are up to 50% faster than normal functions; the built-in len and isset functions are implemented as fast functions (read more in the new Advanced section)
  • simple string concatenation in templates obviate the need for sprintf-like functions: {{ "build."+someString+".your-string" }} (see here)
  • isset can now be used to check for the existence of a key in a map (works both with the var map as well as the context, see here and here)
  • templates can now also be imported/included relatively and without the extension; provided the templates' filenames end with .jet, .html.jet or .jet.html (read more)