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

Update babel&corejs fix the process for updating js libraries #981

Closed
mstoykov opened this issue Mar 28, 2019 · 2 comments
Closed

Update babel&corejs fix the process for updating js libraries #981

mstoykov opened this issue Mar 28, 2019 · 2 comments

Comments

@mstoykov
Copy link
Contributor

mstoykov commented Mar 28, 2019

The current babel that we used is babel-standalone 6.26.0. (Fun thing the commit (0d465bf) adds it is 2 months and 10 days younger than the code by ... the commit date 🤷‍♂️ ). Now 7.0+ has standalone built in.
We should also update core-js (whatever version it currently is) , but given the write up by the core-js author maybe we can just go by with babel.

There are a couple of problems:

  1. currently we have the source of both babel and core-js twice: once as files on disk and once as go.rice files ... this is probably not needed we need only the go.rice files and if we can write a script that automatically generates what is in the repo given it has network connection I am fine :). This will still mean that k6 will be completely buildable with only what is in the git repo and go, but if we want to regenerate the babel it will need network connection.
  2. Well documented what version from where we got for each of those dependencies, so next time we know (easily) from what we upgrade to what. Probably the script from 1 will do this well enough (I hope)
  3. We should probably configure babel better. Supposedly we can remove some plugins add some and so on and so forth to get better ES6 compatibility.
  4. Way more and better tests for things that babel and corejs provide us ... currently this is what is stopping me form just start work on this. I have no idea if I will miss some babel plugin that is needed for something obvious that we currently support and will break it ...
  5. Something that I have forgotten
@na--
Copy link
Member

na-- commented Jan 26, 2021

Some updates for this issue, though we might be better off closing it 🤷‍♂️

@mstoykov did something like this in a recent PR that dropped big parts of the currently bundled core.js: #1772. The current consensus is that we'd completely drop core.js from k6 v0.31.0, so we're probably not going to merge it, but it's still a useful illustration how we don't need to commit the actual minified JS code in our repo.

It's unclear if we'll ever update babel now, whether with #1663 or some other PR... If we ever do, we should just make sure to require something similar from the PR, so we drop babel.min.js from the repo as well.

@mstoykov
Copy link
Contributor Author

mstoykov commented Apr 28, 2021

We did drop corejs completely with #1824.

One of the bigger problems with the currently very old babel we have is it being super slow with very long files, was fixed by a goja update after we got let/const support and disable the babel's plugin #1904.

Given those two I am closing the issue - we are somewhat unlikely to update babel as that comes with a lot of risks and instead we are betting on goja progressing enough that we can actually drop babel at a future point in time.

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

No branches or pull requests

2 participants