Commit Graph

12 Commits

Author SHA1 Message Date
Dan Abramov
bdbce00f53 Use Flow server for local development (#2245)
Summary:
`flow check` runs a complete Flow check.
This is good for CI, but it means every re-check after edit is as slow as first check.

I'm changing local `yarn flow` to use a Flow server instead. This should speed up rechecks locally somewhat. Still won't save us from large recheck cycles, but at least we're not starting from a clean slate every time.

I'm adding `yarn flow-ci` with old behavior for the CI.

Finally, I replaced `--merge-timeout` with an equivalent recently added config option. This ensures it's respected both for the server and for the full check. Without it, the server dies.
Pull Request resolved: https://github.com/facebook/prepack/pull/2245

Differential Revision: D8891234

Pulled By: gaearon

fbshipit-source-id: 2c309a1718ed00ca5839cb3a586386e3e779f029
2018-07-18 06:40:25 -07:00
Dominic Gannaway
e170c37aaa Upgrade Prepack to Babel 7 (#2256)
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
2018-07-14 09:55:18 -07:00
Nikolai Tillmann
4d8b90a94e Upgrading to Flow .69, starting @flow strict annotations
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
2018-04-02 22:28:33 -07:00
Dominic Gannaway
87b77a9258 Ignore fb-www in flowconfig
Summary:
Release notes: none

Ignore fb-www in flowconfig.
Closes https://github.com/facebook/prepack/pull/1652

Differential Revision: D7399181

Pulled By: trueadm

fbshipit-source-id: 091a4302228fa32f5478e7a3d6b6f2996760fea2
2018-03-26 09:08:30 -07:00
James Nolan
d9dc4d2fd1 Website publication script should remove its temporary directories
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
2018-01-01 14:27:47 -08:00
Herman Venter
0ea4c473b4 Update flow version
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
2017-12-22 17:39:16 -08:00
Wuhan Zhou
ec37d26b64 Set up flow-libs
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
2017-10-19 17:12:49 -07:00
wdhorton
7f5ec3b43f Making Prettier a check-in gate
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
2017-07-07 11:35:32 -07:00
Sebastian Markbåge
db10fc86f1 Extract scripts from npm package (#463)
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.
2017-04-26 12:26:18 -07:00
Nikolai Tillmann
dc166cbbf5 Mechanical search+replace renaming of everything relating to serializer. 2017-04-10 18:00:47 -07:00
Herman Venter
6b5f32b2dc Track writes to property (#340) 2017-04-04 10:43:21 -07:00
Sebastian Markbage
8a1d196255 Initial commit 2017-03-28 20:52:41 -07:00