1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
Version 0.10.3, released 2016-12-09
-----------------------------------
Minor improvements:
* Spaceless tag no longer escapes Static values (#435)
* Inline includes now load (#433)
* Errors during async fs loading use error callback (#431)
Version 0.10.2, released 2016-11-23
-----------------------------------
Minor improvements:
* Support 'same as' (#429)
* Fix windows colon colon namespace (#430)
Version 0.10.1, released 2016-11-18
-----------------------------------
Minor improvements:
* Fixed missing changelog updates
* Fixed incorrect versions in source
* Rethrow errors when option to do so is set (#422)
Version 0.10.0, released 2016-10-28
-----------------------------------
Bower is no longer supported
Major improvements:
* Updated to locutus which replaces phpjs
* elseif now accepts truthy values (#370)
* Use PHP style falsy matching (#383)
* Fix 'not' after binary expressions (#385)
* Use current context when parsing an include (#395)
* Correct handling of 'ignore missing' in embed and include (#424)
Minor improvements:
* Documentation updates
* Refreshed dependencies
Version 0.9.5, released 2016-05-14
-----------------------------------
Minor improvements:
* Templates that are included via "extends" now populate the parent template context
Version 0.9.4, released 2016-05-13
-----------------------------------
Parentheses parsing has undergone quite a large refactoring, but nothing should have explicitly broken.
Major improvements:
* Subexpressions are now supported and parsed differently from function parameters
Version 0.9.3, released 2016-05-12
-----------------------------------
Fix missing changelog updates
Version 0.9.2, released 2016-05-12
-----------------------------------
Minor improvements:
* Empty strings can now be passed to the date filter
* Twig.expression.resolve keeps the correct context for `this`
Version 0.9.1, released 2016-05-10
-----------------------------------
Fixed changelog versioning
Version 0.9.0, released 2016-05-10
-----------------------------------
Theoretically no breaking changes, but lots of things have changed so it is possible something has slipped through.
Dependencies have been updated. You should run `npm install` to update these.
Major improvements:
* Webpack is now used for builds
* phpjs is now a dependency and replaces our reimplementation of PHP functions (#343)
* Arrays are now cast to booleans unless accessing their contents
* in/not in operator precedence changed (#344)
* Expressions can now be keys (#350)
* The extended ternary operator is now supported (#354)
* Expressions can now appear after period accessor (#356)
* The slice shorthand is now supported (#362)
Minor improvements:
* Twig.exports.renderFile now returns a string rather than a String (#348)
* The value of context is now cloned when setting a variable to context (#345)
* Negative numbers are now correctly parsed (#353)
* The // operator now works correctly (#353)
Version 0.8.9, released 2016-03-18
-----------------------------
Dependencies have been updated to current versions. You should run `npm install` to update these. (#313)
Major improvements:
* Twig's `source` function is now supported (#309)
* It is possible to add additional parsers using Twig.Templates.registerParser() (currently available: twig, source). If you are using a custom loader, please investigate src/twig.loader.fs.js how to call the requested parser. (#309)
* `undefined` and `null` values now supported in the `in` operator (#311)
* Namespaces can now be defined using the '@' symbol (#328)
Minor improvements:
* Undefined object properties now have the value of `undefined` rather than `null` (#311)
* Improved browser tests (#325, #310)
* IE8 fix (#324)
* Path resolution has been refactored to its own module (#323)
Version 0.8.8, released 2016-02-13
----------------------------------
Major improvements:
* Support for [block shortcuts](http://twig.sensiolabs.org/doc/tags/extends.html#block-shortcuts): `{% block title page_title|title %}` (#304)
* Define custom template loaders, by registering them via `Twig.Templates.registerLoader()` (#301)
Minor improvements:
* Some mocha tests didn't work in browsers (#281)
* Fix Twig.renderFile (#303)
[All issues of this milestone](https://github.com/justjohn/twig.js/issues?q=milestone%3A0.8.8)
Version 0.8.7, released 2016-01-20
----------------------------------
Major improvements:
* The `autoescape` option now supports all strategies which are supported by the `escape` filter (#299)
Minor improvements:
* The `date` filter now recognises unix timestamps as input, when they are passed as string (#296)
* The `default` filter now allows to be called without parameters (it will return an empty string in that case) (#295)
* Normalize provided template paths (this generated problems when using nodejs under Windows) (#252, #300)
Version 0.8.6, released 2016-01-05
----------------------------------
Major improvements:
* The `escape` filter now supports the strategy parameter: `{{ var|escape('css') }}` with the following available strategies: html (default), js, css, url, html_attr. (#289)
Minor improvements:
* The filter `url_encode` now also encodes apostrophe (as in Twig.php) (#288)
* Minor bugfixes (#290, #291)
Version 0.8.5, released 2015-12-24
----------------------------------
From 0.8.5 on, a summary of changes between each version will be included in the CHANGELOG.md file.
There were some changes to the [Contribution guidelines](https://github.com/justjohn/twig.js/wiki/Contributing): please commit only changes to source files, the files `twig.js` and `twig.min.js` will be rebuilt when a new version gets released. Therefore you need to run `make` after cloning resp. pulling (if you want to use the development version).
Major improvements:
* Implement `min` and `max` functions (#164)
* Support for the whitespace control modifier: `{{- -}}` (#266)
* `sort` filter: try to cast values to match type (numeric values to number, string otherwise) (#278)
* Support for twig namespaces (#195, #251)
* Support for expressions as object keys: `{% set foo = { (1 + 1): 'bar' } %}` (#284)
Minor improvements:
* Allow integer 0 as key in objects: `{ 0: "value" }` (#186)
* `json_encode` filter: always return objects in order of keys, also ignore the internal key `_keys` for nested objects (#279)
* `date` filter: update to current strtotime() function from phpjs: now support ISO8601 dates as input on Mozilla Firefox. (#276)
* Validate template IDs only when caching is enabled (#233, #259)
* Support xmlhttp.status==0 when using cordova (#240)
* Improved sub template file loading (#264)
* Ignore quotes between `{% raw %}` and `{% endraw %}` (#286)
|