Skip to content

[Babel 8] Align esmodules: true behaviour to intersect#17188

Merged
JLHwung merged 5 commits into
babel:mainfrom
JLHwung:remove-esmodules-intersect
Mar 20, 2025
Merged

[Babel 8] Align esmodules: true behaviour to intersect#17188
JLHwung merged 5 commits into
babel:mainfrom
JLHwung:remove-esmodules-intersect

Conversation

@JLHwung

@JLHwung JLHwung commented Mar 17, 2025

Copy link
Copy Markdown
Contributor
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#3069
Any Dependency Changes?
License MIT

In this PR we change the esmodules: true behaviour in Babel 8 to esmodules: "intersect". I didn't remove the esmodules: "intersect" option because I think it is more straightforward than esmodules: true.

I also restructured the tests: the snapshots are replaced by static base queries plus various value updates.

@JLHwung JLHwung added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release pkg: preset-env PR: Needs Docs labels Mar 17, 2025
@babel-bot

babel-bot commented Mar 17, 2025

Copy link
Copy Markdown
Collaborator

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

"safari": "10.1",
"samsung": "8.2"
"safari": "18.2",
"samsung": "26"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These test cases are updated because in Babel 8 a single esmodules: true will be ignored as the browsers in the defaults browserslist queries all support ESM.

@nicolo-ribaudo

Copy link
Copy Markdown
Member

Agree with also keeping "intersect"

@JLHwung

JLHwung commented Mar 18, 2025

Copy link
Copy Markdown
Contributor Author

Docs PR is ready now: babel/website#3069, ptal.

@JLHwung
JLHwung merged commit 624e699 into babel:main Mar 20, 2025
@JLHwung
JLHwung deleted the remove-esmodules-intersect branch March 20, 2025 15:52
@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 Jun 20, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 20, 2025
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 pkg: preset-env 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.

4 participants