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
Summary:
Release notes: None
Upgraded to Flow .69
Added [strict] section to .flowconfig
Started going strict with a simple file
The Flow team suggests to do this on a file-by-file basis,
instead of doing it on a rule-by-rule basis.
Closes https://github.com/facebook/prepack/pull/1692
Differential Revision: D7478479
Pulled By: NTillmann
fbshipit-source-id: b279f6b3a350cc70c263b693522016a20fc8d5d7
Summary:
The [website publication script](https://github.com/facebook/prepack/blob/master/scripts/publish-gh-pages.sh) creates a temporary directory (`build`) to fetch fresh copies of the `master` and `gh-pages` branches.
This temporary directory is not removed and causes `flow` to check it when running `yarn flow`, causing many errors.
To address this issue, this PR:
- Changes the publication script to clean up temporary directories at the end of its execution
- Renames the temporary directory name from `build` to `tmp_website_build` to make it clearer that it can be safely removed, should the script fail to remove it
- Changes `.gitignore` and `.flowconfig` to ignore the temporary directory, should the script fail to remove it
Thanks to hermanventer for reporting the issue
Closes https://github.com/facebook/prepack/pull/1302
Differential Revision: D6648852
Pulled By: j-nolan
fbshipit-source-id: 099963bf6907ff7e69301acafcfb3aeedfbb5b20
Summary: Update Flow to version 61 and deal with changes in the behavior of Flow.
Reviewed By: yinghuitan
Differential Revision: D6631584
fbshipit-source-id: f00c2707bcb991ffbdb3e2e74b6a49032f06a5e4
Summary:
Release notes: none
- Add defined flow libs
- Starting with vscode-debugadapter and vscode-debugprotocol
- vscode-debugprotocol obtained from public Nuclide open source
- vscode-debugadapter generated using https://github.com/joarwilk/flowgen and modified
Test Plan:
`yarn flow`
Closes https://github.com/facebook/prepack/pull/1095
Differential Revision: D6106213
Pulled By: JWZ2018
fbshipit-source-id: f1a50c835ed36dd43326d6c273ea73ec80d3c0cc
Summary:
This supersedes #760.
Additional changes over #760:
Pinning Prettier version to get some formatting always. (Different prettier versions were responsible for the observed flip-flopping of StringPrototype.js.)
Print output of prettier in wrapper script for better diagnosis / experience. (TODO: How to just pipe through console output? Couldn't get it to work.)
Updating problematic .js file for the last time.
Closes https://github.com/facebook/prepack/pull/787
Differential Revision: D5382336
Pulled By: NTillmann
fbshipit-source-id: 95ed988ef3f091493d2fb509b5481753d56901cd
This moves things around in a more common idiomatic folder structure / naming convention. This extracts the scripts that are only used to test the library from the source of the library itself.
/src/scripts -> /scripts
This is no longer part of the build process. Therefore we use babel-node to run the files as needed. The exception is test-runner that is just ran in plain node so that it works with the coverage reports.
The lib folder now includes only and all the library files required to use the package and no longer test runners.
Because of that I moved all the dependencies that were related only to our test scripts and website build to devDependencies. That way we minimize the required dependencies to use Prepack downstream as an npm package.
Then I configured the package.json to only list lib/ and bin/ folders as part of the package. This lets `npm publish` ignore all other files so that people installing the package don't need to include all our testing code.
I added files to bin/ and package.json which is a convention to make this package installable and usable as a command-line tool.
Renamed run_util -> prepack-cli and repl -> repl-cli to separate these from library variants.
The coverage reports now get created in the root instead of lib folder so that they don't get included in the build.
I bumped the version number to one minor above what is already on npm since we can't publish earlier than that.