unstale

npm / @babel/parser

@babel/parser

What changed in @babel/parser 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.

47 breaking1 deprecations1 new APIs and options1 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/parser 850 changes

Breaking changes 47

  • BigIntLiteral.value is a bigint rather than a string; use toString() for a string representation, and provide a serializer if storing the AST as JSON.

    8.0.0upgrade guide

  • The typeParameters field is renamed to typeArguments.

    8.0.0upgrade guide

  • The superTypeParameters field is renamed to superTypeArguments.

    8.0.0upgrade guide

  • The superTypeParameters field is renamed to superTypeArguments.

    8.0.0upgrade guide

  • TSParenthesizedType is no longer generated unless createParenthesizedExpression is enabled; node.extra.parenthesized can identify parentheses when it is false.

    8.0.0upgrade guide

  • The decimal parser plugin is removed because the latest proposal no longer includes the syntax.

    8.0.0upgrade guide

  • The parser plugin for the obsolete import attributes syntax using assert is removed.

    8.0.0upgrade guide

  • The error code for OptionalBindingPattern is renamed to PatternIsOptional, aligning Flow and TypeScript parser error codes.

    8.0.0upgrade guide

  • Babel is shipped as native ECMAScript modules.

    8.0.0upgrade guide

  • Remove the classFeatures option; class properties AST output compatible with ESLint 8 is now enabled by default.

    8.0.0upgrade guide

  • The parser plugin for the obsolete import attributes syntax using assert is removed.

    8.0.0upgrade guide

  • Dynamic import() is represented by an ImportExpression node instead of a CallExpression with an Import callee.

    8.0.0upgrade guide

  • The importReflection parser plugin is removed; use sourcePhaseImports and replace the source modifier module with source.

    8.0.0upgrade guide

  • The characters {, }, <, and > are disallowed in JSX text; represent them with JSX expressions instead.

    8.0.0upgrade guide

  • The typeParameters field is renamed to typeArguments.

    8.0.0upgrade guide

  • The packed locations option is removed.

    8.0.0release notes

  • The typeParameters field is renamed to typeArguments.

    8.0.0upgrade guide

  • ObjectProperty nodes no longer include extra.shorthand; use node.shorthand instead.

    8.0.0upgrade guide

  • Babel 8 packages require Node.js ^22.18.0 || >=24.11.0; Babel itself no longer runs on older Node versions.

    8.0.0upgrade guide

  • The typeParameters field is renamed to typeArguments.

    8.0.0upgrade guide

  • Private names such as #priv are returned as a single privateName token instead of separate # and name tokens.

    8.0.0upgrade guide

  • Sequence expressions inside JSX attributes are disallowed; parenthesize the sequence expression.

    8.0.0upgrade guide

  • Use sourcePhaseImports instead of importReflection for source phase imports, and use source rather than module in import declarations.

    8.0.0upgrade guide

  • Template literal segments are tokenized as templateNonTail or templateTail rather than the generic template token.

    8.0.0upgrade guide

  • The updateContext field is removed from token types returned when the tokens option is enabled.

    8.0.0upgrade guide

  • The parameters field is renamed to params.

    8.0.0upgrade guide

  • The return type field typeAnnotation is renamed to returnType.

    8.0.0upgrade guide

  • The parameters field is renamed to params.

    8.0.0upgrade guide

  • The return type field typeAnnotation is renamed to returnType.

    8.0.0upgrade guide

  • The parameters field is renamed to params.

    8.0.0upgrade guide

  • The return type field typeAnnotation is renamed to returnType.

    8.0.0upgrade guide

  • Enum members are now contained in a TSEnumBody node under the body field.

    8.0.0upgrade guide

  • This node is split into TSClassImplements and TSInterfaceHeritage; qualified-name expressions are represented as MemberExpression nodes.

    8.0.0upgrade guide

  • The parameters field is renamed to params.

    8.0.0upgrade guide

  • The return type field typeAnnotation is renamed to returnType.

    8.0.0upgrade guide

  • An exported TSImportEqualsDeclaration is now nested in an ExportNamedDeclaration, and its isExport field is removed; detect exports through the parent path.

    8.0.0upgrade guide

  • The argument field is renamed to source.

    8.0.0upgrade guide

  • The typeParameters field is renamed to typeArguments.

    8.0.0upgrade guide

  • The typeParameters field is renamed to typeArguments.

    8.0.0upgrade guide

  • The typeParameter property is flattened into key and constraint properties on TSMappedType.

    8.0.0upgrade guide

  • The parameters field is renamed to params.

    8.0.0upgrade guide

  • The return type field typeAnnotation is renamed to returnType.

    8.0.0upgrade guide

  • A dotted namespace name such as namespace X.Y is represented as one TSModuleDeclaration with a TSQualifiedName, rather than nested TSModuleDeclaration nodes.

    8.0.0upgrade guide

  • Interpolated template literal types now produce a TSTemplateLiteralType node.

    8.0.0upgrade guide

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

    8.0.0upgrade guide

  • The typeParameters field is renamed to typeArguments.

    8.0.0upgrade guide

  • The typeParameters field is renamed to typeArguments.

    8.0.0upgrade guide

Deprecations 1

  • The legacy import() AST can be requested with false, but that AST is deprecated and the parser option will be removed in Babel 9.

    8.0.0upgrade guide

New APIs and options 1

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

    8.0.0upgrade guide

Fixes and other changes 1

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

    8.0.0upgrade guide