babel-source 5.8.31 → 5.8.32
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 +37 -34
- 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
|
+
YmVhZjg4YjY2MjI1YjFmZGY3OGU5ZjE5NGZmMGFhMTI5MTIyODE1Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2UxYTRhZjc1NWQyOGZlYmQzZjczOWI3NmQ2ZmI1ZjM4MmUwYzdkMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTY1MTYwMTMwYzI5ODc1Zjg3MGIyNzQ1OGY4ODIyZjhmNWNjYjRhOWFjYzY2
|
10
|
+
ZWI0ZTNjNzUyODY0MzJjMjlmYjYwMzE4NTQ5ODY5N2JiMDA3MmQwODVkMzhl
|
11
|
+
ZTg0YTRhZGI5ZDQwNTZhY2RlNWJiOTY0YzBjMzkzNjk3MThiMjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzU5ZmEwYWJjYTY4NjU0ODM5YjBjZmFkYWU4ODMyODQ2OTYxODg3MTRlMThh
|
14
|
+
MjllZjhlMWViZWFiYWYyMTc3MmU5NGYyMjIzMjdiZTIzYmIxYWQ1MDMwZDI0
|
15
|
+
MzU5YTRjMmU1NmQ0MWU4MTRmODg1MmEzMDNhYmFmNzg5YjZlYTQ=
|
data/lib/babel.js
CHANGED
@@ -24958,7 +24958,7 @@ var Scope = (function () {
|
|
24958
24958
|
if (path.isLabeledStatement()) {
|
24959
24959
|
this.registerBinding("label", path);
|
24960
24960
|
} else if (path.isFunctionDeclaration()) {
|
24961
|
-
this.registerBinding("hoisted", path.get("id"));
|
24961
|
+
this.registerBinding("hoisted", path.get("id"), path);
|
24962
24962
|
} else if (path.isVariableDeclaration()) {
|
24963
24963
|
var declarations = path.get("declarations");
|
24964
24964
|
var _arr6 = declarations;
|
@@ -25002,46 +25002,49 @@ var Scope = (function () {
|
|
25002
25002
|
*/
|
25003
25003
|
|
25004
25004
|
Scope.prototype.registerBinding = function registerBinding(kind, path) {
|
25005
|
-
|
25005
|
+
var bindingPath = arguments.length <= 2 || arguments[2] === undefined ? path : arguments[2];
|
25006
|
+
return (function () {
|
25007
|
+
if (!kind) throw new ReferenceError("no `kind`");
|
25006
25008
|
|
25007
|
-
|
25008
|
-
|
25009
|
-
|
25010
|
-
|
25011
|
-
|
25012
|
-
|
25009
|
+
if (path.isVariableDeclaration()) {
|
25010
|
+
var declarators = path.get("declarations");
|
25011
|
+
var _arr8 = declarators;
|
25012
|
+
for (var _i8 = 0; _i8 < _arr8.length; _i8++) {
|
25013
|
+
var declar = _arr8[_i8];
|
25014
|
+
this.registerBinding(kind, declar);
|
25015
|
+
}
|
25016
|
+
return;
|
25013
25017
|
}
|
25014
|
-
return;
|
25015
|
-
}
|
25016
25018
|
|
25017
|
-
|
25018
|
-
|
25019
|
+
var parent = this.getProgramParent();
|
25020
|
+
var ids = path.getBindingIdentifiers(true);
|
25019
25021
|
|
25020
|
-
|
25021
|
-
|
25022
|
+
for (var name in ids) {
|
25023
|
+
var _arr9 = ids[name];
|
25022
25024
|
|
25023
|
-
|
25024
|
-
|
25025
|
-
|
25026
|
-
|
25027
|
-
|
25028
|
-
|
25029
|
-
|
25025
|
+
for (var _i9 = 0; _i9 < _arr9.length; _i9++) {
|
25026
|
+
var id = _arr9[_i9];
|
25027
|
+
var local = this.getOwnBinding(name);
|
25028
|
+
if (local) {
|
25029
|
+
// same identifier so continue safely as we're likely trying to register it
|
25030
|
+
// multiple times
|
25031
|
+
if (local.identifier === id) continue;
|
25030
25032
|
|
25031
|
-
|
25032
|
-
|
25033
|
+
this.checkBlockScopedCollisions(local, kind, name, id);
|
25034
|
+
}
|
25033
25035
|
|
25034
|
-
|
25036
|
+
parent.references[name] = true;
|
25035
25037
|
|
25036
|
-
|
25037
|
-
|
25038
|
-
|
25039
|
-
|
25040
|
-
|
25041
|
-
|
25042
|
-
|
25038
|
+
this.bindings[name] = new _binding2["default"]({
|
25039
|
+
identifier: id,
|
25040
|
+
existing: local,
|
25041
|
+
scope: this,
|
25042
|
+
path: bindingPath,
|
25043
|
+
kind: kind
|
25044
|
+
});
|
25045
|
+
}
|
25043
25046
|
}
|
25044
|
-
}
|
25047
|
+
}).apply(this, arguments);
|
25045
25048
|
};
|
25046
25049
|
|
25047
25050
|
/**
|
@@ -25210,7 +25213,7 @@ var Scope = (function () {
|
|
25210
25213
|
// FunctionExpression - id
|
25211
25214
|
|
25212
25215
|
if (path.isFunctionExpression() && path.has("id")) {
|
25213
|
-
this.registerBinding("local", path.get("id"));
|
25216
|
+
this.registerBinding("local", path.get("id"), path);
|
25214
25217
|
}
|
25215
25218
|
|
25216
25219
|
// Class
|
@@ -61642,7 +61645,7 @@ resolve.relative = function (loc) {
|
|
61642
61645
|
},{"1":1,"10":10}],609:[function(_dereq_,module,exports){
|
61643
61646
|
module.exports={
|
61644
61647
|
"name": "babel-core",
|
61645
|
-
"version": "5.8.
|
61648
|
+
"version": "5.8.32",
|
61646
61649
|
"description": "A compiler for writing next generation JavaScript",
|
61647
61650
|
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
61648
61651
|
"homepage": "https://babeljs.io/",
|
data/lib/babel/source.rb
CHANGED