unstale

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

@unstale/cli on npm

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

    8.0.0upgrade guide

  • The package is now shipped as a native ECMAScript module, so consumers must use it as ESM.

    8.0.0upgrade guide

  • Imports from internal files are disallowed; use the exported API only.

    8.0.0upgrade guide

  • BigIntLiteral.value is now a bigint rather than a string; JSON.stringify cannot serialize bigint.

    8.0.0upgrade guide

  • Exporting a TSImportEqualsDeclaration is parsed as an ExportNamedDeclaration; detect the export through the parent path because isExport is removed.

    8.0.0upgrade guide

  • Dynamic import() is represented as an ImportExpression node instead of a CallExpression.

    8.0.0upgrade guide

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

    8.0.0upgrade guide

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

    8.0.0upgrade guide

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

    8.0.0upgrade guide

  • The superTypeParameters field is renamed to superTypeArguments in ClassDeclaration and ClassExpression.

    8.0.0upgrade guide

  • Class implements entries use TSClassImplements instead of TSExpressionWithTypeArguments; the new node uses typeArguments.

    8.0.0upgrade guide

  • TSEnumDeclaration members are now wrapped within a TSEnumBody node.

    8.0.0upgrade guide

  • This node is replaced in class implements and interface heritage positions by TSClassImplements and TSInterfaceHeritage.

    8.0.0upgrade guide

  • The isExport field is removed; use the parent path to detect whether the declaration follows an export keyword.

    8.0.0upgrade guide

  • The TSImportType argument field is renamed to source.

    8.0.0upgrade guide

  • Interface heritage entries use TSInterfaceHeritage instead of TSExpressionWithTypeArguments; the new node uses typeArguments.

    8.0.0upgrade guide

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

    8.0.0upgrade guide

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

    8.0.0upgrade guide

  • A dotted namespace name is represented by one TSModuleDeclaration whose name is a TSQualifiedName, rather than nested TSModuleDeclaration nodes.

    8.0.0upgrade guide

  • Interpolated template literal types now produce TSTemplateLiteralType nodes; non-interpolated template literal types remain unchanged.

    8.0.0upgrade guide

  • TSTypeParameter.name is now an Identifier node instead of a plain string.

    8.0.0upgrade guide

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

    8.0.0upgrade guide

Deprecations 1

  • The legacy import() AST can be retained by setting this parser option to false; the option will be removed in Babel 9.

    8.0.0upgrade guide

New APIs and options 2

  • Enable this parser option to retain TSParenthesizedType nodes and information about parentheses.

    8.0.0upgrade guide

  • When both estree and typescript parser plugins are enabled, Babel creates TSAbstractMethodDefinition and TSPropertyDefinition nodes to align the AST with typescript-eslint.

    8.0.0upgrade guide

Fixes and other changes 1

  • TSTypeQuery.exprName can now be a ThisExpression instead of a this identifier.

    8.0.0upgrade guide