Skip to content

[babel 8] Fully remove import assertions#17603

Merged
nicolo-ribaudo merged 8 commits into
babel:mainfrom
nicolo-ribaudo:import-ass-8
Nov 26, 2025
Merged

[babel 8] Fully remove import assertions#17603
nicolo-ribaudo merged 8 commits into
babel:mainfrom
nicolo-ribaudo:import-ass-8

Conversation

@nicolo-ribaudo

@nicolo-ribaudo nicolo-ribaudo commented Nov 24, 2025

Copy link
Copy Markdown
Member
Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link babel/website#3142
Any Dependency Changes?
License MIT

Ref #17580 (comment)

@nicolo-ribaudo nicolo-ribaudo added the PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release label Nov 24, 2025
@babel-bot

babel-bot commented Nov 24, 2025

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/60220

@pkg-pr-new

pkg-pr-new Bot commented Nov 24, 2025

Copy link
Copy Markdown

Open in StackBlitz

commit: ac66b2a

!pluginsMap.has("deprecatedImportAssert") &&
if (pluginsMap.has("deprecatedImportAssert")) {
if (process.env.BABEL_8_BREAKING) {
console.warn(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this a warning and not an error to keep compatibility with Babel 7 @babel/preset-env.

@nicolo-ribaudo
nicolo-ribaudo merged commit 711db56 into babel:main Nov 26, 2025
74 checks passed
@nicolo-ribaudo
nicolo-ribaudo deleted the import-ass-8 branch November 26, 2025 10:42
@fisker

fisker commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

Hello, @nicolo-ribaudo

There is no way to parse "import assertions" now?

Prettier remains supported for it because the code is runnable on Node.js 20.

Maybe it's fine for us to drop support for it, but if there is still a plugin or options to support it, we'd like to avoid this change, just want to be sure.

@nicolo-ribaudo

Copy link
Copy Markdown
Member Author

Yeah there is no way to support it in Babel now, as that proposed syntax does not exist anymore.

I think Prettier should drop it, as Node.js 20 is the only remaining existing platform that supports them and it reports a warning when using it.

If really needed, given that Prettier bundles Babel anyway we could figure out a way for you to support it with some build-time system.

@fisker

fisker commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

Thanks.

we could figure out a way for you to support it

We are good.

@github-actions github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Apr 18, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants