From 20cc905deb922444d26c1064442fc254f391dff8 Mon Sep 17 00:00:00 2001 From: harttle Date: Mon, 26 Aug 2019 23:14:42 +0800 Subject: [PATCH] add: migrate to 9.0 --- Migrate-to-9.md | 19 +++++++++++++++++++ Register-Filters-Tags.md | 2 +- _Sidebar.md | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 Migrate-to-9.md diff --git a/Migrate-to-9.md b/Migrate-to-9.md new file mode 100644 index 0000000..041e8f0 --- /dev/null +++ b/Migrate-to-9.md @@ -0,0 +1,19 @@ +LiquidJS 9.0.0 has some fundamental improvements, including bugfixes, new features and performance improvement due to higher target(see #137). There're also some breaking changes. + +Features: + +* Sync rendering: renderSync, parseAndRenderSync, renderFileSync +* New utils: Expression + +Fixes: + +* Rewrite boolean expression evaluation order, #130 +* `break` and `continue` tags omitting output before them, #123 +* Fixes errors in reactjs demo during yarn install, #145 +* promise typed Drops are not await-ed some times + +REAKING CHANGE: + +* Liquid is no longer a default export, use `import {Liquid} from 'liquidjs'` instead, `Liquid` in the UMD bundle is also changed to `window.liquidjs.Liquid` +* The duplicate `Liquid.evalValue` is removed, use `liquid.evalValue` instead +* Shipped to Node.js 8, the dist/liquid.cjs.js (main) nolonger supports Node.js 6, other bundles are also provided via dist/liquid.esm.js, dist/liquid.js (ES5 umd) and liquid.min.js (minified ES5 umd) \ No newline at end of file diff --git a/Register-Filters-Tags.md b/Register-Filters-Tags.md index 57e42a4..e0999e8 100644 --- a/Register-Filters-Tags.md +++ b/Register-Filters-Tags.md @@ -23,7 +23,7 @@ engine.registerTag('upper', { this.str = tagToken.args; // name }, render: async function(scope, hash) { - var str = await Liquid.evalValue(this.str, scope); // 'alice' + var str = await this.liquid.evalValue(this.str, scope); // 'alice' return str.toUpperCase() // 'Alice' } }); diff --git a/_Sidebar.md b/_Sidebar.md index 092fe18..646d867 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -7,6 +7,7 @@ * [Whitespace Control](/harttle/liquidjs/wiki/Whitespace-Control) * [Register Filters/Tags](/harttle/liquidjs/wiki/Register-Filters-Tags) * [Write a Plugin](/harttle/liquidjs/wiki/Write-a-Plugin) + * [Migrate to 9.0.0](/harttle/liquidjs/wiki/Migrate-to-9) * API * [Options](https://harttle.github.io/liquidjs/interfaces/_liquid_options_.liquidoptions.html) * [Builtin Filters](/harttle/liquidjs/wiki/Builtin-Filters)