unstale

npm / @babel/traverse

@babel/traverse

What changed in @babel/traverse 8, from its official release notes, upgrade guides and advisories. Also covers @babel/runtime-corejs3, @types/babel__traverse. Sources checked 2026-10-24.

28 breaking1 deprecations2 new APIs and options6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.6 on npm

@babel/traverse 837 changes

Breaking changes 28

  • path.evaluate no longer evaluates destructured bindings.

    8.0.7release notes

  • Babel is shipped as native ECMAScript modules, affecting how developers load the package.

    8.0.0upgrade guide

  • BigIntLiteral.value is now a bigint rather than a string, aligning with NumericLiteral; JSON.stringify cannot serialize the new value.

    8.0.0upgrade guide

  • TSParenthesizedType is no longer generated unless this parser option is enabled; node.extra.parenthesized can still indicate parentheses when disabled.

    8.0.0upgrade guide

  • Dynamic import() is represented by an ImportExpression node instead of a CallExpression with an Import callee.

    8.0.0upgrade guide

  • Babel 8 packages require Node.js ^22.18.0 || >=24.11.0; older Node.js versions cannot run Babel.

    8.0.0upgrade guide

  • NodePath methods hoist, updateSiblingKeys, call, setScope, resync, popContext, pushContext, setup, setKey, and visit are removed.

    8.0.0upgrade guide

  • The NodePath is, isnt, has, and equals methods are removed; compare properties of path.node directly instead.

    8.0.0upgrade guide

  • NodePath.prototype.toComputedKey and Scope.prototype.buildUndefinedNode are removed; use t.toComputedKey and t.buildUndefinedNode from @babel/types instead.

    8.0.0upgrade guide

  • NodePath#requeue() can now requeue a skipped NodePath; check NodePath#shouldSkip to preserve the previous behavior.

    8.0.0upgrade guide

  • The parameters field is renamed to params on TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.

    8.0.0upgrade guide

  • Methods starting with an underscore are removed from Scope and NodePath.

    8.0.0upgrade guide

  • Scope.prototype.getAllBindingsOfKind and Scope.prototype.toArray are removed.

    8.0.0upgrade guide

  • Scope.prototype.traverse, Scope#parentBlock, and Scope#hub are removed; use scope.path methods and properties instead.

    8.0.0upgrade guide

  • The block argument is removed; call rename on the scope corresponding to that block instead.

    8.0.0upgrade guide

  • Scope#uids and Scope#references become uidsSet and referencesSet Set objects, defined only on the program scope.

    8.0.0upgrade guide

  • The field on ClassDeclaration and ClassExpression is renamed to superTypeArguments.

    8.0.0upgrade guide

  • Enum members are now wrapped in a TSEnumBody node under the declaration's body field.

    8.0.0upgrade guide

  • This node is split into TSClassImplements and TSInterfaceHeritage; the new nodes use typeArguments, and qualified expressions are parsed as MemberExpression.

    8.0.0upgrade guide

  • An exported TSImportEqualsDeclaration is now nested in an ExportNamedDeclaration, and its isExport field is removed; detect export status through the parent path.

    8.0.0upgrade guide

  • The argument field is renamed to source.

    8.0.0upgrade guide

  • The typeParameter property is flattened into key and constraint properties on the TSMappedType node.

    8.0.0upgrade guide

  • A dotted namespace name is now represented by one TSModuleDeclaration whose name is a TSQualifiedName, rather than nested TSModuleDeclaration nodes.

    8.0.0upgrade guide

  • Interpolated template literal types now produce TSTemplateLiteralType nodes; templates without interpolated positions retain their previous AST shape.

    8.0.0upgrade guide

  • TSTypeParameter.name is now an Identifier node rather than a plain string.

    8.0.0upgrade guide

  • For typeof this, exprName is now a ThisExpression rather than an Identifier named this.

    8.0.0upgrade guide

  • The typeAnnotation field is renamed to returnType on TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.

    8.0.0upgrade guide

  • The field is renamed to typeArguments on CallExpression, JSXOpeningElement, NewExpression, OptionalCallExpression, TSImportType, TSInstantiationExpression, TSTypeQuery, and TSTypeReference.

    8.0.0upgrade guide

Deprecations 1

  • The Babel 7 import() AST can be requested by setting this parser option to false; the legacy AST is deprecated and the option will be removed in Babel 9.

    8.0.0upgrade guide

New APIs and options 2

  • This node is created when both the estree and typescript parser plugins are enabled.

    8.0.0upgrade guide

  • This node is created when both the estree and typescript parser plugins are enabled.

    8.0.0upgrade guide

Fixes and other changes 6

  • Traversal now visits decorators of TSParameterProperty nodes.

    8.0.8release notes

  • NodePath#evaluate now evaluates TypeScript expression wrappers.

    8.0.7release notes

  • Handles null when retrieving all next siblings.

    8.0.5release notes

  • Handles null when retrieving all previous siblings.

    8.0.5release notes

  • Removing a node now unwraps a single sequence expression.

    8.0.5release notes

  • Calling replaceWith in Visitor#exit no longer stops traversal.

    8.0.4release notes