All Versions
44
Latest Version
Avg Release Cycle
86 days
Latest Release
244 days ago

Changelog History
Page 3

  • v2.4.0 Changes

    March 10, 2016
    • πŸ‘ Allow retrieving boolean-false as a global. Thanks Marius BΓΌscher. Merge of #694.

    • Don't automatically convert any for-loop that has an include statement into an async loop. Reverts 7d4716f4fd, re-opens #372, fixes #527. Thanks Tom Delmas for the report.

    • πŸ“œ Switch from Optimist to Yargs for argument-parsing. Thanks Bogdan Chadkin. Merge of #672.

    • πŸ”€ Prevent includes from writing to their including scope. Merge of #667 (only partially backported to 2.x; macro var visibility not backported).

    • πŸ›  Fix handling of dev environment option, to get full tracebacks on errors (including nunjucks internals). Thanks Tobias Petry and Chandrasekhar Ambula V for the report, Aleksandr Motsjonov for draft patch.

    • πŸ‘Œ Support using in operator to search in both arrays and objects, and it will throw an error for other data types. Fix #659. Thanks Alex Mayfield for report and test, Ouyang Yadong for fix. Merge of #661.

    • βž• Add support for {% set %} block assignments as in jinja2. Thanks Daniele Rapagnani. Merge of #656

    • πŸ›  Fix {% set %} scoping within macros. Fixes #577 and the macro portion of #561. Thanks Ouyang Yadong. Merge of #653.

    • βž• Add support for named endblock (e.g. {% endblock foo %}). Thanks ricordisamoa. Merge of #641.

    • πŸ›  Fix range global with zero as stop-value. Thanks Thomas Hunkapiller. Merge of #638.

    • πŸ›  Fix a bug in urlize that collapsed whitespace. Thanks Paulo Bu. Merge of #637.

    • βž• Add sum filter. Thanks Pablo MatΓ­as Lazo. Merge of #629.

    • Don't suppress errors inside {% if %} tags. Thanks Artemy Tregubenko for report and test, Ouyang Yadong for fix. Merge of #634.

    • πŸ‘ Allow whitespace control on comment blocks, too. Thanks Ouyang Yadong. Merge of #632.

    • πŸ›  Fix whitespace control around nested tags/variables/comments. Thanks Ouyang Yadong. Merge of #631.

  • v2.3.0 Changes

    January 06, 2016
    • Return null from WebLoader on missing template instead of throwing an error, for consistency with other loaders. This allows WebLoader to support the new ignore missing flag on the include tag. If ignore missing is not set, a generic "template not found" error will still be thrown, just like for any other loader. Ajax errors other than 404 will still cause WebLoader to throw an error directly.

    • βž• Add preserve-linebreaks option to striptags filter. Thanks Ivan Kleshnin. Merge of #619.

  • v2.2.0 Changes

    November 23, 2015
    • βž• Add striptags filter. Thanks Anthony Giniers. Merge of #589.
    • πŸ‘ Allow compiled templates to be imported, included and extended. Thanks Luis Gutierrez-Sheris. Merge of #581.
    • πŸ›  Fix issue with different nunjucks environments sharing same globals. Each environment is now independent. Thanks Paul Pechin. Merge of #574.
    • βž• Add negative steps support for range function. Thanks Nikita Mostovoy. Merge of #575.
    • βœ‚ Remove deprecation warning when using the default filter without specifying a third argument. Merge of #567.
    • βž• Add support for chaining of addGlobal, addFilter, etc. Thanks Rob Graeber. Merge of #537
    • πŸ›  Fix error propagation. Thanks Tom Delmas. Merge of #534.
    • πŸ’… trimBlocks now also trims windows style line endings. Thanks Magnus Tovslid. Merge of #548
    • πŸ‘ include now supports an option to suppress errors if the template does not exist. Thanks Mathias Nestler. Merge of #559
  • v2.1.0 Changes

    September 21, 2015
    • πŸ›  Fix creating WebLoader without opts. Merge of #524.
    • βž• Add hasExtension and removeExtension methods to Environment. Merge of #512.
    • βž• Add support for kwargs in sort filter. Merge of #510.
    • βž• Add none as a lexed constant evaluating to null. Merge of #480.
    • πŸ›  Fix rendering of multiple raw blocks. Thanks Aaron O'Mullan. Merge of #503.
    • πŸ”€ Avoid crashing on async loader error. Thanks Samy PessΓ©. Merge of #504.
    • βž• Add support for keyword arguments for sort filter. Thanks Andres Pardini. Merge of #510
  • v2.0.0 Changes

    August 30, 2015

    Most of the changes can be summed up in the issues tagged 2.0.

    Or you can πŸ‘€ see all commits.

    Most important changes:

    • 0️⃣ autoescape is now on by default. You need to explicitly pass { autoescape: false } in the options to turn it off.
    • 0️⃣ watch is off by default. You need to explicitly pass { watch: true } to start the watcher.
    • 0️⃣ The default filter has changed. It will show the default value only if the argument is undefined. Any other value, even false-y values like false and null, will be returned. You can get back the old behavior by passing true as a 3rd argument to activate the loose-y behavior: foo | default("bar", true). In 2.0 if you don't pass the 3rd argument, a warning will be displayed about this change in behavior. In 2.1 this warning will be removed.
    • New filter tag
    • πŸ›  Lots of other bug fixes and small features, view the above issue list!
  • v1.3.4 Changes

    April 27, 2015

    πŸš€ This is an extremely minor release that only adds an .npmignore so that the βœ… bench, tests, and docs folders do not get published to npm. Nunjucks should download a lot faster now.

  • v1.3.3 Changes

    April 03, 2015

    This is exactly the same as v1.3.1, just fixing a typo in the git version tag.

  • v1.3.2 Changes

    April 03, 2015

    (no notes)

  • v1.3.1 Changes

    April 03, 2015

    We added strict mode to all the files, but that broke running nunjucks in the πŸ’» browser. Should work now with this small fix.

  • v1.3.0 Changes

    April 03, 2015
    • Relative templates: you can now load a template relatively by starting the path with ., like ./foo.html
    • FileSystemLoader now takes a noCache option, if true will disable caching entirely
    • βž• Additional lstripBlocks and trimBlocks available to clean output automatically
    • πŸ†• New selectattr and rejectattr filters
    • πŸ›  Small fixes to the watcher
    • πŸ›  Several bug fixes