facebook / hermes

A JavaScript engine optimized for running React Native.
https://hermesengine.dev/
MIT License
9.41k stars 596 forks source link

Allow using `babel-plugin-syntax-hermes-parser` with Babel 8 alpha #1330

Closed nicolo-ribaudo closed 2 months ago

nicolo-ribaudo commented 2 months ago

Summary

The plugin currently requires Babel 7. Babel 8 alpha has no changes to the API that the plugin is using, so it will work if we allow it.

Note that there are some AST breaking changes in Babel 8, so the plugin will have to be updated to fully support it: https://next.babeljs.io/docs/v8-migration-api#ast-changes. However, this PR at least allows experimenting with the plugin in Babel 8 (and making sure that everything else works) for people not affected by those AST changes.

Test Plan

Existing tests pass.

facebook-github-bot commented 2 months ago

@pieterv has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 months ago

@pieterv merged this pull request in facebook/hermes@6ef2a170bddb6313b7d12b1a8837c92809dd7f7b.

pieterv commented 2 months ago

@nicolo-ribaudo thanks so much for the patch! We should be able to cut a new release soon.

nicolo-ribaudo commented 2 months ago

Thank you! :)

pieterv commented 2 months ago

@nicolo-ribaudo This was released in version 0.20.1: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md