Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove core-js dependency from @babel/register #9847

Merged

Conversation

@coreyfarrell
Copy link
Contributor

commented Apr 10, 2019

Q                       A
Fixed Issues?
Patch: Bug Fix? 👍
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Existing tests pass
Documentation PR Link
Any Dependency Changes? 👍
License MIT

The dependency core-js is not actually used by @babel/register so this PR removes it.

Remove core-js from @babel/register.
This module doesn't use core-js at all.
@babel-bot

This comment has been minimized.

Copy link
Collaborator

commented Apr 10, 2019

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

@nicolo-ribaudo

This comment has been minimized.

Copy link
Member

commented Sep 3, 2019

While this could be removed, I am a bit worried that it will break users using @babel/register @babel/preset-env with corejs: 3 without explicitly listing it in their dependencies.

cc @babel/babel

@ljharb
ljharb approved these changes Sep 3, 2019
Copy link
Member

left a comment

anyone relying on this being implicitly present already has a bug; this error will surface their broken package.json most efficiently, at build time.

@suchipi

This comment has been minimized.

Copy link
Member

commented Sep 3, 2019

Perhaps we should move the core-js dep to preset-env, then?

@chicoxyzzy
Copy link
Member

left a comment

LGTM

@nicolo-ribaudo

This comment has been minimized.

Copy link
Member

commented Sep 4, 2019

Perhaps we should move the core-js dep to preset-env, then?

preset-env doesn't rely on core-js. Only it's output, when explicitly enabled by the user, does.
Also, we would need somehow to add both core-js 2 and 3 without aliasing them so it's not possible.

this error will surface their broken package.json most efficiently, at build time

Actually, @babel/runtime is executed at runtime by definition 😛
And also if it wasn't, the error would be a MODULE_NOT_FOUND thrown at runtime because of the injected core-js imports.

@ljharb

This comment has been minimized.

Copy link
Member

commented Sep 4, 2019

ok, fair point on that. still tho, theoretically any test of any kind on a babelified file would expose it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.