Commit Graph

20 Commits

Author SHA1 Message Date
David Aurelio 08699062d5 npm package has `src/` rather than `build/`
Summary:
We use custom npm scripts (`prepare-release`, `cleanup-release`) to

- move `src` to `src.orig`, and `build` to `src` before creating the tarball
- move everything back afterwards

We run these scripts with lerna before and after publishing. Custom hooks avoid problems with `prepublishOnly` and `postpublish` not being run at opportune times, `prepack` and `postpack` not being supported by npm v4 and yarn, and using `lerna run prepublishOnly` resulting in duplicated execution of the command.

This ensures that development is closer to what is pulled in from npm.

Reviewed By: jeanlauliac

Differential Revision: D5310133

fbshipit-source-id: 6b9885c88b936ef3fe5f1858738ad63d581a8731
2017-06-23 09:06:33 -07:00
Avik Chaudhuri 67669d7676 update xplat/js to flow 0.48.0
Reviewed By: zertosh

Differential Revision: D5243415

fbshipit-source-id: 78ea4f7f29bcd6a70650f24ceb05f06b18b39018
2017-06-14 15:52:32 -07:00
Lxxyx 32e0d2c0d7 upgrade image-size version fix caculate webp image size bugs
Summary:
When I try to use webp for app. But some webp images get an error message `unsupported file type` by image-size@0.3.5.

And I in image-size repo I found a issue https://github.com/image-size/image-size/issues/65.
This is the same problem.

And try image-size^0.5.1 the error fixed.

![image](https://cloud.githubusercontent.com/assets/13161470/23597366/403a3070-026d-11e7-8666-f4357f1eee73.png)
Closes https://github.com/facebook/react-native/pull/14238

Reviewed By: davidaurelio

Differential Revision: D5145534

Pulled By: javache

fbshipit-source-id: a2aeeae19e928ffefbd0b32501d34069ed37386d
2017-06-13 09:44:02 -07:00
Christoph Pojer 9127fce33c Add --maxWorkers flag and allow transformers to run in-band.
Summary:
This diff cleans up some cruft and adds some features:

* It removes the usage of an env variable to control workers.
* It removes the lazy and handwavy calculation on how many workers to use for jest-haste-map. Jest itself uses the maximum amount of workers available and it has never been reported as an issue – especially since it is a one-time startup cost of about 3 seconds on a cold cache only.
* It adds a `--max-workers` flag to replace the env variable. This one is able to control both the number of workers for `jest-haste-map` as well as the transformers.
* It makes the transformers run in the parent process if 1 or fewer workers are are specified. This should help with debugging.

Once you approve this diff, I will publish a new version of metro to npm and update the version used in RN and remove the use of the env variable altogether: https://our.intern.facebook.com/intern/biggrep/?corpus=xplat&filename=&case=false&view=default&extre=&s=REACT_NATIVE_MAX_WORKERS&engine=apr_strmatch&context=false&filter[uninteresting]=false&filter[intern]=false&filter[test]=false&grep_regex=

Note: the process of adding a CLI option is really broken. Commander also has a weird API. We should consider building a better public API for Metro and then consider how to build a new CLI on top of it and simplify our internal integration. I really don't like how Metro is integrated across pieces of the RN cli in ways that is hard to manage. But that is a larger task for another time :)

Reviewed By: jeanlauliac

Differential Revision: D5217726

fbshipit-source-id: 74efddbb87755a9e744c816fbc62efa21f6a79bf
2017-06-13 09:21:40 -07:00
Miguel Jiménez Esún bc654954a7 Add prettier to metro-bundler, fixing code styling issues
Reviewed By: cpojer

Differential Revision: D5215552

fbshipit-source-id: 64106d322ccd3a39701a41e4efda4975db9aa52c
2017-06-12 01:20:50 -07:00
Christoph Pojer 5e6d70d4d6 Disable automocking from tests
Summary: We are flipping the switch all over Facebook, now that this part of the code is isolated we can do it in Metro as well.

Reviewed By: davidaurelio

Differential Revision: D5199449

fbshipit-source-id: 20c1bacc6dd2d314bd76bc5cc0ecd13266bf81c6
2017-06-08 05:52:18 -07:00
Jean Lauliac 8af0267fdf make jest include polyfills so that it works on node 6 2017-06-01 10:47:51 +01:00
cpojer 0eccb5ebf4 Add more packages. 2017-05-23 11:58:55 +01:00
cpojer 3d45d3c5d0 Update packages. 2017-05-23 11:40:47 +01:00
cpojer a7983ebcc8 Modernize scripts. 2017-05-22 11:54:20 +01:00
cpojer bc03c8d231 Update package.json. 2017-05-22 11:39:13 +01:00
cpojer 16d4cb329b Make most tests work. 2017-04-11 19:19:25 +01:00
cpojer cb6f300ed1 Update flow. 2017-04-11 18:22:31 +01:00
cpojer cbd8149abd Fixes. 2017-04-11 18:14:32 +01:00
cpojer 556c432260 Use Yarn with lerna. 2017-03-01 11:01:35 +00:00
cpojer 84ee9a488e Repo updates. 2017-02-28 11:45:45 +00:00
cpojer f1c1984cc7 Update eslint settings. 2017-02-25 08:25:05 +00:00
cpojer c27751d4c3 Update package.json 2017-02-23 16:38:25 +00:00
cpojer 294850f364 Add spread transform. 2017-02-23 16:16:00 +00:00
cpojer f8eda9b735 Initial repository structure. 2017-01-26 12:56:40 +00:00