handlebars-source 4.3.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of handlebars-source might be problematic. Click here for more details.

Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/handlebars.js +23 -15
  3. data/handlebars.runtime.js +23 -15
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abd35253deb2222b2dbf9053814e618969a2e9a4f676d7d67bca639a23e2de11
4
- data.tar.gz: b478bc2bcc21c05f6a475d7d500bcb362fbf4d31d889d4c0cae4b25ceda7dabe
3
+ metadata.gz: be3ad6089d8775ec61d10ff68de9864216ee40b236b56a2fe0aed77a4e6741cf
4
+ data.tar.gz: 49e914e74b45e26f1d7cf454bab15a8e49eca77f11bcfe0f93c614c22dd1e27a
5
5
  SHA512:
6
- metadata.gz: 0efc9dc868477d08e8c5f18b0beb5727bc2d3b813b0eec7ba87e78574860749496459fed96afca9881b0e725988ecfb21884b012b5c1a05f69c0b8fb43ccc72c
7
- data.tar.gz: d9e4692274edb3f37e77fd3ff705d78c2292de60196a0eab7efd6a5829d4c06c998645914ecb27cdce640755b81fd373b71338c7a17ae11a18c4c054c9606524
6
+ metadata.gz: 2909531ab5415970a20be3864489083096ed93d8e5f102beb3f5426caafbb34a0c6a2b659f562fea05cd81a067404e51987f571bdd01e73e7d9e86c4a2a4c29f
7
+ data.tar.gz: 6a740332f6fd2431a2088750ac992182397b66e1ad1b79f707ef12b89dcce4b65d0fd06b507cabc0ab19f56740c426133aa44b6e9cc277e014347b3dab0136cf
@@ -1,7 +1,7 @@
1
1
  /**!
2
2
 
3
3
  @license
4
- handlebars v4.3.0
4
+ handlebars v4.3.1
5
5
 
6
6
  Copyright (C) 2011-2017 by Yehuda Katz
7
7
 
@@ -275,11 +275,13 @@ return /******/ (function(modules) { // webpackBootstrap
275
275
 
276
276
  var _logger2 = _interopRequireDefault(_logger);
277
277
 
278
- var VERSION = '4.3.0';
278
+ var VERSION = '4.3.1';
279
279
  exports.VERSION = VERSION;
280
280
  var COMPILER_REVISION = 8;
281
-
282
281
  exports.COMPILER_REVISION = COMPILER_REVISION;
282
+ var LAST_COMPATIBLE_COMPILER_REVISION = 7;
283
+
284
+ exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
283
285
  var REVISION_CHANGES = {
284
286
  1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
285
287
  2: '== 1.0.0-rc.3',
@@ -1087,15 +1089,17 @@ return /******/ (function(modules) { // webpackBootstrap
1087
1089
  var compilerRevision = compilerInfo && compilerInfo[0] || 1,
1088
1090
  currentRevision = _base.COMPILER_REVISION;
1089
1091
 
1090
- if (compilerRevision !== currentRevision) {
1091
- if (compilerRevision < currentRevision) {
1092
- var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
1093
- compilerVersions = _base.REVISION_CHANGES[compilerRevision];
1094
- throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
1095
- } else {
1096
- // Use the embedded version info since the runtime doesn't know about this revision yet
1097
- throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
1098
- }
1092
+ if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
1093
+ return;
1094
+ }
1095
+
1096
+ if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
1097
+ var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
1098
+ compilerVersions = _base.REVISION_CHANGES[compilerRevision];
1099
+ throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
1100
+ } else {
1101
+ // Use the embedded version info since the runtime doesn't know about this revision yet
1102
+ throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
1099
1103
  }
1100
1104
  }
1101
1105
 
@@ -1115,6 +1119,9 @@ return /******/ (function(modules) { // webpackBootstrap
1115
1119
  // for external users to override these as pseudo-supported APIs.
1116
1120
  env.VM.checkRevision(templateSpec.compiler);
1117
1121
 
1122
+ // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)
1123
+ var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
1124
+
1118
1125
  function invokePartialWrapper(partial, context, options) {
1119
1126
  if (options.hash) {
1120
1127
  context = Utils.extend({}, context, options.hash);
@@ -1243,9 +1250,10 @@ return /******/ (function(modules) { // webpackBootstrap
1243
1250
  }
1244
1251
 
1245
1252
  container.hooks = {};
1246
- var keepHelper = options.allowCallsToHelperMissing;
1247
- _helpers.moveHelperToHooks(container, 'helperMissing', keepHelper);
1248
- _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelper);
1253
+
1254
+ var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
1255
+ _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
1256
+ _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
1249
1257
  } else {
1250
1258
  container.helpers = options.helpers;
1251
1259
  container.partials = options.partials;
@@ -1,7 +1,7 @@
1
1
  /**!
2
2
 
3
3
  @license
4
- handlebars v4.3.0
4
+ handlebars v4.3.1
5
5
 
6
6
  Copyright (C) 2011-2017 by Yehuda Katz
7
7
 
@@ -207,11 +207,13 @@ return /******/ (function(modules) { // webpackBootstrap
207
207
 
208
208
  var _logger2 = _interopRequireDefault(_logger);
209
209
 
210
- var VERSION = '4.3.0';
210
+ var VERSION = '4.3.1';
211
211
  exports.VERSION = VERSION;
212
212
  var COMPILER_REVISION = 8;
213
-
214
213
  exports.COMPILER_REVISION = COMPILER_REVISION;
214
+ var LAST_COMPATIBLE_COMPILER_REVISION = 7;
215
+
216
+ exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
215
217
  var REVISION_CHANGES = {
216
218
  1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
217
219
  2: '== 1.0.0-rc.3',
@@ -1019,15 +1021,17 @@ return /******/ (function(modules) { // webpackBootstrap
1019
1021
  var compilerRevision = compilerInfo && compilerInfo[0] || 1,
1020
1022
  currentRevision = _base.COMPILER_REVISION;
1021
1023
 
1022
- if (compilerRevision !== currentRevision) {
1023
- if (compilerRevision < currentRevision) {
1024
- var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
1025
- compilerVersions = _base.REVISION_CHANGES[compilerRevision];
1026
- throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
1027
- } else {
1028
- // Use the embedded version info since the runtime doesn't know about this revision yet
1029
- throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
1030
- }
1024
+ if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
1025
+ return;
1026
+ }
1027
+
1028
+ if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
1029
+ var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
1030
+ compilerVersions = _base.REVISION_CHANGES[compilerRevision];
1031
+ throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
1032
+ } else {
1033
+ // Use the embedded version info since the runtime doesn't know about this revision yet
1034
+ throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
1031
1035
  }
1032
1036
  }
1033
1037
 
@@ -1047,6 +1051,9 @@ return /******/ (function(modules) { // webpackBootstrap
1047
1051
  // for external users to override these as pseudo-supported APIs.
1048
1052
  env.VM.checkRevision(templateSpec.compiler);
1049
1053
 
1054
+ // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)
1055
+ var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
1056
+
1050
1057
  function invokePartialWrapper(partial, context, options) {
1051
1058
  if (options.hash) {
1052
1059
  context = Utils.extend({}, context, options.hash);
@@ -1175,9 +1182,10 @@ return /******/ (function(modules) { // webpackBootstrap
1175
1182
  }
1176
1183
 
1177
1184
  container.hooks = {};
1178
- var keepHelper = options.allowCallsToHelperMissing;
1179
- _helpers.moveHelperToHooks(container, 'helperMissing', keepHelper);
1180
- _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelper);
1185
+
1186
+ var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
1187
+ _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
1188
+ _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
1181
1189
  } else {
1182
1190
  container.helpers = options.helpers;
1183
1191
  container.partials = options.partials;
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.3.0
4
+ version: 4.3.1
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-09-24 00:00:00.000000000 Z
11
+ date: 2019-09-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Handlebars.js source code wrapper for (pre)compilation gems.
14
14
  email: