@babel/traverse 7.12.10 → 7.12.12

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.

@@ -104,7 +104,15 @@ class Renamer {
104
104
  }
105
105
  }
106
106
 
107
- scope.traverse(block || scope.block, renameVisitor, this);
107
+ const blockToTraverse = block || scope.block;
108
+
109
+ if ((blockToTraverse == null ? void 0 : blockToTraverse.type) === "SwitchStatement") {
110
+ blockToTraverse.cases.forEach(c => {
111
+ scope.traverse(c, renameVisitor, this);
112
+ });
113
+ } else {
114
+ scope.traverse(blockToTraverse, renameVisitor, this);
115
+ }
108
116
 
109
117
  if (!block) {
110
118
  scope.removeOwnBinding(oldName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babel/traverse",
3
- "version": "7.12.10",
3
+ "version": "7.12.12",
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/",
@@ -15,12 +15,12 @@
15
15
  },
16
16
  "main": "lib/index.js",
17
17
  "dependencies": {
18
- "@babel/code-frame": "^7.10.4",
19
- "@babel/generator": "^7.12.10",
20
- "@babel/helper-function-name": "^7.10.4",
21
- "@babel/helper-split-export-declaration": "^7.11.0",
22
- "@babel/parser": "^7.12.10",
23
- "@babel/types": "^7.12.10",
18
+ "@babel/code-frame": "^7.12.11",
19
+ "@babel/generator": "^7.12.11",
20
+ "@babel/helper-function-name": "^7.12.11",
21
+ "@babel/helper-split-export-declaration": "^7.12.11",
22
+ "@babel/parser": "^7.12.11",
23
+ "@babel/types": "^7.12.12",
24
24
  "debug": "^4.1.0",
25
25
  "globals": "^11.1.0",
26
26
  "lodash": "^4.17.19"