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 es5 builds #9945

Merged
merged 1 commit into from
May 2, 2020
Merged

Remove es5 builds #9945

merged 1 commit into from
May 2, 2020

Conversation

cpojer
Copy link
Member

@cpojer cpojer commented May 1, 2020

Summary

We have shipped es5 builds for a very long time but they receive little usage. Their original intent was to enable people to load these packages into the browser without transformation. Nowadays most browsers support latest syntax features and app developers have bundlers available to compile and bundle npm packages. With this change, we are pushing the responsibility to bundle the affected packages themselves rather than Jest providing them out of the box.

This change will be part of Jest 26.

Test plan

The code has been terminated.

@cpojer
Copy link
Member Author

cpojer commented May 1, 2020

Note: I left the build-es5 folder in the build clean command so that everyone rebasing past this commit will get a clean checkout without artifacts. We can remove that one in a month or so.

@cpojer cpojer force-pushed the remove-es5-build branch from 5482e0f to 6f6b693 Compare May 2, 2020 00:06
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

👍

@SimenB SimenB added this to the Jest 26 milestone May 2, 2020
@cpojer cpojer merged commit 687089b into jestjs:master May 2, 2020
@cpojer cpojer deleted the remove-es5-build branch May 2, 2020 08:19
@skovhus
Copy link
Contributor

skovhus commented May 4, 2020

Aw, the only feature I added to Jest... I should probably have added some documentation for it though. ;)

But I agree that it makes sense to remove now.

@cpojer
Copy link
Member Author

cpojer commented May 4, 2020

@skovhus thank you for your contribution to Jest all those years ago. It was very useful when Jest was still gaining adoption. Nowadays everyone is using a bundler so they can compile these themselves.

@skovhus
Copy link
Contributor

skovhus commented May 5, 2020

@skovhus thank you for your contribution to Jest all those years ago. It was very useful when Jest was still gaining adoption. Nowadays everyone is using a bundler so they can compile these themselves.

It is always nice when you can remove code. 👏

@jquense
Copy link
Contributor

jquense commented Oct 7, 2020

:( we were using these (sorry we've just upgraded). Compiling them is not hard, but these were also stubbing out chalk, which is a paaaaaain to do ourselves

@SimenB
Copy link
Member

SimenB commented Oct 8, 2020

you can just copy the fake chalk we used and do module replacement.

https://github.com/facebook/jest/blob/285e4625e3f88c289ebff7b8b32ce80f6309d86d/packages/expect/src/fakeChalk.ts

You can look at the PR that added it for rollup (#4367), or this PR which removed the webpack way (which we migrated to at some point)

(Seems we haven't even removed it from our sources, which we should do.)

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants