Add support for rhino as a compilation target#13448
Add support for rhino as a compilation target#13448nicolo-ribaudo merged 13 commits intobabel:mainfrom
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 8ac5af5:
|
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/47047/ |
|
Could you run |
Unfortunately Rhino can't really even run the test runner |
|
@gausie you could check the source of the test runner and adapt it to Rhino - it's just some lines. It's required for proper built-ins injection by |
|
@zloirock Sure, I'll adapt in my local copy for rhino, get the data and discard my edits. |
|
@gausie you could add a Rhino runner to the PR like in |
I think I'll just fix the two issues in Rhino! |
|
Here's that PR: zloirock/core-js#942 |
|
@zloirock whats up with these two in-progress ci jobs? Are they waiting for approval to start somehow? |
|
I think that it could be better to ask @nicolo-ribaudo since I'm not an expert in current CI. |
|
We only run them manually when changing code that only affects Babel 8 or that might affect spec compliancy of our plugin. |
|
Ahha! Well this ain't that 😛 |
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Could you also add a test in babel-preset-env/tests/fixtures to make sure that the rhino target works?
|
We need to bump |
|
@JLHwung that has now landed in core-js v3.15.0 |
|
Ok I've bumped |
|
@gausie I'm preparing a PR to bump all the |
|
@nicolo-ribaudo ok, is bumping |
|
We'll ask you to rebase this PR on |
|
I just saw compat-table/compat-table#1731. Maybe for the same reason we should have Rhino patch versions in our data? We might need to update our build script to support them. |
|
@nicolo-ribaudo Adding in that patch release is easy since every 1.7 would just need the same change, but I'm not sure how I'd go about updating the build scripts. |
|
Mmh, looking at our build script it looks like it should already work 🤔 Could you try updating the Btw, we just merged #13491 into |
|
@nicolo-ribaudo Ok that's all done now |
packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/input.mjs
Outdated
Show resolved
Hide resolved
…de syntax that is and isn't supported for better testing
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Sorry, I was not clear enough in my previous comment 😅
JLHwung
left a comment
There was a problem hiding this comment.
Does rhino support ES Modules? I searched its repo and it seems to me rhino only supports commonjs. If I am wrong, we should also update packages/babel-compat-data/scripts/build-modules-support.js, otherwise this PR lgtm.
You're correct, for now it only supports commonjs. Woop! |
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Thanks! We'll merge this for the next minor release, somewhere in July.
|
We'll release 7.15 this week. Thank you! |
As suggested by @nicolo-ribaudo in mozilla/rhino#661, I've updated
compat-tableto fully represent the latest version of Rhino and this PR should mean that we can now start targeting it with babel!