npm / @babel/code-frame
@babel/code-frame
What changed in @babel/code-frame 8, from its official release notes, upgrade guides and advisories. Also covers @types/babel__code-frame. Sources checked 2026-10-24.
19 breaking1 new APIs and options1 behavior and defaults1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@babel/code-frame 822 changes
Breaking changes 19
BigIntLiteral.value is a bigint rather than a string; use toString() for its string representation.
The typeParameters field is renamed to typeArguments across the listed expression and TypeScript AST nodes.
The superTypeParameters field is renamed to superTypeArguments in ClassDeclaration and ClassExpression.
The column passed to codeFrameColumns is now 0-based, matching @babel/parser AST locations.
TSParenthesizedType is no longer generated unless createParenthesizedExpression is enabled; node.extra.parenthesized can detect parentheses when disabled.
The default export was removed; migrate to the
codeFrameColumnsAPI.Dynamic import() is represented by an ImportExpression node instead of a CallExpression with an Import callee.
Babel is shipped as native ECMAScript modules.
Babel 8 packages require Node.js ^22.18.0 || >=24.11.0; older Node versions cannot run Babel.
The parameters field is renamed to params.
The typeAnnotation field is renamed to returnType.
Class implements entries use TSClassImplements instead of TSExpressionWithTypeArguments.
Enum members are wrapped in a TSEnumBody node under the body property.
An exported TSImportEqualsDeclaration is represented inside an ExportNamedDeclaration; its isExport field is removed.
The argument field is renamed to source.
Interface heritage entries use TSInterfaceHeritage instead of TSExpressionWithTypeArguments.
The typeParameter property is flattened into key and constraint properties on TSMappedType.
Interpolated template literal types produce TSTemplateLiteralType nodes; templates without interpolation retain their existing AST shape.
TSTypeParameter.name is an Identifier node rather than a plain string.
New APIs and options 1
When both estree and typescript parser plugins are enabled, the parser creates TSAbstractMethodDefinition and TSPropertyDefinition nodes.
Behavior and default changes 1
Dotted namespace names are represented as a single TSModuleDeclaration with a TSQualifiedName name.
Fixes and other changes 1
TSTypeQuery.exprName can be a ThisExpression instead of an Identifier for typeof this.