Visitar URL original
Allow Babel 8 in compatible Babel 7 plugins by nicolo-ribaudo · Pull Request #17580 · babel/babel · GitHub
Skip to content

Allow Babel 8 in compatible Babel 7 plugins - #17580

Merged
nicolo-ribaudo merged 1 commit into
babel:mainfrom
nicolo-ribaudo:allow-babel-8-in-some-plugins
Nov 25, 2025
Merged

nicolo-ribaudo merged 1 commit into
babel:mainfrom
nicolo-ribaudo:allow-babel-8-in-some-plugins

Conversation

@nicolo-ribaudo

@nicolo-ribaudo nicolo-ribaudo commented Oct 29, 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
Any Dependency Changes?
License MIT

This is the list of plugins from https://github.com/babel/babel/blob/main/test/babel-7-8-compat/data.json, for which we are testing Babel 8 compatibility, as well as all the syntax plugins.

This PR only affects Babel 7 plugins. Babel 8 plugins still require a Babel 8 version.

@nicolo-ribaudo nicolo-ribaudo added the PR: Internal 🏠 A type of pull request used for our changelog categories label Oct 29, 2025
@babel-bot

Copy link
Copy Markdown
Collaborator

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2025

Copy link
Copy Markdown

Open in StackBlitz

commit: 324080a


export default declare((api, { deprecatedAssertSyntax }: Options) => {
api.assertVersion(REQUIRED_VERSION("^7.22.0"));
api.assertVersion(REQUIRED_VERSION("^7.22.0 || ^8.0.0-0"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this plugin should be kept Babel 7 only. We should remove the deprecatedImportAssert parser plugin in Babel 8 and then archive this syntax plugin.

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.

Babel 7's preset-env enables this plugin. I'd like to keep it as working (but effectively a no-op) in Babel 8 so that we keep compat with preset-env (at least, when compiling just up to a couple years back of features).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK.

@nicolo-ribaudo
nicolo-ribaudo merged commit 445b575 into babel:main Nov 25, 2025
@nicolo-ribaudo
nicolo-ribaudo deleted the allow-babel-8-in-some-plugins branch November 25, 2025 09:01
@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 Feb 25, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 25, 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: Internal 🏠 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants