Update mustache to the latest version π
Version 2.3.1 of mustache was just published.
| Dependency | mustache |
|---|---|
| Current Version | 2.3.0 |
| Type | dependency |
The version 2.3.1 is not covered by your current version range.
If you donβt accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
It might be worth looking into these changes and trying to get this project onto the latest version of mustache.
If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you donβt have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.
Commits
The new version differs by 11 commits.
9e8035d:ship: bump to version 2.3.12659301FixRakefileby deleting refs to removed install taskse443adaUse ngrok rather than localtunnel when running browser tests (#668)5bbe25eFix browser test suite by using Node.js 6 (#667)0a9999aInstall release tools with npm rather than via pre-commit hook (#666)28ca619fix bug: cache actually not working (#664)85a2c2dReadme: Mustache.parse returns an array of Tokens (#657)3fddfb1Document global Mustache.escape overriding capacity (#644)b283da5Merge pull request #643 from raymond-lam/issue617198a565fix typo in parse-caching/Mustache.tags test2465398Writer.prototype.parse to cache by tags in addition to template string
See the full diff
FAQ and help
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper bot :palm_tree:
Version 2.3.2 just got published.
Update to this version instead π
Release Notes
v2.3.12This release is made to revert changes introduced in 2.3.1 that caused unexpected behaviour for several users.
Minor
- #670: Rollback template cache causing unexpected behaviour, by @raymond-lam.
- The
dependencymustache was updated from2.3.0to3.0.0.
Update to this version instead π
Release Notes for v3.0.0
3.0.0 / 16 September 2018
We are very happy to announce a new major version of mustache.js. We want to be very careful not to break projects out in the wild, and adhering to Semantic Versioning we have therefore cut this new major version.
The changes introduced will likely not require any actions for most using projects. The things to look out
for that might cause unexpected rendering results are described in the migration guide below.
A big shout out and thanks to @raymond-lam for this release! Without his contributions with code and
issue triaging, this release would never have happened.
Major
- #618: Allow rendering properties of primitive types that are not objects, by @raymond-lam.
- #643:
Writer.prototype.parseto cache by tags in addition to template string, by @raymond-lam. - #664: Fix
Writer.prototype.parsecache, by @seminaoki.
Minor
- #673: Add
tagsparameter toMustache.render(), by @raymond-lam.
Migrating from mustache.js v2.x to v3.x
Rendering properties of primitive types
We have ensured properties of primitive types can be rendered at all times. That means Array.length, String.length and similar. A corner case where this could cause unexpected output follows:
View:
{
stooges: [
{ name: "Moe" },
{ name: "Larry" },
{ name: "Curly" }
]
}
Template:
{{#stooges}}
{{name}}: {{name.length}} characters
{{/stooges}}
Output with v3.0:
Moe: 3 characters
Larry: 5 characters
Curly: 5 characters
Output with v2.x:
Moe: characters
Larry: characters
Curly: characters
Caching for templates with custom delimiters
We have improved the templates cache to ensure custom delimiters are taken into consideration for the cache.
This improvement might cause unexpected rendering behaviour for using projects actively using the custom delimiters functionality.
Previously it was possible to use Mustache.parse() as a means to set global custom delimiters. If custom
delimiters were provided as an argument, it would affect all following calls to Mustache.render().
Consider the following:
const template = "[[item.title]] [[item.value]]";
mustache.parse(template, ["[[", "]]"]);
console.log(
mustache.render(template, {
item: {
title: "TEST",
value: 1
}
})
);
>> TEST 1
The above illustrates the fact that Mustache.parse() made mustache.js cache the template without
considering the custom delimiters provided. This is no longer true.
We no longer encourage using Mustache.parse() for this purpose, but have rather added a fourth argument to
Mustache.render() letting you provide custom delimiters when rendering.
If you still need the pre-parse the template and use custom delimiters at the same time, ensure to provide
the custom delimiters as argument to Mustache.render() as well.
Commits
The new version differs by 7 commits.
17510f0:ship: bump to version 3.0.0f452acbUpdate v3.0.0 release date in changelog8ee916aChangelog for v3.0.0 (#674)a2699e4Allow rendering properties of primitive types that are not objects (#618)efdeb55Add tags parameter to .render()8e45409Update README.md to reflect correct caching behavior7845848Reintroduce pull requests #643 and #664, and update description for
See the full diff
- The
dependencymustache was updated from2.3.0to3.0.1.
Update to this version instead π
Commits
The new version differs by 4 commits.
38b1448:ship: bump to version 3.0.1d170f41Add test to verify custom tags are used in partials for via.render()b86665dUse older version of eslint to stay pre Node.js 1 compliant a little longer5a5c1d4Fix partials not rendering tokens when using custom tags (#678)
See the full diff
- The
dependencymustache was updated from2.3.0to3.0.2.
Update to this version instead π
Commits
The new version differs by 15 commits.
6c3608b:ship: bump to version 3.0.2619c928Delete old GitHub Actions workflow filefc8eb5dConvert to new GitHub Actions yaml format1c4187aDon't run browser tests on IE 9 and IE 10, start from IE 11 and above69e2bf3Add mustache partials indentation spec and fix one broken testcadf571Indent Partials1a244cbInstall deps before tests in Actions workflow930a485Install deps as part of GitHub Actions workflowd0290c4Try a basic GitHub Actions workflowbb700c5Start linting all test/ files as part of test script (#704)11ac71aRun tests on Node.js 10 & 12 after CLI test got fixed932ad33cli-test: fs.unlink β fs.unlinkSync to fix test failure on Node 10 (#701)78eb820Run tests on Node.js 8 as wellfe06a16Cut official support for Node.js 0.8 by not running tests on it anymore (#700)639c94fUpdated Beard Competition URL in README.md (#699)
See the full diff