npm / @babel/plugin-proposal-decorators
@babel/plugin-proposal-decorators
What changed in @babel/plugin-proposal-decorators 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-26.
20 breaking2 new APIs and options2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@babel/plugin-proposal-decorators 824 changes
Breaking changes 20
Set the version option to legacy or 2023-11 when using the plugin with Babel 8.
BigIntLiteral.value is a bigint rather than a string, aligning with NumericLiteral; JSON.stringify cannot serialize the new value directly.
TSParenthesizedType is generated only when createParenthesizedExpression is enabled; otherwise use node.extra.parenthesized to detect parentheses.
The
decoratorsBeforeExportoption has been removed; remove it from your Babel config.Exporting a TSImportEqualsDeclaration is represented as an ExportNamedDeclaration containing the declaration; the isExport field is removed.
Importing internal files is disallowed; use the exported API only.
The
legacyboolean option has been removed; remove it from your Babel config. Thelegacyproposal version remains supported.With modules: auto, the plugin now falls back to assuming ESM support.
The parameters field is renamed to params in TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.
The typeAnnotation field is renamed to returnType in TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.
ClassDeclaration and ClassExpression use superTypeArguments instead of superTypeParameters.
Class implements entries use TSClassImplements instead of TSExpressionWithTypeArguments; typeArguments replaces typeParameters, and qualified expressions parse as MemberExpression.
TSEnumDeclaration members are now wrapped in a TSEnumBody node.
The argument field is renamed to source; TSImportType also uses typeArguments instead of typeParameters.
Interface extends entries use TSInterfaceHeritage instead of TSExpressionWithTypeArguments and use typeArguments instead of typeParameters.
TSMappedType flattens typeParameter into key and constraint properties on the node.
Interpolated template literal types now produce TSTemplateLiteralType nodes; types without interpolated positions are unchanged.
TSTypeParameter.name is now an Identifier node rather than a plain string.
The typeParameters field is renamed to typeArguments in CallExpression, JSXOpeningElement, NewExpression, OptionalCallExpression, TSImportType, TSInstantiationExpression, TSTypeQuery, and TSTypeReference.
The plugin now requires
versionand supports onlylegacyand2023-11; migrate to2023-11and rewrite decorator functions as needed.
New APIs and options 2
Dynamic import() is represented by an ImportExpression node instead of a CallExpression; the legacy AST is deprecated and does not support newer ES features such as Source Phrase Imports.
When both estree and typescript parser plugins are enabled, the AST uses TSAbstractMethodDefinition and TSPropertyDefinition; this aligns it with typescript-eslint.
Fixes and other changes 2
A dotted namespace name such as namespace X.Y is represented as one TSModuleDeclaration whose name is a TSQualifiedName, rather than nested declarations.
TSTypeQuery.exprName can now be a ThisExpression for typeof this, rather than an Identifier named this.