Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ee913e28bd | |||
| 7a77f61c44 | |||
| 72753bcaa3 | |||
| f3d266a66e |
+1
-1
@@ -1,2 +1,2 @@
|
||||
instrumentation:
|
||||
excludes: ['**/spec/**', '**/handlebars/compiler/parser.js']
|
||||
excludes: ['**/spec/**']
|
||||
|
||||
@@ -11,7 +11,7 @@ function BenchWarmer() {
|
||||
this.errors = {};
|
||||
}
|
||||
|
||||
var print = require('util').print;
|
||||
var print = require('sys').print;
|
||||
|
||||
BenchWarmer.prototype = {
|
||||
winners: function(benches) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "handlebars",
|
||||
"version": "4.0.7",
|
||||
"version": "4.0.6",
|
||||
"main": "handlebars.js",
|
||||
"license": "MIT",
|
||||
"dependencies": {}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<package>
|
||||
<metadata>
|
||||
<id>handlebars.js</id>
|
||||
<version>4.0.7</version>
|
||||
<version>4.0.6</version>
|
||||
<authors>handlebars.js Authors</authors>
|
||||
<licenseUrl>https://github.com/wycats/handlebars.js/blob/master/LICENSE</licenseUrl>
|
||||
<projectUrl>https://github.com/wycats/handlebars.js/</projectUrl>
|
||||
|
||||
@@ -4,7 +4,7 @@ import {registerDefaultHelpers} from './helpers';
|
||||
import {registerDefaultDecorators} from './decorators';
|
||||
import logger from './logger';
|
||||
|
||||
export const VERSION = '4.0.7';
|
||||
export const VERSION = '4.0.6';
|
||||
export const COMPILER_REVISION = 7;
|
||||
|
||||
export const REVISION_CHANGES = {
|
||||
|
||||
@@ -987,7 +987,7 @@ JavaScriptCompiler.prototype = {
|
||||
let params = [],
|
||||
paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
|
||||
let foundHelper = this.nameLookup('helpers', name, 'helper'),
|
||||
callContext = this.aliasable(`${this.contextName(0)} != null ? ${this.contextName(0)} : (container.nullContext || {})`);
|
||||
callContext = this.aliasable(`${this.contextName(0)} != null ? ${this.contextName(0)} : {}`);
|
||||
|
||||
return {
|
||||
params: params,
|
||||
|
||||
@@ -124,8 +124,6 @@ export function template(templateSpec, env) {
|
||||
|
||||
return obj;
|
||||
},
|
||||
// An empty object to use as replacement for null-contexts
|
||||
nullContext: Object.seal({}),
|
||||
|
||||
noop: env.VM.noop,
|
||||
compilerInfo: templateSpec.compiler
|
||||
@@ -189,7 +187,7 @@ export function template(templateSpec, env) {
|
||||
export function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
||||
function prog(context, options = {}) {
|
||||
let currentDepths = depths;
|
||||
if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
|
||||
if (depths && context != depths[0]) {
|
||||
currentDepths = [context].concat(depths);
|
||||
}
|
||||
|
||||
|
||||
@@ -250,6 +250,9 @@ module.exports.cli = function(opts) {
|
||||
outSourceMap: opts.map,
|
||||
inSourceMap: JSON.parse(output.map)
|
||||
});
|
||||
if (opts.map) {
|
||||
output.code += '\n//# sourceMappingURL=' + opts.map + '\n';
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.map) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "handlebars",
|
||||
"barename": "handlebars",
|
||||
"version": "4.0.7",
|
||||
"version": "4.0.6",
|
||||
"description": "Handlebars provides the power necessary to let you build semantic templates effectively with no frustration",
|
||||
"homepage": "http://www.handlebarsjs.com/",
|
||||
"keywords": [
|
||||
|
||||
+1
-13
@@ -2,19 +2,7 @@
|
||||
|
||||
## Development
|
||||
|
||||
[Commits](https://github.com/nknapp/handlebars.js/compare/v4.0.7...master)
|
||||
|
||||
## v4.0.7 - April 29th, 2017
|
||||
- [#1319](https://github.com/wycats/handlebars.js/issues/1319): Fix context-stack when calling block-helpers on null values ([@nknapp](https://github.com/nknapp)) - c8f4b57
|
||||
- [#1315](https://github.com/wycats/handlebars.js/pull/1315) Parser: Change suffix to use ES6 default module export ([@Turbo87](https://github.com/Turbo87))- b617375
|
||||
- [#1290](https://github.com/wycats/handlebars.js/pull/1290) [#1252](https://github.com/wycats/handlebars.js/issue/1290) Add more tests for partial-blocks and inline partials ([@nknapp](https://github.com/nknapp)) - 63a8e0c
|
||||
- [#1252](https://github.com/wycats/handlebars.js/issue/1290) Using @partial-block twice in a template not possible ([@nknapp](https://github.com/nknapp)) - 5a164d0
|
||||
- [#1310](https://github.com/wycats/handlebars.js/pull/1310) Avoid duplicate "sourceMappingURL=" lines. ([@joonas-lahtinen](https://github.com/joonas-lahtinen)) - 01b0f65
|
||||
- [#1275](https://github.com/wycats/handlebars.js/pull/1275) require('sys') is deprecated, using 'util' instead ([@travnels](https://github.com/travnels)) - 406f2ee
|
||||
- [#1285](https://github.com/wycats/handlebars.js/pull/1285) [#1284](https://github.com/wycats/handlebars.js/issues/1284) Make "column"-property of Errors enumerable ([@nknapp](https://github.com/nknapp)) - a023cb4
|
||||
- [#1285](https://github.com/wycats/handlebars.js/pull/1285) Testcase to verify that compile-errors have a column-property ([@nknapp](https://github.com/nknapp)) - c7dc353
|
||||
|
||||
[Commits](https://github.com/lawnsea/handlebars.js/compare/v4.0.6...v4.0.7)
|
||||
[Commits](https://github.com/lawnsea/handlebars.js/compare/v4.0.6...master)
|
||||
|
||||
## v4.0.6 - November 12th, 2016
|
||||
- [#1243](https://github.com/wycats/handlebars.js/pull/1243) - Walk up data frames for nested @partial-block ([@lawnsea](https://github.com/lawnsea))
|
||||
|
||||
+2
-2
@@ -152,14 +152,14 @@ describe('precompiler', function() {
|
||||
Precompiler.cli({templates: [emptyTemplate], map: 'foo.js.map'});
|
||||
|
||||
equal(file, 'foo.js.map');
|
||||
equal(log.match(/sourceMappingURL=/g).length, 1);
|
||||
equal(/sourceMappingURL=/.test(log), true);
|
||||
});
|
||||
|
||||
it('should output map', function() {
|
||||
Precompiler.cli({templates: [emptyTemplate], min: true, map: 'foo.js.map'});
|
||||
|
||||
equal(file, 'foo.js.map');
|
||||
equal(log.match(/sourceMappingURL=/g).length, 1);
|
||||
equal(/sourceMappingURL=/.test(log), true);
|
||||
});
|
||||
|
||||
describe('#loadTemplates', function() {
|
||||
|
||||
@@ -277,9 +277,4 @@ describe('Regressions', function() {
|
||||
|
||||
shouldCompileTo(string, { listOne: ['a'], listTwo: ['b']}, 'ab', '');
|
||||
});
|
||||
|
||||
it('GH-1319: "unless" breaks when "each" value equals "null"', function() {
|
||||
var string = '{{#each list}}{{#unless ./prop}}parent={{../value}} {{/unless}}{{/each}}';
|
||||
shouldCompileTo(string, { value: 'parent', list: [ null, 'a'] }, 'parent=parent parent=parent ', '');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1 +1 @@
|
||||
// File ignored in coverage tests via setting in .istanbul.yml
|
||||
/* istanbul ignore next */
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export default handlebars;
|
||||
exports.__esModule = true;
|
||||
exports['default'] = handlebars;
|
||||
|
||||
Reference in New Issue
Block a user