UNPKG

4.27 kBMarkdownView Raw
1# Change Log
2All notable changes to this project will be documented in this file.
3
4The format is based on [Keep a Changelog](http://keepachangelog.com/)
5and this project adheres to [Semantic Versioning](http://semver.org/).
6
7## Unreleased
8
9- Support [optional chaining syntax](https://github.com/tc39/proposal-optional-chaining). But the default behaviour of mustache is like we use `?.` everywhere we write `.`.
10- Support comments: `{{! ...}}` like MustacheJS
11- Reenable tests/ for mustache compatibility and add relevant options
12- Add a string literal tag function (generic render)
13- Add the possibility to process variable names before and after they are resolved using `get()`. This can allow HTML escaping for example. Also see #50
14
15## 8.0.0
16
17- The CommonJS file has changed name: V7=`dist/micromustache.js` v8=`dist/micromustache.cjs`. If you just use `require('micromustache')` it sould work without any change.
18- The `depth` option is added
19- Updated the dependencies
20- Addressed known security issues
21
22### BREAKING CHANGES
23
24- The `scope` could be a `function` as well, but with this release we only accept `Object`.
25- Previously string characters could be accessed with array-index syntax, but now it is not possible (eg. `render('{{str[0]}}', { str: 'Hello' })` will not return `'H'` anymore)
26- Drop support for Safari10
27
28## 7.0.0
29
30### BREAKING CHANGES:
31
32- **The CLI is removed**
33- Variable names cannot be longer than 1000 characters
34
35## 6.0.0
36
37- We no more try to JSON.stringify() arrays and objects. You can use `.renderFn()` to do that. There's still the `get()` utility function to help do the lookup.
38- Object bracket accessors are now supported: `obj['foo']` (previously only `obj.foo` worked like Mustache and handlebars)
39- Rewrote the project in TypeScript
40- Custom resolver can also be async (see `.renderFnAsync()`)
41- Compile and rendering is significantly faster than Mustache
42- A change in terminology to better reflect JavaScript terms: What Mustache and the previous version of the lib called `view` is not called `scope`.
43- Expose a CommonJS build for the browser limited to ECMAScript 5 features.
44
45### BREAKING CHANGES:
46- **The biggest change is that if you used `compile()` in version 5, it returned a function but since version 6, it returns an object that _has_ a `render()` function**
47- The behaviour of the resolver function has changed: In v5 if the resolver threw an error we fell back to the standard `.get()` functionality but v6 just throws that error in an effort to make debugging easier.
48- We don't use default exports anymore so `const render = require('micromustache/render')`
49 should be refactored to `const { render } = require('micromustache')`
50- Now the compiler returns a renderer object with a render() function
51- If you pass a non-string template it'll throw an error
52- If you provide a custom resolver and it throws, we throw and will not swallow that error
53- If one of the nested keys do not exist, we throw and will not swallow that error
54
55## 5.4.0
56- Modernize the the dependencies and build system
57
58## 5.1.0 2017-01-08
59- Add command line support
60
61## 5.0.0 2017-01-08
62- Update readme
63- remove building browser packages (use webpack, browserify or any other modern method to build)
64- Command line interface
65- Add travis build
66- Use linting rules from Schibsted
67- Converted to CommonJS (dropped AMD and UMD in favor of modern build tools)
68- Use yarn
69- Rewrote test with chai.expect instead of chai.assert
70- list of params for resolver is reversed to (varName, view)
71- dropped to_html alias
72- dropped bower support
73- dropped CDN support
74- dropped this feature: If the value is a function, call it passing the name of the variable as the only argument.
75
76## 2.2.1 - 2016-07-23
77
78- Mainly modernizing the package after 2 years
79- Added documentation
80- Replaced the old nodeunit test system with mocha/chai
81- Replaced the old gulp build system with pure NPM
82
83## 2.1.20 - 2014-07-11
84
85- Replaced makefile with Gulp
86- Adapted the UMD pattern to easily work with AMD, CommonJS or even good old style globals
87- Removed the test case of Object and Array values (they aren't supported in Micromustache).
88- Updated the test runner to use rawgit.com
89- Added this changelog
90
91## 1.2.1 - 2013-12-18
92
93- Added new logo
94- Released into NPM