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.
- checksums.yaml +8 -8
- data/lib/babel.js +29 -10
- data/lib/babel/source.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTMwYjgzYzFhODBkZGM4YWVmYTdkNjM3NjI2MTc2ZTZhYzE0MTUzMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjliYTE5YzdjZmRmM2Q3NWQ2OGU2OWE1MzVkZmYyNGMxNzMxNDRjMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDcxN2FkOGYwNTUyMWM0Y2YyYTU0NjFiMmRkMzMxYWM3OWRhNGNkNjlkZGE1
|
10
|
+
ZDA1MTRhNmUyMWEyMzE4MTczYWQyNmI2MDYwZWVmZTBhMTFiMTBlNjE4Y2I4
|
11
|
+
NjA1OWI0MjAyMjYxZDQxMTExOWY3ZTJiNjgxMTE3NGYyNjI4NGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
-
|
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
|
-
|
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[
|
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.
|
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
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.
|
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-
|
11
|
+
date: 2015-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: sebmck@gmail.com
|