@babel/traverse
Advanced tools
Comparing version 7.24.5 to 7.24.6
@@ -53,2 +53,20 @@ "use strict"; | ||
} | ||
get removed() { | ||
return (this._traverseFlags & 1) > 0; | ||
} | ||
set removed(v) { | ||
if (v) this._traverseFlags |= 1;else this._traverseFlags &= -2; | ||
} | ||
get shouldStop() { | ||
return (this._traverseFlags & 2) > 0; | ||
} | ||
set shouldStop(v) { | ||
if (v) this._traverseFlags |= 2;else this._traverseFlags &= -3; | ||
} | ||
get shouldSkip() { | ||
return (this._traverseFlags & 4) > 0; | ||
} | ||
set shouldSkip(v) { | ||
if (v) this._traverseFlags |= 4;else this._traverseFlags &= -5; | ||
} | ||
static get({ | ||
@@ -136,35 +154,111 @@ hub, | ||
} | ||
get shouldSkip() { | ||
return !!(this._traverseFlags & SHOULD_SKIP); | ||
} | ||
set shouldSkip(v) { | ||
if (v) { | ||
this._traverseFlags |= SHOULD_SKIP; | ||
} else { | ||
this._traverseFlags &= ~SHOULD_SKIP; | ||
} | ||
} | ||
get shouldStop() { | ||
return !!(this._traverseFlags & SHOULD_STOP); | ||
} | ||
set shouldStop(v) { | ||
if (v) { | ||
this._traverseFlags |= SHOULD_STOP; | ||
} else { | ||
this._traverseFlags &= ~SHOULD_STOP; | ||
} | ||
} | ||
get removed() { | ||
return !!(this._traverseFlags & REMOVED); | ||
} | ||
set removed(v) { | ||
if (v) { | ||
this._traverseFlags |= REMOVED; | ||
} else { | ||
this._traverseFlags &= ~REMOVED; | ||
} | ||
} | ||
}; | ||
Object.assign(NodePath_Final.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments); | ||
const methods = { | ||
findParent: NodePath_ancestry.findParent, | ||
find: NodePath_ancestry.find, | ||
getFunctionParent: NodePath_ancestry.getFunctionParent, | ||
getStatementParent: NodePath_ancestry.getStatementParent, | ||
getEarliestCommonAncestorFrom: NodePath_ancestry.getEarliestCommonAncestorFrom, | ||
getDeepestCommonAncestorFrom: NodePath_ancestry.getDeepestCommonAncestorFrom, | ||
getAncestry: NodePath_ancestry.getAncestry, | ||
isAncestor: NodePath_ancestry.isAncestor, | ||
isDescendant: NodePath_ancestry.isDescendant, | ||
inType: NodePath_ancestry.inType, | ||
getTypeAnnotation: NodePath_inference.getTypeAnnotation, | ||
_getTypeAnnotation: NodePath_inference._getTypeAnnotation, | ||
isBaseType: NodePath_inference.isBaseType, | ||
couldBeBaseType: NodePath_inference.couldBeBaseType, | ||
baseTypeStrictlyMatches: NodePath_inference.baseTypeStrictlyMatches, | ||
isGenericType: NodePath_inference.isGenericType, | ||
replaceWithMultiple: NodePath_replacement.replaceWithMultiple, | ||
replaceWithSourceString: NodePath_replacement.replaceWithSourceString, | ||
replaceWith: NodePath_replacement.replaceWith, | ||
_replaceWith: NodePath_replacement._replaceWith, | ||
replaceExpressionWithStatements: NodePath_replacement.replaceExpressionWithStatements, | ||
replaceInline: NodePath_replacement.replaceInline, | ||
evaluateTruthy: NodePath_evaluation.evaluateTruthy, | ||
evaluate: NodePath_evaluation.evaluate, | ||
toComputedKey: NodePath_conversion.toComputedKey, | ||
ensureBlock: NodePath_conversion.ensureBlock, | ||
unwrapFunctionEnvironment: NodePath_conversion.unwrapFunctionEnvironment, | ||
arrowFunctionToExpression: NodePath_conversion.arrowFunctionToExpression, | ||
matchesPattern: NodePath_introspection.matchesPattern, | ||
has: NodePath_introspection.has, | ||
isStatic: NodePath_introspection.isStatic, | ||
is: NodePath_introspection.is, | ||
isnt: NodePath_introspection.isnt, | ||
equals: NodePath_introspection.equals, | ||
isNodeType: NodePath_introspection.isNodeType, | ||
canHaveVariableDeclarationOrExpression: NodePath_introspection.canHaveVariableDeclarationOrExpression, | ||
canSwapBetweenExpressionAndStatement: NodePath_introspection.canSwapBetweenExpressionAndStatement, | ||
isCompletionRecord: NodePath_introspection.isCompletionRecord, | ||
isStatementOrBlock: NodePath_introspection.isStatementOrBlock, | ||
referencesImport: NodePath_introspection.referencesImport, | ||
getSource: NodePath_introspection.getSource, | ||
willIMaybeExecuteBefore: NodePath_introspection.willIMaybeExecuteBefore, | ||
_guessExecutionStatusRelativeTo: NodePath_introspection._guessExecutionStatusRelativeTo, | ||
resolve: NodePath_introspection.resolve, | ||
_resolve: NodePath_introspection._resolve, | ||
isConstantExpression: NodePath_introspection.isConstantExpression, | ||
isInStrictMode: NodePath_introspection.isInStrictMode, | ||
call: NodePath_context.call, | ||
_call: NodePath_context._call, | ||
isDenylisted: NodePath_context.isDenylisted, | ||
isBlacklisted: NodePath_context.isBlacklisted, | ||
visit: NodePath_context.visit, | ||
skip: NodePath_context.skip, | ||
skipKey: NodePath_context.skipKey, | ||
stop: NodePath_context.stop, | ||
setScope: NodePath_context.setScope, | ||
setContext: NodePath_context.setContext, | ||
resync: NodePath_context.resync, | ||
_resyncParent: NodePath_context._resyncParent, | ||
_resyncKey: NodePath_context._resyncKey, | ||
_resyncList: NodePath_context._resyncList, | ||
_resyncRemoved: NodePath_context._resyncRemoved, | ||
popContext: NodePath_context.popContext, | ||
pushContext: NodePath_context.pushContext, | ||
setup: NodePath_context.setup, | ||
setKey: NodePath_context.setKey, | ||
requeue: NodePath_context.requeue, | ||
_getQueueContexts: NodePath_context._getQueueContexts, | ||
remove: NodePath_removal.remove, | ||
_removeFromScope: NodePath_removal._removeFromScope, | ||
_callRemovalHooks: NodePath_removal._callRemovalHooks, | ||
_remove: NodePath_removal._remove, | ||
_markRemoved: NodePath_removal._markRemoved, | ||
_assertUnremoved: NodePath_removal._assertUnremoved, | ||
insertBefore: NodePath_modification.insertBefore, | ||
_containerInsert: NodePath_modification._containerInsert, | ||
_containerInsertBefore: NodePath_modification._containerInsertBefore, | ||
_containerInsertAfter: NodePath_modification._containerInsertAfter, | ||
insertAfter: NodePath_modification.insertAfter, | ||
updateSiblingKeys: NodePath_modification.updateSiblingKeys, | ||
_verifyNodeList: NodePath_modification._verifyNodeList, | ||
unshiftContainer: NodePath_modification.unshiftContainer, | ||
pushContainer: NodePath_modification.pushContainer, | ||
hoist: NodePath_modification.hoist, | ||
getOpposite: NodePath_family.getOpposite, | ||
getCompletionRecords: NodePath_family.getCompletionRecords, | ||
getSibling: NodePath_family.getSibling, | ||
getPrevSibling: NodePath_family.getPrevSibling, | ||
getNextSibling: NodePath_family.getNextSibling, | ||
getAllNextSiblings: NodePath_family.getAllNextSiblings, | ||
getAllPrevSiblings: NodePath_family.getAllPrevSiblings, | ||
get: NodePath_family.get, | ||
_getKey: NodePath_family._getKey, | ||
_getPattern: NodePath_family._getPattern, | ||
getBindingIdentifiers: NodePath_family.getBindingIdentifiers, | ||
getOuterBindingIdentifiers: NodePath_family.getOuterBindingIdentifiers, | ||
getBindingIdentifierPaths: NodePath_family.getBindingIdentifierPaths, | ||
getOuterBindingIdentifierPaths: NodePath_family.getOuterBindingIdentifierPaths, | ||
shareCommentsWithSiblings: NodePath_comments.shareCommentsWithSiblings, | ||
addComment: NodePath_comments.addComment, | ||
addComments: NodePath_comments.addComments | ||
}; | ||
Object.assign(NodePath_Final.prototype, methods); | ||
{ | ||
NodePath_Final.prototype.arrowFunctionToShadowed = NodePath_conversion[String("arrowFunctionToShadowed")]; | ||
} | ||
{ | ||
NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions = NodePath_introspection._guessExecutionStatusRelativeTo; | ||
@@ -171,0 +265,0 @@ } |
@@ -317,6 +317,7 @@ "use strict"; | ||
do { | ||
var _path; | ||
const shouldSkip = path.key === "key" || path.listKey === "decorators"; | ||
path = path.parentPath; | ||
if (shouldSkip && path.isMethod()) path = path.parentPath; | ||
if (path && path.isScope()) parent = path; | ||
if ((_path = path) != null && _path.isScope()) parent = path; | ||
} while (path && !parent); | ||
@@ -323,0 +324,0 @@ return (_parent = parent) == null ? void 0 : _parent.scope; |
@@ -6,6 +6,6 @@ "use strict"; | ||
}); | ||
exports.explode = explode; | ||
exports.explode = explode$1; | ||
exports.isExplodedVisitor = isExplodedVisitor; | ||
exports.merge = merge; | ||
exports.verify = verify; | ||
exports.verify = verify$1; | ||
var virtualTypes = require("./path/lib/virtual-types.js"); | ||
@@ -27,3 +27,3 @@ var virtualTypesValidators = require("./path/lib/virtual-types-validator.js"); | ||
} | ||
function explode(visitor) { | ||
function explode$1(visitor) { | ||
if (isExplodedVisitor(visitor)) return visitor; | ||
@@ -41,3 +41,3 @@ visitor._exploded = true; | ||
} | ||
verify(visitor); | ||
verify$1(visitor); | ||
delete visitor.__esModule; | ||
@@ -97,3 +97,3 @@ ensureEntranceObjects(visitor); | ||
} | ||
function verify(visitor) { | ||
function verify$1(visitor) { | ||
if (visitor._verified) return; | ||
@@ -135,3 +135,3 @@ if (typeof visitor === "function") { | ||
for (let i = 0; i < visitors.length; i++) { | ||
const visitor = explode(visitors[i]); | ||
const visitor = explode$1(visitors[i]); | ||
const state = states[i]; | ||
@@ -138,0 +138,0 @@ let topVisitor = visitor; |
{ | ||
"name": "@babel/traverse", | ||
"version": "7.24.5", | ||
"version": "7.24.6", | ||
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", | ||
@@ -19,10 +19,10 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"dependencies": { | ||
"@babel/code-frame": "^7.24.2", | ||
"@babel/generator": "^7.24.5", | ||
"@babel/helper-environment-visitor": "^7.22.20", | ||
"@babel/helper-function-name": "^7.23.0", | ||
"@babel/helper-hoist-variables": "^7.22.5", | ||
"@babel/helper-split-export-declaration": "^7.24.5", | ||
"@babel/parser": "^7.24.5", | ||
"@babel/types": "^7.24.5", | ||
"@babel/code-frame": "^7.24.6", | ||
"@babel/generator": "^7.24.6", | ||
"@babel/helper-environment-visitor": "^7.24.6", | ||
"@babel/helper-function-name": "^7.24.6", | ||
"@babel/helper-hoist-variables": "^7.24.6", | ||
"@babel/helper-split-export-declaration": "^7.24.6", | ||
"@babel/parser": "^7.24.6", | ||
"@babel/types": "^7.24.6", | ||
"debug": "^4.3.1", | ||
@@ -32,4 +32,4 @@ "globals": "^11.1.0" | ||
"devDependencies": { | ||
"@babel/core": "^7.24.5", | ||
"@babel/helper-plugin-test-runner": "^7.24.1" | ||
"@babel/core": "^7.24.6", | ||
"@babel/helper-plugin-test-runner": "^7.24.6" | ||
}, | ||
@@ -36,0 +36,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
634330
5308
Updated@babel/code-frame@^7.24.6
Updated@babel/generator@^7.24.6
Updated@babel/parser@^7.24.6
Updated@babel/types@^7.24.6