Commit Graph

41 Commits

Author SHA1 Message Date
Miguel Jimenez Esun 57cfa19518 Update to Jest 22.0.0
Reviewed By: cpojer

Differential Revision: D6591693

fbshipit-source-id: ac3d6320445372a5694e7618ed52eb2f391d0bad
2017-12-18 05:20:08 -08:00
Rafael Oleza 5e65dfcf81 Consolidate eslint config + fix some issues
Reviewed By: davidaurelio

Differential Revision: D6519564

fbshipit-source-id: 0cd894e92dfde451f8ee69d6c7c3d4cbd73b83ea
2017-12-11 12:32:20 -08:00
Rafael Oleza 53290f5b9c Update flow-bin version
Reviewed By: mjesun

Differential Revision: D6519545

fbshipit-source-id: da9f5dd6029d5bfea4b6c758ca3df9caa5c5fa35
2017-12-08 05:28:57 -08:00
Adam Ernst 9e4cfb4c93 Upgrade to 1.9.1
Reviewed By: vjeux

Differential Revision: D6497877

fbshipit-source-id: 3b88b96e375ddf1fbe039a0593569bbdde40a2dc
2017-12-06 17:31:38 -08:00
Miguel Jimenez Esun 3a377ee0a7 Upgrade Jest to "21.3.0-beta.13"
Reviewed By: rafeca

Differential Revision: D6497197

fbshipit-source-id: b816f4b02cf35abee4ce4098c30291b32656ed04
2017-12-06 09:04:51 -08:00
Christoph Nakazawa 6d756334a8 Fix CI
Reviewed By: rafeca

Differential Revision: D6368078

fbshipit-source-id: 04232ac3762ce4c9581c694a60c1372b2f495af0
2017-11-18 10:45:32 -08:00
Christoph Nakazawa 5fdef3bdb2 Update Flow and Lerna for the Metro repo
Summary: I'm working on getting CI to pass. As a first step, I'll upgrade the lerna setup to use Yarn's workspaces (when yarn is run from the Metro root) as well as upgrading Flow to the same version we use in xplat. I also copied over the Jest type definitions. This should fix all type errors for a start.

Reviewed By: davidaurelio

Differential Revision: D6361276

fbshipit-source-id: 4e8661b7d5fe4e3f6dd1e6923891bd2d23c9b4db
2017-11-18 01:10:15 -08:00
Miguel Jimenez Esun 91f724d69d Update Jest to 21.3.0-beta.8
Reviewed By: davidaurelio

Differential Revision: D6221784

fbshipit-source-id: 189e895378635dd21d14d6fb1f93510a52c90742
2017-11-08 06:50:53 -08:00
Kathy Gray 9bb438ed1d Upgrade babel generator
Reviewed By: arcanis

Differential Revision: D6008862

fbshipit-source-id: f8c0bc35d696453fd7cda82ce614d084cbc867e0
2017-10-12 07:52:01 -07:00
Christopher Chedeau 23c69f5362 Upgrade to 1.7.0
Reviewed By: fkgozali

Differential Revision: D5763293

fbshipit-source-id: 865ed74a78606cb54f274ebedae49de980dcab6f
2017-09-26 23:46:09 -07:00
Miguel Jimenez Esun 467fa563fe Migrate tests away from "jsdom" environment
Reviewed By: leebyron

Differential Revision: D5748304

fbshipit-source-id: c66df45f1f35333f994c41eb8ff4cfccc1bb04d4
2017-09-11 09:52:43 -07:00
Miguel Jimenez Esun d4a93eb2fa Update Jest to v21
Reviewed By: cpojer

Differential Revision: D5765333

fbshipit-source-id: 94ea448c4380fdc68f42f84eb3963322ea18ec70
2017-09-05 05:25:02 -07:00
Andres Suarez 89cd3a6619 Update to eslint-plugin-react@7.2.1
Reviewed By: davidaurelio

Differential Revision: D5657026

fbshipit-source-id: 2e3f6bc21495e3af45f0e9ee1745cb2809b0fa7c
2017-08-18 09:32:10 -07:00
Jean Lauliac e032e6621f metro-bundler: upgrade all jest refs to delta.4
Reviewed By: mjesun

Differential Revision: D5503722

fbshipit-source-id: ca5d1e684e6b909804ae2be8c2055439dda611f5
2017-07-28 13:02:53 -07:00
Jean Lauliac 6fd25bb98a metro-bundler: fix test command
Reviewed By: cpojer

Differential Revision: D5452722

fbshipit-source-id: d0253150555bfbc1cbf5ef0331767855bc37d517
2017-07-19 10:21:08 -07:00
Jean Lauliac d23a665647 Revert "fix the test command"
This reverts commit 8c716f0029.
2017-07-19 17:31:41 +01:00
Jean Lauliac 8c716f0029 fix the test command 2017-07-19 15:38:33 +01:00
Jean Lauliac 4399621d36 metro-bundler: upgrade jest to 20.1
Summary: This put it on par with the version we use on other projects. This new version breaks assumptions about the way Promise/ticks/timers use to work, and I was not able to make it work properly synchronously. Since it's fragile anyway (because rely on Promise and feature internals), I propose the switch to async as done in this changeset. If `res.end` is not called, tests will just timeout instead.

Reviewed By: cpojer

Differential Revision: D5423823

fbshipit-source-id: 015e808a2cf2b8297a36b16feeb811a6e745a835
2017-07-14 08:11:09 -07:00
Jean Lauliac e3a9e82b69 metro-bundler: remove image-size
Summary:
It appears this is not needed to build or anything, only for metro-bundler itself.

Closes https://github.com/facebook/metro-bundler/issues/20.

Reviewed By: cpojer

Differential Revision: D5370513

fbshipit-source-id: 563b5716ca9ab1b58fc7ae1f757efc61cf946168
2017-07-06 02:08:34 -07:00
Christopher Chedeau 138ae9623c Update prettier to 1.5.2
Differential Revision: D5338894

fbshipit-source-id: c3ccd927b7f4ddcb36d744b84f66c85f8dea0686
2017-06-28 13:00:25 -07:00
Jean Lauliac e74e123300 fix support for node v4
Summary:
Node v4 support has been broken for some time, with CircleCI failing tests. That's because it needs an additional transform for the spread operator in call position. Ex `foo(...smth)` expanding to `foo.apply(null, smth)`. Also, the build script was using syntax not supported by Node v4.

This changeset fixes the build script, and adds the missing transform. This will be used both for jest test and for the produced production output. This is needed for prod output since we want it to be able to be ran on Node v4 out-of-the-box.

CircleCI will confirm these changes work properly on all supported versions of Node.
Closes https://github.com/facebook/metro-bundler/pull/16

Differential Revision: D5319746

Pulled By: davidaurelio

fbshipit-source-id: 6c001b562b43da0625d1ac15d018117524970431
2017-06-26 05:08:50 -07:00
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