breaking(preset-env): remove isPluginRequired export#17670
Conversation
|
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; |
There was a problem hiding this comment.
In Babel 8 caller is always provided, right? So we can change the type signature and remove ?.
There was a problem hiding this comment.
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" }.
There was a problem hiding this comment.
Oh I see, undefined seems fine then.
| @@ -1,4 +1,3 @@ | |||
| // TODO(Babel 8): Remove this file | |||
There was a problem hiding this comment.
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?
|
commit: |
7d80551 to
45c2505
Compare
Fixes #1, Fixes #2In this PR we removed the
isPluginRequiredAPI frompreset-env. The API has been moved toisRequiredexport from@babel/helper-compilation-targets.Also cleaned up all
Babel 8todo comments inpreset*packages.