Summary:
Release notes: upgrades Prepack to use Babel 7.0.0-beta.53
This is a big PR that updates all of Prepack to Babel 7. Babylon is now `babel/parser` and pretty much all of the the previous Babel packages are now located in scoped packages. I had to make a bunch of changes around Jest/Flow/Webpack to get this all working. The build times of building Prepack itself seem considerably faster (easily twice as fast locally). I followed most of the Babel 6 -> 7 upgrade guide from the Babel site in terms of changing nodes and type definitions to match the new ones.
Pull Request resolved: https://github.com/facebook/prepack/pull/2256
Differential Revision: D8850583
Pulled By: trueadm
fbshipit-source-id: 2d2aaec25c6a1ccd1ec0c08c5e7e2a71f78ac2d8
* Refactor the public API
This refactors the public Node API to mimic the
[Babel API](http://babeljs.io/docs/usage/api/). This is a bit more
idiomatic than "run CLI" or instantiate the full serializer object.
I'm passing a single options object instead of individual arguments. This
is a bit more managable as the option list grows.
The prepack-node file is what is exposed in Node which has a file system
API. Both synchronous and asynchronous forms. prepack-standalone is a
module for environments without access to the file system such as browsers.
I configure this to be exposed by default for such environments.
That way we can also use this in the webpack build so that our own repl
on the website can just use this public API.
* Throw an error when serialization fails
This lets any compiler flow to terminate properly by default but the error
can safely be ignored if we've already printed error messages for it such
as in the CLI.
Turn internalDebug error messages off by default but allow it to be
configured.
* Added missing realm options
Not yet exposed in the cli but available through the API.