babel-source 4.4.2 → 4.4.3

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 +21 -9
  3. data/lib/babel/source.rb +2 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzNhMWVmMmRmY2EzZmJiNDA3MTAyYzllYTAzMTJhNjZlMjc1MDEzOA==
4
+ YzYwYzNmZTFiMjgzOTQ3YmNkZjk1NDA1MzM2MTljOGFmYTQwYWFhNw==
5
5
  data.tar.gz: !binary |-
6
- NTgxZjZkMjNmYjY5M2M3MjIyMzFlNGZjMDliMDZiMTVlODA3MjIwOQ==
6
+ YjFlNWJlODIyNzhmZGQzMjA1MDUwZWRmMTI0MGUxZTQ3Yzg1ODQxOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MWM0Njc5Y2ZlNzBhZTliNDI0NDk5NmJiMjNiOWJiNzgwOTUwNTFlZWE1ZGVj
10
- OTU4ZGZhZDhkYjM5MzFlYjBjOTdlMTMxMmNlY2ExMWE2NGY4Y2Q0ODZhMmE3
11
- ZDVlZjFkMzFiNDQxYzJjNGUyYzcxNGM5NmE0M2VkNGM1MGYxMWM=
9
+ Y2RjZDhjOTMwZjc1YzliZTk3ZTg1MTJiOGM1MDQzODRhNDhjMDQ4OWE1ZGZk
10
+ MzY3ZjZhOWMxZDgxM2Y5YzE1MGQ2ODAxZDU2MmU0NDRhZDE0ZGQwNDNjNzJj
11
+ YWFlY2NmNWRmMTkzYWMyOWYzYzQ1NDEyZWJiOWUyMDY5MWNhMzc=
12
12
  data.tar.gz: !binary |-
13
- MzM1MDI4ODgzYmM2Mjc5MDE3MGY3MDkzODc3MTBhMzA1YTgyNThlNGMwYjYx
14
- Y2IyYzRmNGIyOTBhMTU1NTRiYmJhNWEzNzk0M2Y4YzNlYjg0YzcyYzc2OTQz
15
- MWU1MmMxMWY0ZTlkZjI5OTJlMTBkNWM0MDJmYmFiNjdiZGNkZDg=
13
+ ZmY3Mzk1M2NmMGU4MjNjYjhhMzIyMTg3ZTg0NjRjYmI0OTcxMzExMGRmMzA1
14
+ ZGY4OGQ3YmE5MjA5Njk2YTliYzYyMDI4NjZkNGRhNWQ3OTNkM2E3MzM2NGYy
15
+ OTQ2NjM4OTU2YjYzMjgxOWI1NGZmN2JkN2JkNTM3NDBiOTg0MDg=
@@ -2684,7 +2684,7 @@ File.prototype.normalizeOptions = function (opts) {
2684
2684
  }
2685
2685
 
2686
2686
  if (opts.externalHelpers) {
2687
- this.set("runtimeIdentifier", t.identifier("babelHelpers"));
2687
+ this.set("helpersNamespace", t.identifier("babelHelpers"));
2688
2688
  }
2689
2689
 
2690
2690
  opts.blacklist = transform._ensureTransformerNames("blacklist", opts.blacklist);
@@ -2841,7 +2841,7 @@ File.prototype.addHelper = function (name) {
2841
2841
  var declar = program._declarations && program._declarations[name];
2842
2842
  if (declar) return declar.id;
2843
2843
 
2844
- var runtime = this.get("runtimeIdentifier");
2844
+ var runtime = this.get("helpersNamespace");
2845
2845
  if (runtime) {
2846
2846
  name = t.identifier(t.toIdentifier(name));
2847
2847
  return t.memberExpression(runtime, name);
@@ -5037,7 +5037,9 @@ Transformer.prototype.buildPass = function (file) {
5037
5037
  };
5038
5038
 
5039
5039
  },{"../traversal":112,"./transformer-pass":52,"lodash/collection/each":193,"lodash/lang/isFunction":267,"lodash/lang/isObject":270,"lodash/object/assign":274}],54:[function(require,module,exports){
5040
- module.exports={}
5040
+ module.exports={
5041
+ "selfContained": "runtime"
5042
+ }
5041
5043
 
5042
5044
  },{}],55:[function(require,module,exports){
5043
5045
  "use strict";
@@ -6625,8 +6627,9 @@ var breakVisitor = {
6625
6627
  var ret = t.expressionStatement(
6626
6628
  t.callExpression(t.memberExpression(state.iteratorKey, t.identifier("return")), [])
6627
6629
  );
6628
- if (state.wrapReturn) ret = state.wrapReturn(ret);
6630
+ ret = state.wrapReturn(ret);
6629
6631
 
6632
+ this.skip();
6630
6633
  return [ret, node];
6631
6634
  }
6632
6635
  }
@@ -6671,7 +6674,13 @@ var loose = function (node, parent, scope, file) {
6671
6674
  scope.traverse(node, breakVisitor, {
6672
6675
  iteratorKey: iteratorKey,
6673
6676
  wrapReturn: function (node) {
6674
- return t.ifStatement(t.unaryExpression("!", isArrayKey, true), node);
6677
+ return t.ifStatement(
6678
+ t.logicalExpression(
6679
+ "&&",
6680
+ t.unaryExpression("!", isArrayKey, true),
6681
+ t.memberExpression(iteratorKey, t.identifier("return")
6682
+ )
6683
+ ), node);
6675
6684
  },
6676
6685
  label: t.isLabeledStatement(parent) && parent.label.name
6677
6686
  });
@@ -6717,6 +6726,9 @@ var spec = function (node, parent, scope, file) {
6717
6726
 
6718
6727
  scope.traverse(node, breakVisitor, {
6719
6728
  iteratorKey: iteratorKey,
6729
+ wrapReturn: function (node) {
6730
+ return t.ifStatement(t.memberExpression(iteratorKey, t.identifier("return")), node);
6731
+ },
6720
6732
  label: t.isLabeledStatement(parent) && parent.label.name
6721
6733
  });
6722
6734
 
@@ -8088,7 +8100,7 @@ module.exports = {
8088
8100
  // needs to be after `regenerator` due to needing `regeneratorRuntime` references
8089
8101
  // needs to be after `es6.forOf` due to needing `Symbol.iterator` references
8090
8102
  // needs to be before `es6.modules` due to dynamic imports
8091
- selfContained: require("./other/self-contained"),
8103
+ runtime: require("./other/runtime"),
8092
8104
 
8093
8105
  // needs to be before `_blockHoist` due to function hoisting etc
8094
8106
  "es6.modules": require("./es6/modules"),
@@ -8117,7 +8129,7 @@ module.exports = {
8117
8129
  _cleanUp: require("./internal/cleanup")
8118
8130
  };
8119
8131
 
8120
- },{"./es3/member-expression-literals":55,"./es3/property-literals":56,"./es5/properties.mutators":57,"./es6/arrow-functions":58,"./es6/block-scoping":60,"./es6/block-scoping-tdz":59,"./es6/classes":61,"./es6/constants":62,"./es6/destructuring":63,"./es6/for-of":64,"./es6/modules":65,"./es6/object-super":66,"./es6/parameters.default":67,"./es6/parameters.rest":68,"./es6/properties.computed":69,"./es6/properties.shorthand":70,"./es6/spread":71,"./es6/tail-call":72,"./es6/template-literals":73,"./es6/unicode-regex":74,"./es7/abstract-references":75,"./es7/comprehensions":76,"./es7/exponentiation-operator":77,"./es7/object-rest-spread":78,"./internal/alias-functions":80,"./internal/block-hoist":81,"./internal/cleanup":82,"./internal/declarations":83,"./internal/module-formatter":84,"./internal/modules":85,"./minification/dead-code-elimination":86,"./minification/remove-console-calls":87,"./minification/remove-debugger":88,"./minification/rename-local-variables":89,"./other/async-to-generator":90,"./other/bluebird-coroutines":91,"./other/flow":92,"./other/react":94,"./other/react-compat":93,"./other/regenerator":95,"./other/self-contained":96,"./other/use-strict":97,"./playground/mallet-operator":98,"./playground/memoization-operator":99,"./playground/method-binding":100,"./playground/object-getter-memoization":101,"./spec/block-scoped-functions":102,"./spec/function-name":103,"./spec/proto-to-assign":104,"./spec/typeof-symbol":105,"./spec/undefined-to-void":106,"./validation/no-for-in-of-assignment":107,"./validation/react":108,"./validation/setters":109,"./validation/undeclared-variable-check":110}],80:[function(require,module,exports){
8132
+ },{"./es3/member-expression-literals":55,"./es3/property-literals":56,"./es5/properties.mutators":57,"./es6/arrow-functions":58,"./es6/block-scoping":60,"./es6/block-scoping-tdz":59,"./es6/classes":61,"./es6/constants":62,"./es6/destructuring":63,"./es6/for-of":64,"./es6/modules":65,"./es6/object-super":66,"./es6/parameters.default":67,"./es6/parameters.rest":68,"./es6/properties.computed":69,"./es6/properties.shorthand":70,"./es6/spread":71,"./es6/tail-call":72,"./es6/template-literals":73,"./es6/unicode-regex":74,"./es7/abstract-references":75,"./es7/comprehensions":76,"./es7/exponentiation-operator":77,"./es7/object-rest-spread":78,"./internal/alias-functions":80,"./internal/block-hoist":81,"./internal/cleanup":82,"./internal/declarations":83,"./internal/module-formatter":84,"./internal/modules":85,"./minification/dead-code-elimination":86,"./minification/remove-console-calls":87,"./minification/remove-debugger":88,"./minification/rename-local-variables":89,"./other/async-to-generator":90,"./other/bluebird-coroutines":91,"./other/flow":92,"./other/react":94,"./other/react-compat":93,"./other/regenerator":95,"./other/runtime":96,"./other/use-strict":97,"./playground/mallet-operator":98,"./playground/memoization-operator":99,"./playground/method-binding":100,"./playground/object-getter-memoization":101,"./spec/block-scoped-functions":102,"./spec/function-name":103,"./spec/proto-to-assign":104,"./spec/typeof-symbol":105,"./spec/undefined-to-void":106,"./validation/no-for-in-of-assignment":107,"./validation/react":108,"./validation/setters":109,"./validation/undeclared-variable-check":110}],80:[function(require,module,exports){
8121
8133
  "use strict";
8122
8134
 
8123
8135
  var t = require("../../../types");
@@ -8700,7 +8712,7 @@ exports.Program = function (node, parent, scope, file) {
8700
8712
  };
8701
8713
 
8702
8714
  exports.pre = function (file) {
8703
- file.setDynamic("runtimeIdentifier", function () {
8715
+ file.setDynamic("helpersNamespace", function () {
8704
8716
  return file.addImport("babel-runtime/helpers", "babelHelpers");
8705
8717
  });
8706
8718
 
@@ -42588,7 +42600,7 @@ module.exports = function (str) {
42588
42600
  module.exports={
42589
42601
  "name": "babel",
42590
42602
  "description": "Turn ES6 code into readable vanilla ES5 with source maps",
42591
- "version": "4.4.2",
42603
+ "version": "4.4.3",
42592
42604
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
42593
42605
  "homepage": "https://babeljs.io/",
42594
42606
  "repository": "babel/babel",
@@ -1,7 +1,7 @@
1
1
  module Babel
2
2
  module Source
3
- VERSION = "4.4.2"
4
- DATE = Time.at(1424489467)
3
+ VERSION = "4.4.3"
4
+ DATE = Time.at(1424502790)
5
5
  PATH = File.expand_path("../..", __FILE__)
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: babel-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.2
4
+ version: 4.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian McKenzie