Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CHANGELOG.md 29KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. Changelog
  2. =========
  3. 3.2.3 (Feb 15 2021)
  4. -------------------
  5. * Add support for nested attributes on
  6. [`sort` filter](https://mozilla.github.io/nunjucks/templating.html#sort-arr-reverse-casesens-attr);
  7. respect `throwOnUndefined` if sort attribute is undefined.
  8. * Add `base` arg to
  9. [`int` filter](https://mozilla.github.io/nunjucks/templating.html#int).
  10. * Move `chokidar` to `peerDependencies` and mark it `optional` in `peerDependenciesMeta`.
  11. * Fix prototype pollution issue for template variables. Merge of
  12. [#1330](https://github.com/mozilla/nunjucks/pull/1330); fixes
  13. [#1331](https://github.com/mozilla/nunjucks/issues/1331). Thanks
  14. [ChenKS12138](https://github.com/ChenKS12138)!
  15. 3.2.2 (Jul 20 2020)
  16. -------------------
  17. * Add [`select`](https://mozilla.github.io/nunjucks/templating.html#select) and
  18. [`reject`](https://mozilla.github.io/nunjucks/templating.html#reject) filters.
  19. Merge of [#1278](https://github.com/mozilla/nunjucks/pull/1278) and
  20. [#1279](https://github.com/mozilla/nunjucks/pull/1279); fixes
  21. [#282](https://github.com/mozilla/nunjucks/issues/282). Thanks
  22. [ogonkov](https://github.com/ogonkovv)!
  23. * Fix precompile binary script `TypeError: name.replace is not a function`.
  24. Fixes [#1295](https://github.com/mozilla/nunjucks/issues/1295).
  25. * Add support for nested attributes on
  26. [`groupby` filter](https://mozilla.github.io/nunjucks/templating.html#groupby);
  27. respect `throwOnUndefined` option, if the groupby attribute is undefined.
  28. Merge of [#1276](https://github.com/mozilla/nunjucks/pull/1276); fixes
  29. [#1198](https://github.com/mozilla/nunjucks/issues/1198). Thanks
  30. [ogonkov](https://github.com/ogonkovv)!
  31. * Fix bug that prevented errors in included templates from being raised when
  32. rendering templates synchronously. Fixes
  33. [#1272](https://github.com/mozilla/nunjucks/issues/1272).
  34. * The `indent` filter no longer appends an additional newline. Fixes
  35. [#1231](https://github.com/mozilla/nunjucks/issues/1231).
  36. 3.2.1 (Mar 17 2020)
  37. -------------------
  38. * Replace yargs with commander to reduce number of dependencies. Merge of
  39. [#1253](https://github.com/mozilla/nunjucks/pull/1253). Thanks
  40. [AlynxZhou](@AlynxZhou).
  41. * Update optional dependency chokidar from `^2.0.0` to `^3.3.0`. Merge of
  42. [#1254](https://github.com/mozilla/nunjucks/pull/1254). Thanks
  43. [eklingen](@eklingen).
  44. * Prevent optional dependency Chokidar from loading when not watching. Merge
  45. of [#1250](https://github.com/mozilla/nunjucks/pull/1250). Thanks
  46. [eklingen](@eklingen).
  47. 3.2.0 (Mar 5 2019)
  48. ------------------
  49. * Adds [`NodeResolveLoader`](http://mozilla.github.io/nunjucks/api.html#noderesolveloader),
  50. a Loader that loads templates using node's
  51. [`require.resolve`](https://nodejs.org/api/modules.html#modules_all_together).
  52. Fixes [#1175](https://github.com/mozilla/nunjucks/issues/1175).
  53. * Emit 'load' events on `Environment` instances, to allow runtime dependency
  54. tracking. Fixes [#1153](https://github.com/mozilla/nunjucks/issues/1153).
  55. 3.1.7 (Jan 12 2019)
  56. ------------------
  57. * Fix bug where exceptions were silently swallowed with synchronous render.
  58. Fixes [#678](https://github.com/mozilla/nunjucks/issues/678),
  59. [#1116](https://github.com/mozilla/nunjucks/issues/1116),
  60. [#1127](https://github.com/mozilla/nunjucks/issues/1127), and
  61. [#1164](https://github.com/mozilla/nunjucks/issues/1164)
  62. * Removes deprecated postinstall-build package in favor of
  63. [npm prepare](https://docs.npmjs.com/misc/scripts#prepublish-and-prepare).
  64. Merge of [#1172](https://github.com/mozilla/nunjucks/pull/1172).
  65. Fixes [#1167](https://github.com/mozilla/nunjucks/issues/1167).
  66. - Note: this means that npm@5 or later is required to install nunjucks
  67. directly from github.
  68. 3.1.6 (Dec 13 2018)
  69. -------------------
  70. No code changes; fixed npm packaging issue.
  71. 3.1.5 (Dec 13 2018)
  72. -------------------
  73. * Fix engine dependency version for Node versions > 11.1.0;
  74. Fixes [#1168](https://github.com/mozilla/nunjucks/issues/1168).
  75. 3.1.4 (Nov 9 2018)
  76. ------------------
  77. * Fix engine version for Node v11.1.0
  78. * Fix "Unexpected token" error for U+2028 unicode newline. Fixes [#126](https://github.com/mozilla/nunjucks/issues/126) and [#736](https://github.com/mozilla/nunjucks/issues/736)
  79. 3.1.3 (May 19 2018)
  80. -------------------
  81. * Add `forceescape` filter. Fixes [#782](https://github.com/mozilla/nunjucks/issues/782)
  82. * Fix regression that prevented template errors from reporting line and column number.
  83. Fixes [#1087](https://github.com/mozilla/nunjucks/issues/1087) and
  84. [#1095](https://github.com/mozilla/nunjucks/issues/1095).
  85. * Fix "Invalid type: Is" error for `{% if value is defined %}`. Fixes
  86. [#1110](https://github.com/mozilla/nunjucks/issues/1110)
  87. * Formally drop support for node v4 (the upgrade to babel 7 in 3.1.0 made the
  88. build process incompatible with node < 6.9.0).
  89. 3.1.2 (Feb 23 2018)
  90. -------------------
  91. * Fix regression to make `chokidar` an optional dependency again. Fixes
  92. [#1073](https://github.com/mozilla/nunjucks/issues/1073)
  93. * Fix issue when running `npm install nunjucks` with the `--no-bin-links` flag
  94. * Fix regression that broke template caching. Fixes
  95. [#1074](https://github.com/mozilla/nunjucks/issues/1074)
  96. 3.1.0 (Feb 19 2018)
  97. -------------------
  98. * Support nunjucks.installJinjaCompat() with slim build. Fixes
  99. [#1019](https://github.com/mozilla/nunjucks/issues/1019)
  100. * Fix calling render callback twice when a conditional import throws an error.
  101. Solves [#1029](https://github.com/mozilla/nunjucks/issues/1029)
  102. * Support objects created with Object.create(null). fixes [#468](https://github.com/mozilla/nunjucks/issues/468)
  103. * Support ESNext iterators, using Array.from. Merge of
  104. [#1058](https://github.com/mozilla/nunjucks/pull/1058)
  105. 3.0.1 (May 24 2017)
  106. -------------------
  107. * Fix handling methods and attributes of static arrays, objects and primitives.
  108. Solves the issue [#937](https://github.com/mozilla/nunjucks/issues/937)
  109. * Add support for python-style array slices with Jinja compat enabled.
  110. Fixes [#188](https://github.com/mozilla/nunjucks/issues/188); merge of
  111. [#976](https://github.com/mozilla/nunjucks/pull/976).
  112. * Fix call blocks having access to their parent scope. Fixes
  113. [#906](https://github.com/mozilla/nunjucks/issues/906); merge of
  114. [#994](https://github.com/mozilla/nunjucks/pull/994).
  115. * Fix a bug that caused capturing block tags (e.g. set/endset,
  116. filter/endfilter) to write to the global buffer rather than capturing
  117. their contents. Fixes
  118. [#914](https://github.com/mozilla/nunjucks/issues/914) and
  119. [#972](https://github.com/mozilla/nunjucks/issues/972); merge of
  120. [#990](https://github.com/mozilla/nunjucks/pull/990). Thanks [Noah
  121. Lange](@noahlange).
  122. 3.0.0 (Nov 5 2016)
  123. ----------------
  124. * Allow including many templates without reaching recursion limits. Merge of
  125. [#787](https://github.com/mozilla/nunjucks/pull/787). Thanks Gleb Khudyakov.
  126. * Allow explicitly setting `null` (aka `none`) as the value of a variable;
  127. don't ignore that value and look on up the frame stack or context. Fixes
  128. [#478](https://github.com/mozilla/nunjucks/issues/478). Thanks Jonny Gerig
  129. Meyer for the report.
  130. * Execute blocks in a child frame that can't write to its parent. This means
  131. that vars set inside blocks will not leak outside of the block, base
  132. templates can no longer see vars set in templates that inherit them, and
  133. `super()` can no longer set vars in its calling scope. Fixes the inheritance
  134. portion of [#561](https://github.com/mozilla/nunjucks/issues/561), which
  135. fully closes that issue. Thanks legutierr for the report.
  136. * Prevent macros from seeing or affecting their calling scope. Merge of
  137. [#667](https://github.com/mozilla/nunjucks/pull/667).
  138. * Fix handling of macro arg with default value which shares a name with another
  139. macro. Merge of [#791](https://github.com/mozilla/nunjucks/pull/791).
  140. * Add support for the spaces parameter in the dump template filter.
  141. Merge of [#868](https://github.com/mozilla/nunjucks/pull/868).
  142. Thanks Jesse Eikema
  143. * Add `verbatim` as an alias of `raw` for compatibility with Twig.
  144. Merge of [#874](https://github.com/mozilla/nunjucks/pull/874).
  145. * Add new `nl2br` filter. Thanks Marc-Aurèle Darche
  146. * Add support for python's `list.append` with Jinja compat enabled. Thanks
  147. Conor Flannigan.
  148. * Add variables whitespace control.
  149. 2.5.2 (Sep 14 2016)
  150. ----------------
  151. * Call `.toString` in safe filter.
  152. Merge of [#849](https://github.com/mozilla/nunjucks/pull/849).
  153. 2.5.1 (Sep 13 2016)
  154. ----------------
  155. * Fix `undefined` and `null` behavior in escape and safe filter.
  156. Merge of [#843](https://github.com/mozilla/nunjucks/pull/843).
  157. 2.5.0 (Sep 7 2016)
  158. ----------------
  159. * Add `elseif` as an alias of `elif` for parity with Twig. Thanks kswedberg.
  160. Merge of [#826](https://github.com/mozilla/nunjucks/pull/826).
  161. * Add nunjucks env to express app settings as `nunjucksEnv`.
  162. Merge of [#829](https://github.com/mozilla/nunjucks/pull/829).
  163. * Add support for finding an object's "length" in length filter.
  164. Merge of [#813](https://github.com/mozilla/nunjucks/pull/813).
  165. * Ensure that precompiling on Windows still outputs POSIX-style path
  166. separators. Merge of [#761](https://github.com/mozilla/nunjucks/pull/761).
  167. * Add support for strict type check comparisons (=== and !==). Thanks
  168. oughter. Merge of [#746](https://github.com/mozilla/nunjucks/pull/746).
  169. * Allow full expressions (incl. filters) in import and from tags. Thanks legutierr.
  170. Merge of [#710](https://github.com/mozilla/nunjucks/pull/710).
  171. * OS agnostic file paths in precompile. Merge of [#825](https://github.com/mozilla/nunjucks/pull/825).
  172. 2.4.3 (Sep 7 2016)
  173. ----------------
  174. * Fix potential cast-related XSS vulnerability in autoescape mode, and with `escape` filter.
  175. Thanks Matt Austin for the report and Thomas Hunkapiller for the fix.
  176. [#836](https://github.com/mozilla/nunjucks/pull/836)
  177. 2.4.2 (Apr 15 2016)
  178. -------------------
  179. * Fix use of `in` operator with strings. Fixes
  180. [#714](https://github.com/mozilla/nunjucks/issues/714). Thanks Zubrik for the
  181. report.
  182. * Support ES2015 Map and Set in `length` filter. Merge of
  183. [#705](https://github.com/mozilla/nunjucks/pull/705). Thanks ricordisamoa.
  184. * Remove truncation of long function names in error messages. Thanks Daniel
  185. Bendavid. Merge of [#702](https://github.com/mozilla/nunjucks/pull/702).
  186. 2.4.1 (Mar 17 2016)
  187. -------------------
  188. * Don't double-escape. Thanks legutierr. Merge of
  189. [#701](https://github.com/mozilla/nunjucks/pull/701).
  190. * Prevent filter.escape from escaping SafeString. Thanks atian25. Merge of
  191. [#623](https://github.com/mozilla/nunjucks/pull/623).
  192. * Throw an error if a block is defined multiple times. Refs
  193. [#696](https://github.com/mozilla/nunjucks/issues/696).
  194. * Officially recommend the `.njk` extension. Thanks David Kebler. Merge of
  195. [#691](https://github.com/mozilla/nunjucks/pull/691).
  196. * Allow block-set to wrap an inheritance block. Unreported; fixed as a side
  197. effect of the fix for [#576](https://github.com/mozilla/nunjucks/issues/576).
  198. * Fix `filter` tag with non-trivial contents. Thanks Stefan Cruz and Fabien
  199. Franzen for report and investigation, Jan Oopkaup for failing tests. Fixes
  200. [#576](https://github.com/mozilla/nunjucks/issues/576).
  201. 2.4.0 (Mar 10 2016)
  202. -------------------
  203. * Allow retrieving boolean-false as a global. Thanks Marius Büscher. Merge of
  204. [#694](https://github.com/mozilla/nunjucks/pull/694).
  205. * Don't automatically convert any for-loop that has an include statement into
  206. an async loop. Reverts
  207. [7d4716f4fd](https://github.com/mozilla/nunjucks/commit/7d4716f4fd), re-opens
  208. [#372](https://github.com/mozilla/nunjucks/issues/372), fixes
  209. [#527](https://github.com/mozilla/nunjucks/issues/527). Thanks Tom Delmas for
  210. the report.
  211. * Switch from Optimist to Yargs for argument-parsing. Thanks Bogdan
  212. Chadkin. Merge of [#672](https://github.com/mozilla/nunjucks/pull/672).
  213. * Prevent includes from writing to their including scope. Merge of
  214. [#667](https://github.com/mozilla/nunjucks/pull/667) (only partially
  215. backported to 2.x; macro var visibility not backported).
  216. * Fix handling of `dev` environment option, to get full tracebacks on errors
  217. (including nunjucks internals). Thanks Tobias Petry and Chandrasekhar Ambula
  218. V for the report, Aleksandr Motsjonov for draft patch.
  219. * Support using `in` operator to search in both arrays and objects,
  220. and it will throw an error for other data types.
  221. Fix [#659](https://github.com/mozilla/nunjucks/pull/659).
  222. Thanks Alex Mayfield for report and test, Ouyang Yadong for fix.
  223. Merge of [#661](https://github.com/mozilla/nunjucks/pull/661).
  224. * Add support for `{% set %}` block assignments as in jinja2. Thanks Daniele
  225. Rapagnani. Merge of [#656](https://github.com/mozilla/nunjucks/pull/656)
  226. * Fix `{% set %}` scoping within macros.
  227. Fixes [#577](https://github.com/mozilla/nunjucks/issues/577) and
  228. the macro portion of [#561](https://github.com/mozilla/nunjucks/issues/561).
  229. Thanks Ouyang Yadong. Merge of [#653](https://github.com/mozilla/nunjucks/pull/653).
  230. * Add support for named `endblock` (e.g. `{% endblock foo %}`). Thanks
  231. ricordisamoa. Merge of [#641](https://github.com/mozilla/nunjucks/pull/641).
  232. * Fix `range` global with zero as stop-value. Thanks Thomas Hunkapiller. Merge
  233. of [#638](https://github.com/mozilla/nunjucks/pull/638).
  234. * Fix a bug in urlize that collapsed whitespace. Thanks Paulo Bu. Merge of
  235. [#637](https://github.com/mozilla/nunjucks/pull/637).
  236. * Add `sum` filter. Thanks Pablo Matías Lazo. Merge of
  237. [#629](https://github.com/mozilla/nunjucks/pull/629).
  238. * Don't suppress errors inside {% if %} tags. Thanks Artemy Tregubenko for
  239. report and test, Ouyang Yadong for fix. Merge of
  240. [#634](https://github.com/mozilla/nunjucks/pull/634).
  241. * Allow whitespace control on comment blocks, too. Thanks Ouyang Yadong. Merge
  242. of [#632](https://github.com/mozilla/nunjucks/pull/632).
  243. * Fix whitespace control around nested tags/variables/comments. Thanks Ouyang
  244. Yadong. Merge of [#631](https://github.com/mozilla/nunjucks/pull/631).
  245. v2.3.0 (Jan 6 2016)
  246. -------------------
  247. * Return `null` from `WebLoader` on missing template instead of throwing an
  248. error, for consistency with other loaders. This allows `WebLoader` to support
  249. the new `ignore missing` flag on the `include` tag. If `ignore missing` is
  250. not set, a generic "template not found" error will still be thrown, just like
  251. for any other loader. Ajax errors other than 404 will still cause `WebLoader`
  252. to throw an error directly.
  253. * Add preserve-linebreaks option to `striptags` filter. Thanks Ivan
  254. Kleshnin. Merge of [#619](https://github.com/mozilla/nunjucks/pull/619).
  255. v2.2.0 (Nov 23 2015)
  256. --------------------
  257. * Add `striptags` filter. Thanks Anthony Giniers. Merge of
  258. [#589](https://github.com/mozilla/nunjucks/pull/589).
  259. * Allow compiled templates to be imported, included and extended. Thanks Luis
  260. Gutierrez-Sheris. Merge of
  261. [#581](https://github.com/mozilla/nunjucks/pull/581).
  262. * Fix issue with different nunjucks environments sharing same globals. Each
  263. environment is now independent. Thanks Paul Pechin. Merge of
  264. [#574](https://github.com/mozilla/nunjucks/pull/574).
  265. * Add negative steps support for range function. Thanks Nikita Mostovoy. Merge
  266. of [#575](https://github.com/mozilla/nunjucks/pull/575).
  267. * Remove deprecation warning when using the `default` filter without specifying
  268. a third argument. Merge of
  269. [#567](https://github.com/mozilla/nunjucks/pull/567).
  270. * Add support for chaining of addGlobal, addFilter, etc. Thanks Rob Graeber. Merge of
  271. [#537](https://github.com/mozilla/nunjucks/pull/537)
  272. * Fix error propagation. Thanks Tom Delmas. Merge of
  273. [#534](https://github.com/mozilla/nunjucks/pull/534).
  274. * trimBlocks now also trims windows style line endings. Thanks Magnus Tovslid. Merge of
  275. [#548](https://github.com/mozilla/nunjucks/pull/548)
  276. * `include` now supports an option to suppress errors if the template does not
  277. exist. Thanks Mathias Nestler. Merge of
  278. [#559](https://github.com/mozilla/nunjucks/pull/559)
  279. v2.1.0 (Sep 21 2015)
  280. --------------------
  281. * Fix creating `WebLoader` without `opts`. Merge of
  282. [#524](https://github.com/mozilla/nunjucks/pull/524).
  283. * Add `hasExtension` and `removeExtension` methods to `Environment`. Merge of
  284. [#512](https://github.com/mozilla/nunjucks/pull/512).
  285. * Add support for kwargs in `sort` filter. Merge of
  286. [#510](https://github.com/mozilla/nunjucks/pull/510).
  287. * Add `none` as a lexed constant evaluating to `null`. Merge of
  288. [#480](https://github.com/mozilla/nunjucks/pull/480).
  289. * Fix rendering of multiple `raw` blocks. Thanks Aaron O'Mullan. Merge of
  290. [#503](https://github.com/mozilla/nunjucks/pull/503).
  291. * Avoid crashing on async loader error. Thanks Samy Pessé. Merge of
  292. [#504](https://github.com/mozilla/nunjucks/pull/504).
  293. * Add support for keyword arguments for sort filter. Thanks Andres Pardini. Merge of
  294. [#510](https://github.com/mozilla/nunjucks/pull/510)
  295. v2.0.0 (Aug 30 2015)
  296. --------------------
  297. Most of the changes can be summed up in the
  298. [issues tagged 2.0](https://github.com/mozilla/nunjucks/issues?q=is%3Aissue+milestone%3A2.0+is%3Aclosed).
  299. Or you can
  300. [see all commits](https://github.com/mozilla/nunjucks/compare/v1.3.4...f8aabccefc31a9ffaccdc6797938b5187e07ea87).
  301. Most important changes:
  302. * **autoescape is now on by default.** You need to explicitly pass `{
  303. autoescape: false }` in the options to turn it off.
  304. * **watch is off by default.** You need to explicitly pass `{ watch: true }` to
  305. start the watcher.
  306. * The `default` filter has changed. It will show the default value only if the
  307. argument is **undefined**. Any other value, even false-y values like `false`
  308. and `null`, will be returned. You can get back the old behavior by passing
  309. `true` as a 3rd argument to activate the loose-y behavior: `foo |
  310. default("bar", true)`. In 2.0 if you don't pass the 3rd argument, a warning
  311. will be displayed about this change in behavior. In 2.1 this warning will be
  312. removed.
  313. * [New filter tag](http://mozilla.github.io/nunjucks/templating.html#filter)
  314. * Lots of other bug fixes and small features, view the above issue list!
  315. v1.3.4 (Apr 27 2015)
  316. --------------------
  317. This is an extremely minor release that only adds an .npmignore so that the
  318. bench, tests, and docs folders do not get published to npm. Nunjucks should
  319. download a lot faster now.
  320. v1.3.3 (Apr 3 2015)
  321. -------------------
  322. This is exactly the same as v1.3.1, just fixing a typo in the git version tag.
  323. v1.3.2 (Apr 3 2015)
  324. -------------------
  325. (no notes)
  326. v1.3.1 (Apr 3 2015)
  327. -------------------
  328. We added strict mode to all the files, but that broke running nunjucks in the
  329. browser. Should work now with this small fix.
  330. v1.3.0 (Apr 3 2015)
  331. -------------------
  332. * Relative templates: you can now load a template relatively by starting the
  333. path with ., like ./foo.html
  334. * FileSystemLoader now takes a noCache option, if true will disable caching
  335. entirely
  336. * Additional lstripBlocks and trimBlocks available to clean output
  337. automatically
  338. * New selectattr and rejectattr filters
  339. * Small fixes to the watcher
  340. * Several bug fixes
  341. v1.2.0 (Feb 4 2015)
  342. -------------------
  343. * The special non-line-breaking space is considered whitespace now
  344. * The in operator has a lower precedence now. This is potentially a breaking
  345. change, thus the minor version bump. See
  346. [#336](https://github.com/mozilla/nunjucks/pull/336)
  347. * import with context now implemented:
  348. [#319](https://github.com/mozilla/nunjucks/pull/319)
  349. * async rendering doesn't throw compile errors
  350. v1.1.0 (Sep 30 2014)
  351. --------------------
  352. User visible changes:
  353. * Fix a bug in urlize that would remove periods
  354. * custom tag syntax (like {% and %}) was made Environment-specific
  355. internally. Previously they were global even though you set them through the
  356. Environment.
  357. * Remove aggressive optimization that only emitted loop variables when uses. It
  358. introduced several bugs and didn't really improve perf.
  359. * Support the regular expression syntax like /foo/g.
  360. * The replace filter can take a regex as the first argument
  361. * The call tag was implemented
  362. * for tags can now take an else clause
  363. * The cycler object now exposes the current item as the current property
  364. * The chokidar library was updated and should fix various issues
  365. Dev changes:
  366. * Test coverage now available via istanbul. Will automatically display after
  367. running tests.
  368. v1.0.7 (Aug 15 2014)
  369. --------------------
  370. Mixed up a few things in the 1.0.6 release, so another small bump. This merges
  371. in one thing:
  372. * The length filter will not throw an error is used on an undefined
  373. variable. It will return 0 if the variable is undefined.
  374. v1.0.6 (Aug 15 2014)
  375. --------------------
  376. * Added the addGlobal method to the Environment object
  377. * import/extends/include now can take an arbitrary expression
  378. * fix bugs in set
  379. * improve express integration (allows rendering templates without an extension)
  380. v1.0.5 (May 1 2014)
  381. -------------------
  382. * Added support for browserify
  383. * Added option to specify template output path when precompiling templates
  384. * Keep version comment in browser minified files
  385. * Speed up SafeString implementation
  386. * Handle null and non-matching cases for word count filter
  387. * Added support for node-webkit
  388. * Other various minor bugfixes
  389. chokidar repo fix - v1.0.4 (Apr 4 2014)
  390. ---------------------------------------
  391. * The chokidar dependency moved repos, and though the git URL should have been
  392. forwarded some people were having issues. This fixed the repo and
  393. version.
  394. (v1.0.3 is skipped because it was published with a bad URL, quickly fixed with
  395. another version bump)
  396. Bug fixes - v1.0.2 (Mar 25 2014)
  397. --------------------------------
  398. * Use chokidar for watching file changes. This should fix a lot of problems on
  399. OS X machines.
  400. * Always use / in paths when precompiling templates
  401. * Fix bug where async filters hang indefinitely inside if statements
  402. * Extensions now can override autoescaping with an autoescape property
  403. * Other various minor bugfixes
  404. v1.0.1 (Dec 16, 2013)
  405. ---------------------
  406. (no notes)
  407. We've reached 1.0! Better APIs, asynchronous control, and more (Oct 24, 2013)
  408. -----------------------------------------------------------------------------
  409. * An asynchronous API is now available, and async filters, extensions, and
  410. loaders is supported. The async API is optional and if you don't do anything
  411. async (the default), nothing changes for you. You can read more about this
  412. [here](http://jlongster.github.io/nunjucks/api.html#asynchronous-support). (fixes
  413. [#41](https://github.com/mozilla/nunjucks/issues/41))
  414. * Much simpler higher-level API for initiating/configuring nunjucks is
  415. available. Read more
  416. [here](http://jlongster.github.io/nunjucks/api.html#simple-api).
  417. * An official grunt plugin is available for precompiling templates:
  418. [grunt-nunjucks](https://github.com/jlongster/grunt-nunjucks)
  419. * **The browser files have been renamed.** nunjucks.js is now the full library
  420. with compiler, and nunjucks-slim.js is the small version that only works with
  421. precompiled templates
  422. * urlencode filter has been added
  423. * The express integration has been refactored and isn't a kludge
  424. anymore. Should avoid some bugs and be more future-proof;
  425. * The order in which variables are lookup up in the context and frame lookup
  426. has been reversed. It will now look in the frame first, and then the
  427. context. This means that if a for loop introduces a new var, like {% for name
  428. in names %}, and if you have name in the context as well, it will properly
  429. reference name from the for loop inside the loop. (fixes
  430. [#122](https://github.com/mozilla/nunjucks/pull/122) and
  431. [#119](https://github.com/mozilla/nunjucks/issues/119))
  432. v0.1.10 (Aug 9 2013)
  433. --------------------
  434. (no notes)
  435. v0.1.9 (May 30 2013)
  436. --------------------
  437. (no notes)
  438. v0.1.8 - whitespace controls, unpacking, better errors, and more! (Feb 6 2013)
  439. ------------------------------------------------------------------------------
  440. There are lots of cool new features in this release, as well as many critical
  441. bug fixes.
  442. Full list of changes:
  443. * Whitespace control is implemented. Use {%- and -%} to strip whitespace before/after the block.
  444. * `for` loops implement Python-style array unpacking. This is a really nice
  445. feature which lets you do this:
  446. {% for x, y, z in [[2, 2, 2], [3, 3, 3]] %}
  447. --{{ x }} {{ y }} {{ z }}--
  448. {% endfor %}
  449. The above would output: --2 2 2----3 3 3--
  450. You can pass any number of variable names to for and it will destructure each
  451. array in the list to the variables.
  452. This makes the syntax between arrays and objects more
  453. consistent. Additionally, it allows us to implement the `dictsort` filter
  454. which sorts an object by keys or values. Technically, it returns an array of
  455. 2-value arrays and the unpacking takes care of it. Example:
  456. {% for k, v in { b: 2, a: 1 } %}
  457. --{{ k }}: {{ v }}--
  458. {% endfor %}
  459. Output: `--b: 2----a: 1--` (note: the order could actually be anything
  460. because it uses javascript’s `for k in obj` syntax to iterate, and ordering
  461. depends on the js implementation)
  462. {% for k, v in { b: 2, a: 1} | dictsort %}
  463. --{{ k }}: {{ v }}--
  464. {% endfor %}
  465. Output: `--a: 1----b: 2--`
  466. The above output will always be ordered that way. See the documentation for
  467. more details.
  468. Thanks to novocaine for this!
  469. * Much better error handling with at runtime (shows template/line/col information for attempting to call undefined values, etc)
  470. * Fixed a regression which broke the {% raw %} block
  471. * Fix some edge cases with variable lookups
  472. * Fix a regression with loading precompiled templates
  473. * Tweaks to allow usage with YUICompressor
  474. * Use the same error handling as normal when precompiling (shows proper errors)
  475. * Fix template loading on Windows machines
  476. * Fix int/float filters
  477. * Fix regression with super()
  478. v0.1.7 - helpful errors, many bug fixes (Dec 12 2012)
  479. -----------------------------------------------------
  480. The biggest change in v0.1.7 comes from devoidfury (thanks!) which implements
  481. consistent and helpful error messages. The errors are still simply raw text,
  482. and not pretty HTML, but they at least contain all the necessary information to
  483. track down an error, such as template names, line and column numbers, and the
  484. inheritance stack. So if an error happens in a child template, it will print
  485. out all the templates that it inherits. In the future, we will most likely
  486. display the actual line causing an error.
  487. Full list of changes:
  488. * Consistent and helpful error messages
  489. * Expressions are more consistent now. Previously, there were several places
  490. that wouldn’t accept an arbitrary expression that should. For example, you
  491. can now do {% include templateNames['foo'] %}, whereas previously you could
  492. only give it a simply variable name.
  493. * app.locals is fixed with express 2.5
  494. * Method calls on objects now have correct scope for this. Version 0.1.6 broke
  495. this and this was referencing the global scope.
  496. * A check was added to enforce loading of templates within the correct
  497. path. Previously you could load a file outside of the template with something
  498. like ../../crazyPrivateFile.txt
  499. You can
  500. [view all the code changes here](https://github.com/jlongster/nunjucks/compare/v0.1.6...v0.1.7). Please
  501. [file an issue](https://github.com/jlongster/nunjucks/issues?page=1&state=open)
  502. if something breaks!
  503. v0.1.6 - undefined handling, bugfixes (Nov 13, 2012)
  504. ----------------------------------------------------
  505. This is mostly a bugfix release, but there are a few small tweaks based on
  506. feedback:
  507. * In some cases, backslashes in the template would not appear in the
  508. output. This has been fixed.
  509. * An error is thrown if a filter is not found
  510. * Old versions of express are now supported (2.5.11 was tested)
  511. * References on undefined objects are now suppressed. For example, {{ foo }},
  512. {{ foo.bar }}, {{ foo.bar.baz }} all output nothing if foo is
  513. undefined. Previously only the first form would be suppressed, and a cryptic
  514. error thrown for the latter 2 references. Note: I believe this is a departure
  515. from jinja, which throws errors when referencing undefined objects. I feel
  516. that this is a good and non-breaking addition though. (thanks to devoidfury)
  517. * A bug in set where you couldn’t not reference other variables is fixed
  518. (thanks chriso and panta)
  519. * Other various small bugfixes
  520. You can view
  521. [all the code changes here](https://github.com/jlongster/nunjucks/compare/v0.1.5...v0.1.6). As
  522. always, [file an issue](https://github.com/jlongster/nunjucks/issues) if
  523. something breaks!
  524. v0.1.5 - macros, keyword arguments, bugfixes (Oct 11 2012)
  525. ----------------------------------------------------------
  526. v0.1.5 has been pushed to npm, and it’s a big one. Please file any issues you
  527. find, and I’ll fix them as soon as possible!
  528. * The node data structure has been completely refactored to reduce redundancy
  529. and make it easier to add more types in the future.
  530. * Thanks to Brent Hagany, macros now have been implemented. They should act
  531. exactly the way jinja2 macros do.
  532. * A calling convention which implements keyword arguments now exists. All
  533. keyword args are converted into a hash and passed as the last
  534. argument. Macros needed this to implement keyword/default arguments.
  535. * Function and filter calls apply the new keyword argument calling convention
  536. * The “set” block now appropriately only sets a variable for the current scope.
  537. * Many other bugfixes.
  538. I’m watching this release carefully because of the large amount of code that
  539. has changed, so please
  540. [file an issue](https://github.com/jlongster/nunjucks/issues) if you have a
  541. problem with it.