Skip to content

Commit 70d3e7e

Browse files
committed
🚢 bump to version 3.2.0
1 parent 492d683 commit 70d3e7e

7 files changed

Lines changed: 64 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,60 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## [3.2.0] / 18 December 2019
7+
8+
### Added
9+
10+
* [#728]: Expose ECMAScript Module in addition to UMD (CommonJS, AMD & global scope), by [@phillipj] and [@zekth].
11+
12+
### Using mustache.js as an ES module
13+
14+
To stay backwards compatible with already using projects, the default exposed module format is still UMD.
15+
That means projects using mustache.js as an CommonJS, AMD or global scope module, from npm or directly from github.com
16+
can keep on doing that for now.
17+
18+
For those projects who would rather want to use mustache.js as an ES module, the `mustache/mustache.mjs` file has to
19+
be `import`ed directly.
20+
21+
Below are some usage scenarios for different runtimes.
22+
23+
#### Modern browser with ES module support
24+
25+
```html
26+
<!-- index.html -->
27+
<script type="module">
28+
import mustache from "https://unpkg.com/mustache@3.2.0/mustache.mjs"
29+
30+
console.log(mustache.render('Hello {{name}}!', { name: 'Santa' }))
31+
// Hello Santa!
32+
</script>
33+
```
34+
35+
#### [Node.js](https://nodejs.org) (>= v13.2.0 or using --experimental-modules flag)
36+
37+
```js
38+
// index.mjs
39+
import mustache from 'mustache/mustache.mjs'
40+
41+
console.log(mustache.render('Hello {{name}}!', { name: 'Santa' }))
42+
// Hello Santa!
43+
```
44+
45+
ES Module support for Node.js will be improved in the future when [Conditional Exports](https://nodejs.org/api/esm.html#esm_conditional_exports)
46+
is enabled by default rather than being behind an experimental flag.
47+
48+
More info in [Node.js ECMAScript Modules docs](https://nodejs.org/api/esm.html).
49+
50+
#### [Deno](https://deno.land/)
51+
52+
```js
53+
// index.ts
54+
import mustache from 'https://unpkg.com/mustache@3.2.0/mustache.mjs'
55+
56+
console.log(mustache.render('Hello {{name}}!', { name: 'Santa' }))
57+
// Hello Santa!
58+
```
59+
660
## [3.1.0] / 13 September 2019
761

862
### Added
@@ -357,6 +411,7 @@ This release is made to revert changes introduced in [2.3.1] that caused unexpec
357411
* Fixed a bug that clashed with QUnit (thanks [@kannix]).
358412
* Added volo support (thanks [@guybedford]).
359413

414+
[3.2.0]: https://github.com/janl/mustache.js/compare/v3.1.0...v3.2.0
360415
[3.1.0]: https://github.com/janl/mustache.js/compare/v3.0.3...v3.1.0
361416
[3.0.3]: https://github.com/janl/mustache.js/compare/v3.0.2...v3.0.3
362417
[3.0.2]: https://github.com/janl/mustache.js/compare/v3.0.1...v3.0.2
@@ -424,6 +479,7 @@ This release is made to revert changes introduced in [2.3.1] that caused unexpec
424479
[#714]: https://github.com/janl/mustache.js/issues/714
425480
[#716]: https://github.com/janl/mustache.js/issues/716
426481
[#717]: https://github.com/janl/mustache.js/issues/717
482+
[#728]: https://github.com/janl/mustache.js/issues/728
427483

428484
[@afc163]: https://github.com/afc163
429485
[@andersk]: https://github.com/andersk
@@ -468,7 +524,8 @@ This release is made to revert changes introduced in [2.3.1] that caused unexpec
468524
[@TiddoLangerak]: https://github.com/TiddoLangerak
469525
[@tomekwi]: https://github.com/tomekwi
470526
[@wizawu]: https://github.com/wizawu
527+
[@wol-soft]: https://github.com/wol-soft
471528
[@Xcrucifier]: https://github.com/Xcrucifier
472529
[@yotammadem]: https://github.com/yotammadem
473530
[@yousefcisco]: https://github.com/yousefcisco
474-
[@wol-soft]: https://github.com/wol-soft
531+
[@zekth]: https://github.com/zekth

mustache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@
651651

652652
var mustache = {
653653
name: 'mustache.js',
654-
version: '3.2.0-beta.0',
654+
version: '3.2.0',
655655
tags: [ '{{', '}}' ],
656656
clearCache: undefined,
657657
escape: undefined,

mustache.js.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>mustache.js</id>
5-
<version>3.2.0-beta.0</version>
5+
<version>3.2.0</version>
66
<authors>mustache.js Authors</authors>
77
<licenseUrl>https://github.com/janl/mustache.js/blob/master/LICENSE</licenseUrl>
88
<projectUrl>http://mustache.github.com/</projectUrl>

mustache.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mustache.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ Writer.prototype.rawValue = function rawValue (token) {
644644

645645
var mustache = {
646646
name: 'mustache.js',
647-
version: '3.2.0-beta.0',
647+
version: '3.2.0',
648648
tags: [ '{{', '}}' ],
649649
clearCache: undefined,
650650
escape: undefined,

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mustache",
3-
"version": "3.2.0-beta.0",
3+
"version": "3.2.0",
44
"description": "Logic-less {{mustache}} templates with JavaScript",
55
"author": "mustache.js Authors <http://github.com/janl/mustache.js>",
66
"homepage": "https://github.com/janl/mustache.js",

0 commit comments

Comments
 (0)