UNPKG

12.2 kBMarkdownView Raw
1Express Handlebars Change History
2=================================
3
44.0.1 (2020-04-01)
5------------------
6
7* Update handlebars to fix mimist vulnerability.
8
94.0.0 (2020-03-25)
10------------------
11
12* Move to repo https://github.com/express-handlebars/express-handlebars/
13* Update all deps.
14
153.1.0 (2019-05-14)
16------------------
17
18* `defaultLayout` defaults to main ([#249][])
19* Upgrade Handlebars to v4.1.2 ([#250][])
20
21[#249]: https://github.com/ericf/express-handlebars/issues/249
22[#250]: https://github.com/ericf/express-handlebars/issues/250
23
243.0.2 (2019-02-24)
25------------------
26
27* Fix configuration `layoutsDir` & `partialsDir`. ([#244][])
28
29[#244]: https://github.com/ericf/express-handlebars/issues/244
30
313.0.1 (2019-02-20)
32------------------
33
34* Updated dependencies that are long over due
35
363.0.0 (2016-01-26)
37------------------
38
39* Upgraded to Handlebars 4.0. ([#142][])
40
41[#142]: https://github.com/ericf/express-handlebars/issues/142
42
432.0.1 (2015-04-23)
44------------------
45
46* Guarded against unexpected Handlebars API change that was released in a patch.
47 ([#125][])
48
49
50[#125]: https://github.com/ericf/express-handlebars/issues/125
51
52
532.0.0 (2015-03-22)
54------------------
55
56* __[!]__ Upgraded to Handlebars 3.0 by default, but still works with Handlebars
57 2.x by using the `handlebars` config option. ([#105][])
58
59* __[!]__ Removed using prototype properties for default config values. The
60 default values are now embedded in the constructor. ([#105][])
61
62* __[!]__ Removed `handlebarsVersion` instance property and
63 `getHandlebarsSemver()` static function on the `ExpressHandlebars`
64 constructor. ([#105][])
65
66* __[!]__ Replaced undocumented `compileTemplate()` hook with the protected but
67 supported `_compileTemplate()` and `_precompileTemplate()` hooks. ([#95][])
68
69* Fixed layout path resolution on Windows. ([#113][] @Tineler)
70
71* Added `compilerOptions` config property which is passed along to
72 `Handlebars.compile()` and `Handlebars.precompile()`. ([#95][])
73
74* Exposed Express Handlebars metadata to the data channel during render. This
75 metadata is accessible via `{{@exphbs.*}}` ([#89][], [#101][])
76
77* Added new "protected" hooks for AOP-ing template compilation and rendering,
78 all of which can optionally return a Promise: ([#105][])
79
80 * `_compileTemplate()`
81 * `_precompileTemplate()`
82 * `_renderTemplate()`
83
84
85[#89]: https://github.com/ericf/express-handlebars/issues/89
86[#95]: https://github.com/ericf/express-handlebars/issues/95
87[#101]: https://github.com/ericf/express-handlebars/issues/101
88[#105]: https://github.com/ericf/express-handlebars/issues/105
89[#113]: https://github.com/ericf/express-handlebars/issues/113
90
91
921.2.2 (2015-03-06)
93------------------
94
95* Upgraded `glob` dependency to v5 which now officially supports symlinks via
96 the new `follow` option. ([#98][])
97
98
991.2.1 (2015-02-17)
100------------------
101
102* Locked down `glob` dependency to a v4 version range that is known to work with
103 this package _and_ support symlinks. The `glob` version can be updated when
104 [isaacs/node-glob#139](https://github.com/isaacs/node-glob/issues/139) is
105 resolved. ([#98][] @adgad)
106
107
108[#98]: https://github.com/ericf/express-handlebars/issues/98
109
110
1111.2.0 (2015-02-17)
112------------------
113
114* Added support for render-level `partials` to be specified when calling
115 `renderView()` (which is the method Express calls). The `options.partials`
116 value matches what Handlebars accepts during template rendering: it should
117 have the shape `{partialName: fn}` or be a Promise for such an object.
118 ([#82][])
119
120
121[#82]: https://github.com/ericf/express-handlebars/issues/82
122
123
1241.1.0 (2014-09-14)
125------------------
126
127* __[!]__ Upgraded Handlebars to 2.0.0 final, it was beta before.
128
129* Added support for `partialsDir` to be configured with a collection (or promise
130 for a collection) of templates, via the new `templates` prop in `partialDir`
131 config objects. This allows developers to hand Express Handlebars the compiled
132 partials templates to use for a specific partials dir.
133 ([#81][] @joanniclaborde)
134
135* Upgraded Promise dependency.
136
137
138[#81]: https://github.com/ericf/express-handlebars/issues/81
139
140
1411.0.3 (2014-09-05)
142------------------
143
144* Fixed issue with namespaced partials dirs not actually being namespaces.
145 ([#76][] @inerte)
146
147
148[#76]: https://github.com/ericf/express-handlebars/issues/76
149
150
1511.0.2 (2014-09-05)
152------------------
153
154* Fixed `engines` entry in `package.json` to Node `>=0.10` to reflect this
155 package's requirements. ([#78][])
156
157
158[#78]: https://github.com/ericf/express-handlebars/issues/78
159
160
1611.0.1 (2014-08-08)
162------------------
163
164* Fixed bug where rendered content was only be returned if a layout template was
165 being used. Now a layout-less render will actually return content. ([#73][])
166
167
168[#73]: https://github.com/ericf/express-handlebars/issues/73
169
170
1711.0.0 (2014-08-07)
172------------------
173
174* __[!]__ Renamed to: `express-handlebars`. ([#65][])
175
176* __[!]__ Rewritten to use Promises instead of `async` for asynchronous code.
177 ([#68][]) This resulted in the following public API changes:
178
179 * `loadPartials()` --> `getPartials()`, returns a Promise.
180 * `loadTemplate()` --> `getTemplate()`, returns a Promise.
181 * `loadTemplates()` --> `getTemplates()`, returns a Promise.
182 * `render(file, context, [options])`, returns a Promise.
183
184
185* `partialsDir` can now be set with an array of objects in the following form to
186 support namespaced partials: ([#70][] @joanniclaborde)
187
188 { dir: 'foo/bar/', namespace: 'bar' }
189
190* Added support for Handlebars' `data` channel via `options.data`. ([#62][])
191
192* Added `compileTemplate()` hook for the pre/post compile process, this also
193 supports returning a Promise. ([#39][], [#41][])
194
195* Added `_renderTemplate()` hook that supports returning a Promise.
196 ([#39][], [#41][])
197
198* Upgraded all dependencies, including Handlebars to 2.x. ([#59][])
199
200* Added `graceful-fs` dependency to support large numbers of files to avoid
201 EMFILE errors.
202
203* Reduced complexity of cache code.
204
205* Updated examples to each be self-contained and have `package.json` files.
206
207
208[#39]: https://github.com/ericf/express-handlebars/issues/39
209[#41]: https://github.com/ericf/express-handlebars/issues/41
210[#59]: https://github.com/ericf/express-handlebars/issues/59
211[#62]: https://github.com/ericf/express-handlebars/issues/62
212[#65]: https://github.com/ericf/express-handlebars/issues/65
213[#68]: https://github.com/ericf/express-handlebars/issues/68
214[#70]: https://github.com/ericf/express-handlebars/issues/70
215
216
2170.5.1 (2014-08-05)
218------------------
219
220* __[!]__ Last release before `v1.0` which will have breaking changes.
221
222* Improved `extname` docs in README and added example. ([#30][] @Crashthatch)
223
224* `extname` can now be specified _without_ the leading `"."`.
225 ([#51][] @calvinmetcalf)
226
227
228[#30]: https://github.com/ericf/express-handlebars/issues/30
229[#51]: https://github.com/ericf/express-handlebars/issues/51
230
231
2320.5.0 (2013-07-25)
233------------------
234
235* Added `loadTemplates()` method which will load all the templates in a
236 specified directory. ([#21][])
237
238* Added support for multiple partials directories. This enables the
239 `partialsDir` configuration property to be specified as an *array* of
240 directories, and loads all of the templates in each one.
241
242 This feature allows an app's partials to be split up in multiple directories,
243 which is common if an app has some shared partials which will also be exposed
244 to the client, and some server-side-only partials. ([#20][])
245
246* Added runnable code examples in this package's "examples/" directory.
247 ([#22][])
248
249* Improved optional argument handling in public methods to treat Express
250 `locals` function objects as `options` and not `callback` params to the method
251 being invoked. ([#27][])
252
253
254[#20]: https://github.com/ericf/express-handlebars/issues/20
255[#21]: https://github.com/ericf/express-handlebars/issues/21
256[#22]: https://github.com/ericf/express-handlebars/issues/22
257[#27]: https://github.com/ericf/express-handlebars/issues/27
258
259
2600.4.1 (2013-04-06)
261------------------
262
263* Updated `async` dependency to the latest stable minor version: "~0.2".
264
265
2660.4.0 (2013-03-24)
267------------------
268
269* __[!]__ Removed the following "get" -> "load" aliases which kept in v0.2.0 for
270 back-compat:
271
272 * `getPartials()` -> `loadPartials()`
273 * `getTemplate()` -> `loadTemplate()`
274
275 This is the future version where these aliases have been removed.
276
277* __[!]__ Renamed `lib/express3-handlebars.js` -> `lib/express-handlebars.js`.
278
279* Exposed `getHandlebarsSemver()` function as a static property on the
280 `ExpressHandlebars` constructor.
281
282* Rearranged module exports by moving the engine factory function to `index.js`,
283 making the `lib/express3-handlebars.js` module only responsible for exporting
284 the `ExpressHandlebars` constructor.
285
286
2870.3.3 (2013-03-22)
288------------------
289
290* Updated internal `_resolveLayoutPath()` method to take the full
291 `options`/locals objects which the view is rendered with. This makes it easier
292 to override. ([#14][])
293
294
295[#14]: https://github.com/ericf/express-handlebars/issues/14
296
297
2980.3.2 (2013-02-20)
299------------------
300
301* Transfered ownership and copyright to Yahoo! Inc. This software is still free
302 to use, and is now licensed under the Yahoo! Inc. BSD license.
303
304
3050.3.1 (2013-02-18)
306------------------
307
308* Updated README with info about `options.helpers` for `render()` and
309 `renderView()` docs. ([#7][])
310
311
312[#7]: https://github.com/ericf/express-handlebars/issues/7
313
314
3150.3.0 (2013-02-18)
316------------------
317
318* Added support for render-level helpers, via `options.helpers`, to the
319 `render()` and `renderView()` methods. Handlebars' `registerHelper()` function
320 now works as expected and does not have to be called before the
321 `ExpressHandlebars` instance is created. Helpers are now merged from:
322 `handlebars.helpers` (global), `helpers` (instance), and `options.helpers`
323 (render-level) before a template is rendered; this provides flexibility at
324 all levels. ([#3][], [#11][])
325
326* Added `handlebarsVersion` property which is the version number of `handlebars`
327 as a semver. This is used internally to branch on certain operations which
328 differ between Handlebars releases.
329
330
331[#3]: https://github.com/ericf/express-handlebars/issues/3
332[#11]: https://github.com/ericf/express-handlebars/issues/11
333
334
3350.2.3 (2013-02-13)
336------------------
337
338* Fixed issue with naming nested partials when using the latest version of
339 Handlebars (1.0.rc.2). Previous versions require a hack to replace "/"s with
340 "."s in partial names, and the latest version of Handlebars fixes that bug.
341 This hack will only be applied to old versions of Handlebars. ([#9][])
342
343
344[#9]: https://github.com/ericf/express-handlebars/issues/9
345
346
3470.2.2 (2013-02-04)
348------------------
349
350* Updated README with the public method renames which happened v0.2.0.
351
352
3530.2.1 (2013-02-04)
354------------------
355
356* `extname`, `layoutsDir`, and `partialsDir` property values will now reference
357 the values on the prototype unless an `ExpressHandlebars` instance is
358 constructed with config values for these properties.
359
360* Improved clarity of method implementations, and exposed more override "hooks"
361 via new private methods: `_getPartialName()`, `_renderTemplate()`, and
362 `_resolveLayoutPath()`.
363
364
3650.2.0 (2013-02-01)
366------------------
367
368* __[!]__ Renamed methods prefixed with "get" to "load" for clarity:
369
370 * `getPartials()` -> `loadPartials()`
371 * `getTemplate()` -> `loadTemplate()`
372
373 Aliases for these methods have been created to maintain back-compat, but the
374 old method names are now deprecated will be removed in the future. ([#5][])
375
376* All paths are resolved before checking in or adding to caches. ([#1][])
377
378* Force `{precompiled: false}` option within `render()` and `renderView()`
379 methods to prevent trying to render with precompiled templates. ([#2][])
380
381
382[#1]: https://github.com/ericf/express-handlebars/issues/1
383[#2]: https://github.com/ericf/express-handlebars/issues/2
384[#5]: https://github.com/ericf/express-handlebars/issues/5
385
386
3870.1.2 (2013-01-10)
388------------------
389
390* Tweaked formatting of README documentation.
391
392
3930.1.1 (2013-01-10)
394------------------
395
396* Added README documentation.
397
398
3990.1.0 (2013-01-07)
400------------------
401
402* Initial release.