babel-source 4.4.4 → 4.4.5
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 +10 -40
- data/lib/babel/source.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWVkNDM4MjE4M2IzZDZkNDIwYTllYzQxNTFkZWEyNmU1NzFjYzMyOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjQ2ODc1MjA1N2FjNzc2OWIwZDQ5ZWExZWZiMGE1ZTM5YmQzODMxOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODUwNjlhZWNlYzJiM2FmOGQ4NjY1MTk4MTdkYjRjNWFhZDc0MGIyMDk2MjYx
|
10
|
+
NWM2ZWE4NDQ4Y2NmMGY5ZTIyNGY3MTNkODYwMTJiMWIyOGY3NTBiYjE0MTU3
|
11
|
+
ZDExOGIxMTM2ZjBhNjEyNDBlMGYyZjA4OGE5YTNlYWVlMjBjZTc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjJjYjZlZTRjMTc5ZWQ0NjVmNmY2M2M0M2E5OTk0Y2U2YWQ4ZmNkMzQ3Zjc2
|
14
|
+
Y2NiZmM4OTEzZDUxNGE0ZWFiNjQ1ZDI4ZmJkZDRjMzBmNGY2NzgxN2U5ZDM3
|
15
|
+
MGFjNmViY2U5YTMzYmU1ZjIwMThhMGFmOWVmOTg4ZTY1YWRmNWU=
|
data/lib/babel.js
CHANGED
@@ -3571,49 +3571,20 @@ var visitor = {
|
|
3571
3571
|
if (localDeclar !== state.outerDeclar) return;
|
3572
3572
|
|
3573
3573
|
state.selfReference = true;
|
3574
|
-
|
3575
|
-
|
3576
|
-
if (t.isPattern(parent) || t.isAssignmentExpression(parent) || t.isUpdateExpression(parent)) {
|
3577
|
-
state.selfAssignment = true;
|
3578
|
-
}
|
3579
|
-
}
|
3580
|
-
};
|
3581
|
-
|
3582
|
-
var wrapIncludesSelfReference = function (state, method, id, scope) {
|
3583
|
-
var outerId = scope.generateUidIdentifier("getOuter");
|
3584
|
-
var outerIdCall = t.callExpression(outerId, []);
|
3585
|
-
|
3586
|
-
for (var i = 0; i < state.references.length; i++) {
|
3587
|
-
state.references[i].replaceNode(outerIdCall);
|
3574
|
+
this.stop();
|
3588
3575
|
}
|
3589
|
-
|
3590
|
-
method.id = id;
|
3591
|
-
|
3592
|
-
return util.template("named-function", {
|
3593
|
-
GET_OUTER_ID: outerId,
|
3594
|
-
FUNCTION_ID: id,
|
3595
|
-
FUNCTION: method
|
3596
|
-
});
|
3597
|
-
};
|
3598
|
-
|
3599
|
-
var wrapIncludesSelfAssignment = function (state, method, id, scope) {
|
3600
|
-
var templateName = "property-method-assignment-wrapper";
|
3601
|
-
if (method.generator) templateName += "-generator";
|
3602
|
-
return util.template(templateName, {
|
3603
|
-
FUNCTION: method,
|
3604
|
-
FUNCTION_ID: id,
|
3605
|
-
FUNCTION_KEY: scope.generateUidIdentifier(id.name),
|
3606
|
-
WRAPPER_KEY: scope.generateUidIdentifier(id.name + "Wrapper")
|
3607
|
-
});
|
3608
3576
|
};
|
3609
3577
|
|
3610
3578
|
var wrap = function (state, method, id, scope) {
|
3611
3579
|
if (state.selfReference) {
|
3612
|
-
|
3613
|
-
|
3614
|
-
|
3615
|
-
|
3616
|
-
|
3580
|
+
var templateName = "property-method-assignment-wrapper";
|
3581
|
+
if (method.generator) templateName += "-generator";
|
3582
|
+
return util.template(templateName, {
|
3583
|
+
FUNCTION: method,
|
3584
|
+
FUNCTION_ID: id,
|
3585
|
+
FUNCTION_KEY: scope.generateUidIdentifier(id.name),
|
3586
|
+
WRAPPER_KEY: scope.generateUidIdentifier(id.name + "Wrapper")
|
3587
|
+
});
|
3617
3588
|
} else {
|
3618
3589
|
method.id = id;
|
3619
3590
|
return method;
|
@@ -3648,7 +3619,6 @@ var visit = function (node, name, scope) {
|
|
3648
3619
|
// this isn't to the spec and they've invented this behaviour which is
|
3649
3620
|
// **extremely** annoying so we avoid setting the name if it has a param
|
3650
3621
|
// with the same id
|
3651
|
-
state.selfAssignment = true;
|
3652
3622
|
state.selfReference = true;
|
3653
3623
|
} else {
|
3654
3624
|
// otherwise it's defined somewhere in scope like:
|
@@ -43301,7 +43271,7 @@ module.exports = function (str) {
|
|
43301
43271
|
module.exports={
|
43302
43272
|
"name": "babel",
|
43303
43273
|
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
43304
|
-
"version": "4.4.
|
43274
|
+
"version": "4.4.5",
|
43305
43275
|
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
43306
43276
|
"homepage": "https://babeljs.io/",
|
43307
43277
|
"repository": "babel/babel",
|
data/lib/babel/source.rb
CHANGED