From f08d48764da42dc71875c9381af4bb056804b06a Mon Sep 17 00:00:00 2001 From: Mark Christian Date: Mon, 19 Oct 2015 09:21:32 -0700 Subject: [PATCH 1/5] Include partial name in 'undefined partial' exception message --- lib/handlebars/base.js | 2 +- spec/partials.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js index 67fcc206c..def1d3e09 100644 --- a/lib/handlebars/base.js +++ b/lib/handlebars/base.js @@ -51,7 +51,7 @@ HandlebarsEnvironment.prototype = { extend(this.partials, name); } else { if (typeof partial === 'undefined') { - throw new Exception('Attempting to register a partial as undefined'); + throw new Exception('Attempting to register a partial called `' + name + '` as undefined'); } this.partials[name] = partial; } diff --git a/spec/partials.js b/spec/partials.js index cc2c266e7..839157e92 100644 --- a/spec/partials.js +++ b/spec/partials.js @@ -103,7 +103,7 @@ describe('partials', function() { shouldThrow(function() { var undef; handlebarsEnv.registerPartial('undefined_test', undef); - }, Handlebars.Exception, 'Attempting to register a partial as undefined'); + }, Handlebars.Exception, 'Attempting to register a partial called `undefined_test` as undefined'); }); it('rendering template partial in vm mode throws an exception', function() { From 33b53ef9893938ac2d38b78f548d8bc13642215c Mon Sep 17 00:00:00 2001 From: Mark Christian Date: Mon, 19 Oct 2015 09:44:53 -0700 Subject: [PATCH 2/5] Use template string :sparkles: for error message and double-quotes for quoting partial name --- lib/handlebars/base.js | 2 +- spec/partials.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js index def1d3e09..cf3084ed9 100644 --- a/lib/handlebars/base.js +++ b/lib/handlebars/base.js @@ -51,7 +51,7 @@ HandlebarsEnvironment.prototype = { extend(this.partials, name); } else { if (typeof partial === 'undefined') { - throw new Exception('Attempting to register a partial called `' + name + '` as undefined'); + throw new Exception(`Attempting to register a partial called "${name}" as undefined`); } this.partials[name] = partial; } diff --git a/spec/partials.js b/spec/partials.js index 839157e92..d3ead7458 100644 --- a/spec/partials.js +++ b/spec/partials.js @@ -103,7 +103,7 @@ describe('partials', function() { shouldThrow(function() { var undef; handlebarsEnv.registerPartial('undefined_test', undef); - }, Handlebars.Exception, 'Attempting to register a partial called `undefined_test` as undefined'); + }, Handlebars.Exception, 'Attempting to register a partial called "undefined_test" as undefined'); }); it('rendering template partial in vm mode throws an exception', function() { From 496ed8a25f45d75cfbde6144e6ab05c82d3d57cb Mon Sep 17 00:00:00 2001 From: Nils Knappmeier Date: Wed, 28 Oct 2015 18:00:16 +0100 Subject: [PATCH 3/5] Add promised-handlebars to "in-the-wild"-list --- README.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/README.markdown b/README.markdown index 61c0bdcf9..22b8a51f4 100644 --- a/README.markdown +++ b/README.markdown @@ -149,6 +149,7 @@ Handlebars in the Wild * [YUI](http://yuilibrary.com/yui/docs/handlebars/) implements a port of handlebars * [Swag](https://github.com/elving/swag) by [@elving](https://github.com/elving) is a growing collection of helpers for handlebars.js. Give your handlebars.js templates some swag son! * [DOMBars](https://github.com/blakeembrey/dombars) is a DOM-based templating engine built on the Handlebars parser and runtime +* [promised-handlebars](https://github.com/nknapp/promised-handlebars) is a wrapper for Handlebars that allows helpers to return Promises. External Resources ------------------ From b1e561ee26e773fda898045f7507fb7ca623563a Mon Sep 17 00:00:00 2001 From: kpdecker Date: Thu, 29 Oct 2015 01:53:40 -0500 Subject: [PATCH 4/5] Update release notes --- release-notes.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/release-notes.md b/release-notes.md index 9736ad093..5ea873efe 100644 --- a/release-notes.md +++ b/release-notes.md @@ -2,7 +2,13 @@ ## Development -[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.3...master) +[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.4...master) + +## v4.0.4 - October 29th, 2015 +- [#1121](https://github.com/wycats/handlebars.js/pull/1121) - Include partial name in 'undefined partial' exception message ([@shinypb](https://api.github.com/users/shinypb)) +- [#1125](https://github.com/wycats/handlebars.js/pull/1125) - Add promised-handlebars to "in-the-wild"-list ([@nknapp](https://api.github.com/users/nknapp)) + +[Commits](https://github.com/wycats/handlebars.js/compare/v4.0.3...v4.0.4) ## v4.0.3 - September 23rd, 2015 - [#1099](https://github.com/wycats/handlebars.js/issues/1099) - @partial-block is overridden ([@btmorex](https://api.github.com/users/btmorex)) From b7c95e9feb9b641af2fe83b23c3341ec624aae80 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Thu, 29 Oct 2015 01:54:17 -0500 Subject: [PATCH 5/5] v4.0.4 --- components/bower.json | 2 +- components/handlebars.js.nuspec | 2 +- lib/handlebars/base.js | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/bower.json b/components/bower.json index 5751938d6..e4aaab97e 100644 --- a/components/bower.json +++ b/components/bower.json @@ -1,6 +1,6 @@ { "name": "handlebars", - "version": "4.0.3", + "version": "4.0.4", "main": "handlebars.js", "license": "MIT", "dependencies": {} diff --git a/components/handlebars.js.nuspec b/components/handlebars.js.nuspec index 56899417c..326827e16 100644 --- a/components/handlebars.js.nuspec +++ b/components/handlebars.js.nuspec @@ -2,7 +2,7 @@ handlebars.js - 4.0.3 + 4.0.4 handlebars.js Authors https://github.com/wycats/handlebars.js/blob/master/LICENSE https://github.com/wycats/handlebars.js/ diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js index cf3084ed9..84a89158f 100644 --- a/lib/handlebars/base.js +++ b/lib/handlebars/base.js @@ -4,7 +4,7 @@ import {registerDefaultHelpers} from './helpers'; import {registerDefaultDecorators} from './decorators'; import logger from './logger'; -export const VERSION = '4.0.3'; +export const VERSION = '4.0.4'; export const COMPILER_REVISION = 7; export const REVISION_CHANGES = { diff --git a/package.json b/package.json index 9d6c0b66a..605380365 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "handlebars", "barename": "handlebars", - "version": "4.0.3", + "version": "4.0.4", "description": "Handlebars provides the power necessary to let you build semantic templates effectively with no frustration", "homepage": "http://www.handlebarsjs.com/", "keywords": [