babel-source 5.6.1 → 5.6.2

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 +24 -20
  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
- M2ZlMWFmOWFlN2I3ZjM2ODg3ZjNlNzA3ZWZhN2UzNDdmYzVmMjdiOQ==
4
+ NDRkZDEzZGZmNmRjM2RmNzg2MTgwZGVlNzAxNTRjNGM0OGEwZDIxMQ==
5
5
  data.tar.gz: !binary |-
6
- ZmIwODI5YzlkYjhiNDFhZWE2MGZmNjU2MDU3ZGQ0MGIxYjg5MDZmNQ==
6
+ YmFlODBjOTRmZDBhM2Q5ODk1YWY0OTM5OTVhZWIxZTM2YTA5M2IxNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OWU0OWFjNDZhNzQ0YzM4OGFhN2NjZjg2Y2RjODI4YTU2YmQyZTJhYzBkNjQw
10
- NmEyMjZiYmNlZWY4MTg5YzM1MjU3ODU2MjYyZmI3NmVjOGRjMjdhMWUyNjIy
11
- YzVhOWM5ZjFhOTFmMzBiMDU2ZjBhMTU4MzIzOGFmMjQyMzVjZjg=
9
+ Y2NlZDU3MmIyOGZkMmM5ZjE1NGY5YWZkNjRlN2I2OWJiMjE4M2EzOTQ0OGZm
10
+ MmRmNDM0MTM5MDVhMTFiMTQ2NTFiODAxMDdiNTZjMmU1ZmY1YTQ2NGViYWQy
11
+ NDA1M2YxYzkxMzRhOGIyZTQ4Y2RiNzUzOTRkZTY3NGFhMDUyYWE=
12
12
  data.tar.gz: !binary |-
13
- MTM0YjdjYTdlM2YxZTAxZjExZGIxMjdlYjYyYWE0NDQxYWY2ZGU3MDgwMWRm
14
- NWI1NTRmZjNiNWZkMTA0NzcxOWVkYmY2NGM4Y2RhNGY4ZDQ0MzIwNTA5MzRk
15
- ODI5ZGYxZjZiZjhiODYwMzIxY2M5ZTUxNmI5MWU4OTUyMTM1Yzc=
13
+ ZDgzNTEwOWViNGIzNTQ1N2M0OWE2OWRhNGYyZTRlZTJjMzlhYzEzMjgzZGI4
14
+ YTk1NGEzNDU4ZmRhYWJhOGM5OTRhMGU5OGNlMjNiYTRhYTRhODI3YjE2NmE1
15
+ ZmZkZjdjOGZmNWZhOTNkNDQxZTk5NzUwYmQ1MzMxMjU1M2M2MGY=
data/lib/babel.js CHANGED
@@ -12807,24 +12807,16 @@ exports.visitor = visitor;
12807
12807
  "use strict";
12808
12808
 
12809
12809
  exports.__esModule = true;
12810
-
12811
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }
12812
-
12813
- var _types = require("../../../types");
12814
-
12815
- var t = _interopRequireWildcard(_types);
12816
-
12817
12810
  var visitor = {
12818
12811
  ArrowFunctionExpression: function ArrowFunctionExpression(node) {
12819
- t.ensureBlock(node);
12820
-
12812
+ this.ensureBlock();
12821
12813
  node.expression = false;
12822
12814
  node.type = "FunctionExpression";
12823
12815
  node.shadow = true;
12824
12816
  }
12825
12817
  };
12826
12818
  exports.visitor = visitor;
12827
- },{"../../../types":172}],95:[function(require,module,exports){
12819
+ },{}],95:[function(require,module,exports){
12828
12820
  "use strict";
12829
12821
 
12830
12822
  exports.__esModule = true;
@@ -13993,7 +13985,7 @@ var ClassTransformer = (function () {
13993
13985
 
13994
13986
  var classRef = this.classRef;
13995
13987
  if (!node["static"]) classRef = t.memberExpression(classRef, t.identifier("prototype"));
13996
- var methodName = t.memberExpression(classRef, node.key, node.computed);
13988
+ var methodName = t.memberExpression(classRef, node.key, node.computed || t.isLiteral(node.key));
13997
13989
 
13998
13990
  var expr = t.expressionStatement(t.assignmentExpression("=", methodName, node.value));
13999
13991
  t.inheritsComments(expr, node);
@@ -14145,7 +14137,7 @@ var visitor = {
14145
14137
 
14146
14138
  node.left = t.variableDeclaration("var", [t.variableDeclarator(temp)]);
14147
14139
 
14148
- t.ensureBlock(node);
14140
+ this.ensureBlock();
14149
14141
 
14150
14142
  node.body.body.unshift(t.variableDeclaration("var", [t.variableDeclarator(left, temp)]));
14151
14143
 
@@ -14171,7 +14163,7 @@ var visitor = {
14171
14163
 
14172
14164
  destructuring.init(pattern, key);
14173
14165
 
14174
- t.ensureBlock(node);
14166
+ this.ensureBlock();
14175
14167
 
14176
14168
  var block = node.body;
14177
14169
  block.body = nodes.concat(block.body);
@@ -14209,7 +14201,7 @@ var visitor = {
14209
14201
  destructuring.init(pattern, ref);
14210
14202
  }
14211
14203
 
14212
- t.ensureBlock(node);
14204
+ this.ensureBlock();
14213
14205
 
14214
14206
  var block = node.body;
14215
14207
  block.body = nodes.concat(block.body);
@@ -14657,7 +14649,7 @@ var visitor = {
14657
14649
  var block = loop.body;
14658
14650
 
14659
14651
  // ensure that it's a block so we can take all its statements
14660
- t.ensureBlock(node);
14652
+ this.ensureBlock();
14661
14653
 
14662
14654
  // add the value declaration to the new loop body
14663
14655
  if (declar) {
@@ -15003,7 +14995,7 @@ var visitor = {
15003
14995
  if (!hasDefaults(node)) return;
15004
14996
 
15005
14997
  // ensure it's a block, useful for arrow functions
15006
- t.ensureBlock(node);
14998
+ this.ensureBlock();
15007
14999
 
15008
15000
  var state = {
15009
15001
  iife: false,
@@ -15151,7 +15143,8 @@ var memberExpressionOptimisationVisitor = {
15151
15143
  if (this.parentPath.isSpreadElement() && state.offset === 0) {
15152
15144
  var call = this.parentPath.parentPath;
15153
15145
  if (call.isCallExpression() && call.node.arguments.length === 1) {
15154
- return state.argumentsNode;
15146
+ state.candidates.push(this);
15147
+ return;
15155
15148
  }
15156
15149
  }
15157
15150
  }
@@ -15237,7 +15230,9 @@ var visitor = {
15237
15230
  for (var _i = 0; _i < _arr.length; _i++) {
15238
15231
  var candidate = _arr[_i];
15239
15232
  candidate.replaceWith(argsId);
15240
- optimiseMemberExpression(candidate.parent, state.offset);
15233
+ if (candidate.parentPath.isMemberExpression()) {
15234
+ optimiseMemberExpression(candidate.parent, state.offset);
15235
+ }
15241
15236
  }
15242
15237
  }
15243
15238
  return;
@@ -15922,7 +15917,7 @@ var TailCallTransformer = (function () {
15922
15917
 
15923
15918
  //
15924
15919
 
15925
- var body = t.ensureBlock(node).body;
15920
+ var body = this.path.ensureBlock().body;
15926
15921
 
15927
15922
  for (var i = 0; i < body.length; i++) {
15928
15923
  var bodyNode = body[i];
@@ -18556,6 +18551,7 @@ function queueNode(path) {
18556
18551
 
18557
18552
  exports.__esModule = true;
18558
18553
  exports.toComputedKey = toComputedKey;
18554
+ exports.ensureBlock = ensureBlock;
18559
18555
 
18560
18556
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }
18561
18557
 
@@ -18585,6 +18581,14 @@ function toComputedKey() {
18585
18581
 
18586
18582
  return key;
18587
18583
  }
18584
+
18585
+ /**
18586
+ * Description
18587
+ */
18588
+
18589
+ function ensureBlock() {
18590
+ return t.ensureBlock(this.node);
18591
+ }
18588
18592
  },{"../../types":172}],152:[function(require,module,exports){
18589
18593
  (function (global){
18590
18594
  /* eslint eqeqeq: 0 */
@@ -62881,7 +62885,7 @@ module.exports = function (str) {
62881
62885
  module.exports={
62882
62886
  "name": "babel-core",
62883
62887
  "description": "A compiler for writing next generation JavaScript",
62884
- "version": "5.6.1",
62888
+ "version": "5.6.2",
62885
62889
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
62886
62890
  "homepage": "https://babeljs.io/",
62887
62891
  "license": "MIT",
data/lib/babel/source.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Babel
2
2
  module Source
3
- VERSION = "5.6.1"
4
- DATE = Time.at(1434841513)
3
+ VERSION = "5.6.2"
4
+ DATE = Time.at(1434928132)
5
5
  PATH = File.expand_path("../..", __FILE__)
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: babel-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.1
4
+ version: 5.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian McKenzie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-20 00:00:00.000000000 Z
11
+ date: 2015-06-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: sebmck@gmail.com