npm / @babel/helper-module-imports
@babel/helper-module-imports
What changed in @babel/helper-module-imports 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.
22 breaking1 deprecations2 new APIs and options1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@babel/helper-module-imports 826 changes
Breaking changes 22
The plugin pass no longer provides addImport; use addNamed or addDefault from @babel/helper-module-imports instead.
The package is now shipped as a native ECMAScript module, so consumers must use it as ESM.
Imports from internal files are disallowed; use the exported API only.
BigIntLiteral.value is now a bigint rather than a string; JSON.stringify cannot serialize bigint.
Exporting a TSImportEqualsDeclaration is parsed as an ExportNamedDeclaration; detect the export through the parent path because isExport is removed.
Dynamic import() is represented as an ImportExpression node instead of a CallExpression.
Babel 8 packages require Node.js ^22.18.0 || >=24.11.0; older Node.js versions can no longer run Babel itself.
The parameters field is renamed to params on TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.
The typeAnnotation field is renamed to returnType on TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.
The superTypeParameters field is renamed to superTypeArguments in ClassDeclaration and ClassExpression.
Class implements entries use TSClassImplements instead of TSExpressionWithTypeArguments; the new node uses typeArguments.
TSEnumDeclaration members are now wrapped within a TSEnumBody node.
This node is replaced in class implements and interface heritage positions by TSClassImplements and TSInterfaceHeritage.
The isExport field is removed; use the parent path to detect whether the declaration follows an export keyword.
The TSImportType argument field is renamed to source.
Interface heritage entries use TSInterfaceHeritage instead of TSExpressionWithTypeArguments; the new node uses typeArguments.
The typeParameter property is flattened into key and constraint properties on TSMappedType.
TSParenthesizedType is no longer generated unless createParenthesizedExpression is enabled; node.extra.parenthesized can indicate parentheses when it is false.
A dotted namespace name is represented by one TSModuleDeclaration whose name is a TSQualifiedName, rather than nested TSModuleDeclaration nodes.
Interpolated template literal types now produce TSTemplateLiteralType nodes; non-interpolated template literal types remain unchanged.
TSTypeParameter.name is now an Identifier node instead of a plain string.
The typeParameters field is renamed to typeArguments on CallExpression, JSXOpeningElement, NewExpression, OptionalCallExpression, TSImportType, TSInstantiationExpression, TSTypeQuery, and TSTypeReference.
Deprecations 1
The legacy import() AST can be retained by setting this parser option to false; the option will be removed in Babel 9.
New APIs and options 2
Enable this parser option to retain TSParenthesizedType nodes and information about parentheses.
When both estree and typescript parser plugins are enabled, Babel creates TSAbstractMethodDefinition and TSPropertyDefinition nodes to align the AST with typescript-eslint.
Fixes and other changes 1
TSTypeQuery.exprName can now be a ThisExpression instead of a
thisidentifier.