unstale

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

@unstale/cli 0.2.4 on npm

@babel/template 823 changes

Breaking changes 17

  • The package is now shipped as a native ECMAScript module, affecting how developers load it.

    8.0.0upgrade guide

  • Importing internal files is disallowed; use the exported API instead.

    8.0.0upgrade guide

  • BigIntLiteral.value is now a bigint rather than a string, aligning with NumericLiteral; JSON serialization requires a custom bigint serializer.

    8.0.0upgrade guide

  • Dynamic import() is represented by an ImportExpression node with source and options fields instead of a CallExpression.

    8.0.0upgrade guide

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

    8.0.0upgrade guide

  • In TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature, parameters is renamed to params.

    8.0.0upgrade guide

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

    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 replaced by TSClassImplements or TSInterfaceHeritage; the new nodes use typeArguments, and qualified expressions are represented as MemberExpression.

    8.0.0upgrade guide

  • An exported TSImportEqualsDeclaration is now wrapped in an ExportNamedDeclaration; its isExport field is removed.

    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 TS MappedType nodes.

    8.0.0upgrade guide

  • A dotted namespace name such as X.Y is represented by a single TSModuleDeclaration whose name is a TSQualifiedName, rather than nested declarations.

    8.0.0upgrade guide

  • Interpolated template literal types now produce TSTemplateLiteralType nodes; template literal types without interpolations retain their existing AST shape.

    8.0.0upgrade guide

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

    8.0.0upgrade guide

  • In TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature, typeAnnotation is renamed to returnType.

    8.0.0upgrade guide

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

    8.0.0upgrade guide

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.

    8.0.0upgrade guide

New APIs and options 3

  • When enabled, this option only allows top-level super, including for constructing super nodes in Babel templates.

    8.0.0upgrade guide

  • When both estree and typescript parser plugins are enabled, Babel creates TSAbstractMethodDefinition nodes.

    8.0.0upgrade guide

  • When both estree and typescript parser plugins are enabled, Babel creates TSPropertyDefinition nodes.

    8.0.0upgrade guide

Behavior and default changes 1

  • TSParenthesizedType is generated only when this parser option is enabled; otherwise parentheses can be detected through node.extra.parenthesized.

    8.0.0upgrade guide

Fixes and other changes 1

  • TSTypeQuery.exprName can now be a ThisExpression for typeof this, rather than an Identifier named this.

    8.0.0upgrade guide