babel-source 4.7.12 → 4.7.13

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 +29 -10
  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
- ZjRhZWQ0MDJlZGM4ODcwMzI3MGFkYjBjM2U2NWNmMTdmYjY4ZDI1Mw==
4
+ NTMwYjgzYzFhODBkZGM4YWVmYTdkNjM3NjI2MTc2ZTZhYzE0MTUzMA==
5
5
  data.tar.gz: !binary |-
6
- ZDEyMDNmYmFiYTljNzRjNGI3MDY1ZTc0YmIwN2M0YTEyZmFiNzhlMg==
6
+ ZjliYTE5YzdjZmRmM2Q3NWQ2OGU2OWE1MzVkZmYyNGMxNzMxNDRjMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTM4MzY1MDczNGY2OTg4OGFiZTI2ZTJjZGM5YTEwMDRmYmIwMzdiOTE4N2Ix
10
- ODU3NDhhN2FhOTg1Y2MxNmU4ZjdjMWIzYmU4ODg0YTVjZWU3YWZmZGJhMjBh
11
- OWM0YWViYTBkZmVkZGZhODNhMDE2NTRlNzBkZjc2NmVjZGZmOWY=
9
+ MDcxN2FkOGYwNTUyMWM0Y2YyYTU0NjFiMmRkMzMxYWM3OWRhNGNkNjlkZGE1
10
+ ZDA1MTRhNmUyMWEyMzE4MTczYWQyNmI2MDYwZWVmZTBhMTFiMTBlNjE4Y2I4
11
+ NjA1OWI0MjAyMjYxZDQxMTExOWY3ZTJiNjgxMTE3NGYyNjI4NGQ=
12
12
  data.tar.gz: !binary |-
13
- Mjk3MjE1NDM2ODkzMGQ3OTYzNDA3YzllYTMzOTNkZDJkYTM1NjgzYjRhMzlm
14
- ZWNiZWI4YjY4OWI5Mjg0ZDQ1ZjFlODM4YTg3ODFjZDk0YWRkMWU5NzVjMDcy
15
- ZDU3YjNiZmMxZWE2ZTc0MzIxNzNhOTc2MWQ3ZjE0NmY5ZmVkOWM=
13
+ ZTIxMTY1NTdlNGM2ODA5NGYxNDA4NDcxNWNmMTFiOTcxYTM2NGE5NjkwOTZl
14
+ YjcxM2Q3NzczOTI0MThmNjc1YzkxN2E3M2M4NmEyZGI1MmMzMWYwZDM5YWFl
15
+ OTk2YTI3ZjNlMWEyNTA2NjRhMThlOTk4YzVjNGM2ZDIwYzAzNTI=
data/lib/babel.js CHANGED
@@ -7364,7 +7364,15 @@ var DestructuringTransformer = (function () {
7364
7364
 
7365
7365
  //
7366
7366
 
7367
- this.nodes.push(this.buildVariableAssignment(pattern.left, t.conditionalExpression(t.binaryExpression("===", tempValueRef, t.identifier("undefined")), pattern.right, tempValueRef)));
7367
+ var tempConditional = t.conditionalExpression(t.binaryExpression("===", tempValueRef, t.identifier("undefined")), pattern.right, tempValueRef);
7368
+
7369
+ var left = pattern.left;
7370
+ if (t.isPattern(left)) {
7371
+ this.nodes.push(t.expressionStatement(t.assignmentExpression("=", tempValueRef, tempConditional)));
7372
+ this.push(left, tempValueRef);
7373
+ } else {
7374
+ this.nodes.push(this.buildVariableAssignment(left, tempConditional));
7375
+ }
7368
7376
  };
7369
7377
 
7370
7378
  DestructuringTransformer.prototype.pushObjectSpread = function pushObjectSpread(pattern, objRef, spreadProp, spreadPropIndex) {
@@ -9604,7 +9612,18 @@ var t = _interopRequireWildcard(require("../../../types"));
9604
9612
 
9605
9613
  function Program(program, parent, scope, file) {
9606
9614
  if (file.transformers.strict.canRun()) {
9607
- program.body.unshift(t.expressionStatement(t.literal("use strict")));
9615
+ var directive = file.get("existingStrictDirective");
9616
+
9617
+ if (!directive) {
9618
+ directive = t.expressionStatement(t.literal("use strict"));
9619
+ var first = program.body[0];
9620
+ if (first) {
9621
+ directive.leadingComments = first.leadingComments;
9622
+ first.leadingComments = [];
9623
+ }
9624
+ }
9625
+
9626
+ program.body.unshift(directive);
9608
9627
  }
9609
9628
  }
9610
9629
 
@@ -9977,10 +9996,10 @@ var messages = _interopRequireWildcard(require("../../../messages"));
9977
9996
 
9978
9997
  var t = _interopRequireWildcard(require("../../../types"));
9979
9998
 
9980
- function Program(program) {
9999
+ function Program(program, parent, scope, file) {
9981
10000
  var first = program.body[0];
9982
10001
  if (t.isExpressionStatement(first) && t.isLiteral(first.expression, { value: "use strict" })) {
9983
- program.body.shift();
10002
+ file.set("existingStrictDirective", program.body.shift());
9984
10003
  }
9985
10004
  }
9986
10005
 
@@ -11236,6 +11255,10 @@ var Scope = (function () {
11236
11255
  */
11237
11256
 
11238
11257
  Scope.prototype.generateTempBasedOnNode = function generateTempBasedOnNode(node) {
11258
+ if (t.isThisExpression(node)) {
11259
+ return null;
11260
+ }
11261
+
11239
11262
  if (t.isIdentifier(node) && this.hasBinding(node.name)) {
11240
11263
  return null;
11241
11264
  }
@@ -27569,10 +27592,6 @@ module.exports = (function () {
27569
27592
  return false;
27570
27593
  }
27571
27594
 
27572
- if ('UPSTART_JOB' in process.env) {
27573
- return false;
27574
- }
27575
-
27576
27595
  if (process.platform === 'win32') {
27577
27596
  return true;
27578
27597
  }
@@ -30366,7 +30385,7 @@ function formatArgs() {
30366
30385
  if (useColors) {
30367
30386
  var c = this.color;
30368
30387
 
30369
- args[0] = ' \u001b[9' + c + 'm' + name + ' '
30388
+ args[0] = ' \u001b[3' + c + ';1m' + name + ' '
30370
30389
  + '\u001b[0m'
30371
30390
  + args[0] + '\u001b[3' + c + 'm'
30372
30391
  + ' +' + exports.humanize(this.diff) + '\u001b[0m';
@@ -46213,7 +46232,7 @@ module.exports = function (str) {
46213
46232
  module.exports={
46214
46233
  "name": "babel",
46215
46234
  "description": "Turn ES6 code into readable vanilla ES5 with source maps",
46216
- "version": "4.7.12",
46235
+ "version": "4.7.13",
46217
46236
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
46218
46237
  "homepage": "https://babeljs.io/",
46219
46238
  "repository": "babel/babel",
data/lib/babel/source.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Babel
2
2
  module Source
3
- VERSION = "4.7.12"
4
- DATE = Time.at(1426261050)
3
+ VERSION = "4.7.13"
4
+ DATE = Time.at(1426554686)
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: 4.7.12
4
+ version: 4.7.13
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-03-13 00:00:00.000000000 Z
11
+ date: 2015-03-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: sebmck@gmail.com