test/dummy/node_modules/@babel/traverse/lib/path/removal.js in disco_app-0.18.0 vs test/dummy/node_modules/@babel/traverse/lib/path/removal.js in disco_app-0.18.1
- old
+ new
@@ -10,16 +10,24 @@
exports._markRemoved = _markRemoved;
exports._assertUnremoved = _assertUnremoved;
var _removalHooks = require("./lib/removal-hooks");
+var _cache = require("../cache");
+
+var _index = require("./index");
+
function remove() {
+ var _this$opts;
+
this._assertUnremoved();
this.resync();
- this._removeFromScope();
+ if (!((_this$opts = this.opts) != null && _this$opts.noScope)) {
+ this._removeFromScope();
+ }
if (this._callRemovalHooks()) {
this._markRemoved();
return;
@@ -51,11 +59,11 @@
this._replaceWith(null);
}
}
function _markRemoved() {
- this.shouldSkip = true;
- this.removed = true;
+ this._traverseFlags |= _index.SHOULD_SKIP | _index.REMOVED;
+ if (this.parent) _cache.path.get(this.parent).delete(this.node);
this.node = null;
}
function _assertUnremoved() {
if (this.removed) {
\ No newline at end of file