Skip to content

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Dec 16, 2025

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

In this PR we removed the isPluginRequired API from preset-env. The API has been moved to isRequired export from @babel/helper-compilation-targets.

Also cleaned up all Babel 8 todo comments in preset* packages.

@JLHwung JLHwung added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release PR: Needs Docs labels Dec 16, 2025
@babel-bot
Copy link
Collaborator

babel-bot commented Dec 16, 2025

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

function supportsStaticESM(caller: CallerMetadata | undefined) {
// TODO(Babel 8): Fallback to true
// TODO(Babel 9): Fallback to true
return !!caller?.supportsStaticESM;
Copy link
Member

Choose a reason for hiding this comment

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

In Babel 8 caller is always provided, right? So we can change the type signature and remove ?.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. The @babel/core does not provide any default values for the caller in normalizeOptions or loadPrivatePartialConfig. Maybe we can at least defaults caller to an empty object, or { name: "unknown Babel caller" }.

Copy link
Member

Choose a reason for hiding this comment

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

Oh I see, undefined seems fine then.

@@ -1,4 +1,3 @@
// TODO(Babel 8): Remove this file
Copy link
Contributor Author

@JLHwung JLHwung Dec 17, 2025

Choose a reason for hiding this comment

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

This todo item was removed because removing this file essentially renders the shippedProposals option useless and thus it is subject to removal. The current status quo is that the shippedProposals does not add new plugins, but situations could change if any browsers implemented a stage-3 proposal that is also supported by Babel.

Do we want to remove this option or keep this file?

Copy link
Member

Choose a reason for hiding this comment

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

I agree with keeping it

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 17, 2025

Open in StackBlitz

commit: 45c2505

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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