handlebars-source 4.0.2 → 4.0.3

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 +15 -14
  3. data/handlebars.runtime.js +10 -10
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f31bda0957c82763b63ec942695369e5daca26c2
4
- data.tar.gz: 54b990aaf846ad2f6d8ae2fad7ee7e17227c3cc7
3
+ metadata.gz: 59c065316f24503c3cf9d93829c99312873b4b73
4
+ data.tar.gz: 0a9fb30043c8b8a5f4163273dc62607cd93e9dd1
5
5
  SHA512:
6
- metadata.gz: e076691f4987f728651c705cbeccd97fdd20746f6eabc234f8f90c0a18fda389ca2c9229dc5c051bf2ff16330aaff8c45da3abcc47299a42b454478c1397a67b
7
- data.tar.gz: db4cf2d0683d7690a0adbaed070ce9649e4cdb36401b6f5709909a7c111d6a1617618f52365557fb6d3588e3f1608646d05d84146f92826ffd7d5f9d4e6aca9d
6
+ metadata.gz: 63a636685d0bf6a90020f46e0bea99bfdce9119a436e57cf4909b85222f7eeca3584ead4032255a0f53c6dd03f35f89c3b00259f55ab1d42547a11ce5849921a
7
+ data.tar.gz: a5a802dcc8ade52bc1f17f9dcfbd6519482d62787e32b6d86c48251c492ecddf3629d16036e9b6af90c2e31be2b21c2608f4b27c11a1d07b497573b5e1b0b880
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
 
3
- handlebars v4.0.2
3
+ handlebars v4.0.3
4
4
 
5
5
  Copyright (C) 2011-2015 by Yehuda Katz
6
6
 
@@ -1867,13 +1867,14 @@ return /******/ (function(modules) { // webpackBootstrap
1867
1867
  setupHelper: function setupHelper(paramSize, name, blockHelper) {
1868
1868
  var params = [],
1869
1869
  paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
1870
- var foundHelper = this.nameLookup('helpers', name, 'helper');
1870
+ var foundHelper = this.nameLookup('helpers', name, 'helper'),
1871
+ callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : {}');
1871
1872
 
1872
1873
  return {
1873
1874
  params: params,
1874
1875
  paramsInit: paramsInit,
1875
1876
  name: foundHelper,
1876
- callParams: [this.contextName(0)].concat(params)
1877
+ callParams: [callContext].concat(params)
1877
1878
  };
1878
1879
  },
1879
1880
 
@@ -2230,7 +2231,7 @@ return /******/ (function(modules) { // webpackBootstrap
2230
2231
 
2231
2232
  var _logger2 = _interopRequireDefault(_logger);
2232
2233
 
2233
- var VERSION = '4.0.2';
2234
+ var VERSION = '4.0.3';
2234
2235
  exports.VERSION = VERSION;
2235
2236
  var COMPILER_REVISION = 7;
2236
2237
 
@@ -2756,6 +2757,7 @@ return /******/ (function(modules) { // webpackBootstrap
2756
2757
 
2757
2758
  var partialBlock = undefined;
2758
2759
  if (options.fn && options.fn !== noop) {
2760
+ options.data = _base.createFrame(options.data);
2759
2761
  partialBlock = options.data['partial-block'] = options.fn;
2760
2762
 
2761
2763
  if (partialBlock.partials) {
@@ -3515,7 +3517,7 @@ return /******/ (function(modules) { // webpackBootstrap
3515
3517
  return 72;
3516
3518
  break;
3517
3519
  case 42:
3518
- return 72;
3520
+ yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
3519
3521
  break;
3520
3522
  case 43:
3521
3523
  return 'INVALID';
@@ -3525,7 +3527,7 @@ return /******/ (function(modules) { // webpackBootstrap
3525
3527
  break;
3526
3528
  }
3527
3529
  };
3528
- lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[[^\]]*\])/, /^(?:.)/, /^(?:$)/];
3530
+ lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
3529
3531
  lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
3530
3532
  return lexer;
3531
3533
  })();
@@ -4239,6 +4241,9 @@ return /******/ (function(modules) { // webpackBootstrap
4239
4241
  'use strict';
4240
4242
 
4241
4243
  exports.__esModule = true;
4244
+
4245
+ var _utils = __webpack_require__(13);
4246
+
4242
4247
  var logger = {
4243
4248
  methodMap: ['debug', 'info', 'warn', 'error'],
4244
4249
  level: 'info',
@@ -4246,7 +4251,7 @@ return /******/ (function(modules) { // webpackBootstrap
4246
4251
  // Maps a given level value to the `methodMap` indexes above.
4247
4252
  lookupLevel: function lookupLevel(level) {
4248
4253
  if (typeof level === 'string') {
4249
- var levelMap = logger.methodMap.indexOf(level.toLowerCase());
4254
+ var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
4250
4255
  if (levelMap >= 0) {
4251
4256
  level = levelMap;
4252
4257
  } else {
@@ -4365,12 +4370,6 @@ return /******/ (function(modules) { // webpackBootstrap
4365
4370
  }
4366
4371
 
4367
4372
  function execIteration(field, index, last) {
4368
- // Don't iterate over undefined values since we can't execute blocks against them
4369
- // in non-strict (js) mode.
4370
- if (context[field] == null) {
4371
- return;
4372
- }
4373
-
4374
4373
  if (data) {
4375
4374
  data.key = field;
4376
4375
  data.index = index;
@@ -4391,7 +4390,9 @@ return /******/ (function(modules) { // webpackBootstrap
4391
4390
  if (context && typeof context === 'object') {
4392
4391
  if (_utils.isArray(context)) {
4393
4392
  for (var j = context.length; i < j; i++) {
4394
- execIteration(i, i, i === context.length - 1);
4393
+ if (i in context) {
4394
+ execIteration(i, i, i === context.length - 1);
4395
+ }
4395
4396
  }
4396
4397
  } else {
4397
4398
  var priorKey = undefined;
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
 
3
- handlebars v4.0.2
3
+ handlebars v4.0.3
4
4
 
5
5
  Copyright (C) 2011-2015 by Yehuda Katz
6
6
 
@@ -169,7 +169,7 @@ return /******/ (function(modules) { // webpackBootstrap
169
169
 
170
170
  var _logger2 = _interopRequireDefault(_logger);
171
171
 
172
- var VERSION = '4.0.2';
172
+ var VERSION = '4.0.3';
173
173
  exports.VERSION = VERSION;
174
174
  var COMPILER_REVISION = 7;
175
175
 
@@ -695,6 +695,7 @@ return /******/ (function(modules) { // webpackBootstrap
695
695
 
696
696
  var partialBlock = undefined;
697
697
  if (options.fn && options.fn !== noop) {
698
+ options.data = _base.createFrame(options.data);
698
699
  partialBlock = options.data['partial-block'] = options.fn;
699
700
 
700
701
  if (partialBlock.partials) {
@@ -872,6 +873,9 @@ return /******/ (function(modules) { // webpackBootstrap
872
873
  'use strict';
873
874
 
874
875
  exports.__esModule = true;
876
+
877
+ var _utils = __webpack_require__(4);
878
+
875
879
  var logger = {
876
880
  methodMap: ['debug', 'info', 'warn', 'error'],
877
881
  level: 'info',
@@ -879,7 +883,7 @@ return /******/ (function(modules) { // webpackBootstrap
879
883
  // Maps a given level value to the `methodMap` indexes above.
880
884
  lookupLevel: function lookupLevel(level) {
881
885
  if (typeof level === 'string') {
882
- var levelMap = logger.methodMap.indexOf(level.toLowerCase());
886
+ var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
883
887
  if (levelMap >= 0) {
884
888
  level = levelMap;
885
889
  } else {
@@ -998,12 +1002,6 @@ return /******/ (function(modules) { // webpackBootstrap
998
1002
  }
999
1003
 
1000
1004
  function execIteration(field, index, last) {
1001
- // Don't iterate over undefined values since we can't execute blocks against them
1002
- // in non-strict (js) mode.
1003
- if (context[field] == null) {
1004
- return;
1005
- }
1006
-
1007
1005
  if (data) {
1008
1006
  data.key = field;
1009
1007
  data.index = index;
@@ -1024,7 +1022,9 @@ return /******/ (function(modules) { // webpackBootstrap
1024
1022
  if (context && typeof context === 'object') {
1025
1023
  if (_utils.isArray(context)) {
1026
1024
  for (var j = context.length; i < j; i++) {
1027
- execIteration(i, i, i === context.length - 1);
1025
+ if (i in context) {
1026
+ execIteration(i, i, i === context.length - 1);
1027
+ }
1028
1028
  }
1029
1029
  } else {
1030
1030
  var priorKey = undefined;
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.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-04 00:00:00.000000000 Z
11
+ date: 2015-09-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Handlebars.js source code wrapper for (pre)compilation gems.
14
14
  email: