Install Theme

Your web-browser is very outdated, and as such, this website may not display properly. Please consider upgrading to a modern, faster and more secure browser. Click here to do so.

Nunjucks Changelog

Changelog for
nunjucks, a javascript templating system based on jinja2
Dec 12 '12

v0.1.7 - helpful errors, many bug fixes

The biggest change in v0.1.7 comes from devoidfury (thanks!) which implements consistent and helpful error messages. The errors are still simply raw text, and not pretty HTML, but they at least contain all the necessary information to track down an error, such as template names, line and column numbers, and the inheritance stack. So if an error happens in a child template, it will print out all the templates that it inherits. In the future, we will most likely display the actual line causing an error.

Full list of changes:

  • Consistent and helpful error messages
  • Expressions are more consistent now. Previously, there were several places that wouldn’t accept an arbitrary expression that  should. For example, you can now do {% include templateNames['foo'] %}, whereas previously you could only give it a simply variable name.
  • app.locals is fixed with express 2.5
  • Method calls on objects now have correct scope for this. Version 0.1.6 broke this and this was referencing the global scope.
  • A check was added to enforce loading of templates within the correct path. Previously you could load a file outside of the template with something like ../../crazyPrivateFile.txt

You can view all the code changes here. Please file an issue if something breaks!