npm / @babel/template
@babel/template
What changed in @babel/template 8, from its official release notes, upgrade guides and advisories. Also covers @types/babel__template. Sources checked 2026-10-23.
17 breaking1 deprecations3 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/template 823 changes
Breaking changes 17
The package is now shipped as a native ECMAScript module, affecting how developers load it.
Importing internal files is disallowed; use the exported API instead.
BigIntLiteral.value is now a bigint rather than a string, aligning with NumericLiteral; JSON serialization requires a custom bigint serializer.
Dynamic import() is represented by an ImportExpression node with source and options fields instead of a CallExpression.
Babel 8 packages require Node.js ^22.18.0 or >=24.11.0; older Node.js versions cannot run Babel.
In TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature, parameters is renamed to params.
The field is renamed to superTypeArguments in ClassDeclaration and ClassExpression.
Enum members are now wrapped in a TSEnumBody node under the declaration's body field.
This node is replaced by TSClassImplements or TSInterfaceHeritage; the new nodes use typeArguments, and qualified expressions are represented as MemberExpression.
An exported TSImportEqualsDeclaration is now wrapped in an ExportNamedDeclaration; its isExport field is removed.
The argument field is renamed to source.
The typeParameter property is flattened into key and constraint properties on TS MappedType nodes.
A dotted namespace name such as X.Y is represented by a single TSModuleDeclaration whose name is a TSQualifiedName, rather than nested declarations.
Interpolated template literal types now produce TSTemplateLiteralType nodes; template literal types without interpolations retain their existing AST shape.
TSTypeParameter.name is now an Identifier node rather than a plain string.
In TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature, typeAnnotation is renamed to returnType.
The field is renamed to typeArguments in CallExpression, JSXOpeningElement, NewExpression, OptionalCallExpression, TSImportType, TSInstantiationExpression, TSTypeQuery, and TSTypeReference.
Deprecations 1
The legacy import() AST can be requested with this parser option set to false, but it is deprecated and will be removed in Babel 9.
New APIs and options 3
When enabled, this option only allows top-level super, including for constructing super nodes in Babel templates.
When both estree and typescript parser plugins are enabled, Babel creates TSAbstractMethodDefinition nodes.
When both estree and typescript parser plugins are enabled, Babel creates TSPropertyDefinition nodes.
Behavior and default changes 1
TSParenthesizedType is generated only when this parser option is enabled; otherwise parentheses can be detected through node.extra.parenthesized.
Fixes and other changes 1
TSTypeQuery.exprName can now be a ThisExpression for typeof this, rather than an Identifier named this.