babel-source 5.2.15 → 5.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/babel.js +36 -19
- 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
|
+
M2QxYjdhNzgxNDcxOGFiZTdkN2Y0ZGE1ZmZmNWYxYWNkZDlkY2VhOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2ZlMWJmMDk1MDVjMTk1NGRjZTAwM2IzMDA0MGQzNjQxNjJkNzU3Yw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzEyZTczODRkMzY4ODdmYTI1MGNlMzIwYjgzNWMwNzhmZDI1ODZmZDI5MGU3
|
10
|
+
NjM4MTdiMzBmM2ZhNDU5MzA3NDNiOTFjNjAyNjRmNWJhODgxOGI4MDBkMGQz
|
11
|
+
NjQzNGNmYWE1NjRjZGU0ZTM3NTM0MjAzOGVmYzY1M2M2M2I4ODU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWM2NzM1MzZkZWVkZmNlMjdmNDgwY2JlZGMzYTRmMWQxYTAxYzZlYjVkZDBi
|
14
|
+
NjU4OTY2NGYyMDM0MTkwYWQ2Mjc1ZDI0M2YyZWU4MmE4YjE4ZDYwNzZiNDBj
|
15
|
+
YjA1ZjJlNDFkOWY4ZDZiYTUyNmEwOWY5MzgzMGE5OGRjNjY5Y2E=
|
data/lib/babel.js
CHANGED
@@ -3058,7 +3058,7 @@ pp.parseClass = function (node, isStatement) {
|
|
3058
3058
|
this.parsePropertyName(method);
|
3059
3059
|
}
|
3060
3060
|
method.kind = "method";
|
3061
|
-
if (!method.computed && !isGenerator) {
|
3061
|
+
if (!method.computed && !isGenerator && !isAsync) {
|
3062
3062
|
if (method.key.type === "Identifier") {
|
3063
3063
|
if (this.type !== _tokentype.types.parenL && (method.key.name === "get" || method.key.name === "set")) {
|
3064
3064
|
method.kind = method.key.name;
|
@@ -9096,6 +9096,9 @@ var PluginManager = (function () {
|
|
9096
9096
|
if (!plugin.buildPass || plugin.constructor.name !== "Transformer") {
|
9097
9097
|
throw new TypeError(messages.get("pluginNotTransformer", name));
|
9098
9098
|
}
|
9099
|
+
|
9100
|
+
// register as a plugin
|
9101
|
+
plugin.metadata.plugin = true;
|
9099
9102
|
};
|
9100
9103
|
|
9101
9104
|
PluginManager.prototype.add = function add(name) {
|
@@ -9597,7 +9600,7 @@ function push(mutatorMap, node, kind, file) {
|
|
9597
9600
|
var decorators = map.decorators = map.decorators || t.arrayExpression([]);
|
9598
9601
|
decorators.elements = decorators.elements.concat(node.decorators.map(function (dec) {
|
9599
9602
|
return dec.expression;
|
9600
|
-
}));
|
9603
|
+
}).reverse());
|
9601
9604
|
}
|
9602
9605
|
|
9603
9606
|
if (map.value || map.initializer) {
|
@@ -11945,8 +11948,9 @@ var TransformerPipeline = (function () {
|
|
11945
11948
|
};
|
11946
11949
|
|
11947
11950
|
TransformerPipeline.prototype.canTransform = function canTransform(transformer, fileOpts) {
|
11948
|
-
|
11951
|
+
if (transformer.metadata.plugin) return true;
|
11949
11952
|
|
11953
|
+
var _arr = this.filters;
|
11950
11954
|
for (var _i = 0; _i < _arr.length; _i++) {
|
11951
11955
|
var filter = _arr[_i];
|
11952
11956
|
var result = filter(transformer, fileOpts);
|
@@ -13274,7 +13278,7 @@ var ClassTransformer = (function () {
|
|
13274
13278
|
if (isConstructor) {
|
13275
13279
|
this.pushConstructor(node, path);
|
13276
13280
|
} else {
|
13277
|
-
this.pushMethod(node);
|
13281
|
+
this.pushMethod(node, path);
|
13278
13282
|
}
|
13279
13283
|
} else if (t.isClassProperty(node)) {
|
13280
13284
|
this.pushProperty(node);
|
@@ -13361,7 +13365,7 @@ var ClassTransformer = (function () {
|
|
13361
13365
|
if (this.hasPropertyCollision()) {
|
13362
13366
|
var call = t.expressionStatement(t.callExpression(t.memberExpression(t.thisExpression(), t.identifier(PROPERTY_COLLISION_METHOD_NAME)), []));
|
13363
13367
|
|
13364
|
-
this.pushMethod(t.methodDefinition(t.identifier(PROPERTY_COLLISION_METHOD_NAME), t.functionExpression(null, [], t.blockStatement(body))), true);
|
13368
|
+
this.pushMethod(t.methodDefinition(t.identifier(PROPERTY_COLLISION_METHOD_NAME), t.functionExpression(null, [], t.blockStatement(body))), null, true);
|
13365
13369
|
|
13366
13370
|
if (this.hasSuper) {
|
13367
13371
|
this.bareSuper.insertAfter(call);
|
@@ -13422,13 +13426,13 @@ var ClassTransformer = (function () {
|
|
13422
13426
|
* Push a method to its respective mutatorMap.
|
13423
13427
|
*/
|
13424
13428
|
|
13425
|
-
ClassTransformer.prototype.pushMethod = function pushMethod(node, allowedIllegal) {
|
13429
|
+
ClassTransformer.prototype.pushMethod = function pushMethod(node, path, allowedIllegal) {
|
13426
13430
|
if (!allowedIllegal && t.isLiteral(t.toComputedKey(node), { value: PROPERTY_COLLISION_METHOD_NAME })) {
|
13427
13431
|
throw this.file.errorWithNode(node, messages.get("illegalMethodName", PROPERTY_COLLISION_METHOD_NAME));
|
13428
13432
|
}
|
13429
13433
|
|
13430
13434
|
if (node.kind === "method") {
|
13431
|
-
nameMethod.property(node, this.file, this.scope);
|
13435
|
+
nameMethod.property(node, this.file, path ? path.get("value").scope : this.scope);
|
13432
13436
|
|
13433
13437
|
if (this.isLoose) {
|
13434
13438
|
// use assignments instead of define properties for loose classes
|
@@ -13668,6 +13672,7 @@ exports.Function = function (node, parent, scope, file) {
|
|
13668
13672
|
|
13669
13673
|
hasDestructuring = true;
|
13670
13674
|
var ref = scope.generateUidIdentifier("ref");
|
13675
|
+
t.inherits(ref, pattern);
|
13671
13676
|
|
13672
13677
|
var destructuring = new DestructuringTransformer({
|
13673
13678
|
blockHoist: node.params.length - i,
|
@@ -22748,17 +22753,7 @@ module.exports = function(acorn) {
|
|
22748
22753
|
default:
|
22749
22754
|
if (acorn.isNewLine(ch)) {
|
22750
22755
|
out += this.input.slice(chunkStart, this.pos);
|
22751
|
-
|
22752
|
-
if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
|
22753
|
-
++this.pos;
|
22754
|
-
out += '\n';
|
22755
|
-
} else {
|
22756
|
-
out += String.fromCharCode(ch);
|
22757
|
-
}
|
22758
|
-
if (this.options.locations) {
|
22759
|
-
++this.curLine;
|
22760
|
-
this.lineStart = this.pos;
|
22761
|
-
}
|
22756
|
+
out += this.jsx_readNewLine(true);
|
22762
22757
|
chunkStart = this.pos;
|
22763
22758
|
} else {
|
22764
22759
|
++this.pos;
|
@@ -22767,6 +22762,24 @@ module.exports = function(acorn) {
|
|
22767
22762
|
}
|
22768
22763
|
};
|
22769
22764
|
|
22765
|
+
pp.jsx_readNewLine = function(normalizeCRLF) {
|
22766
|
+
var ch = this.input.charCodeAt(this.pos);
|
22767
|
+
var out;
|
22768
|
+
++this.pos;
|
22769
|
+
if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
|
22770
|
+
++this.pos;
|
22771
|
+
out = normalizeCRLF ? '\n' : '\r\n';
|
22772
|
+
} else {
|
22773
|
+
out = String.fromCharCode(ch);
|
22774
|
+
}
|
22775
|
+
if (this.options.locations) {
|
22776
|
+
++this.curLine;
|
22777
|
+
this.lineStart = this.pos;
|
22778
|
+
}
|
22779
|
+
|
22780
|
+
return out;
|
22781
|
+
};
|
22782
|
+
|
22770
22783
|
pp.jsx_readString = function(quote) {
|
22771
22784
|
var out = '', chunkStart = ++this.pos;
|
22772
22785
|
for (;;) {
|
@@ -22778,6 +22791,10 @@ module.exports = function(acorn) {
|
|
22778
22791
|
out += this.input.slice(chunkStart, this.pos);
|
22779
22792
|
out += this.jsx_readEntity();
|
22780
22793
|
chunkStart = this.pos;
|
22794
|
+
} else if (acorn.isNewLine(ch)) {
|
22795
|
+
out += this.input.slice(chunkStart, this.pos);
|
22796
|
+
out += this.jsx_readNewLine(false);
|
22797
|
+
chunkStart = this.pos;
|
22781
22798
|
} else {
|
22782
22799
|
++this.pos;
|
22783
22800
|
}
|
@@ -85830,7 +85847,7 @@ module.exports = function (str) {
|
|
85830
85847
|
module.exports={
|
85831
85848
|
"name": "babel-core",
|
85832
85849
|
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
85833
|
-
"version": "5.2.
|
85850
|
+
"version": "5.2.16",
|
85834
85851
|
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
85835
85852
|
"homepage": "https://babeljs.io/",
|
85836
85853
|
"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: 5.2.
|
4
|
+
version: 5.2.16
|
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-05-
|
11
|
+
date: 2015-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: sebmck@gmail.com
|