babel-source 5.3.0 → 5.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/babel.js +283 -251
  3. data/lib/babel/source.rb +2 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTdmNmM3M2JjZTRjMTE0Mjc1Y2Q0OTY4MmNhZjEyNzAzNGY0ZjcwNA==
4
+ MTMxNjJhYjQ5OGE1ODFhNjBhNDI2NGQyMmQzNjc5YTYyNzk3MWYxNQ==
5
5
  data.tar.gz: !binary |-
6
- YzIxN2RkNDU2MGNkZGY0MWE4YWRhYzVmNGU3NTlmMGM5ZTk1NmJiNg==
6
+ NjA5ZGRmZjQ4MjM4ZmRiNTYxNmZiZDdlZTI0MjcxMjZhZGY5NTkzMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTZkYmE1NWEzYzc4MzI0YTUwMmYzM2Q0ZmI4OWFkZDNiYWFiMDkyMWE2N2Rh
10
- MjU0NDk5YjEzZGFiZDc3YTcyMWIwMTZjNjgzYTJiMTcyYmI4Y2FiYTAxYTE3
11
- ZmI1NjY3MDAwMmZhOTVhYjE5ZjE3ODc5OThhMzI3NTg4MzlhYmU=
9
+ OTRlMjQ5MWU5ZWNkMjY5Zjk3MTViNjIwNzUxYzRiNjgzOWI0ZDQ5YjVkMTVk
10
+ NTY1MzVkNGNmNGMwMDI1ODU1NGQzZWE1YWMxN2E3MzE0MDQ3MjY2YzMzOTlm
11
+ ODJmMDQyZGQzNGU0MzYyNzMxMGMzYjg5YjRkYjIyYjgxMzY0YWQ=
12
12
  data.tar.gz: !binary |-
13
- MzI1ODVlOTAxZWM5OTNmMGM2YjE2NzU2OGUyZjc5N2IzMjU2ZWFlZjczZTc4
14
- YTcxOTVmMDI0YWZjNzQwZjdlNGIxODVlMzM3MTc3YjY0NGE2MGExMzY2MjEx
15
- MTkwODMzOGI4MWI1YzE5MDg3Mzg3MTdiYjE1YmJmZDc0MDg2NjM=
13
+ OTM3YmMzZmNiYjQ5YThmMDJjMmUyMjlmZmY3YzY4ZWEyNjQ0MGFlY2UzMjcy
14
+ N2Q3NzRkNmY3ZjYwYWFkNWM3NTJkMjkzMzQ2NzEwMWNlNjc0Y2MxMjljMjQ1
15
+ ZTI0OTZjODlkZWRmMTg3ZTM1ZjA5YzMyODA0N2I5YmY5MDk0MmE=
@@ -21,7 +21,7 @@ var acorn = _interopRequireWildcard(_srcIndex);
21
21
 
22
22
  _defaults(exports, _interopRequireWildcard(_srcIndex));
23
23
 
24
- _acornJsxInject2["default"](acorn);
24
+ (0, _acornJsxInject2["default"])(acorn);
25
25
  },{"./plugins/flow":2,"./src/index":5,"acorn-jsx/inject":172}],2:[function(require,module,exports){
26
26
  "use strict";
27
27
 
@@ -904,7 +904,7 @@ pp.checkPropClash = function (prop, propHash) {
904
904
  }
905
905
  var kind = prop.kind || "init",
906
906
  other = undefined;
907
- if (_util.has(propHash, name)) {
907
+ if ((0, _util.has)(propHash, name)) {
908
908
  other = propHash[name];
909
909
  var isGetSet = kind !== "init";
910
910
  if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property");
@@ -1864,7 +1864,7 @@ function tokenizer(input, options) {
1864
1864
  }
1865
1865
 
1866
1866
  function parser(options, input) {
1867
- return new _state.Parser(_options.getOptions(options), String(input));
1867
+ return new _state.Parser((0, _options.getOptions)(options), String(input));
1868
1868
  }
1869
1869
  },{"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){
1870
1870
  "use strict";
@@ -2145,7 +2145,7 @@ pp.checkLVal = function (expr, isBinding, checkClashes) {
2145
2145
  case "Identifier":
2146
2146
  if (this.strict && (_identifier.reservedWords.strictBind(expr.name) || _identifier.reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
2147
2147
  if (checkClashes) {
2148
- if (_util.has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode");
2148
+ if ((0, _util.has)(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode");
2149
2149
  checkClashes[expr.name] = true;
2150
2150
  }
2151
2151
  break;
@@ -2348,8 +2348,8 @@ var defaultOptions = {
2348
2348
  function getOptions(opts) {
2349
2349
  var options = {};
2350
2350
  for (var opt in defaultOptions) {
2351
- options[opt] = opts && _util.has(opts, opt) ? opts[opt] : defaultOptions[opt];
2352
- }if (_util.isArray(options.onToken)) {
2351
+ options[opt] = opts && (0, _util.has)(opts, opt) ? opts[opt] : defaultOptions[opt];
2352
+ }if ((0, _util.isArray)(options.onToken)) {
2353
2353
  (function () {
2354
2354
  var tokens = options.onToken;
2355
2355
  options.onToken = function (token) {
@@ -2357,7 +2357,7 @@ function getOptions(opts) {
2357
2357
  };
2358
2358
  })();
2359
2359
  }
2360
- if (_util.isArray(options.onComment)) options.onComment = pushComment(options, options.onComment);
2360
+ if ((0, _util.isArray)(options.onComment)) options.onComment = pushComment(options, options.onComment);
2361
2361
 
2362
2362
  return options;
2363
2363
  }
@@ -3514,7 +3514,7 @@ pp.nextToken = function () {
3514
3514
  pp.readToken = function (code) {
3515
3515
  // Identifier or keyword. '\uXXXX' sequences are allowed in
3516
3516
  // identifiers, so '\' also dispatches to that.
3517
- if (_identifier.isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord();
3517
+ if ((0, _identifier.isIdentifierStart)(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord();
3518
3518
 
3519
3519
  return this.getTokenFromCode(code);
3520
3520
  };
@@ -3927,7 +3927,7 @@ pp.readRadixNumber = function (radix) {
3927
3927
  this.pos += 2; // 0x
3928
3928
  var val = this.readInt(radix);
3929
3929
  if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix);
3930
- if (_identifier.isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
3930
+ if ((0, _identifier.isIdentifierStart)(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
3931
3931
  return this.finishToken(_tokentype.types.num, val);
3932
3932
  };
3933
3933
 
@@ -3951,7 +3951,7 @@ pp.readNumber = function (startsWithDot) {
3951
3951
  if (this.readInt(10) === null) this.raise(start, "Invalid number");
3952
3952
  isFloat = true;
3953
3953
  }
3954
- if (_identifier.isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
3954
+ if ((0, _identifier.isIdentifierStart)(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
3955
3955
 
3956
3956
  var str = this.input.slice(start, this.pos),
3957
3957
  val = undefined;
@@ -3996,7 +3996,7 @@ pp.readString = function (quote) {
3996
3996
  out += this.readEscapedChar();
3997
3997
  chunkStart = this.pos;
3998
3998
  } else {
3999
- if (_whitespace.isNewLine(ch)) this.raise(this.start, "Unterminated string constant");
3999
+ if ((0, _whitespace.isNewLine)(ch)) this.raise(this.start, "Unterminated string constant");
4000
4000
  ++this.pos;
4001
4001
  }
4002
4002
  }
@@ -4031,7 +4031,7 @@ pp.readTmplToken = function () {
4031
4031
  out += this.input.slice(chunkStart, this.pos);
4032
4032
  out += this.readEscapedChar();
4033
4033
  chunkStart = this.pos;
4034
- } else if (_whitespace.isNewLine(ch)) {
4034
+ } else if ((0, _whitespace.isNewLine)(ch)) {
4035
4035
  out += this.input.slice(chunkStart, this.pos);
4036
4036
  ++this.pos;
4037
4037
  if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
@@ -4126,7 +4126,7 @@ pp.readWord1 = function () {
4126
4126
  var astral = this.options.ecmaVersion >= 6;
4127
4127
  while (this.pos < this.input.length) {
4128
4128
  var ch = this.fullCharCodeAtPos();
4129
- if (_identifier.isIdentifierChar(ch, astral)) {
4129
+ if ((0, _identifier.isIdentifierChar)(ch, astral)) {
4130
4130
  this.pos += ch <= 65535 ? 1 : 2;
4131
4131
  } else if (ch === 92) {
4132
4132
  // "\"
@@ -4529,7 +4529,7 @@ function polyfill() {
4529
4529
  }
4530
4530
 
4531
4531
  function transformFile(filename, opts, callback) {
4532
- if (_lodashLangIsFunction2["default"](opts)) {
4532
+ if ((0, _lodashLangIsFunction2["default"])(opts)) {
4533
4533
  callback = opts;
4534
4534
  opts = {};
4535
4535
  }
@@ -4542,7 +4542,7 @@ function transformFile(filename, opts, callback) {
4542
4542
  var result;
4543
4543
 
4544
4544
  try {
4545
- result = _transformation2["default"](code, opts);
4545
+ result = (0, _transformation2["default"])(code, opts);
4546
4546
  } catch (err) {
4547
4547
  return callback(err);
4548
4548
  }
@@ -4555,7 +4555,7 @@ function transformFileSync(filename) {
4555
4555
  var opts = arguments[1] === undefined ? {} : arguments[1];
4556
4556
 
4557
4557
  opts.filename = filename;
4558
- return _transformation2["default"](_fs2["default"].readFileSync(filename, "utf8"), opts);
4558
+ return (0, _transformation2["default"])(_fs2["default"].readFileSync(filename, "utf8"), opts);
4559
4559
  }
4560
4560
 
4561
4561
  function parse(code) {
@@ -4643,14 +4643,14 @@ var Buffer = (function () {
4643
4643
  }
4644
4644
 
4645
4645
  Buffer.prototype.get = function get() {
4646
- return _trimRight2["default"](this.buf);
4646
+ return (0, _trimRight2["default"])(this.buf);
4647
4647
  };
4648
4648
 
4649
4649
  Buffer.prototype.getIndent = function getIndent() {
4650
4650
  if (this.format.compact || this.format.concise) {
4651
4651
  return "";
4652
4652
  } else {
4653
- return _repeating2["default"](this.format.indent.style, this._indent);
4653
+ return (0, _repeating2["default"])(this.format.indent.style, this._indent);
4654
4654
  }
4655
4655
  };
4656
4656
 
@@ -4709,7 +4709,7 @@ var Buffer = (function () {
4709
4709
 
4710
4710
  removeLast = removeLast || false;
4711
4711
 
4712
- if (_lodashLangIsNumber2["default"](i)) {
4712
+ if ((0, _lodashLangIsNumber2["default"])(i)) {
4713
4713
  i = Math.min(2, i);
4714
4714
 
4715
4715
  if (this.endsWith("{\n") || this.endsWith(":\n")) i--;
@@ -4722,7 +4722,7 @@ var Buffer = (function () {
4722
4722
  return;
4723
4723
  }
4724
4724
 
4725
- if (_lodashLangIsBoolean2["default"](i)) {
4725
+ if ((0, _lodashLangIsBoolean2["default"])(i)) {
4726
4726
  removeLast = i;
4727
4727
  }
4728
4728
 
@@ -4794,7 +4794,7 @@ var Buffer = (function () {
4794
4794
  var last = buf[buf.length - 1];
4795
4795
 
4796
4796
  if (Array.isArray(cha)) {
4797
- return _lodashCollectionIncludes2["default"](cha, last);
4797
+ return (0, _lodashCollectionIncludes2["default"])(cha, last);
4798
4798
  } else {
4799
4799
  return cha === last;
4800
4800
  }
@@ -5127,7 +5127,7 @@ function MemberExpression(node, print) {
5127
5127
  }
5128
5128
 
5129
5129
  var computed = node.computed;
5130
- if (t.isLiteral(node.property) && _lodashLangIsNumber2["default"](node.property.value)) {
5130
+ if (t.isLiteral(node.property) && (0, _lodashLangIsNumber2["default"])(node.property.value)) {
5131
5131
  computed = true;
5132
5132
  }
5133
5133
 
@@ -5137,7 +5137,7 @@ function MemberExpression(node, print) {
5137
5137
  this.push("]");
5138
5138
  } else {
5139
5139
  // 5..toFixed(2);
5140
- if (t.isLiteral(obj) && _isInteger2["default"](obj.value) && !SCIENTIFIC_NOTATION.test(obj.value.toString())) {
5140
+ if (t.isLiteral(obj) && (0, _isInteger2["default"])(obj.value) && !SCIENTIFIC_NOTATION.test(obj.value.toString())) {
5141
5141
  this.push(".");
5142
5142
  }
5143
5143
 
@@ -6012,7 +6012,7 @@ function VariableDeclaration(node, print, parent) {
6012
6012
 
6013
6013
  var sep = ",";
6014
6014
  if (!this.format.compact && !this.format.concise && hasInits && !this.format.retainLines) {
6015
- sep += "\n" + _repeating2["default"](" ", node.kind.length + 1);
6015
+ sep += "\n" + (0, _repeating2["default"])(" ", node.kind.length + 1);
6016
6016
  } else {
6017
6017
  sep += " ";
6018
6018
  }
@@ -6291,7 +6291,7 @@ var CodeGenerator = (function () {
6291
6291
  CodeGenerator.normalizeOptions = function normalizeOptions(code, opts, tokens) {
6292
6292
  var style = " ";
6293
6293
  if (code) {
6294
- var indent = _detectIndent2["default"](code).indent;
6294
+ var indent = (0, _detectIndent2["default"])(code).indent;
6295
6295
  if (indent && indent !== " ") style = indent;
6296
6296
  }
6297
6297
 
@@ -6644,7 +6644,7 @@ var CodeGenerator = (function () {
6644
6644
  }
6645
6645
 
6646
6646
  var indent = Math.max(this.indentSize(), column);
6647
- val = val.replace(/\n/g, "\n" + _repeating2["default"](" ", indent));
6647
+ val = val.replace(/\n/g, "\n" + (0, _repeating2["default"])(" ", indent));
6648
6648
  }
6649
6649
 
6650
6650
  if (column === 0) {
@@ -6686,14 +6686,14 @@ var CodeGenerator = (function () {
6686
6686
  return CodeGenerator;
6687
6687
  })();
6688
6688
 
6689
- _lodashCollectionEach2["default"](_buffer2["default"].prototype, function (fn, key) {
6689
+ (0, _lodashCollectionEach2["default"])(_buffer2["default"].prototype, function (fn, key) {
6690
6690
  CodeGenerator.prototype[key] = function () {
6691
6691
  return fn.apply(this.buffer, arguments);
6692
6692
  };
6693
6693
  });
6694
6694
 
6695
- _lodashCollectionEach2["default"](CodeGenerator.generators, function (generator) {
6696
- _lodashObjectExtend2["default"](CodeGenerator.prototype, generator);
6695
+ (0, _lodashCollectionEach2["default"])(CodeGenerator.generators, function (generator) {
6696
+ (0, _lodashObjectExtend2["default"])(CodeGenerator.prototype, generator);
6697
6697
  });
6698
6698
 
6699
6699
  module.exports = function (ast, opts, code) {
@@ -6799,7 +6799,7 @@ var Node = (function () {
6799
6799
  if (t.isNewExpression(parent) && parent.callee === node) {
6800
6800
  if (t.isCallExpression(node)) return true;
6801
6801
 
6802
- var hasCall = _lodashCollectionSome2["default"](node, function (val) {
6802
+ var hasCall = (0, _lodashCollectionSome2["default"])(node, function (val) {
6803
6803
  return t.isCallExpression(val);
6804
6804
  });
6805
6805
  if (hasCall) return true;
@@ -6824,7 +6824,7 @@ var Node = (function () {
6824
6824
 
6825
6825
  exports["default"] = Node;
6826
6826
 
6827
- _lodashCollectionEach2["default"](Node, function (fn, key) {
6827
+ (0, _lodashCollectionEach2["default"])(Node, function (fn, key) {
6828
6828
  Node.prototype[key] = function () {
6829
6829
  // Avoid leaking arguments to prevent deoptimization
6830
6830
  var args = new Array(arguments.length + 2);
@@ -6871,8 +6871,8 @@ var t = _interopRequireWildcard(_types);
6871
6871
 
6872
6872
  var PRECEDENCE = {};
6873
6873
 
6874
- _lodashCollectionEach2["default"]([["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]], function (tier, i) {
6875
- _lodashCollectionEach2["default"](tier, function (op) {
6874
+ (0, _lodashCollectionEach2["default"])([["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]], function (tier, i) {
6875
+ (0, _lodashCollectionEach2["default"])(tier, function (op) {
6876
6876
  PRECEDENCE[op] = i;
6877
6877
  });
6878
6878
  });
@@ -7171,7 +7171,7 @@ exports.nodes.Property = exports.nodes.SpreadProperty = function (node, parent)
7171
7171
 
7172
7172
  exports.list = {
7173
7173
  VariableDeclaration: function VariableDeclaration(node) {
7174
- return _lodashCollectionMap2["default"](node.declarations, "init");
7174
+ return (0, _lodashCollectionMap2["default"])(node.declarations, "init");
7175
7175
  },
7176
7176
 
7177
7177
  ArrayExpression: function ArrayExpression(node) {
@@ -7183,7 +7183,7 @@ exports.list = {
7183
7183
  }
7184
7184
  };
7185
7185
 
7186
- _lodashCollectionEach2["default"]({
7186
+ (0, _lodashCollectionEach2["default"])({
7187
7187
  Function: true,
7188
7188
  Class: true,
7189
7189
  Loop: true,
@@ -7191,11 +7191,11 @@ _lodashCollectionEach2["default"]({
7191
7191
  SwitchStatement: true,
7192
7192
  TryStatement: true
7193
7193
  }, function (amounts, type) {
7194
- if (_lodashLangIsBoolean2["default"](amounts)) {
7194
+ if ((0, _lodashLangIsBoolean2["default"])(amounts)) {
7195
7195
  amounts = { after: amounts, before: amounts };
7196
7196
  }
7197
7197
 
7198
- _lodashCollectionEach2["default"]([type].concat(t.FLIPPED_ALIAS_KEYS[type] || []), function (type) {
7198
+ (0, _lodashCollectionEach2["default"])([type].concat(t.FLIPPED_ALIAS_KEYS[type] || []), function (type) {
7199
7199
  exports.nodes[type] = function () {
7200
7200
  return amounts;
7201
7201
  };
@@ -7356,7 +7356,7 @@ var Whitespace = (function () {
7356
7356
  function Whitespace(tokens, comments) {
7357
7357
  _classCallCheck(this, Whitespace);
7358
7358
 
7359
- this.tokens = _lodashCollectionSortBy2["default"](tokens.concat(comments), "start");
7359
+ this.tokens = (0, _lodashCollectionSortBy2["default"])(tokens.concat(comments), "start");
7360
7360
  this.used = {};
7361
7361
 
7362
7362
  // Profiling this code shows that while generator passes over it, indexes
@@ -7552,7 +7552,7 @@ exports["default"] = function (lines, lineNumber, colNumber) {
7552
7552
  end = lines.length;
7553
7553
  }
7554
7554
 
7555
- return _lineNumbers2["default"](lines.slice(start, end), {
7555
+ return (0, _lineNumbers2["default"])(lines.slice(start, end), {
7556
7556
  start: start + 1,
7557
7557
  before: " ",
7558
7558
  after: " | ",
@@ -7561,7 +7561,7 @@ exports["default"] = function (lines, lineNumber, colNumber) {
7561
7561
  return;
7562
7562
  }
7563
7563
  if (colNumber) {
7564
- params.line += "\n" + params.before + "" + _repeating2["default"](" ", params.width) + "" + params.after + "" + _repeating2["default"](" ", colNumber - 1) + "^";
7564
+ params.line += "\n" + params.before + "" + (0, _repeating2["default"])(" ", params.width) + "" + params.after + "" + (0, _repeating2["default"])(" ", colNumber - 1) + "^";
7565
7565
  }
7566
7566
  params.before = params.before.replace(/^./, ">");
7567
7567
  }
@@ -7652,7 +7652,7 @@ exports["default"] = function (code) {
7652
7652
  var ast = acorn.parse(code, parseOpts);
7653
7653
 
7654
7654
  _estraverse2["default"].attachComments(ast, comments, tokens);
7655
- ast = _normalizeAst2["default"](ast, comments, tokens);
7655
+ ast = (0, _normalizeAst2["default"])(ast, comments, tokens);
7656
7656
  return ast;
7657
7657
  };
7658
7658
 
@@ -7762,7 +7762,7 @@ var t = _interopRequireWildcard(_types);
7762
7762
 
7763
7763
  // estraverse
7764
7764
 
7765
- _lodashObjectExtend2["default"](_estraverse2["default"].VisitorKeys, t.VISITOR_KEYS);
7765
+ (0, _lodashObjectExtend2["default"])(_estraverse2["default"].VisitorKeys, t.VISITOR_KEYS);
7766
7766
 
7767
7767
  // regenerator/ast-types
7768
7768
 
@@ -7876,7 +7876,7 @@ function buildVar(namespace, builder) {
7876
7876
  }
7877
7877
 
7878
7878
  function buildHelpers(body, namespace, whitelist) {
7879
- _lodashCollectionEach2["default"](_transformationFile2["default"].helpers, function (name) {
7879
+ (0, _lodashCollectionEach2["default"])(_transformationFile2["default"].helpers, function (name) {
7880
7880
  if (whitelist && whitelist.indexOf(name) === -1) return;
7881
7881
 
7882
7882
  var key = t.identifier(t.toIdentifier(name));
@@ -7907,7 +7907,7 @@ exports["default"] = function (whitelist) {
7907
7907
  throw new Error(messages.get("unsupportedOutputType", outputType));
7908
7908
  }
7909
7909
 
7910
- return _generation2["default"](tree).code;
7910
+ return (0, _generation2["default"])(tree).code;
7911
7911
  };
7912
7912
 
7913
7913
  ;
@@ -7967,7 +7967,7 @@ exports["default"] = function (loc) {
7967
7967
  var json;
7968
7968
 
7969
7969
  try {
7970
- json = jsons[content] = jsons[content] || JSON.parse(_stripJsonComments2["default"](content));
7970
+ json = jsons[content] = jsons[content] || JSON.parse((0, _stripJsonComments2["default"])(content));
7971
7971
  } catch (err) {
7972
7972
  err.message = "" + file + ": " + err.message;
7973
7973
  throw err;
@@ -7976,7 +7976,7 @@ exports["default"] = function (loc) {
7976
7976
  opts.babelrc.push(file);
7977
7977
 
7978
7978
  if (json.breakConfig) return;
7979
- _lodashObjectMerge2["default"](opts, json, function (a, b) {
7979
+ (0, _lodashObjectMerge2["default"])(opts, json, function (a, b) {
7980
7980
  if (Array.isArray(a)) {
7981
7981
  var c = a.slice(0);
7982
7982
  for (var _iterator = b, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
@@ -8166,12 +8166,12 @@ var File = (function () {
8166
8166
  }
8167
8167
 
8168
8168
  File.prototype.normalizeOptions = function normalizeOptions(opts) {
8169
- opts = _lodashObjectAssign2["default"]({}, opts);
8169
+ opts = (0, _lodashObjectAssign2["default"])({}, opts);
8170
8170
 
8171
8171
  if (opts.filename) {
8172
8172
  var rcFilename = opts.filename;
8173
- if (!_pathIsAbsolute2["default"](rcFilename)) rcFilename = _path2["default"].join(process.cwd(), rcFilename);
8174
- opts = _toolsResolveRc2["default"](rcFilename, opts);
8173
+ if (!(0, _pathIsAbsolute2["default"])(rcFilename)) rcFilename = _path2["default"].join(process.cwd(), rcFilename);
8174
+ opts = (0, _toolsResolveRc2["default"])(rcFilename, opts);
8175
8175
  }
8176
8176
 
8177
8177
  //
@@ -8194,7 +8194,7 @@ var File = (function () {
8194
8194
  }
8195
8195
 
8196
8196
  if (val == null) {
8197
- val = _lodashLangClone2["default"](option["default"]);
8197
+ val = (0, _lodashLangClone2["default"])(option["default"]);
8198
8198
  }
8199
8199
 
8200
8200
  var optionParser = optionParsers[option.type];
@@ -8212,9 +8212,9 @@ var File = (function () {
8212
8212
  }
8213
8213
 
8214
8214
  // normalize windows path separators to unix
8215
- opts.filename = _slash2["default"](opts.filename);
8215
+ opts.filename = (0, _slash2["default"])(opts.filename);
8216
8216
  if (opts.sourceRoot) {
8217
- opts.sourceRoot = _slash2["default"](opts.sourceRoot);
8217
+ opts.sourceRoot = (0, _slash2["default"])(opts.sourceRoot);
8218
8218
  }
8219
8219
 
8220
8220
  if (opts.moduleId) {
@@ -8226,19 +8226,19 @@ var File = (function () {
8226
8226
  opts.ignore = util.arrayify(opts.ignore, util.regexify);
8227
8227
  opts.only = util.arrayify(opts.only, util.regexify);
8228
8228
 
8229
- _lodashObjectDefaults2["default"](opts, {
8229
+ (0, _lodashObjectDefaults2["default"])(opts, {
8230
8230
  moduleRoot: opts.sourceRoot
8231
8231
  });
8232
8232
 
8233
- _lodashObjectDefaults2["default"](opts, {
8233
+ (0, _lodashObjectDefaults2["default"])(opts, {
8234
8234
  sourceRoot: opts.moduleRoot
8235
8235
  });
8236
8236
 
8237
- _lodashObjectDefaults2["default"](opts, {
8237
+ (0, _lodashObjectDefaults2["default"])(opts, {
8238
8238
  filenameRelative: opts.filename
8239
8239
  });
8240
8240
 
8241
- _lodashObjectDefaults2["default"](opts, {
8241
+ (0, _lodashObjectDefaults2["default"])(opts, {
8242
8242
  sourceFileName: opts.filenameRelative,
8243
8243
  sourceMapName: opts.filenameRelative
8244
8244
  });
@@ -8253,7 +8253,7 @@ var File = (function () {
8253
8253
  };
8254
8254
 
8255
8255
  File.prototype.isLoose = function isLoose(key) {
8256
- return _lodashCollectionIncludes2["default"](this.opts.loose, key);
8256
+ return (0, _lodashCollectionIncludes2["default"])(this.opts.loose, key);
8257
8257
  };
8258
8258
 
8259
8259
  File.prototype.buildTransformers = function buildTransformers() {
@@ -8424,9 +8424,9 @@ var File = (function () {
8424
8424
  };
8425
8425
 
8426
8426
  File.prototype.addHelper = function addHelper(name) {
8427
- var isSolo = _lodashCollectionIncludes2["default"](File.soloHelpers, name);
8427
+ var isSolo = (0, _lodashCollectionIncludes2["default"])(File.soloHelpers, name);
8428
8428
 
8429
- if (!isSolo && !_lodashCollectionIncludes2["default"](File.helpers, name)) {
8429
+ if (!isSolo && !(0, _lodashCollectionIncludes2["default"])(File.helpers, name)) {
8430
8430
  throw new ReferenceError("Unknown helper " + name);
8431
8431
  }
8432
8432
 
@@ -8503,7 +8503,7 @@ var File = (function () {
8503
8503
  };
8504
8504
 
8505
8505
  File.prototype.getModuleFormatter = function getModuleFormatter(type) {
8506
- var ModuleFormatter = _lodashLangIsFunction2["default"](type) ? type : _modules2["default"][type];
8506
+ var ModuleFormatter = (0, _lodashLangIsFunction2["default"])(type) ? type : _modules2["default"][type];
8507
8507
 
8508
8508
  if (!ModuleFormatter) {
8509
8509
  var loc = util.resolveRelative(type);
@@ -8540,7 +8540,7 @@ var File = (function () {
8540
8540
  parseOpts.sourceType = "module";
8541
8541
 
8542
8542
  this.log.debug("Parse start");
8543
- var tree = _helpersParse2["default"](code, parseOpts);
8543
+ var tree = (0, _helpersParse2["default"])(code, parseOpts);
8544
8544
  this.log.debug("Parse stop");
8545
8545
  return tree;
8546
8546
  };
@@ -8609,7 +8609,7 @@ var File = (function () {
8609
8609
 
8610
8610
  var loc = err.loc;
8611
8611
  if (loc) {
8612
- err.codeFrame = _helpersCodeFrame2["default"](code, loc.line, loc.column + 1, this.opts);
8612
+ err.codeFrame = (0, _helpersCodeFrame2["default"])(code, loc.line, loc.column + 1, this.opts);
8613
8613
  message += "\n" + err.codeFrame;
8614
8614
  }
8615
8615
 
@@ -8692,7 +8692,7 @@ var File = (function () {
8692
8692
 
8693
8693
  this.log.debug("Generation start");
8694
8694
 
8695
- var _result = _generation2["default"](ast, opts, this.code);
8695
+ var _result = (0, _generation2["default"])(ast, opts, this.code);
8696
8696
  result.code = _result.code;
8697
8697
  result.map = _result.map;
8698
8698
 
@@ -8756,8 +8756,8 @@ var _debugNode = require("debug/node");
8756
8756
 
8757
8757
  var _debugNode2 = _interopRequireDefault(_debugNode);
8758
8758
 
8759
- var verboseDebug = _debugNode2["default"]("babel:verbose");
8760
- var generalDebug = _debugNode2["default"]("babel");
8759
+ var verboseDebug = (0, _debugNode2["default"])("babel:verbose");
8760
+ var generalDebug = (0, _debugNode2["default"])("babel");
8761
8761
 
8762
8762
  var Logger = (function () {
8763
8763
  function Logger(file, filename) {
@@ -9265,7 +9265,7 @@ exports["default"] = function (opts) {
9265
9265
  if (!isAssignment(expr)) return;
9266
9266
 
9267
9267
  var nodes = [];
9268
- var exploded = _explodeAssignableExpression2["default"](expr.left, nodes, file, scope, true);
9268
+ var exploded = (0, _explodeAssignableExpression2["default"])(expr.left, nodes, file, scope, true);
9269
9269
 
9270
9270
  nodes.push(t.expressionStatement(buildAssignment(exploded.ref, opts.build(exploded.uid, expr.right))));
9271
9271
 
@@ -9276,7 +9276,7 @@ exports["default"] = function (opts) {
9276
9276
  if (!isAssignment(node)) return;
9277
9277
 
9278
9278
  var nodes = [];
9279
- var exploded = _explodeAssignableExpression2["default"](node.left, nodes, file, scope);
9279
+ var exploded = (0, _explodeAssignableExpression2["default"])(node.left, nodes, file, scope);
9280
9280
  nodes.push(buildAssignment(exploded.ref, opts.build(exploded.uid, node.right)));
9281
9281
  return nodes;
9282
9282
  };
@@ -9385,7 +9385,7 @@ exports["default"] = function (exports, opts) {
9385
9385
  exports.JSXAttribute = {
9386
9386
  enter: function enter(node) {
9387
9387
  var value = node.value;
9388
- if (t.isLiteral(value) && _lodashLangIsString2["default"](value.value)) {
9388
+ if (t.isLiteral(value) && (0, _lodashLangIsString2["default"])(value.value)) {
9389
9389
  value.value = value.value.replace(/\n\s+/g, " ");
9390
9390
  }
9391
9391
  },
@@ -9638,7 +9638,7 @@ function push(mutatorMap, node, kind, file) {
9638
9638
  //
9639
9639
 
9640
9640
  var map = {};
9641
- if (_lodashObjectHas2["default"](mutatorMap, alias)) map = mutatorMap[alias];
9641
+ if ((0, _lodashObjectHas2["default"])(mutatorMap, alias)) map = mutatorMap[alias];
9642
9642
  mutatorMap[alias] = map;
9643
9643
 
9644
9644
  //
@@ -9700,12 +9700,12 @@ function toComputedObjectFromClass(obj) {
9700
9700
  function toClassObject(mutatorMap) {
9701
9701
  var objExpr = t.objectExpression([]);
9702
9702
 
9703
- _lodashCollectionEach2["default"](mutatorMap, function (map) {
9703
+ (0, _lodashCollectionEach2["default"])(mutatorMap, function (map) {
9704
9704
  var mapNode = t.objectExpression([]);
9705
9705
 
9706
9706
  var propNode = t.property("init", map._key, mapNode, map._computed);
9707
9707
 
9708
- _lodashCollectionEach2["default"](map, function (node, key) {
9708
+ (0, _lodashCollectionEach2["default"])(map, function (node, key) {
9709
9709
  if (key[0] === "_") return;
9710
9710
 
9711
9711
  var inheritNode = node;
@@ -9725,7 +9725,7 @@ function toClassObject(mutatorMap) {
9725
9725
  }
9726
9726
 
9727
9727
  function toDefineObject(mutatorMap) {
9728
- _lodashCollectionEach2["default"](mutatorMap, function (map) {
9728
+ (0, _lodashCollectionEach2["default"])(mutatorMap, function (map) {
9729
9729
  if (map.value) map.writable = t.literal(true);
9730
9730
  map.configurable = t.literal(true);
9731
9731
  map.enumerable = t.literal(true);
@@ -9934,7 +9934,7 @@ var wrap = function wrap(state, method, id, scope) {
9934
9934
  // shim in dummy params to retain function arity, if you try to read the
9935
9935
  // source then you'll get the original since it's proxied so it's all good
9936
9936
  var params = template.callee.body.body[0].params;
9937
- for (var i = 0, len = _getFunctionArity2["default"](method); i < len; i++) {
9937
+ for (var i = 0, len = (0, _getFunctionArity2["default"])(method); i < len; i++) {
9938
9938
  params.push(scope.generateUidIdentifier("x"));
9939
9939
  }
9940
9940
 
@@ -10096,7 +10096,7 @@ function isCompatTag(tagName) {
10096
10096
  }
10097
10097
 
10098
10098
  function isStringLiteral(node) {
10099
- return t.isLiteral(node) && _lodashLangIsString2["default"](node.value);
10099
+ return t.isLiteral(node) && (0, _lodashLangIsString2["default"])(node.value);
10100
10100
  }
10101
10101
 
10102
10102
  function cleanJSXElementLiteralChild(child, args) {
@@ -10189,7 +10189,7 @@ function is(node, flag) {
10189
10189
  function pullFlag(node, flag) {
10190
10190
  var flags = node.regex.flags.split("");
10191
10191
  if (node.regex.flags.indexOf(flag) < 0) return;
10192
- _lodashArrayPull2["default"](flags, flag);
10192
+ (0, _lodashArrayPull2["default"])(flags, flag);
10193
10193
  node.regex.flags = flags.join("");
10194
10194
  }
10195
10195
  },{"../../types":167,"lodash/array/pull":332}],67:[function(require,module,exports){
@@ -10692,7 +10692,11 @@ var remapVisitor = {
10692
10692
 
10693
10693
  if (remap && node !== remap) {
10694
10694
  if (!scope.hasBinding(node.name) || scope.bindingIdentifierEquals(node.name, formatter.localImports[node.name])) {
10695
- return remap;
10695
+ if (this.key === "callee" && this.parentPath.isCallExpression()) {
10696
+ return t.sequenceExpression([t.literal(0), remap]);
10697
+ } else {
10698
+ return remap;
10699
+ }
10696
10700
  }
10697
10701
  }
10698
10702
  },
@@ -10745,7 +10749,7 @@ var importsVisitor = {
10745
10749
  ImportDeclaration: {
10746
10750
  enter: function enter(node, parent, scope, formatter) {
10747
10751
  formatter.hasLocalImports = true;
10748
- _lodashObjectExtend2["default"](formatter.localImports, this.getBindingIdentifiers());
10752
+ (0, _lodashObjectExtend2["default"])(formatter.localImports, this.getBindingIdentifiers());
10749
10753
  }
10750
10754
  }
10751
10755
  };
@@ -10788,19 +10792,19 @@ var DefaultFormatter = (function () {
10788
10792
  function DefaultFormatter(file) {
10789
10793
  _classCallCheck(this, DefaultFormatter);
10790
10794
 
10791
- this.internalRemap = _helpersObject2["default"]();
10792
- this.defaultIds = _helpersObject2["default"]();
10795
+ this.internalRemap = (0, _helpersObject2["default"])();
10796
+ this.defaultIds = (0, _helpersObject2["default"])();
10793
10797
  this.scope = file.scope;
10794
10798
  this.file = file;
10795
- this.ids = _helpersObject2["default"]();
10799
+ this.ids = (0, _helpersObject2["default"])();
10796
10800
 
10797
10801
  this.hasNonDefaultExports = false;
10798
10802
 
10799
10803
  this.hasLocalExports = false;
10800
10804
  this.hasLocalImports = false;
10801
10805
 
10802
- this.localExports = _helpersObject2["default"]();
10803
- this.localImports = _helpersObject2["default"]();
10806
+ this.localExports = (0, _helpersObject2["default"])();
10807
+ this.localImports = (0, _helpersObject2["default"])();
10804
10808
 
10805
10809
  this.getLocalExports();
10806
10810
  this.getLocalImports();
@@ -11073,7 +11077,7 @@ var _strict = require("./_strict");
11073
11077
 
11074
11078
  var _strict2 = _interopRequireDefault(_strict);
11075
11079
 
11076
- exports["default"] = _strict2["default"](_amd2["default"]);
11080
+ exports["default"] = (0, _strict2["default"])(_amd2["default"]);
11077
11081
  module.exports = exports["default"];
11078
11082
  },{"./_strict":72,"./amd":74}],74:[function(require,module,exports){
11079
11083
  "use strict";
@@ -11153,7 +11157,7 @@ var AMDFormatter = (function (_DefaultFormatter) {
11153
11157
 
11154
11158
  // build up define container
11155
11159
 
11156
- var params = _lodashObjectValues2["default"](this.ids);
11160
+ var params = (0, _lodashObjectValues2["default"])(this.ids);
11157
11161
  if (this.passModuleArg) params.unshift(t.identifier("module"));
11158
11162
  params.unshift(t.identifier("exports"));
11159
11163
 
@@ -11201,7 +11205,7 @@ var AMDFormatter = (function (_DefaultFormatter) {
11201
11205
  // prevent unnecessary renaming of dynamic imports
11202
11206
  this.ids[node.source.value] = ref;
11203
11207
  ref = t.memberExpression(ref, t.identifier("default"));
11204
- } else if (t.isImportNamespaceSpecifier(specifier)) {} else if (!_lodashCollectionIncludes2["default"](this.file.dynamicImported, node) && t.isSpecifierDefault(specifier) && !this.noInteropRequireImport) {
11208
+ } else if (t.isImportNamespaceSpecifier(specifier)) {} else if (!(0, _lodashCollectionIncludes2["default"])(this.file.dynamicImported, node) && t.isSpecifierDefault(specifier) && !this.noInteropRequireImport) {
11205
11209
  // import foo from "foo";
11206
11210
  var uid = this.scope.generateUidIdentifier(specifier.local.name);
11207
11211
  nodes.push(t.variableDeclaration("var", [t.variableDeclarator(uid, t.callExpression(this.file.addHelper("interop-require"), [ref]))]));
@@ -11276,7 +11280,7 @@ var _strict = require("./_strict");
11276
11280
 
11277
11281
  var _strict2 = _interopRequireDefault(_strict);
11278
11282
 
11279
- exports["default"] = _strict2["default"](_common2["default"]);
11283
+ exports["default"] = (0, _strict2["default"])(_common2["default"]);
11280
11284
  module.exports = exports["default"];
11281
11285
  },{"./_strict":72,"./common":76}],76:[function(require,module,exports){
11282
11286
  "use strict";
@@ -11663,15 +11667,15 @@ var SystemFormatter = (function (_AMDFormatter) {
11663
11667
  nodes.push(t.variableDeclaration("var", [t.variableDeclarator(t.identifier(name), this.internalRemap[name])]));
11664
11668
  }
11665
11669
 
11666
- this.internalRemap = _helpersObject2["default"]();
11670
+ this.internalRemap = (0, _helpersObject2["default"])();
11667
11671
 
11668
- this._addImportSource(_lodashArrayLast2["default"](nodes), node);
11672
+ this._addImportSource((0, _lodashArrayLast2["default"])(nodes), node);
11669
11673
  };
11670
11674
 
11671
11675
  SystemFormatter.prototype.buildRunnerSetters = function buildRunnerSetters(block, hoistDeclarators) {
11672
11676
  var scope = this.file.scope;
11673
11677
 
11674
- return t.arrayExpression(_lodashCollectionMap2["default"](this.ids, function (uid, source) {
11678
+ return t.arrayExpression((0, _lodashCollectionMap2["default"])(this.ids, function (uid, source) {
11675
11679
  var state = {
11676
11680
  hoistDeclarators: hoistDeclarators,
11677
11681
  source: source,
@@ -11753,7 +11757,7 @@ var _strict = require("./_strict");
11753
11757
 
11754
11758
  var _strict2 = _interopRequireDefault(_strict);
11755
11759
 
11756
- exports["default"] = _strict2["default"](_umd2["default"]);
11760
+ exports["default"] = (0, _strict2["default"])(_umd2["default"]);
11757
11761
  module.exports = exports["default"];
11758
11762
  },{"./_strict":72,"./umd":81}],81:[function(require,module,exports){
11759
11763
  "use strict";
@@ -11817,7 +11821,7 @@ var UMDFormatter = (function (_AMDFormatter) {
11817
11821
 
11818
11822
  // factory
11819
11823
 
11820
- var ids = _lodashObjectValues2["default"](this.ids);
11824
+ var ids = (0, _lodashObjectValues2["default"])(this.ids);
11821
11825
  var args = [t.identifier("exports")];
11822
11826
  if (this.passModuleArg) args.push(t.identifier("module"));
11823
11827
  args = args.concat(ids);
@@ -11923,7 +11927,7 @@ var TransformerPass = (function () {
11923
11927
 
11924
11928
  file.log.debug("Start transformer " + this.key);
11925
11929
 
11926
- _traversal2["default"](file.ast, this.handlers, file.scope, file);
11930
+ (0, _traversal2["default"])(file.ast, this.handlers, file.scope, file);
11927
11931
 
11928
11932
  file.log.debug("Finish transformer " + this.key);
11929
11933
 
@@ -11968,10 +11972,10 @@ var TransformerPipeline = (function () {
11968
11972
  function TransformerPipeline() {
11969
11973
  _classCallCheck(this, TransformerPipeline);
11970
11974
 
11971
- this.transformers = _helpersObject2["default"]();
11972
- this.namespaces = _helpersObject2["default"]();
11973
- this.deprecated = _helpersObject2["default"]();
11974
- this.aliases = _helpersObject2["default"]();
11975
+ this.transformers = (0, _helpersObject2["default"])();
11976
+ this.namespaces = (0, _helpersObject2["default"])();
11977
+ this.deprecated = (0, _helpersObject2["default"])();
11978
+ this.aliases = (0, _helpersObject2["default"])();
11975
11979
  this.filters = [];
11976
11980
  }
11977
11981
 
@@ -11994,12 +11998,12 @@ var TransformerPipeline = (function () {
11994
11998
  };
11995
11999
 
11996
12000
  TransformerPipeline.prototype.addAliases = function addAliases(names) {
11997
- _lodashObjectAssign2["default"](this.aliases, names);
12001
+ (0, _lodashObjectAssign2["default"])(this.aliases, names);
11998
12002
  return this;
11999
12003
  };
12000
12004
 
12001
12005
  TransformerPipeline.prototype.addDeprecated = function addDeprecated(names) {
12002
- _lodashObjectAssign2["default"](this.deprecated, names);
12006
+ (0, _lodashObjectAssign2["default"])(this.deprecated, names);
12003
12007
  return this;
12004
12008
  };
12005
12009
 
@@ -12029,7 +12033,7 @@ var TransformerPipeline = (function () {
12029
12033
  };
12030
12034
 
12031
12035
  TransformerPipeline.prototype.transformFromAst = function transformFromAst(ast, code, opts) {
12032
- ast = _helpersNormalizeAst2["default"](ast);
12036
+ ast = (0, _helpersNormalizeAst2["default"])(ast);
12033
12037
 
12034
12038
  var file = new _file2["default"](opts, this);
12035
12039
  return file.wrap(code, function () {
@@ -12129,7 +12133,7 @@ var Transformer = (function () {
12129
12133
  function Transformer(transformerKey, transformer) {
12130
12134
  _classCallCheck(this, Transformer);
12131
12135
 
12132
- transformer = _lodashObjectAssign2["default"]({}, transformer);
12136
+ transformer = (0, _lodashObjectAssign2["default"])({}, transformer);
12133
12137
 
12134
12138
  var take = function take(key) {
12135
12139
  var val = transformer[key];
@@ -12159,13 +12163,13 @@ var Transformer = (function () {
12159
12163
  Transformer.prototype.normalize = function normalize(transformer) {
12160
12164
  var _this = this;
12161
12165
 
12162
- if (_lodashLangIsFunction2["default"](transformer)) {
12166
+ if ((0, _lodashLangIsFunction2["default"])(transformer)) {
12163
12167
  transformer = { ast: transformer };
12164
12168
  }
12165
12169
 
12166
12170
  _traversal2["default"].explode(transformer);
12167
12171
 
12168
- _lodashCollectionEach2["default"](transformer, function (fns, type) {
12172
+ (0, _lodashCollectionEach2["default"])(transformer, function (fns, type) {
12169
12173
  // hidden property
12170
12174
  if (type[0] === "_") {
12171
12175
  _this[type] = fns;
@@ -12174,9 +12178,9 @@ var Transformer = (function () {
12174
12178
 
12175
12179
  if (type === "enter" || type === "exit") return;
12176
12180
 
12177
- if (_lodashLangIsFunction2["default"](fns)) fns = { enter: fns };
12181
+ if ((0, _lodashLangIsFunction2["default"])(fns)) fns = { enter: fns };
12178
12182
 
12179
- if (!_lodashLangIsObject2["default"](fns)) return;
12183
+ if (!(0, _lodashLangIsObject2["default"])(fns)) return;
12180
12184
 
12181
12185
  if (!fns.enter) fns.enter = function () {};
12182
12186
  if (!fns.exit) fns.exit = function () {};
@@ -12624,9 +12628,9 @@ var BlockScoping = (function () {
12624
12628
  this.blockPath = blockPath;
12625
12629
  this.block = blockPath.node;
12626
12630
 
12627
- this.outsideLetReferences = _helpersObject2["default"]();
12631
+ this.outsideLetReferences = (0, _helpersObject2["default"])();
12628
12632
  this.hasLetReferences = false;
12629
- this.letReferences = this.block._letReferences = _helpersObject2["default"]();
12633
+ this.letReferences = this.block._letReferences = (0, _helpersObject2["default"])();
12630
12634
  this.body = [];
12631
12635
 
12632
12636
  if (loopPath) {
@@ -12678,7 +12682,7 @@ var BlockScoping = (function () {
12678
12682
  // we have to check if any of our let variables collide with
12679
12683
  // those in upper scopes and then if they do, generate a uid
12680
12684
  // for them and replace all references with it
12681
- var remaps = _helpersObject2["default"]();
12685
+ var remaps = (0, _helpersObject2["default"])();
12682
12686
 
12683
12687
  for (var key in letRefs) {
12684
12688
  // just an Identifier node we collected in `getLetReferences`
@@ -12745,8 +12749,8 @@ var BlockScoping = (function () {
12745
12749
  this.hoistVarDeclarations();
12746
12750
 
12747
12751
  // turn outsideLetReferences into an array
12748
- var params = _lodashObjectValues2["default"](outsideRefs);
12749
- var args = _lodashObjectValues2["default"](outsideRefs);
12752
+ var params = (0, _lodashObjectValues2["default"])(outsideRefs);
12753
+ var args = (0, _lodashObjectValues2["default"])(outsideRefs);
12750
12754
 
12751
12755
  // build the closure that we're going to wrap the block with
12752
12756
  var fn = t.functionExpression(null, params, t.blockStatement(block.body));
@@ -12841,7 +12845,7 @@ var BlockScoping = (function () {
12841
12845
  //
12842
12846
  for (var i = 0; i < declarators.length; i++) {
12843
12847
  var declar = declarators[i];
12844
- _lodashObjectExtend2["default"](this.outsideLetReferences, t.getBindingIdentifiers(declar));
12848
+ (0, _lodashObjectExtend2["default"])(this.outsideLetReferences, t.getBindingIdentifiers(declar));
12845
12849
  }
12846
12850
 
12847
12851
  //
@@ -12858,7 +12862,7 @@ var BlockScoping = (function () {
12858
12862
  for (var i = 0; i < declarators.length; i++) {
12859
12863
  var declar = declarators[i];
12860
12864
  var keys = t.getBindingIdentifiers(declar);
12861
- _lodashObjectExtend2["default"](this.letReferences, keys);
12865
+ (0, _lodashObjectExtend2["default"])(this.letReferences, keys);
12862
12866
  this.hasLetReferences = true;
12863
12867
  }
12864
12868
 
@@ -13316,7 +13320,7 @@ var ClassTransformer = (function () {
13316
13320
  var path = classBodyPaths[i];
13317
13321
 
13318
13322
  if (node.decorators) {
13319
- _helpersMemoiseDecorators2["default"](node.decorators, this.scope);
13323
+ (0, _helpersMemoiseDecorators2["default"])(node.decorators, this.scope);
13320
13324
  }
13321
13325
 
13322
13326
  if (t.isMethodDefinition(node)) {
@@ -14588,7 +14592,7 @@ function Func(node, parent, scope, file) {
14588
14592
  node.params = node.params.slice(0, lastNonDefaultParam);
14589
14593
 
14590
14594
  if (state.iife) {
14591
- body.push(_helpersCallDelegate2["default"](node, scope));
14595
+ body.push((0, _helpersCallDelegate2["default"])(node, scope));
14592
14596
  node.body = t.blockStatement(body);
14593
14597
  } else {
14594
14598
  node.body.body = body.concat(node.body.body);
@@ -14639,7 +14643,7 @@ var memberExpressionOptimisationVisitor = {
14639
14643
  // if we know that this member expression is referencing a number then we can safely
14640
14644
  // optimise it
14641
14645
  var prop = parent.property;
14642
- if (_lodashLangIsNumber2["default"](prop.value) || t.isUnaryExpression(prop) || t.isBinaryExpression(prop)) {
14646
+ if ((0, _lodashLangIsNumber2["default"])(prop.value) || t.isUnaryExpression(prop) || t.isBinaryExpression(prop)) {
14643
14647
  state.candidates.push(this);
14644
14648
  return;
14645
14649
  }
@@ -14908,7 +14912,7 @@ var regex = _interopRequireWildcard(_helpersRegex);
14908
14912
 
14909
14913
  function Literal(node) {
14910
14914
  if (!regex.is(node, "u")) return;
14911
- node.regex.pattern = _regexpuRewritePattern2["default"](node.regex.pattern, node.regex.flags);
14915
+ node.regex.pattern = (0, _regexpuRewritePattern2["default"])(node.regex.pattern, node.regex.flags);
14912
14916
  regex.pullFlag(node, "u");
14913
14917
  }
14914
14918
  },{"../../helpers/regex":66,"regexpu/rewrite-pattern":492}],104:[function(require,module,exports){
@@ -15230,8 +15234,7 @@ function returnBlock(expr) {
15230
15234
  return t.blockStatement([t.returnStatement(expr)]);
15231
15235
  }
15232
15236
 
15233
- // looks for and replaces tail recursion calls
15234
- var firstPass = {
15237
+ var visitor = {
15235
15238
  enter: function enter(node, parent, scope, state) {
15236
15239
  if (t.isTryStatement(parent)) {
15237
15240
  if (node === parent.block) {
@@ -15243,7 +15246,6 @@ var firstPass = {
15243
15246
  },
15244
15247
 
15245
15248
  ReturnStatement: function ReturnStatement(node, parent, scope, state) {
15246
- this.skip();
15247
15249
  return state.subTransform(node.argument);
15248
15250
  },
15249
15251
 
@@ -15252,44 +15254,18 @@ var firstPass = {
15252
15254
  },
15253
15255
 
15254
15256
  VariableDeclaration: function VariableDeclaration(node, parent, scope, state) {
15255
- this.skip();
15256
15257
  state.vars.push(node);
15257
- }
15258
- };
15258
+ },
15259
15259
 
15260
- // hoists up function declarations, replaces `this` and `arguments` and marks
15261
- // them as needed
15262
- var secondPass = {
15263
15260
  ThisExpression: function ThisExpression(node, parent, scope, state) {
15264
15261
  state.needsThis = true;
15265
- return state.getThisId();
15262
+ state.thisPaths.push(this);
15266
15263
  },
15267
15264
 
15268
15265
  ReferencedIdentifier: function ReferencedIdentifier(node, parent, scope, state) {
15269
- if (node.name !== "arguments") return;
15270
- state.needsArguments = true;
15271
- return state.getArgumentsId();
15272
- },
15273
-
15274
- Function: function Function(node, parent, scope, state) {
15275
- this.skip();
15276
- if (this.isFunctionDeclaration()) {
15277
- node = t.variableDeclaration("var", [t.variableDeclarator(node.id, t.toExpression(node))]);
15278
- node._blockHoist = 2;
15279
- return node;
15280
- }
15281
- }
15282
- };
15283
-
15284
- // optimizes recursion by removing `this` and `arguments` if they aren't used
15285
- var thirdPass = {
15286
- AssignmentExpression: function AssignmentExpression(node, parent, scope, state) {
15287
- if (!state.needsThis && node.left === state.getThisId()) {
15288
- this.remove();
15289
- } else if (!state.needsArguments && node.left === state.getArgumentsId() && t.isArrayExpression(node.right)) {
15290
- return _lodashCollectionMap2["default"](node.right.elements, function (elem) {
15291
- return t.expressionStatement(elem);
15292
- });
15266
+ if (node.name === "arguments") {
15267
+ state.needsArguments = true;
15268
+ state.argumentsPaths.push(this);
15293
15269
  }
15294
15270
  }
15295
15271
  };
@@ -15299,9 +15275,14 @@ var TailCallTransformer = (function () {
15299
15275
  _classCallCheck(this, TailCallTransformer);
15300
15276
 
15301
15277
  this.hasTailRecursion = false;
15278
+
15302
15279
  this.needsArguments = false;
15280
+ this.argumentsPaths = [];
15303
15281
  this.setsArguments = false;
15282
+
15304
15283
  this.needsThis = false;
15284
+ this.thisPaths = [];
15285
+
15305
15286
  this.ownerId = path.node.id;
15306
15287
  this.vars = [];
15307
15288
 
@@ -15366,10 +15347,12 @@ var TailCallTransformer = (function () {
15366
15347
  if (!ownerId) return;
15367
15348
 
15368
15349
  // traverse the function and look for tail recursion
15369
- this.path.traverse(firstPass, this);
15350
+ this.path.traverse(visitor, this);
15370
15351
 
15352
+ // has no tail call recursion
15371
15353
  if (!this.hasTailRecursion) return;
15372
15354
 
15355
+ // the function binding isn't constant so we can't be sure that it's the same function :(
15373
15356
  if (this.hasDeopt()) {
15374
15357
  this.file.log.deopt(node, messages.get("tailCallReassignmentDeopt"));
15375
15358
  return;
@@ -15377,20 +15360,22 @@ var TailCallTransformer = (function () {
15377
15360
 
15378
15361
  //
15379
15362
 
15380
- this.path.traverse(secondPass, this);
15363
+ var body = t.ensureBlock(node).body;
15381
15364
 
15382
- if (!this.needsThis || !this.needsArguments) {
15383
- this.path.traverse(thirdPass, this);
15384
- }
15365
+ for (var i = 0; i < body.length; i++) {
15366
+ var bodyNode = body[i];
15367
+ if (!t.isFunctionDeclaration(bodyNode)) continue;
15385
15368
 
15386
- var body = t.ensureBlock(node).body;
15369
+ bodyNode = body[i] = t.variableDeclaration("var", [t.variableDeclarator(bodyNode.id, t.toExpression(bodyNode))]);
15370
+ bodyNode._blockHoist = 2;
15371
+ }
15387
15372
 
15388
15373
  if (this.vars.length > 0) {
15389
- var declarations = _lodashArrayFlatten2["default"](_lodashCollectionMap2["default"](this.vars, function (decl) {
15374
+ var declarations = (0, _lodashArrayFlatten2["default"])((0, _lodashCollectionMap2["default"])(this.vars, function (decl) {
15390
15375
  return decl.declarations;
15391
15376
  }));
15392
15377
 
15393
- var assignment = _lodashCollectionReduceRight2["default"](declarations, function (expr, decl) {
15378
+ var assignment = (0, _lodashCollectionReduceRight2["default"])(declarations, function (expr, decl) {
15394
15379
  return t.assignmentExpression("=", decl.id, expr);
15395
15380
  }, t.identifier("undefined"));
15396
15381
 
@@ -15409,22 +15394,34 @@ var TailCallTransformer = (function () {
15409
15394
  body.unshift(t.expressionStatement(t.assignmentExpression("=", this.getAgainId(), t.literal(false))));
15410
15395
 
15411
15396
  node.body = util.template("tail-call-body", {
15412
- AGAIN_ID: this.getAgainId(),
15413
- THIS_ID: this.thisId,
15414
- ARGUMENTS_ID: this.argumentsId,
15415
15397
  FUNCTION_ID: this.getFunctionId(),
15398
+ AGAIN_ID: this.getAgainId(),
15416
15399
  BLOCK: node.body
15417
15400
  });
15418
15401
 
15419
15402
  var topVars = [];
15420
15403
 
15421
15404
  if (this.needsThis) {
15405
+ var _arr = this.thisPaths;
15406
+
15407
+ for (var _i = 0; _i < _arr.length; _i++) {
15408
+ var path = _arr[_i];
15409
+ path.replaceWith(this.getThisId());
15410
+ }
15411
+
15422
15412
  topVars.push(t.variableDeclarator(this.getThisId(), t.thisExpression()));
15423
15413
  }
15424
15414
 
15425
15415
  if (this.needsArguments || this.setsArguments) {
15426
- var decl = t.variableDeclarator(this.getArgumentsId());
15427
- if (this.needsArguments) {
15416
+ var _arr2 = this.argumentsPaths;
15417
+
15418
+ for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
15419
+ var path = _arr2[_i2];
15420
+ path.replaceWith(this.argumentsId);
15421
+ }
15422
+
15423
+ var decl = t.variableDeclarator(this.argumentsId);
15424
+ if (this.argumentsId) {
15428
15425
  decl.init = t.identifier("arguments");
15429
15426
  }
15430
15427
  topVars.push(decl);
@@ -15535,7 +15532,7 @@ var TailCallTransformer = (function () {
15535
15532
 
15536
15533
  var body = [];
15537
15534
 
15538
- if (!t.isThisExpression(thisBinding)) {
15535
+ if (this.needsThis && !t.isThisExpression(thisBinding)) {
15539
15536
  body.push(t.expressionStatement(t.assignmentExpression("=", this.getThisId(), thisBinding || t.identifier("undefined"))));
15540
15537
  }
15541
15538
 
@@ -15546,23 +15543,32 @@ var TailCallTransformer = (function () {
15546
15543
  var argumentsId = this.getArgumentsId();
15547
15544
  var params = this.getParams();
15548
15545
 
15549
- body.push(t.expressionStatement(t.assignmentExpression("=", argumentsId, args)));
15550
-
15551
- var i, param;
15546
+ if (this.needsArguments) {
15547
+ body.push(t.expressionStatement(t.assignmentExpression("=", argumentsId, args)));
15548
+ }
15552
15549
 
15553
15550
  if (t.isArrayExpression(args)) {
15554
15551
  var elems = args.elements;
15555
- for (i = 0; i < elems.length && i < params.length; i++) {
15556
- param = params[i];
15552
+ for (var i = 0; i < elems.length && i < params.length; i++) {
15553
+ var param = params[i];
15557
15554
  var elem = elems[i] || (elems[i] = t.identifier("undefined"));
15558
15555
  if (!param._isDefaultPlaceholder) {
15559
15556
  elems[i] = t.assignmentExpression("=", param, elem);
15560
15557
  }
15561
15558
  }
15559
+
15560
+ if (!this.needsArguments) {
15561
+ var _arr3 = elems;
15562
+
15563
+ for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
15564
+ var elem = _arr3[_i3];
15565
+ body.push(t.expressionStatement(elem));
15566
+ }
15567
+ }
15562
15568
  } else {
15563
15569
  this.setsArguments = true;
15564
- for (i = 0; i < params.length; i++) {
15565
- param = params[i];
15570
+ for (var i = 0; i < params.length; i++) {
15571
+ var param = params[i];
15566
15572
  if (!param._isDefaultPlaceholder) {
15567
15573
  body.push(t.expressionStatement(t.assignmentExpression("=", param, t.memberExpression(argumentsId, t.literal(i), true))));
15568
15574
  }
@@ -15570,6 +15576,7 @@ var TailCallTransformer = (function () {
15570
15576
  }
15571
15577
 
15572
15578
  body.push(t.expressionStatement(t.assignmentExpression("=", this.getAgainId(), t.literal(true))));
15579
+
15573
15580
  body.push(t.continueStatement(this.getFunctionId()));
15574
15581
 
15575
15582
  return body;
@@ -15708,7 +15715,7 @@ function generator(node) {
15708
15715
  var container = t.functionExpression(null, [], t.blockStatement(body), true);
15709
15716
  container.shadow = true;
15710
15717
 
15711
- body.push(_helpersBuildComprehension2["default"](node, function () {
15718
+ body.push((0, _helpersBuildComprehension2["default"])(node, function () {
15712
15719
  return t.expressionStatement(t.yieldExpression(node.body));
15713
15720
  }));
15714
15721
 
@@ -15733,7 +15740,7 @@ function array(node, parent, scope, file) {
15733
15740
 
15734
15741
  var returnStatement = body.pop();
15735
15742
 
15736
- body.push(_helpersBuildComprehension2["default"](node, function () {
15743
+ body.push((0, _helpersBuildComprehension2["default"])(node, function () {
15737
15744
  return util.template("array-push", {
15738
15745
  STATEMENT: node.body,
15739
15746
  KEY: uid
@@ -15788,7 +15795,7 @@ function ObjectExpression(node, parent, scope, file) {
15788
15795
 
15789
15796
  for (var i = 0; i < node.properties.length; i++) {
15790
15797
  var prop = node.properties[i];
15791
- if (prop.decorators) _helpersMemoiseDecorators2["default"](prop.decorators, scope);
15798
+ if (prop.decorators) (0, _helpersMemoiseDecorators2["default"])(prop.decorators, scope);
15792
15799
 
15793
15800
  if (prop.kind === "init") {
15794
15801
  prop.kind = "";
@@ -15855,7 +15862,7 @@ var metadata = {
15855
15862
  exports.metadata = metadata;
15856
15863
  var MATH_POW = t.memberExpression(t.identifier("Math"), t.identifier("pow"));
15857
15864
 
15858
- var _build = _helpersBuildBinaryAssignmentOperatorTransformer2["default"]({
15865
+ var _build = (0, _helpersBuildBinaryAssignmentOperatorTransformer2["default"])({
15859
15866
  operator: "**",
15860
15867
 
15861
15868
  build: function build(left, right) {
@@ -16002,12 +16009,12 @@ function internal(transformer, opts) {
16002
16009
 
16003
16010
  function blacklist(transformer, opts) {
16004
16011
  var blacklist = opts.blacklist;
16005
- if (blacklist.length && _lodashCollectionIncludes2["default"](blacklist, transformer.key)) return false;
16012
+ if (blacklist.length && (0, _lodashCollectionIncludes2["default"])(blacklist, transformer.key)) return false;
16006
16013
  }
16007
16014
 
16008
16015
  function whitelist(transformer, opts) {
16009
16016
  var whitelist = opts.whitelist;
16010
- if (whitelist) return _lodashCollectionIncludes2["default"](whitelist, transformer.key);
16017
+ if (whitelist) return (0, _lodashCollectionIncludes2["default"])(whitelist, transformer.key);
16011
16018
  }
16012
16019
 
16013
16020
  function stage(transformer, opts) {
@@ -16016,7 +16023,7 @@ function stage(transformer, opts) {
16016
16023
  }
16017
16024
 
16018
16025
  function optional(transformer, opts) {
16019
- if (transformer.metadata.optional && !_lodashCollectionIncludes2["default"](opts.optional, transformer.key)) return false;
16026
+ if (transformer.metadata.optional && !(0, _lodashCollectionIncludes2["default"])(opts.optional, transformer.key)) return false;
16020
16027
  }
16021
16028
  },{"lodash/collection/includes":337}],120:[function(require,module,exports){
16022
16029
  "use strict";
@@ -16139,7 +16146,7 @@ var BlockStatement = {
16139
16146
  }
16140
16147
  if (!hasChange) return;
16141
16148
 
16142
- node.body = _lodashCollectionSortBy2["default"](node.body, function (bodyNode) {
16149
+ node.body = (0, _lodashCollectionSortBy2["default"])(node.body, function (bodyNode) {
16143
16150
  var priority = bodyNode && bodyNode._blockHoist;
16144
16151
  if (priority == null) priority = 1;
16145
16152
  if (priority === true) priority = 2;
@@ -16177,17 +16184,31 @@ exports.metadata = metadata;
16177
16184
  function buildClone(bindingKey, refKey) {
16178
16185
  return function (node) {
16179
16186
  if (node[bindingKey] === node[refKey]) {
16180
- node[refKey] = t.removeComments(_lodashLangClone2["default"](node[refKey]));
16187
+ node[refKey] = t.removeComments((0, _lodashLangClone2["default"])(node[refKey]));
16188
+ }
16189
+ };
16190
+ }
16191
+
16192
+ function buildListClone(listKey, bindingKey, refKey) {
16193
+ var clone = buildClone(bindingKey, refKey);
16194
+
16195
+ return function (node) {
16196
+ if (!node[listKey]) return;
16197
+
16198
+ var _arr = node[listKey];
16199
+ for (var _i = 0; _i < _arr.length; _i++) {
16200
+ var subNode = _arr[_i];
16201
+ clone(subNode);
16181
16202
  }
16182
16203
  };
16183
16204
  }
16184
16205
 
16185
16206
  var Property = buildClone("value", "key");
16186
16207
  exports.Property = Property;
16187
- var ExportSpecifier = buildClone("local", "exported");
16188
- exports.ExportSpecifier = ExportSpecifier;
16189
- var ImportSpecifier = buildClone("local", "imported");
16190
- exports.ImportSpecifier = ImportSpecifier;
16208
+ var ExportDeclaration = buildListClone("specifiers", "local", "exported");
16209
+ exports.ExportDeclaration = ExportDeclaration;
16210
+ var ImportDeclaration = buildListClone("specifiers", "local", "imported");
16211
+ exports.ImportDeclaration = ImportDeclaration;
16191
16212
  },{"../../../types":167,"lodash/lang/clone":416}],123:[function(require,module,exports){
16192
16213
  "use strict";
16193
16214
 
@@ -16325,6 +16346,10 @@ function ExportDefaultDeclaration(node, parent, scope) {
16325
16346
  }
16326
16347
  }
16327
16348
 
16349
+ function buildExportSpecifier(id) {
16350
+ return t.exportSpecifier((0, _lodashLangClone2["default"])(id), (0, _lodashLangClone2["default"])(id));
16351
+ }
16352
+
16328
16353
  function ExportNamedDeclaration(node, parent, scope) {
16329
16354
  ImportDeclaration.apply(this, arguments);
16330
16355
 
@@ -16337,12 +16362,12 @@ function ExportNamedDeclaration(node, parent, scope) {
16337
16362
 
16338
16363
  if (t.isClassDeclaration(declar)) {
16339
16364
  // export class Foo {}
16340
- node.specifiers = [t.exportSpecifier(declar.id, declar.id)];
16365
+ node.specifiers = [buildExportSpecifier(declar.id)];
16341
16366
  node.declaration = null;
16342
16367
  return [getDeclar(), node];
16343
16368
  } else if (t.isFunctionDeclaration(declar)) {
16344
16369
  // export function Foo() {}
16345
- node.specifiers = [t.exportSpecifier(declar.id, declar.id)];
16370
+ node.specifiers = [buildExportSpecifier(declar.id)];
16346
16371
  node.declaration = null;
16347
16372
  node._blockHoist = 2;
16348
16373
  return [getDeclar(), node];
@@ -16351,8 +16376,7 @@ function ExportNamedDeclaration(node, parent, scope) {
16351
16376
  var specifiers = [];
16352
16377
  var bindings = this.get("declaration").getBindingIdentifiers();
16353
16378
  for (var key in bindings) {
16354
- var id = bindings[key];
16355
- specifiers.push(t.exportSpecifier(_lodashLangClone2["default"](id), _lodashLangClone2["default"](id)));
16379
+ specifiers.push(buildExportSpecifier(bindings[key]));
16356
16380
  }
16357
16381
  return [declar, t.exportNamedDeclaration(null, specifiers)];
16358
16382
  }
@@ -16954,7 +16978,7 @@ exports.metadata = metadata;
16954
16978
  function Func(node, parent, scope, file) {
16955
16979
  if (!node.async || node.generator) return;
16956
16980
 
16957
- return _helpersRemapAsyncToGenerator2["default"](node, file.addHelper("async-to-generator"), scope);
16981
+ return (0, _helpersRemapAsyncToGenerator2["default"])(node, file.addHelper("async-to-generator"), scope);
16958
16982
  }
16959
16983
  },{"../../helpers/remap-async-to-generator":67,"./bluebird-coroutines":138}],138:[function(require,module,exports){
16960
16984
  "use strict";
@@ -16989,7 +17013,7 @@ exports.metadata = metadata;
16989
17013
  function Func(node, parent, scope, file) {
16990
17014
  if (!node.async || node.generator) return;
16991
17015
 
16992
- return _helpersRemapAsyncToGenerator2["default"](node, t.memberExpression(file.addImport("bluebird", null, "absolute"), t.identifier("coroutine")), scope);
17016
+ return (0, _helpersRemapAsyncToGenerator2["default"])(node, t.memberExpression(file.addImport("bluebird", null, "absolute"), t.identifier("coroutine")), scope);
16993
17017
  }
16994
17018
  },{"../../../types":167,"../../helpers/remap-async-to-generator":67}],139:[function(require,module,exports){
16995
17019
  "use strict";
@@ -17414,7 +17438,7 @@ function ReferencedIdentifier(node, parent, scope, file) {
17414
17438
  }
17415
17439
 
17416
17440
  if (t.isMemberExpression(parent)) return;
17417
- if (!_lodashObjectHas2["default"](_definitions2["default"].builtins, node.name)) return;
17441
+ if (!(0, _lodashObjectHas2["default"])(_definitions2["default"].builtins, node.name)) return;
17418
17442
  if (scope.getBindingIdentifier(node.name)) return;
17419
17443
 
17420
17444
  // Symbol() -> _core.Symbol(); new Promise -> new _core.Promise
@@ -17457,10 +17481,10 @@ var MemberExpression = {
17457
17481
 
17458
17482
  if (node.computed) return;
17459
17483
 
17460
- if (!_lodashObjectHas2["default"](_definitions2["default"].methods, obj.name)) return;
17484
+ if (!(0, _lodashObjectHas2["default"])(_definitions2["default"].methods, obj.name)) return;
17461
17485
 
17462
17486
  var methods = _definitions2["default"].methods[obj.name];
17463
- if (!_lodashObjectHas2["default"](methods, prop.name)) return;
17487
+ if (!(0, _lodashObjectHas2["default"])(methods, prop.name)) return;
17464
17488
 
17465
17489
  if (scope.getBindingIdentifier(obj.name)) return;
17466
17490
 
@@ -17474,7 +17498,7 @@ var MemberExpression = {
17474
17498
  var prop = node.property;
17475
17499
  var obj = node.object;
17476
17500
 
17477
- if (!_lodashObjectHas2["default"](_definitions2["default"].builtins, obj.name)) return;
17501
+ if (!(0, _lodashObjectHas2["default"])(_definitions2["default"].builtins, obj.name)) return;
17478
17502
  if (scope.getBindingIdentifier(obj.name)) return;
17479
17503
 
17480
17504
  var modulePath = _definitions2["default"].builtins[obj.name];
@@ -17662,7 +17686,7 @@ function ObjectExpression(node, parent, scope, file) {
17662
17686
 
17663
17687
  if (isProtoKey(prop)) {
17664
17688
  proto = prop.value;
17665
- _lodashArrayPull2["default"](node.properties, prop);
17689
+ (0, _lodashArrayPull2["default"])(node.properties, prop);
17666
17690
  }
17667
17691
  }
17668
17692
 
@@ -17801,7 +17825,7 @@ function Identifier(node, parent, scope, file) {
17801
17825
  var shortest = -1;
17802
17826
 
17803
17827
  for (var name in bindings) {
17804
- var distance = _leven2["default"](node.name, name);
17828
+ var distance = (0, _leven2["default"])(node.name, name);
17805
17829
  if (distance <= 0 || distance > 3) continue;
17806
17830
  if (distance <= shortest) continue;
17807
17831
 
@@ -18135,7 +18159,7 @@ function hasBlacklistedType(node, parent, scope, state) {
18135
18159
 
18136
18160
  traverse.hasType = function (tree, scope, type, blacklistTypes) {
18137
18161
  // the node we're searching in is blacklisted
18138
- if (_lodashCollectionIncludes2["default"](blacklistTypes, tree.type)) return false;
18162
+ if ((0, _lodashCollectionIncludes2["default"])(blacklistTypes, tree.type)) return false;
18139
18163
 
18140
18164
  // the type we're looking for is the same as the passed node
18141
18165
  if (tree.type === type) return true;
@@ -18560,7 +18584,7 @@ var _types = require("../../types");
18560
18584
 
18561
18585
  var t = _interopRequireWildcard(_types);
18562
18586
 
18563
- var hoistVariablesVisitor = _visitors.explode({
18587
+ var hoistVariablesVisitor = (0, _visitors.explode)({
18564
18588
  Function: function Function() {
18565
18589
  this.skip();
18566
18590
  },
@@ -18821,7 +18845,7 @@ var TraversalPath = (function () {
18821
18845
  if (t.isLabeledStatement(this.parent) || t.isBlockStatement(this.container)) {
18822
18846
  return false;
18823
18847
  } else {
18824
- return _lodashCollectionIncludes2["default"](t.STATEMENT_OR_BLOCK_KEYS, this.key);
18848
+ return (0, _lodashCollectionIncludes2["default"])(t.STATEMENT_OR_BLOCK_KEYS, this.key);
18825
18849
  }
18826
18850
  };
18827
18851
 
@@ -19145,12 +19169,12 @@ var TraversalPath = (function () {
19145
19169
  TraversalPath.prototype.replaceWithSourceString = function replaceWithSourceString(replacement) {
19146
19170
  try {
19147
19171
  replacement = "(" + replacement + ")";
19148
- replacement = _helpersParse2["default"](replacement);
19172
+ replacement = (0, _helpersParse2["default"])(replacement);
19149
19173
  } catch (err) {
19150
19174
  var loc = err.loc;
19151
19175
  if (loc) {
19152
19176
  err.message += " - make sure this is an expression.";
19153
- err.message += "\n" + _helpersCodeFrame2["default"](replacement, loc.line, loc.column + 1);
19177
+ err.message += "\n" + (0, _helpersCodeFrame2["default"])(replacement, loc.line, loc.column + 1);
19154
19178
  }
19155
19179
  throw err;
19156
19180
  }
@@ -19472,6 +19496,14 @@ var TraversalPath = (function () {
19472
19496
  return !this.has(key);
19473
19497
  };
19474
19498
 
19499
+ /**
19500
+ * Description
19501
+ */
19502
+
19503
+ TraversalPath.prototype.equals = function equals(key, value) {
19504
+ return this.node[key] === value;
19505
+ };
19506
+
19475
19507
  /**
19476
19508
  * Description
19477
19509
  */
@@ -19583,9 +19615,9 @@ var TraversalPath = (function () {
19583
19615
 
19584
19616
  if (path.isLiteral()) {
19585
19617
  var value = path.node.value;
19586
- if (_lodashLangIsString2["default"](value)) return t.stringTypeAnnotation();
19587
- if (_lodashLangIsNumber2["default"](value)) return t.numberTypeAnnotation();
19588
- if (_lodashLangIsBoolean2["default"](value)) return t.booleanTypeAnnotation();
19618
+ if ((0, _lodashLangIsString2["default"])(value)) return t.stringTypeAnnotation();
19619
+ if ((0, _lodashLangIsNumber2["default"])(value)) return t.numberTypeAnnotation();
19620
+ if ((0, _lodashLangIsBoolean2["default"])(value)) return t.booleanTypeAnnotation();
19589
19621
  }
19590
19622
 
19591
19623
  if (path.isCallExpression()) {
@@ -19641,7 +19673,7 @@ var TraversalPath = (function () {
19641
19673
  */
19642
19674
 
19643
19675
  TraversalPath.prototype.traverse = function traverse(visitor, state) {
19644
- _index2["default"](this.node, visitor, this.scope, state, this);
19676
+ (0, _index2["default"])(this.node, visitor, this.scope, state, this);
19645
19677
  };
19646
19678
 
19647
19679
  /**
@@ -19731,8 +19763,8 @@ var TraversalPath = (function () {
19731
19763
 
19732
19764
  exports["default"] = TraversalPath;
19733
19765
 
19734
- _lodashObjectAssign2["default"](TraversalPath.prototype, require("./evaluation"));
19735
- _lodashObjectAssign2["default"](TraversalPath.prototype, require("./conversion"));
19766
+ (0, _lodashObjectAssign2["default"])(TraversalPath.prototype, require("./evaluation"));
19767
+ (0, _lodashObjectAssign2["default"])(TraversalPath.prototype, require("./conversion"));
19736
19768
 
19737
19769
  var _loop = function (type) {
19738
19770
  if (type[0] === "_") return "continue";
@@ -19902,7 +19934,7 @@ var functionVariableVisitor = {
19902
19934
  }
19903
19935
  };
19904
19936
 
19905
- var programReferenceVisitor = _visitors.explode({
19937
+ var programReferenceVisitor = (0, _visitors.explode)({
19906
19938
  ReferencedIdentifier: function ReferencedIdentifier(node, parent, scope, state) {
19907
19939
  var bindingInfo = scope.getBinding(node.name);
19908
19940
  if (bindingInfo) {
@@ -19954,7 +19986,7 @@ var programReferenceVisitor = _visitors.explode({
19954
19986
  }
19955
19987
  });
19956
19988
 
19957
- var blockVariableVisitor = _visitors.explode({
19989
+ var blockVariableVisitor = (0, _visitors.explode)({
19958
19990
  Scope: function Scope() {
19959
19991
  this.skip();
19960
19992
  },
@@ -19966,7 +19998,7 @@ var blockVariableVisitor = _visitors.explode({
19966
19998
  }
19967
19999
  });
19968
20000
 
19969
- var renameVisitor = _visitors.explode({
20001
+ var renameVisitor = (0, _visitors.explode)({
19970
20002
  ReferencedIdentifier: function ReferencedIdentifier(node, parent, scope, state) {
19971
20003
  if (node.name === state.oldName) {
19972
20004
  node.name = state.newName;
@@ -20024,7 +20056,7 @@ var Scope = (function () {
20024
20056
  */
20025
20057
 
20026
20058
  Scope.prototype.traverse = function traverse(node, opts, state) {
20027
- _index2["default"](node, opts, this, state, this.path);
20059
+ (0, _index2["default"])(node, opts, this, state, this.path);
20028
20060
  };
20029
20061
 
20030
20062
  /**
@@ -20402,15 +20434,15 @@ var Scope = (function () {
20402
20434
  //
20403
20435
 
20404
20436
  var info = this.block._scopeInfo;
20405
- if (info) return _lodashObjectExtend2["default"](this, info);
20437
+ if (info) return (0, _lodashObjectExtend2["default"])(this, info);
20406
20438
 
20407
20439
  info = this.block._scopeInfo = {
20408
- references: _helpersObject2["default"](),
20409
- bindings: _helpersObject2["default"](),
20410
- globals: _helpersObject2["default"](),
20411
- uids: _helpersObject2["default"]() };
20440
+ references: (0, _helpersObject2["default"])(),
20441
+ bindings: (0, _helpersObject2["default"])(),
20442
+ globals: (0, _helpersObject2["default"])(),
20443
+ uids: (0, _helpersObject2["default"])() };
20412
20444
 
20413
- _lodashObjectExtend2["default"](this, info);
20445
+ (0, _lodashObjectExtend2["default"])(this, info);
20414
20446
 
20415
20447
  // ForStatement - left, init
20416
20448
 
@@ -20563,11 +20595,11 @@ var Scope = (function () {
20563
20595
  */
20564
20596
 
20565
20597
  Scope.prototype.getAllBindings = function getAllBindings() {
20566
- var ids = _helpersObject2["default"]();
20598
+ var ids = (0, _helpersObject2["default"])();
20567
20599
 
20568
20600
  var scope = this;
20569
20601
  do {
20570
- _lodashObjectDefaults2["default"](ids, scope.bindings);
20602
+ (0, _lodashObjectDefaults2["default"])(ids, scope.bindings);
20571
20603
  scope = scope.parent;
20572
20604
  } while (scope);
20573
20605
 
@@ -20579,7 +20611,7 @@ var Scope = (function () {
20579
20611
  */
20580
20612
 
20581
20613
  Scope.prototype.getAllBindingsOfKind = function getAllBindingsOfKind() {
20582
- var ids = _helpersObject2["default"]();
20614
+ var ids = (0, _helpersObject2["default"])();
20583
20615
 
20584
20616
  var _arr8 = arguments;
20585
20617
  for (var _i8 = 0; _i8 < _arr8.length; _i8++) {
@@ -20661,8 +20693,8 @@ var Scope = (function () {
20661
20693
  if (this.hasOwnBinding(name)) return true;
20662
20694
  if (this.parentHasBinding(name)) return true;
20663
20695
  if (this.hasUid(name)) return true;
20664
- if (_lodashCollectionIncludes2["default"](Scope.globals, name)) return true;
20665
- if (_lodashCollectionIncludes2["default"](Scope.contextVariables, name)) return true;
20696
+ if ((0, _lodashCollectionIncludes2["default"])(Scope.globals, name)) return true;
20697
+ if ((0, _lodashCollectionIncludes2["default"])(Scope.contextVariables, name)) return true;
20666
20698
  return false;
20667
20699
  };
20668
20700
 
@@ -20706,7 +20738,7 @@ var Scope = (function () {
20706
20738
 
20707
20739
  _createClass(Scope, null, [{
20708
20740
  key: "globals",
20709
- value: _lodashArrayFlatten2["default"]([_globals2["default"].builtin, _globals2["default"].browser, _globals2["default"].node].map(Object.keys)),
20741
+ value: (0, _lodashArrayFlatten2["default"])([_globals2["default"].builtin, _globals2["default"].browser, _globals2["default"].node].map(Object.keys)),
20710
20742
  enumerable: true
20711
20743
  }, {
20712
20744
  key: "contextVariables",
@@ -21531,7 +21563,7 @@ function valueToNode(value) {
21531
21563
  return t.identifier("undefined");
21532
21564
  }
21533
21565
 
21534
- if (value === true || value === false || value === null || _lodashLangIsString2["default"](value) || _lodashLangIsNumber2["default"](value) || _lodashLangIsRegExp2["default"](value)) {
21566
+ if (value === true || value === false || value === null || (0, _lodashLangIsString2["default"])(value) || (0, _lodashLangIsNumber2["default"])(value) || (0, _lodashLangIsRegExp2["default"])(value)) {
21535
21567
  return t.literal(value);
21536
21568
  }
21537
21569
 
@@ -21539,7 +21571,7 @@ function valueToNode(value) {
21539
21571
  return t.arrayExpression(value.map(t.valueToNode));
21540
21572
  }
21541
21573
 
21542
- if (_lodashLangIsPlainObject2["default"](value)) {
21574
+ if ((0, _lodashLangIsPlainObject2["default"])(value)) {
21543
21575
  var props = [];
21544
21576
  for (var key in value) {
21545
21577
  var nodeKey;
@@ -21696,18 +21728,18 @@ var ALIAS_KEYS = require("./alias-keys");
21696
21728
  exports.ALIAS_KEYS = ALIAS_KEYS;
21697
21729
  t.FLIPPED_ALIAS_KEYS = {};
21698
21730
 
21699
- _lodashCollectionEach2["default"](t.VISITOR_KEYS, function (keys, type) {
21731
+ (0, _lodashCollectionEach2["default"])(t.VISITOR_KEYS, function (keys, type) {
21700
21732
  registerType(type, true);
21701
21733
  });
21702
21734
 
21703
- _lodashCollectionEach2["default"](t.ALIAS_KEYS, function (aliases, type) {
21704
- _lodashCollectionEach2["default"](aliases, function (alias) {
21735
+ (0, _lodashCollectionEach2["default"])(t.ALIAS_KEYS, function (aliases, type) {
21736
+ (0, _lodashCollectionEach2["default"])(aliases, function (alias) {
21705
21737
  var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || [];
21706
21738
  types.push(type);
21707
21739
  });
21708
21740
  });
21709
21741
 
21710
- _lodashCollectionEach2["default"](t.FLIPPED_ALIAS_KEYS, function (types, type) {
21742
+ (0, _lodashCollectionEach2["default"])(t.FLIPPED_ALIAS_KEYS, function (types, type) {
21711
21743
  t[type.toUpperCase() + "_TYPES"] = types;
21712
21744
  registerType(type, false);
21713
21745
  });
@@ -21744,17 +21776,17 @@ function isType(nodeType, targetType) {
21744
21776
  return false;
21745
21777
  }
21746
21778
 
21747
- _lodashCollectionEach2["default"](t.VISITOR_KEYS, function (keys, type) {
21779
+ (0, _lodashCollectionEach2["default"])(t.VISITOR_KEYS, function (keys, type) {
21748
21780
  if (t.BUILDER_KEYS[type]) return;
21749
21781
 
21750
21782
  var defs = {};
21751
- _lodashCollectionEach2["default"](keys, function (key) {
21783
+ (0, _lodashCollectionEach2["default"])(keys, function (key) {
21752
21784
  defs[key] = null;
21753
21785
  });
21754
21786
  t.BUILDER_KEYS[type] = defs;
21755
21787
  });
21756
21788
 
21757
- _lodashCollectionEach2["default"](t.BUILDER_KEYS, function (keys, type) {
21789
+ (0, _lodashCollectionEach2["default"])(t.BUILDER_KEYS, function (keys, type) {
21758
21790
  t[type[0].toLowerCase() + type.slice(1)] = function () {
21759
21791
  var node = {};
21760
21792
  node.start = null;
@@ -21897,7 +21929,7 @@ function inheritsComments(child, parent) {
21897
21929
 
21898
21930
  for (var _i4 = 0; _i4 < _arr4.length; _i4++) {
21899
21931
  var key = _arr4[_i4];
21900
- child[key] = _lodashArrayUniq2["default"](_lodashArrayCompact2["default"]([].concat(child[key], parent[key])));
21932
+ child[key] = (0, _lodashArrayUniq2["default"])((0, _lodashArrayCompact2["default"])([].concat(child[key], parent[key])));
21901
21933
  }
21902
21934
  }
21903
21935
  return child;
@@ -21919,13 +21951,13 @@ function inherits(child, parent) {
21919
21951
  return child;
21920
21952
  }
21921
21953
 
21922
- _toFastProperties2["default"](t);
21923
- _toFastProperties2["default"](t.VISITOR_KEYS);
21954
+ (0, _toFastProperties2["default"])(t);
21955
+ (0, _toFastProperties2["default"])(t.VISITOR_KEYS);
21924
21956
 
21925
21957
  exports.__esModule = true;
21926
- _lodashObjectAssign2["default"](t, require("./retrievers"));
21927
- _lodashObjectAssign2["default"](t, require("./validators"));
21928
- _lodashObjectAssign2["default"](t, require("./converters"));
21958
+ (0, _lodashObjectAssign2["default"])(t, require("./retrievers"));
21959
+ (0, _lodashObjectAssign2["default"])(t, require("./validators"));
21960
+ (0, _lodashObjectAssign2["default"])(t, require("./converters"));
21929
21961
  },{"./alias-keys":164,"./builder-keys":165,"./converters":166,"./retrievers":168,"./validators":169,"./visitor-keys":170,"lodash/array/compact":329,"lodash/array/uniq":333,"lodash/collection/each":335,"lodash/object/assign":431,"to-fast-properties":509}],168:[function(require,module,exports){
21930
21962
  "use strict";
21931
21963
 
@@ -21958,7 +21990,7 @@ var t = _interopRequireWildcard(_index);
21958
21990
 
21959
21991
  function getBindingIdentifiers(node) {
21960
21992
  var search = [].concat(node);
21961
- var ids = _helpersObject2["default"]();
21993
+ var ids = (0, _helpersObject2["default"])();
21962
21994
 
21963
21995
  while (search.length) {
21964
21996
  var id = search.shift();
@@ -22483,7 +22515,7 @@ exports.inspect = _util.inspect;
22483
22515
  function canCompile(filename, altExts) {
22484
22516
  var exts = altExts || canCompile.EXTENSIONS;
22485
22517
  var ext = _path2["default"].extname(filename);
22486
- return _lodashCollectionContains2["default"](exts, ext);
22518
+ return (0, _lodashCollectionContains2["default"])(exts, ext);
22487
22519
  }
22488
22520
 
22489
22521
  canCompile.EXTENSIONS = [".js", ".jsx", ".es6", ".es"];
@@ -22529,15 +22561,15 @@ function list(val) {
22529
22561
  function regexify(val) {
22530
22562
  if (!val) return new RegExp(/.^/);
22531
22563
  if (Array.isArray(val)) val = new RegExp(val.map(_lodashStringEscapeRegExp2["default"]).join("|"), "i");
22532
- if (_lodashLangIsString2["default"](val)) return _minimatch2["default"].makeRe(val, { nocase: true });
22533
- if (_lodashLangIsRegExp2["default"](val)) return val;
22564
+ if ((0, _lodashLangIsString2["default"])(val)) return _minimatch2["default"].makeRe(val, { nocase: true });
22565
+ if ((0, _lodashLangIsRegExp2["default"])(val)) return val;
22534
22566
  throw new TypeError("illegal type for regexify");
22535
22567
  }
22536
22568
 
22537
22569
  function arrayify(val, mapFn) {
22538
22570
  if (!val) return [];
22539
- if (_lodashLangIsBoolean2["default"](val)) return arrayify([val], mapFn);
22540
- if (_lodashLangIsString2["default"](val)) return arrayify(list(val), mapFn);
22571
+ if ((0, _lodashLangIsBoolean2["default"])(val)) return arrayify([val], mapFn);
22572
+ if ((0, _lodashLangIsString2["default"])(val)) return arrayify(list(val), mapFn);
22541
22573
 
22542
22574
  if (Array.isArray(val)) {
22543
22575
  if (mapFn) val = val.map(mapFn);
@@ -22554,7 +22586,7 @@ function booleanify(val) {
22554
22586
  }
22555
22587
 
22556
22588
  function shouldIgnore(filename, ignore, only) {
22557
- filename = _slash2["default"](filename);
22589
+ filename = (0, _slash2["default"])(filename);
22558
22590
  if (only.length) {
22559
22591
  var _arr = only;
22560
22592
 
@@ -22581,7 +22613,7 @@ var templateVisitor = {
22581
22613
  node = node.expression;
22582
22614
  }
22583
22615
 
22584
- if (t.isIdentifier(node) && _lodashObjectHas2["default"](nodes, node.name)) {
22616
+ if (t.isIdentifier(node) && (0, _lodashObjectHas2["default"])(nodes, node.name)) {
22585
22617
  this.skip();
22586
22618
  this.replaceInline(nodes[node.name]);
22587
22619
  }
@@ -22596,10 +22628,10 @@ function template(name, nodes, keepExpression) {
22596
22628
  nodes = null;
22597
22629
  }
22598
22630
 
22599
- ast = _lodashLangCloneDeep2["default"](ast);
22631
+ ast = (0, _lodashLangCloneDeep2["default"])(ast);
22600
22632
 
22601
- if (!_lodashLangIsEmpty2["default"](nodes)) {
22602
- _traversal2["default"](ast, templateVisitor, null, nodes);
22633
+ if (!(0, _lodashLangIsEmpty2["default"])(nodes)) {
22634
+ (0, _traversal2["default"])(ast, templateVisitor, null, nodes);
22603
22635
  }
22604
22636
 
22605
22637
  if (ast.body.length > 1) return ast.body;
@@ -22614,7 +22646,7 @@ function template(name, nodes, keepExpression) {
22614
22646
  }
22615
22647
 
22616
22648
  function parseTemplate(loc, code) {
22617
- var ast = _helpersParse2["default"](code, { filename: loc, looseModules: true }).program;
22649
+ var ast = (0, _helpersParse2["default"])(code, { filename: loc, looseModules: true }).program;
22618
22650
  ast = _traversal2["default"].removeProperties(ast);
22619
22651
  return ast;
22620
22652
  }
@@ -85837,7 +85869,7 @@ module.exports = function (str) {
85837
85869
  module.exports={
85838
85870
  "name": "babel-core",
85839
85871
  "description": "Turn ES6 code into readable vanilla ES5 with source maps",
85840
- "version": "5.3.0",
85872
+ "version": "5.3.1",
85841
85873
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
85842
85874
  "homepage": "https://babeljs.io/",
85843
85875
  "license": "MIT",
@@ -85900,7 +85932,7 @@ module.exports={
85900
85932
  "user-home": "^1.1.1"
85901
85933
  },
85902
85934
  "devDependencies": {
85903
- "babel": "5.1.13",
85935
+ "babel": "5.3.0",
85904
85936
  "browserify": "^9.0.8",
85905
85937
  "chai": "^2.2.0",
85906
85938
  "eslint": "^0.18.0",