unstale

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

@unstale/cli on npm

@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.

    8.0.0upgrade guide

  • BigIntLiteral.value is a bigint rather than a string, aligning with NumericLiteral; JSON.stringify cannot serialize the new value directly.

    8.0.0upgrade guide

  • TSParenthesizedType is generated only when createParenthesizedExpression is enabled; otherwise use node.extra.parenthesized to detect parentheses.

    8.0.0upgrade guide

  • The decoratorsBeforeExport option has been removed; remove it from your Babel config.

    8.0.0upgrade guide

  • Exporting a TSImportEqualsDeclaration is represented as an ExportNamedDeclaration containing the declaration; the isExport field is removed.

    8.0.0upgrade guide

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

    8.0.0upgrade guide

  • The legacy boolean option has been removed; remove it from your Babel config. The legacy proposal version remains supported.

    8.0.0upgrade guide

  • With modules: auto, the plugin now falls back to assuming ESM support.

    8.0.0release notes

  • The parameters field is renamed to params in TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.

    8.0.0upgrade guide

  • The typeAnnotation field is renamed to returnType in TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.

    8.0.0upgrade guide

  • ClassDeclaration and ClassExpression use superTypeArguments instead of superTypeParameters.

    8.0.0upgrade guide

  • Class implements entries use TSClassImplements instead of TSExpressionWithTypeArguments; typeArguments replaces typeParameters, and qualified expressions parse as MemberExpression.

    8.0.0upgrade guide

  • TSEnumDeclaration members are now wrapped in a TSEnumBody node.

    8.0.0upgrade guide

  • The argument field is renamed to source; TSImportType also uses typeArguments instead of typeParameters.

    8.0.0upgrade guide

  • Interface extends entries use TSInterfaceHeritage instead of TSExpressionWithTypeArguments and use typeArguments instead of typeParameters.

    8.0.0upgrade guide

  • TSMappedType flattens typeParameter into key and constraint properties on the node.

    8.0.0upgrade guide

  • Interpolated template literal types now produce TSTemplateLiteralType nodes; types without interpolated positions are unchanged.

    8.0.0upgrade guide

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

    8.0.0upgrade guide

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

    8.0.0upgrade guide

  • The plugin now requires version and supports only legacy and 2023-11; migrate to 2023-11 and rewrite decorator functions as needed.

    8.0.0upgrade guide

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.

    8.0.0upgrade guide

  • When both estree and typescript parser plugins are enabled, the AST uses TSAbstractMethodDefinition and TSPropertyDefinition; this aligns it with typescript-eslint.

    8.0.0upgrade guide

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.

    8.0.0upgrade guide

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

    8.0.0upgrade guide