From eba6110d7905eb943068813da250222a771daf41 Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Tue, 25 Sep 2018 13:12:54 -0700 Subject: [PATCH] chore(all): prepare release 1.9.0 --- bower.json | 2 +- dist/amd/aurelia-templating.js | 4 ++-- dist/aurelia-templating.js | 10 ++++++---- dist/commonjs/aurelia-templating.js | 4 ++-- dist/es2015/aurelia-templating.js | 4 ++-- dist/native-modules/aurelia-templating.js | 4 ++-- dist/system/aurelia-templating.js | 4 ++-- doc/CHANGELOG.md | 11 +++++++++++ package.json | 2 +- 9 files changed, 29 insertions(+), 16 deletions(-) diff --git a/bower.json b/bower.json index 9b5cfb34..07e28505 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating", - "version": "1.8.3", + "version": "1.9.0", "description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-templating.js b/dist/amd/aurelia-templating.js index ce7db458..2aede876 100644 --- a/dist/amd/aurelia-templating.js +++ b/dist/amd/aurelia-templating.js @@ -707,7 +707,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli function StaticViewStrategy(config) { - if (typeof config === 'string' || config instanceof HTMLTemplateElement) { + if (typeof config === 'string' || config instanceof _aureliaPal.DOM.Element && config.tagName === 'TEMPLATE') { config = { template: config }; @@ -777,7 +777,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli return Promise.all(elDeps.map(function (el) { return el.load(container, el.target); })).then(function () { - var factory = viewCompiler.compile(_this2.template, viewResources, compileInstruction); + var factory = _this2.template !== null ? viewCompiler.compile(_this2.template, viewResources, compileInstruction) : null; _this2.factoryIsReady = true; _this2.factory = factory; return factory; diff --git a/dist/aurelia-templating.js b/dist/aurelia-templating.js index 6a773400..2b37771f 100644 --- a/dist/aurelia-templating.js +++ b/dist/aurelia-templating.js @@ -831,7 +831,7 @@ export class NoViewStrategy { * @param dependencies A list of view resource dependencies of this view. * @param dependencyBaseUrl The base url for the view dependencies. */ - constructor(dependencies?: Array, dependencyBaseUrl?: string) { + constructor(dependencies?: Array, dependencyBaseUrl?: string) { this.dependencies = dependencies || null; this.dependencyBaseUrl = dependencyBaseUrl || ''; } @@ -923,7 +923,7 @@ export class InlineViewStrategy { * @param dependencies A list of view resource dependencies of this view. * @param dependencyBaseUrl The base url for the view dependencies. */ - constructor(markup: string, dependencies?: Array, dependencyBaseUrl?: string) { + constructor(markup: string, dependencies?: Array, dependencyBaseUrl?: string) { this.markup = markup; this.dependencies = dependencies || null; this.dependencyBaseUrl = dependencyBaseUrl || ''; @@ -981,7 +981,7 @@ export class StaticViewStrategy { factory: ViewFactory; constructor(config: string | HTMLTemplateElement | IStaticViewConfig) { - if (typeof config === 'string' || config instanceof HTMLTemplateElement) { + if (typeof config === 'string' || (config instanceof DOM.Element && config.tagName === 'TEMPLATE')) { config = { template: config }; @@ -1045,7 +1045,9 @@ export class StaticViewStrategy { } // only load custom element as first step. return Promise.all(elDeps.map(el => el.load(container, el.target))).then(() => { - const factory = viewCompiler.compile(this.template, viewResources, compileInstruction); + const factory = this.template !== null + ? viewCompiler.compile(this.template, viewResources, compileInstruction) + : null; this.factoryIsReady = true; this.factory = factory; return factory; diff --git a/dist/commonjs/aurelia-templating.js b/dist/commonjs/aurelia-templating.js index 7d8723aa..63626875 100644 --- a/dist/commonjs/aurelia-templating.js +++ b/dist/commonjs/aurelia-templating.js @@ -688,7 +688,7 @@ var StaticViewStrategy = exports.StaticViewStrategy = (_dec6 = viewStrategy(), _ function StaticViewStrategy(config) { - if (typeof config === 'string' || config instanceof HTMLTemplateElement) { + if (typeof config === 'string' || config instanceof _aureliaPal.DOM.Element && config.tagName === 'TEMPLATE') { config = { template: config }; @@ -758,7 +758,7 @@ var StaticViewStrategy = exports.StaticViewStrategy = (_dec6 = viewStrategy(), _ return Promise.all(elDeps.map(function (el) { return el.load(container, el.target); })).then(function () { - var factory = viewCompiler.compile(_this2.template, viewResources, compileInstruction); + var factory = _this2.template !== null ? viewCompiler.compile(_this2.template, viewResources, compileInstruction) : null; _this2.factoryIsReady = true; _this2.factory = factory; return factory; diff --git a/dist/es2015/aurelia-templating.js b/dist/es2015/aurelia-templating.js index 6796dfe7..f6b99faa 100644 --- a/dist/es2015/aurelia-templating.js +++ b/dist/es2015/aurelia-templating.js @@ -569,7 +569,7 @@ export let InlineViewStrategy = (_dec5 = viewStrategy(), _dec5(_class6 = class I export let StaticViewStrategy = (_dec6 = viewStrategy(), _dec6(_class7 = class StaticViewStrategy { constructor(config) { - if (typeof config === 'string' || config instanceof HTMLTemplateElement) { + if (typeof config === 'string' || config instanceof DOM.Element && config.tagName === 'TEMPLATE') { config = { template: config }; @@ -622,7 +622,7 @@ export let StaticViewStrategy = (_dec6 = viewStrategy(), _dec6(_class7 = class S } return Promise.all(elDeps.map(el => el.load(container, el.target))).then(() => { - const factory = viewCompiler.compile(this.template, viewResources, compileInstruction); + const factory = this.template !== null ? viewCompiler.compile(this.template, viewResources, compileInstruction) : null; this.factoryIsReady = true; this.factory = factory; return factory; diff --git a/dist/native-modules/aurelia-templating.js b/dist/native-modules/aurelia-templating.js index e1b61976..c38e36fa 100644 --- a/dist/native-modules/aurelia-templating.js +++ b/dist/native-modules/aurelia-templating.js @@ -651,7 +651,7 @@ export var StaticViewStrategy = (_dec6 = viewStrategy(), _dec6(_class7 = functio function StaticViewStrategy(config) { - if (typeof config === 'string' || config instanceof HTMLTemplateElement) { + if (typeof config === 'string' || config instanceof DOM.Element && config.tagName === 'TEMPLATE') { config = { template: config }; @@ -721,7 +721,7 @@ export var StaticViewStrategy = (_dec6 = viewStrategy(), _dec6(_class7 = functio return Promise.all(elDeps.map(function (el) { return el.load(container, el.target); })).then(function () { - var factory = viewCompiler.compile(_this2.template, viewResources, compileInstruction); + var factory = _this2.template !== null ? viewCompiler.compile(_this2.template, viewResources, compileInstruction) : null; _this2.factoryIsReady = true; _this2.factory = factory; return factory; diff --git a/dist/system/aurelia-templating.js b/dist/system/aurelia-templating.js index 0d85ff68..39e01ef3 100644 --- a/dist/system/aurelia-templating.js +++ b/dist/system/aurelia-templating.js @@ -1435,7 +1435,7 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia- function StaticViewStrategy(config) { - if (typeof config === 'string' || config instanceof HTMLTemplateElement) { + if (typeof config === 'string' || config instanceof DOM.Element && config.tagName === 'TEMPLATE') { config = { template: config }; @@ -1505,7 +1505,7 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia- return Promise.all(elDeps.map(function (el) { return el.load(container, el.target); })).then(function () { - var factory = viewCompiler.compile(_this2.template, viewResources, compileInstruction); + var factory = _this2.template !== null ? viewCompiler.compile(_this2.template, viewResources, compileInstruction) : null; _this2.factoryIsReady = true; _this2.factory = factory; return factory; diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index af4d49e8..f2697f55 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,14 @@ + +# [1.9.0](https://github.com/aurelia/templating/compare/1.8.3...1.9.0) (2018-09-25) + + +### Bug Fixes + +* **StaticViewStrategy:** check for null template before compiling ([37d23ea](https://github.com/aurelia/templating/commit/37d23ea)) +* **StaticViewStrategy:** use DOM.Element instead of HTMLTemplateElement ([f9fb639](https://github.com/aurelia/templating/commit/f9fb639)) + + + ## [1.8.3](https://github.com/aurelia/templating/compare/1.8.2...1.8.3) (2018-09-07) diff --git a/package.json b/package.json index f557613f..9f83b2e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating", - "version": "1.8.3", + "version": "1.9.0", "description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.", "keywords": [ "aurelia",