Commit Graph

41 Commits

Author SHA1 Message Date
Christoph Nakazawa 2a64bd390e Use the Config type from Metro
Reviewed By: davidaurelio

Differential Revision: D5832633

fbshipit-source-id: 8e4e0e6a2907e485a5627c87161af2d0672b4f56
2017-09-15 05:10:08 -07:00
Christoph Nakazawa 80a3306448 Bump metro-bundler dependency to 0.17
Reviewed By: davidaurelio

Differential Revision: D5834180

fbshipit-source-id: 121efc7000bff7aff121d44e6b0b8eed1d4e81ae
2017-09-14 22:09:13 -07:00
Rafael Oleza 61fb142520 Bump babel-preset-react-native dependency in metro bundler
Reviewed By: jeanlauliac

Differential Revision: D5833281

fbshipit-source-id: 42a62e71b77467973d15d60419a33c310082d015
2017-09-14 09:05:52 -07:00
Rafael Oleza 286c5ccdd9 Bump metro-bundler to 0.16.0
Reviewed By: davidaurelio

Differential Revision: D5793558

fbshipit-source-id: c5d7f3029b889987613034150ba13a72b4850421
2017-09-08 06:23:47 -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
Rafael Oleza 1f90522a13 Upgrade metro-bunder to v0.15.0
Summary: Some breaking changes require a new release.

Reviewed By: cpojer

Differential Revision: D5766207

fbshipit-source-id: d0ebc5cb46fbd2ad167c0a3369d0f354346f61b9
2017-09-05 05:25:02 -07:00
Jean Lauliac 6e415bcb2f metro-bunder: v0.14.0
Summary: Some breaking changes require a new release.

Reviewed By: cpojer

Differential Revision: D5763898

fbshipit-source-id: 0580c9b1256c2c019adc5fb2f771c54d7e7a0bf1
2017-09-04 04:42:16 -07:00
Jean Lauliac 8907de28ac metro-bundler: v0.13
Reviewed By: cpojer

Differential Revision: D5754623

fbshipit-source-id: b70bfa105e6752db5350b82433bd64e1ca45f33b
2017-09-01 07:36:11 -07:00
Jean Lauliac 1142f05d59 metro-bundler: v0.12
Reviewed By: cpojer

Differential Revision: D5745702

fbshipit-source-id: 6dc88811525e1595f58b23b7d0ebd5cc9f309785
2017-08-31 10:52:51 -07:00
Andres Suarez 6d4b8e0c8d Upgrade to babylon@6.18.0
Reviewed By: davidaurelio

Differential Revision: D5652526

fbshipit-source-id: 4e1f217c924b9eee33e9f9eae447962617af7e22
2017-08-18 11:21:41 -07:00
Miguel Jimenez Esun 506e3ec358 Update Jest to 20.1.0-echo.1
Reviewed By: cpojer

Differential Revision: D5591819

fbshipit-source-id: 91830096988d88a6f0601d73225a12ae31e61a17
2017-08-10 07:37:05 -07:00
Brian Vaughn 36b22341b5 React 16 beta 5 sync (5495e49...c3718c4)
Reviewed By: spicyj

Differential Revision: D5564030

fbshipit-source-id: fd3e6133df7ee8e7488a3c515ce6c783c11d9401
2017-08-09 12:25:12 -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 c37f730c57 metro-bundler: 0.11.0
Reviewed By: davidaurelio

Differential Revision: D5494606

fbshipit-source-id: 2049fe162b76fa6ffeec9f87871276057d84f892
2017-07-27 11:51:18 -07:00
Jean Lauliac fd6c2a4013 v0.10.0
Summary: Closes https://github.com/facebook/metro-bundler/pull/32

Differential Revision: D5469676

Pulled By: jeanlauliac

fbshipit-source-id: 68cf83d43582fa0543e28810df48915911760ce3
2017-07-21 04:54:57 -07:00
Miguel Jimenez Esun 3cbc2f3ec4 Revert D5388655: BREAKING: Add regenerator-runtime on demand, based on the files
Differential Revision: D5388655

fbshipit-source-id: 2f92d6ae69f4772195aeca7493f53209388b3ad0
2017-07-19 12:14:28 -07:00
Miguel Jimenez Esun d7521c53ae BREAKING: Add regenerator-runtime on demand, based on the files
Summary:
Adding a Babel plugin that will analyze the file looking for any potential candidate to use `regenerator-runtime`, and if so, will inject dynamically the module. The module is injected per file, so we avoid polluting the global environment. The plugin is also able to inject the `require` call beforehand, so that the inliner can pick them and inline them.

The Babel plugin is part of `react-native-babel-preset`, so as long as you are using this preset you are safe. If not, you should include the specific transformer into your list of plugins, as `react-native-babel-preset/transforms/transform-regenerator-runtime-insertion.js`.

Reviewed By: davidaurelio

Differential Revision: D5388655

fbshipit-source-id: dc403f3d5e2d807529eb8569a85c45fec36a6a3e
2017-07-19 11:11:16 -07:00
Miguel Jimenez Esun 3f4135e444 Update Jest to 20.1.0, chi.1
Reviewed By: davidaurelio

Differential Revision: D5423945

fbshipit-source-id: deb58ba9288883b5d671148aeaa59da6629d0de4
2017-07-14 10:07:30 -07:00
Jean Lauliac 392a129b56 package-json-sync-test: verify metro-bundler dependencies as well
Reviewed By: davidaurelio

Differential Revision: D5370620

fbshipit-source-id: fdcbcd0b9bb78f37745ace28f9f8c17b8b8fd52e
2017-07-11 03:38:03 -07:00
David Aurelio 0e4b4f7c7b Update `throat` dependency to 3.2.0
Summary: it has flow definitions now. OMG!

Reviewed By: cpojer

Differential Revision: D5381183

fbshipit-source-id: bdb3863b24da9802eeeb8a7d08f05d629f735178
2017-07-07 09:18:27 -07:00
David Aurelio 7111cf6e4e Bump dependencies
Summary: Bump dependencies to the same version that react native uses

Reviewed By: jeanlauliac

Differential Revision: D5364009

fbshipit-source-id: 302db951a5509584da13a18a7fab6965e0b1e394
2017-07-06 14:36:22 -07:00
Jean Lauliac b96d886982 metro-bundler: upgrade jest-haste-map
Reviewed By: cpojer

Differential Revision: D5346860

fbshipit-source-id: 16e9eeeb28804af81428745fda4ffc05a461845c
2017-06-29 08:36:14 -07:00
David Aurelio 429c1e8032 Use `jest-docblock`
Summary:
Remove our internal docbloc module and use `jest-docblock` instead.

The development server is using `jest-haste-map` exclusively, which in turn relies on `jest-docblock`, which differs slightly from our own docblock module.

Depending on only one version greatly reduces the number of edge cases

Reviewed By: cpojer

Differential Revision: D5328472

fbshipit-source-id: 4a31d8159519e01a83fda04b76e8f14f0beb16af
2017-06-27 03:51:37 -07:00
David Aurelio b62669e2da Publish v0.9.0
Reviewed By: bestander

Differential Revision: D5310936

fbshipit-source-id: a4d1b5f273c3fd6ba631834175d7e37e8589ef16
2017-06-23 13:07:43 -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
David Aurelio 1e6b34f415 Backed out changeset db8638eebe2d
Reviewed By: alexeylang

Differential Revision: D5246311

fbshipit-source-id: cb12964c27a6d1e6fa719a979a8f0ebcc8efae8a
2017-06-14 09:53:06 -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
David Aurelio 573d9edfd0 Upgrade uglify to v3 + es support
Summary: Upgrades uglify to version 3 with (experimental) ES6 support turned on.

Reviewed By: cpojer

Differential Revision: D5227245

fbshipit-source-id: db8638eebe2daf40b60570cac34905e9a7288705
2017-06-12 10:11:20 -07:00
Christoph Pojer ef7965df63 Update package.json
Reviewed By: jeanlauliac

Differential Revision: D5183469

fbshipit-source-id: 89c17c80398afb7755d8e7dec5116e62fbbc520e
2017-06-06 12:37:37 -07:00
Christoph Pojer 921005d44d Move remaining Metro Bundler files around.
Reviewed By: jeanlauliac

Differential Revision: D5154653

fbshipit-source-id: 482bf9829263d5d8f3d0b951ee58e2020236cc2c
2017-05-31 11:08:01 -07:00
Jean Lauliac f0ee61c438 packager: upgrade jest-haste-map version
Summary: This allows us to get the new fix for recovery on duplicate modules.

Reviewed By: cpojer

Differential Revision: D5128975

fbshipit-source-id: 5a2b60430bbca1806a97798c482af8522366e071
2017-05-25 05:07:05 -07:00
Jean Lauliac 20d7a7cdc8 packager: add missing dep
Reviewed By: davidaurelio

Differential Revision: D5111613

fbshipit-source-id: bf3b574e6166601d52127540e7970839d7019b6c
2017-05-23 09:26:05 -07:00
Christoph Pojer 8e8daabf3f Update package.json
Reviewed By: jeanlauliac

Differential Revision: D5103378

fbshipit-source-id: 64acdc767372a166460859ffba729710d5bf4b80
2017-05-22 07:52:44 -07:00
David Aurelio b5b443f2a5 Pass local paths to transformers
Summary:
Pass `localPath` to transformers to allow usage of plugins like `transform-react-jsx-source` that don’t conflict with x-machine caches, e.g. Buck or our own global cache.
These caches don’t work properly if paths local to a specific machine are part of cached outputs.

Reviewed By: jeanlauliac

Differential Revision: D5044147

fbshipit-source-id: 1177afb48d6dd9351738fcd4da8f9f6357e25e81
2017-05-11 16:51:38 -07:00
David Aurelio 797a07ccc2 BREAKING: Pass parameters to `transformer.transform` as object
Reviewed By: jeanlauliac

Differential Revision: D5037155

fbshipit-source-id: fbd18bd62254d7e1522f659ea62055e66748a951
2017-05-11 08:38:05 -07:00
Brent Vatne e3daf33ed8 Lock version to 2.7.5 to avoid breakage like #12772
Summary:
As per uglify-js maintainer kzc's comment in https://github.com/mishoo/UglifyJS2/issues/1573#issuecomment-284940371 we should be locking our version to prevent issues like #12772 from happening again.

No test plan needed, people are already using this version of uglify-js (it's the latest).
Closes https://github.com/facebook/react-native/pull/12802

Differential Revision: D4749853

Pulled By: javache

fbshipit-source-id: 866a19cb2c1add31b55e14d0f4dadb7f68fda64c
2017-03-22 05:53:50 -07:00
David Aurelio f19e5215cf Allow flow-declared variables when inlining
Summary: The logic of the `inline` babel transform regarded identifiers as global if no binding exists for them. We extend that logic to also accept flow-declared variables.

Reviewed By: arcanis

Differential Revision: D4737620

fbshipit-source-id: e71cfdf77c7b7751265cfa4412430b4f29e9e853
2017-03-20 08:09:09 -07:00
David Aurelio d7dbcfc478 Symbolicate stack traces off the main process
Summary:
Moves stack trace symbolication to a worker process.

The worker process is spawned laziliy, and is treated as an exclusive resource (requests are queued).

This helps keeping the server process responsive when symbolicating.

Reviewed By: cpojer

Differential Revision: D4602722

fbshipit-source-id: 5da97e53afd9a1ab981c5ba4b02a7d1d869dee71
2017-02-27 10:52:57 -08:00
Christoph Pojer 7e8ab0d237 Add dependencies to package.json
Summary:
I extracted all the dependencies (using jest-haste-map) and copied them from the package.json in react-native to RNP. There is some duplication here for now but we can later go back and remove the duplicated dependencies from react-native that aren't needed there.

I also removed a mock file that hasn't been in use for a long time.

Reviewed By: jeanlauliac

Differential Revision: D4598155

fbshipit-source-id: 850b6dfa6fc2eec138ebdd7208cd34bee21f7927
2017-02-23 01:07:28 -08:00
cpojer 2a65cc1963 Revert package.json for now. 2017-02-23 08:59:36 +00:00
cpojer f8eda9b735 Initial repository structure. 2017-01-26 12:56:40 +00:00