handlebars-source 4.2.2 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handlebars-source might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/handlebars.js +652 -410
- data/handlebars.runtime.js +33 -19
- metadata +2 -2
data/handlebars.runtime.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**!
|
2
2
|
|
3
3
|
@license
|
4
|
-
handlebars v4.
|
4
|
+
handlebars v4.3.0
|
5
5
|
|
6
6
|
Copyright (C) 2011-2017 by Yehuda Katz
|
7
7
|
|
@@ -207,9 +207,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
207
207
|
|
208
208
|
var _logger2 = _interopRequireDefault(_logger);
|
209
209
|
|
210
|
-
var VERSION = '4.
|
210
|
+
var VERSION = '4.3.0';
|
211
211
|
exports.VERSION = VERSION;
|
212
|
-
var COMPILER_REVISION =
|
212
|
+
var COMPILER_REVISION = 8;
|
213
213
|
|
214
214
|
exports.COMPILER_REVISION = COMPILER_REVISION;
|
215
215
|
var REVISION_CHANGES = {
|
@@ -219,7 +219,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
219
219
|
4: '== 1.x.x',
|
220
220
|
5: '== 2.0.0-alpha.x',
|
221
221
|
6: '>= 2.0.0-beta.1',
|
222
|
-
7: '>= 4.0.0'
|
222
|
+
7: '>= 4.0.0 <4.3.0',
|
223
|
+
8: '>= 4.3.0'
|
223
224
|
};
|
224
225
|
|
225
226
|
exports.REVISION_CHANGES = REVISION_CHANGES;
|
@@ -303,6 +304,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
303
304
|
exports.createFrame = createFrame;
|
304
305
|
exports.blockParams = blockParams;
|
305
306
|
exports.appendContextPath = appendContextPath;
|
307
|
+
|
306
308
|
var escape = {
|
307
309
|
'&': '&',
|
308
310
|
'<': '<',
|
@@ -520,6 +522,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
520
522
|
|
521
523
|
exports.__esModule = true;
|
522
524
|
exports.registerDefaultHelpers = registerDefaultHelpers;
|
525
|
+
exports.moveHelperToHooks = moveHelperToHooks;
|
523
526
|
|
524
527
|
var _helpersBlockHelperMissing = __webpack_require__(10);
|
525
528
|
|
@@ -559,6 +562,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
559
562
|
_helpersWith2['default'](instance);
|
560
563
|
}
|
561
564
|
|
565
|
+
function moveHelperToHooks(instance, helperName, keepHelper) {
|
566
|
+
if (instance.helpers[helperName]) {
|
567
|
+
instance.hooks[helperName] = instance.helpers[helperName];
|
568
|
+
if (!keepHelper) {
|
569
|
+
delete instance.helpers[helperName];
|
570
|
+
}
|
571
|
+
}
|
572
|
+
}
|
573
|
+
|
562
574
|
/***/ }),
|
563
575
|
/* 10 */
|
564
576
|
/***/ (function(module, exports, __webpack_require__) {
|
@@ -1001,6 +1013,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1001
1013
|
|
1002
1014
|
var _base = __webpack_require__(3);
|
1003
1015
|
|
1016
|
+
var _helpers = __webpack_require__(9);
|
1017
|
+
|
1004
1018
|
function checkRevision(compilerInfo) {
|
1005
1019
|
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
1006
1020
|
currentRevision = _base.COMPILER_REVISION;
|
@@ -1018,6 +1032,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1018
1032
|
}
|
1019
1033
|
|
1020
1034
|
function template(templateSpec, env) {
|
1035
|
+
|
1021
1036
|
/* istanbul ignore next */
|
1022
1037
|
if (!env) {
|
1023
1038
|
throw new _exception2['default']('No environment passed to template');
|
@@ -1039,13 +1054,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1039
1054
|
options.ids[0] = true;
|
1040
1055
|
}
|
1041
1056
|
}
|
1042
|
-
|
1043
1057
|
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
1044
|
-
|
1058
|
+
|
1059
|
+
var optionsWithHooks = Utils.extend({}, options, { hooks: this.hooks });
|
1060
|
+
|
1061
|
+
var result = env.VM.invokePartial.call(this, partial, context, optionsWithHooks);
|
1045
1062
|
|
1046
1063
|
if (result == null && env.compile) {
|
1047
1064
|
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
1048
|
-
result = options.partials[options.name](context,
|
1065
|
+
result = options.partials[options.name](context, optionsWithHooks);
|
1049
1066
|
}
|
1050
1067
|
if (result != null) {
|
1051
1068
|
if (options.indent) {
|
@@ -1112,15 +1129,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1112
1129
|
}
|
1113
1130
|
return value;
|
1114
1131
|
},
|
1115
|
-
merge: function merge(param, common) {
|
1116
|
-
var obj = param || common;
|
1117
|
-
|
1118
|
-
if (param && common && param !== common) {
|
1119
|
-
obj = Utils.extend({}, common, param);
|
1120
|
-
}
|
1121
|
-
|
1122
|
-
return obj;
|
1123
|
-
},
|
1124
1132
|
// An empty object to use as replacement for null-contexts
|
1125
1133
|
nullContext: _Object$seal({}),
|
1126
1134
|
|
@@ -1157,18 +1165,24 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1157
1165
|
|
1158
1166
|
ret._setup = function (options) {
|
1159
1167
|
if (!options.partial) {
|
1160
|
-
container.helpers =
|
1168
|
+
container.helpers = Utils.extend({}, env.helpers, options.helpers);
|
1161
1169
|
|
1162
1170
|
if (templateSpec.usePartial) {
|
1163
|
-
container.partials =
|
1171
|
+
container.partials = Utils.extend({}, env.partials, options.partials);
|
1164
1172
|
}
|
1165
1173
|
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
1166
|
-
container.decorators =
|
1174
|
+
container.decorators = Utils.extend({}, env.decorators, options.decorators);
|
1167
1175
|
}
|
1176
|
+
|
1177
|
+
container.hooks = {};
|
1178
|
+
var keepHelper = options.allowCallsToHelperMissing;
|
1179
|
+
_helpers.moveHelperToHooks(container, 'helperMissing', keepHelper);
|
1180
|
+
_helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelper);
|
1168
1181
|
} else {
|
1169
1182
|
container.helpers = options.helpers;
|
1170
1183
|
container.partials = options.partials;
|
1171
1184
|
container.decorators = options.decorators;
|
1185
|
+
container.hooks = options.hooks;
|
1172
1186
|
}
|
1173
1187
|
};
|
1174
1188
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handlebars-source
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yehuda Katz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Handlebars.js source code wrapper for (pre)compilation gems.
|
14
14
|
email:
|