npm / @babel/plugin-transform-classes
@babel/plugin-transform-classes
What changed in @babel/plugin-transform-classes 8, from its official release notes, upgrade guides and advisories. Also covers @babel/plugin-transform-class-static-block, @babel/plugin-transform-destructuring, @babel/plugin-transform-explicit-resource-management, @babel/plugin-transform-optional-chaining, @babel/plugin-transform-parameters, @babel/plugin-transform-private-property-in-object, @babel/plugin-transform-react-constant-elements. Sources checked 2026-10-23.
21 breaking2 new APIs and options1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@babel/plugin-transform-classes 824 changes
Breaking changes 21
preset-env's useBuiltIns option was removed.
Babel 8 plugins require @babel/core@^8.0.0 as a peer dependency; other major-version combinations are not officially supported.
The syntax plugin is no longer needed and can be removed from configuration and dependencies.
The package was renamed from @babel/plugin-proposal-private-property-in-object to @babel/plugin-transform-private-property-in-object; update the package name in dependencies and configuration.
Internal files can no longer be imported; use the exported API instead.
BigIntLiteral.value is a bigint rather than a string; use toString() when you need its string representation.
TSParenthesizedType is no longer generated unless createParenthesizedExpression is enabled; node.extra.parenthesized can indicate parentheses when it is false.
Babel is shipped as native ECMAScript modules, affecting how the plugin is loaded and integrated.
Dynamic import() is represented by an ImportExpression node instead of a CallExpression with an Import callee.
Babel 8 packages require Node.js ^22.18.0 || >=24.11.0, so Babel itself will not run on older versions.
The parameters field becomes params on TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.
The field on ClassDeclaration and ClassExpression is renamed to superTypeArguments.
Enum members are wrapped in a TSEnumBody node under the declaration's body field.
This node is split into TSClassImplements and TSInterfaceHeritage; the new nodes use typeArguments, and qualified expressions are represented as MemberExpression.
Exported TSImportEqualsDeclaration nodes are parsed inside an ExportNamedDeclaration; the isExport field is removed.
The TSImportType argument field is renamed to source.
The typeParameter property is flattened into key and constraint properties on TSMappedType.
A dotted namespace name is represented as one TSQualifiedName rather than nested TSModuleDeclaration nodes.
TSTypeParameter.name is an Identifier node rather than a plain string.
The return type field becomes returnType on TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.
The field is renamed to typeArguments on CallExpression, JSXOpeningElement, NewExpression, OptionalCallExpression, TSImportType, TSInstantiationExpression, TSTypeQuery, and TSTypeReference.
New APIs and options 2
When both estree and typescript parser plugins are enabled, Babel creates TSAbstractMethodDefinition and TSPropertyDefinition nodes.
Interpolated template literal types are represented by TSTemplateLiteralType; literals without interpolation retain their existing AST representation.
Fixes and other changes 1
TSTypeQuery.exprName can be a ThisExpression rather than an Identifier for typeof this.