@babel/traverse 7.7.4 → 7.8.0
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.
Potentially problematic release.
This version of @babel/traverse might be problematic. Click here for more details.
- package/lib/path/lib/virtual-types.js +1 -1
- package/lib/scope/index.js +9 -1
- package/lib/visitors.js +4 -0
- package/package.json +10 -9
package/lib/scope/index.js
CHANGED
@@ -774,10 +774,18 @@ class Scope {
|
|
774
774
|
|
775
775
|
getBinding(name) {
|
776
776
|
let scope = this;
|
777
|
+
let previousPath;
|
777
778
|
|
778
779
|
do {
|
779
780
|
const binding = scope.getOwnBinding(name);
|
780
|
-
|
781
|
+
|
782
|
+
if (binding) {
|
783
|
+
if (previousPath && previousPath.isPattern() && previousPath.parentPath.isFunction() && binding.kind !== "param") {} else {
|
784
|
+
return binding;
|
785
|
+
}
|
786
|
+
}
|
787
|
+
|
788
|
+
previousPath = scope.path;
|
781
789
|
} while (scope = scope.parent);
|
782
790
|
}
|
783
791
|
|
package/lib/visitors.js
CHANGED
package/package.json
CHANGED
@@ -1,28 +1,29 @@
|
|
1
1
|
{
|
2
2
|
"name": "@babel/traverse",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.8.0",
|
4
4
|
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes",
|
5
5
|
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
6
6
|
"homepage": "https://babeljs.io/",
|
7
7
|
"license": "MIT",
|
8
|
+
"type": "commonjs",
|
8
9
|
"publishConfig": {
|
9
10
|
"access": "public"
|
10
11
|
},
|
11
12
|
"repository": "https://github.com/babel/babel/tree/master/packages/babel-traverse",
|
12
13
|
"main": "lib/index.js",
|
13
14
|
"dependencies": {
|
14
|
-
"@babel/code-frame": "^7.
|
15
|
-
"@babel/generator": "^7.
|
16
|
-
"@babel/helper-function-name": "^7.
|
17
|
-
"@babel/helper-split-export-declaration": "^7.
|
18
|
-
"@babel/parser": "^7.
|
19
|
-
"@babel/types": "^7.
|
15
|
+
"@babel/code-frame": "^7.8.0",
|
16
|
+
"@babel/generator": "^7.8.0",
|
17
|
+
"@babel/helper-function-name": "^7.8.0",
|
18
|
+
"@babel/helper-split-export-declaration": "^7.8.0",
|
19
|
+
"@babel/parser": "^7.8.0",
|
20
|
+
"@babel/types": "^7.8.0",
|
20
21
|
"debug": "^4.1.0",
|
21
22
|
"globals": "^11.1.0",
|
22
23
|
"lodash": "^4.17.13"
|
23
24
|
},
|
24
25
|
"devDependencies": {
|
25
|
-
"@babel/helper-plugin-test-runner": "^7.
|
26
|
+
"@babel/helper-plugin-test-runner": "^7.8.0"
|
26
27
|
},
|
27
|
-
"gitHead": "
|
28
|
+
"gitHead": "2486615a74580283c49475d66067bd7fcab3330e"
|
28
29
|
}
|