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@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.
The typeParameters field is renamed to typeArguments.
The superTypeParameters field is renamed to superTypeArguments.
The superTypeParameters field is renamed to superTypeArguments.
TSParenthesizedType is no longer generated unless createParenthesizedExpression is enabled; node.extra.parenthesized can identify parentheses when it is false.
The decimal parser plugin is removed because the latest proposal no longer includes the syntax.
The parser plugin for the obsolete import attributes syntax using assert is removed.
The error code for OptionalBindingPattern is renamed to PatternIsOptional, aligning Flow and TypeScript parser error codes.
Babel is shipped as native ECMAScript modules.
Remove the classFeatures option; class properties AST output compatible with ESLint 8 is now enabled by default.
The parser plugin for the obsolete import attributes syntax using assert is removed.
Dynamic import() is represented by an ImportExpression node instead of a CallExpression with an Import callee.
The importReflection parser plugin is removed; use sourcePhaseImports and replace the source modifier module with source.
The characters {, }, <, and > are disallowed in JSX text; represent them with JSX expressions instead.
The typeParameters field is renamed to typeArguments.
The packed locations option is removed.
The typeParameters field is renamed to typeArguments.
ObjectProperty nodes no longer include extra.shorthand; use node.shorthand instead.
Babel 8 packages require Node.js ^22.18.0 || >=24.11.0; Babel itself no longer runs on older Node versions.
The typeParameters field is renamed to typeArguments.
Private names such as #priv are returned as a single privateName token instead of separate # and name tokens.
Sequence expressions inside JSX attributes are disallowed; parenthesize the sequence expression.
Use sourcePhaseImports instead of importReflection for source phase imports, and use source rather than module in import declarations.
Template literal segments are tokenized as templateNonTail or templateTail rather than the generic template token.
The updateContext field is removed from token types returned when the tokens option is enabled.
The parameters field is renamed to params.
The return type field typeAnnotation is renamed to returnType.
The parameters field is renamed to params.
The return type field typeAnnotation is renamed to returnType.
The parameters field is renamed to params.
The return type field typeAnnotation is renamed to returnType.
Enum members are now contained in a TSEnumBody node under the body field.
This node is split into TSClassImplements and TSInterfaceHeritage; qualified-name expressions are represented as MemberExpression nodes.
The parameters field is renamed to params.
The return type field typeAnnotation is renamed to returnType.
An exported TSImportEqualsDeclaration is now nested in an ExportNamedDeclaration, and its isExport field is removed; detect exports through the parent path.
The argument field is renamed to source.
The typeParameters field is renamed to typeArguments.
The typeParameters field is renamed to typeArguments.
The typeParameter property is flattened into key and constraint properties on TSMappedType.
The parameters field is renamed to params.
The return type field typeAnnotation is renamed to returnType.
A dotted namespace name such as namespace X.Y is represented as one TSModuleDeclaration with a TSQualifiedName, rather than nested TSModuleDeclaration nodes.
Interpolated template literal types now produce a TSTemplateLiteralType node.
TSTypeParameter.name is an Identifier node rather than a plain string.
The typeParameters field is renamed to typeArguments.
The typeParameters field is renamed to typeArguments.
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.
New APIs and options 1
When both estree and typescript parser plugins are enabled, the parser creates TSAbstractMethodDefinition and TSPropertyDefinition nodes.
Fixes and other changes 1
TSTypeQuery.exprName can be a ThisExpression for typeof this, rather than an Identifier named this.