From efbc2ffe6a1ee5ec38a4396305561d6515d0943e Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 30 Aug 2024 17:21:18 +0800 Subject: node fixes, updates --- node_modules/@babel/traverse/lib/path/removal.js | 25 +++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'node_modules/@babel/traverse/lib/path/removal.js') diff --git a/node_modules/@babel/traverse/lib/path/removal.js b/node_modules/@babel/traverse/lib/path/removal.js index aa61f9a6..04b9b701 100644 --- a/node_modules/@babel/traverse/lib/path/removal.js +++ b/node_modules/@babel/traverse/lib/path/removal.js @@ -11,25 +11,28 @@ exports._removeFromScope = _removeFromScope; exports.remove = remove; var _removalHooks = require("./lib/removal-hooks.js"); var _cache = require("../cache.js"); +var _replacement = require("./replacement.js"); var _index = require("./index.js"); var _t = require("@babel/types"); +var _modification = require("./modification.js"); +var _context = require("./context.js"); const { getBindingIdentifiers } = _t; function remove() { var _this$opts; - this._assertUnremoved(); - this.resync(); - if (!((_this$opts = this.opts) != null && _this$opts.noScope)) { - this._removeFromScope(); - } - if (this._callRemovalHooks()) { - this._markRemoved(); + _assertUnremoved.call(this); + _context.resync.call(this); + if (_callRemovalHooks.call(this)) { + _markRemoved.call(this); return; } + if (!((_this$opts = this.opts) != null && _this$opts.noScope)) { + _removeFromScope.call(this); + } this.shareCommentsWithSiblings(); - this._remove(); - this._markRemoved(); + _remove.call(this); + _markRemoved.call(this); } function _removeFromScope() { const bindings = getBindingIdentifiers(this.node, false, false, true); @@ -45,9 +48,9 @@ function _callRemovalHooks() { function _remove() { if (Array.isArray(this.container)) { this.container.splice(this.key, 1); - this.updateSiblingKeys(this.key, -1); + _modification.updateSiblingKeys.call(this, this.key, -1); } else { - this._replaceWith(null); + _replacement._replaceWith.call(this, null); } } function _markRemoved() { -- cgit v1.2.3