@babel/traverse
Advanced tools
Comparing version 7.23.4 to 7.23.5
@@ -39,8 +39,6 @@ "use strict"; | ||
function removeIfExisting(list, toRemove) { | ||
if (!toRemove) return list; | ||
let lastFoundIndex = -1; | ||
if (!(toRemove != null && toRemove.length)) return list; | ||
const set = new Set(toRemove); | ||
return list.filter(el => { | ||
const i = toRemove.indexOf(el, lastFoundIndex); | ||
if (i === -1) return true; | ||
lastFoundIndex = i; | ||
return !set.has(el); | ||
}); | ||
@@ -47,0 +45,0 @@ } |
@@ -15,2 +15,6 @@ "use strict"; | ||
var _index = require("./index.js"); | ||
var _t = require("@babel/types"); | ||
const { | ||
getBindingIdentifiers | ||
} = _t; | ||
function remove() { | ||
@@ -32,3 +36,3 @@ var _this$opts; | ||
function _removeFromScope() { | ||
const bindings = this.getBindingIdentifiers(); | ||
const bindings = getBindingIdentifiers(this.node, false, false, true); | ||
Object.keys(bindings).forEach(name => this.scope.removeBinding(name)); | ||
@@ -35,0 +39,0 @@ } |
{ | ||
"name": "@babel/traverse", | ||
"version": "7.23.4", | ||
"version": "7.23.5", | ||
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", | ||
@@ -19,4 +19,4 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"dependencies": { | ||
"@babel/code-frame": "^7.23.4", | ||
"@babel/generator": "^7.23.4", | ||
"@babel/code-frame": "^7.23.5", | ||
"@babel/generator": "^7.23.5", | ||
"@babel/helper-environment-visitor": "^7.22.20", | ||
@@ -26,4 +26,4 @@ "@babel/helper-function-name": "^7.23.0", | ||
"@babel/helper-split-export-declaration": "^7.22.6", | ||
"@babel/parser": "^7.23.4", | ||
"@babel/types": "^7.23.4", | ||
"@babel/parser": "^7.23.5", | ||
"@babel/types": "^7.23.5", | ||
"debug": "^4.1.0", | ||
@@ -33,3 +33,3 @@ "globals": "^11.1.0" | ||
"devDependencies": { | ||
"@babel/core": "^7.23.3", | ||
"@babel/core": "^7.23.5", | ||
"@babel/helper-plugin-test-runner": "^7.22.5" | ||
@@ -36,0 +36,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
610416
5179
1
+ Added@babel/generator@7.24.5(transitive)
+ Added@babel/helper-split-export-declaration@7.24.5(transitive)
+ Added@babel/helper-validator-identifier@7.24.5(transitive)
+ Added@babel/highlight@7.24.5(transitive)
+ Added@babel/parser@7.24.5(transitive)
+ Added@babel/types@7.24.5(transitive)
- Removed@babel/generator@7.24.4(transitive)
- Removed@babel/helper-split-export-declaration@7.22.6(transitive)
- Removed@babel/helper-validator-identifier@7.22.20(transitive)
- Removed@babel/highlight@7.24.2(transitive)
- Removed@babel/parser@7.24.4(transitive)
- Removed@babel/types@7.24.0(transitive)
Updated@babel/code-frame@^7.23.5
Updated@babel/generator@^7.23.5
Updated@babel/parser@^7.23.5
Updated@babel/types@^7.23.5