Commit Graph

1058 Commits

Author SHA1 Message Date
Maël Nison 2f9ba4b57a Adds react-transform-hmr to Metro dependencies
Reviewed By: davidaurelio

Differential Revision: D7707139

fbshipit-source-id: e271db39fda3bf257d5126a7a5734d8565f809d0
2018-04-20 04:22:19 -07:00
Miguel Jimenez Esun 585a0def32 Clean DependencyGraph.js
Reviewed By: cpojer

Differential Revision: D7628731

fbshipit-source-id: 653d0ebc7b506fb19df15874aad7877c981f1979
2018-04-19 18:41:32 -07:00
Miguel Jimenez Esun b88d8d1f99 Clean ModuleCache.js
Reviewed By: cpojer

Differential Revision: D7628729

fbshipit-source-id: 0c9d617cfdb6f1e514e2bc61fe393ef1b589bd97
2018-04-19 18:41:32 -07:00
Miguel Jimenez Esun fecc8d3508 Clean Bundler.js
Reviewed By: rafeca

Differential Revision: D7628724

fbshipit-source-id: 75256551bfcaf3729882b76eaade2979d8a85c64
2018-04-19 18:41:32 -07:00
Miguel Jimenez Esun 01827a0fab Simplify Module.js
Reviewed By: rafeca

Differential Revision: D7628732

fbshipit-source-id: 50f5612d94727190c372148eba1a01f245f21d73
2018-04-19 09:13:50 -07:00
Peter van der Zee 16e843ef98 Lock down Babel 7 in metro to beta.40
Summary:
Since Babel is still in beta and breaking changes may happen between beta versions we need to lock this down and carefully consider upgrades.

For example, between .40 and .44 there seem to be at least two new mandatory options and who knows what else.

Once Babel 7 leaves beta we can go back to the caret (^).

Reviewed By: rafeca

Differential Revision: D7685783

fbshipit-source-id: ff6e19f5716b4c7fdfb8778c650309bb92966ff7
2018-04-19 06:23:34 -07:00
Peter van der Zee 91568c8e5c Upgrade Prettier to v1.12.1 on fbsource
Reviewed By: benjaffe, ryanmce, yungsters

Differential Revision: D7652946

fbshipit-source-id: 396d45c675e93f2298cd2920d927630c81867447
2018-04-19 03:04:48 -07:00
Rafael Oleza e023342d24 Bump metro@0.33.0
Reviewed By: davidaurelio

Differential Revision: D7661486

fbshipit-source-id: 5186a853eaff139948622e93d851deb9577567dc
2018-04-18 12:25:03 -07:00
Rafael Oleza 380ad7105a Move minification to the transformation phase
Reviewed By: mjesun

Differential Revision: D7670710

fbshipit-source-id: 8a55de0d3a1ee4879d21391d47fd0acd66482f44
2018-04-18 12:25:03 -07:00
Rafael Oleza 310c096671 Expose type parameter on the buildGraph command
Reviewed By: davidaurelio

Differential Revision: D7654256

fbshipit-source-id: c3d97a1564ed06561b071ca412b14655f46cbc4f
2018-04-18 12:25:03 -07:00
Rafael Oleza 47793c25a5 Rename edge to module in DeltaBundler
Reviewed By: jeanlauliac

Differential Revision: D7652219

fbshipit-source-id: 88922711eaccd0a6bff1a0f3cc9bfaa770f4c275
2018-04-18 12:25:02 -07:00
Rafael Oleza 2446fe2211 Decouple the dependency traversal logic from Bundler/Dependencygraph/Module
Summary:
This commit refactors the metro bundling logic to make the traversal of dependencies much more generic, to not depend on any assumption regarding dependency resolution, haste, or even about the transformer/caching system.

So, the actual API of the `DeltaBundler` module (which will be extracted as a separate package in the near future) ends up being like this:

```
const graph = await deltaBundler.buildGraph(
  ['/root/entryPoint1.js', '/root/entryPoint2.js', /* ... */],
  {
    dependencyResolver: (from, to) => require('resolve').sync(to, {from}), // Use the standard nodejs resolver
    transformFn: filePath => await transformFileUsingWhateverIPrefer(filePath),
  },
);
```

The only part that is still coupled with the `DependencyGraph` is the file listener (which is tied to JestHasteMap via `DependencyGraph`), which is going to be decoupled soon.

From here, and once we have the new caching system fully rolled out and the old cache logic removed, we'll incorporate `jest-worker` and the caching system directly into the build graph logic, to end up extracting the whole `DeltaBundler` logic into its own package.

From there we can potentially reuse it to create simpler/more focused bundlers for web/etc.

Reviewed By: davidaurelio

Differential Revision: D7617143

fbshipit-source-id: b7e1a71cd95043f6232b07f2e8c45dcd49f089f2
2018-04-18 12:25:02 -07:00
Rafael Oleza 7cdbdffa96 Fix incremental builds when minify=true
Reviewed By: jeanlauliac

Differential Revision: D7615597

fbshipit-source-id: ab0985ed1954d8916e2f9c89c88465be196edd5f
2018-04-17 18:45:55 -07:00
Avik Chaudhuri c82456d8e0 @allow-large-files clean up xplat/js for flow 0.70.0
Reviewed By: fishythefish

Differential Revision: D7643236

fbshipit-source-id: 1d9a95f1e249ce3fdc552a4ca92a6c63b267dae4
2018-04-17 05:50:48 -07:00
Miguel Jimenez Esun c67b6317fa Improve error reporting for SHA-1 retrieval
Reviewed By: rafeca

Differential Revision: D7642401

fbshipit-source-id: b04610abcfbb33629db640c7d97083722db1fe17
2018-04-16 16:09:05 -07:00
Miguel Jimenez Esun c56e414560 Implement "clear" method in "metro-cache" stores
Reviewed By: rubennorte

Differential Revision: D7628735

fbshipit-source-id: a129bd32f30be968116e0efa065badc6a7d55d51
2018-04-16 12:59:57 -07:00
Rafael Oleza 8fcc40edf2 Clean not found/error requests from nodejs HTTP agent
Differential Revision: D7635421

fbshipit-source-id: 2a825a99ce57857354f17496239a9537bf068bc2
2018-04-16 04:52:18 -07:00
Miguel Jimenez Esun f5e93c6e91 Remove PersistedMapStore
Reviewed By: cpojer

Differential Revision: D7628723

fbshipit-source-id: 0efb8d42da621870e46ab57a2c23775d5f0e373c
2018-04-14 05:33:45 -07:00
Jean Lauliac 9922584f45 metro: remove fs mock completely
Reviewed By: mjesun

Differential Revision: D7627213

fbshipit-source-id: cc68b46ef93e2da78d34f1561b2c65a5f1682b06
2018-04-14 00:01:00 -07:00
Peter van der Zee ef7c0a869d Add missing plugin for node 6/7
Reviewed By: mjesun

Differential Revision: D7610367

fbshipit-source-id: 5797bd713c0dc81d627e3eec72913c5100700369
2018-04-12 20:28:54 -07:00
Miguel Jimenez Esun 305669e716 Add HTTP store
Reviewed By: jeanlauliac

Differential Revision: D7382414

fbshipit-source-id: 2c6cdb9330137718f49771bafdabe2b6d24e7ba8
2018-04-12 15:28:03 -07:00
Miguel Jimenez Esun b278e42155 Lazily access source all the way up
Reviewed By: jeanlauliac

Differential Revision: D7602299

fbshipit-source-id: e3787d164a691350cb37183b4738947902cc85cf
2018-04-12 14:43:39 -07:00
Jean Lauliac 55e7e50232 metro: traverseDependencies-integration-test: switch to the memory FS
Reviewed By: rafeca

Differential Revision: D7257733

fbshipit-source-id: a82583bfed0921a69e4518bf32bcdb4515f50c94
2018-04-11 18:14:34 -07:00
Jean Lauliac 13e0844dcf metro-memory-fs: add support for win32
Reviewed By: rafeca

Differential Revision: D7545983

fbshipit-source-id: 1fa8ae6c773e933a73fa525c191599b35d85c604
2018-04-11 18:14:34 -07:00
Peter van der Zee 0349db8654 BREAKING CHANGE: UPGRADE REACT NATIVE TO BABEL 7!
Summary:
BREAKING CHANGE
This change upgrades the React Native build pipeline from Babel 6 to Babel 7

If you use a `.babelrc` then you'll need to update it to Babel 7 (note that some plugins are no longer relevant, some plugins are automatically upgraded, and some will need some manual love).

Note that you may also need to upgrade your dev env, tests etc, to make sure they work with Babel 7.

Reviewed By: mjesun

Differential Revision: D7591303

fbshipit-source-id: 29cef21f6466633a9c366d1f3c0d3cf874c714db
2018-04-11 17:14:14 -07:00
David Aurelio 2a2b54555e Move `.../<name>/index.js` to `.../<name>.js`
Summary:
Here, we move `index.js` files in directories one level up, and rename them to `<dirname>.js`.

This makes for a more pleasant development experience, as files are easier to identify even when only seeing the file name.
It also eliminates quite some `../` segments in imports.

Reviewed By: mjesun

Differential Revision: D7587186

fbshipit-source-id: cf7e6b417085435d731c5b6830309068035bcd19
2018-04-11 13:46:37 -07:00
Rafael Oleza 5f0117e27a Bump metro@0.32.0
Reviewed By: mjesun

Differential Revision: D7586296

fbshipit-source-id: 72407851366c5c2de15d4b3c7fe6311281d697bf
2018-04-11 10:53:54 -07:00
Rafael Oleza d54a7044f2 Support passing multiple entryPoints to the public buildGraph() method
Reviewed By: mjesun

Differential Revision: D7365288

fbshipit-source-id: 1d1b94858d2ad31307157839808b9a6c01c00365
2018-04-11 10:53:53 -07:00
Rafael Oleza d0fdca73cd metro-memory-fs: Do not report a file change when reading a file
Reviewed By: jeanlauliac

Differential Revision: D7584517

fbshipit-source-id: 55f87d15c723f697ea00c357da1d36f5d31accbb
2018-04-11 10:04:08 -07:00
Rafael Oleza bd5d776a2f metro-memory-fs: Allow to also listen directly to files
Reviewed By: jeanlauliac

Differential Revision: D7584516

fbshipit-source-id: 4362b148a59f11b7cc1ccb27e4c1a9ebf042e52c
2018-04-11 10:04:08 -07:00
Matt Mahoney 76a9a21369 Revert D7097279: BREAKING CHANGE: UPGRADE REACT NATIVE TO BABEL 7!
Differential Revision:
D7097279

Original commit changeset: 9fb204cae733

fbshipit-source-id: bbbb20b5dbed5dc01ae5557686a07d987b9a6cc6
2018-04-11 08:32:08 -07:00
David Aurelio 1c3adf5d21 Fix source map generation with experimental caches
Summary: Fixes a typo with a property name that flow did not catch.

Reviewed By: mjesun

Differential Revision: D7582300

fbshipit-source-id: 039550dffb0f22ed8d2820e7fdcbe35c1d012c68
2018-04-10 22:02:06 -07:00
Peter van der Zee 11d36cd985 BREAKING CHANGE: UPGRADE REACT NATIVE TO BABEL 7!
Summary:
BREAKING CHANGE
This change upgrades the React Native build pipeline from Babel 6 to Babel 7

If you use a `.babelrc` then you'll need to update it to Babel 7 (note that some plugins are no longer relevant, some plugins are automatically upgraded, and some will need some manual love).

Note that you may also need to upgrade your dev env, tests etc, to make sure they work with Babel 7.

Reviewed By: cpojer

Differential Revision: D7097279

fbshipit-source-id: 9fb204cae733174a1c155669b7c17ddb70f7aecc
2018-04-10 21:14:56 -07:00
Miguel Jimenez Esun e49c7a350c Do not read file on the main process when using SHA-1 + experimental caches
Reviewed By: jeanlauliac

Differential Revision: D7443476

fbshipit-source-id: 4363b35ee5cbf988758b249c9a9c3d5ca606f317
2018-04-10 18:57:45 -07:00
Peter van der Zee 8073bdaa08 Tiny refactor; use `== null`
Reviewed By: davidaurelio

Differential Revision: D7575286

fbshipit-source-id: a9e0fc7ee5a15ce1eabb84759cf584df2acca008
2018-04-10 18:02:06 -07:00
Spencer Ahrens 11cc6a7f65 add new hooks to print require paths
Reviewed By: jingc

Differential Revision: D7545569

fbshipit-source-id: 57fa6fef45805c74682dd9897570a89c82ce0b23
2018-04-10 12:36:45 -07:00
Peter van der Zee 6ab9e7d09c Change the name JSFileWrapping uses for `require`
Reviewed By: jeanlauliac

Differential Revision: D7502266

fbshipit-source-id: 23457eba7321fccb6d9a1f2d3d950e75cdc8a26a
2018-04-10 10:30:18 -07:00
Rafael Oleza c35f1a2c01 Remove .meta files generation from metro
Reviewed By: davidaurelio

Differential Revision: D7347623

fbshipit-source-id: 29c8b79771566178ea8f720a93bd73df678c7807
2018-04-10 09:44:32 -07:00
Miguel Jimenez Esun 9045aad7e4 Use SHA-1 on experimental caches
Reviewed By: jeanlauliac

Differential Revision: D7399785

fbshipit-source-id: c8e842390e27d7954ca78dcd5c4b7e2a115d1b9d
2018-04-09 16:12:06 -07:00
Jean Lauliac caf4fe379f metro: inline-plugin-test: does not replace local variables
Reviewed By: fromcelticpark

Differential Revision: D7533450

fbshipit-source-id: 5f1d37ad3cd8ecd585d627edd501f732837f12c5
2018-04-06 06:29:24 -07:00
Maël Nison 203bb0ddfd Adds an experimental hook for custom resolutions
Reviewed By: mjesun

Differential Revision: D7337022

fbshipit-source-id: fea1ee345e4d3b5713fed6cdc33869fbba6f21e2
2018-04-05 08:59:51 -07:00
Peter van der Zee 5714c450f7 Rename the `accept` local function to `metroAccept`
Reviewed By: rubennorte

Differential Revision: D7487829

fbshipit-source-id: f9055d7c42542124cf8db2652638973f6dfef63f
2018-04-05 06:29:53 -07:00
Jean Lauliac 7e523b21e5 metro-memory-fs: add unlinkSync()
Reviewed By: rubennorte

Differential Revision: D7443805

fbshipit-source-id: 53368103f9230622250be62cde2474c21a930be8
2018-04-04 03:10:49 -07:00
Jean Lauliac 6d8b06dcd9 metro-memory-fs: add watch()
Reviewed By: rubennorte

Differential Revision: D7443797

fbshipit-source-id: 2ffdfb3649caf057c42313e36e9ff35e70f4f759
2018-04-04 03:10:49 -07:00
Jean Lauliac 72a66fa8e4 xplat/js/metro: DependencyGraph: reject on duplicate modules
Reviewed By: davidaurelio

Differential Revision: D7398617

fbshipit-source-id: eaac785d94b827502c2c50d8ec53ae251547a8a5
2018-04-03 09:30:23 -07:00
David Aurelio 01599ed55e Send `X-Metro-Delta-ID` header
Summary:
Adds additional headers to delta responses:
- The next delta ID. This helps to defer parsing the delta payload to a different layer.
- The size of the delta. This can be used as a hint for memory allocation

Reviewed By: jeanlauliac

Differential Revision: D7428603

fbshipit-source-id: 1d5e840991ec8cb490d33b3bc97444b0d7a3a0f3
2018-03-29 09:18:48 -07:00
glevi@fb.com a15a515f37 Upgrade to Flow v0.69.0
Reviewed By: panagosg7

Differential Revision: D7437630

fbshipit-source-id: db9627afed89049c07a121296fbd52e2bfbf39bf
2018-03-29 06:42:18 -07:00
Peter van der Zee 77a5cbdd33 Rename the `require` local var in the require "polyfill"
Reviewed By: mjesun

Differential Revision: D7399735

fbshipit-source-id: 1daa1aee112f47bc87cc5b156a48919f8da8fa4f
2018-03-28 10:16:29 -07:00
Miguel Jimenez Esun a36195a0fd Upgrade Jest to 23.0.0-alpha.4
Reviewed By: cpojer

Differential Revision: D7397960

fbshipit-source-id: 40984ff1ebfccdcba58f898abf8c52e2ed337221
2018-03-27 12:29:38 -07:00
Peter van der Zee 22b5fef24d Move package resolution error to its own file
Reviewed By: rafeca

Differential Revision: D7180926

fbshipit-source-id: 24f14a662bbfc776c02093339f571db32af0be90
2018-03-25 13:42:31 -07:00
Peter van der Zee 94028f16c1 Move the ambiguous error to its own file
Reviewed By: davidaurelio

Differential Revision: D7180925

fbshipit-source-id: 4b92397a768e0d9cda102d4b237bc39d2b38b443
2018-03-25 13:42:31 -07:00
Peter van der Zee 094489f6e1 Add the skeleton for abstracting error classes
Reviewed By: rafeca

Differential Revision: D7180927

fbshipit-source-id: 9acc77e761433845009367faea28b1c8dbbcc114
2018-03-25 13:42:31 -07:00
Miguel Jimenez Esun debe429690 Organize a bit metro-cache
Reviewed By: jeanlauliac

Differential Revision: D7350100

fbshipit-source-id: bc5ce7ca4f264f523a18be84e390c6a19ac74374
2018-03-21 10:43:20 -07:00
Peter van der Zee e42b126485 Inject imports through external babel api for babel 7
Reviewed By: arcanis

Differential Revision: D7337424

fbshipit-source-id: 9bbaea34759475d2bbd95615e6715fcacda59c3a
2018-03-21 09:30:47 -07:00
Peter van der Zee 5a7fa7e2dd Add babel-helper-module-imports to prepare react transform
Reviewed By: arcanis

Differential Revision: D7337427

fbshipit-source-id: caf2b2df2b506378b820302374ad9be523283da7
2018-03-21 09:30:47 -07:00
Peter van der Zee b3619fc838 Workaround for babel7
Reviewed By: arcanis

Differential Revision: D7337431

fbshipit-source-id: f25a576b1ead75cba32cdffd3341a89380665d7a
2018-03-21 09:30:47 -07:00
Peter van der Zee 9b90096a2a Depend on local version of babel-plugin-react-transform
Reviewed By: arcanis

Differential Revision: D7337432

fbshipit-source-id: 3729359da0ccfd3161546ab3ea9331ad30fb6e8d
2018-03-21 09:30:47 -07:00
Peter van der Zee ad2d99512b Create a local package of babel-plugin-transform-react
Reviewed By: arcanis

Differential Revision: D7337425

fbshipit-source-id: c70c27921faacb4f39674d0fbc14a2052fe9eac3
2018-03-21 09:30:47 -07:00
Rafael Oleza 012bb6a512 Bump metro@0.31.0
Reviewed By: mjesun

Differential Revision: D7336904

fbshipit-source-id: 2132c77d07e52a91f09b6f905bee4806aaf7d23e
2018-03-20 19:46:18 -07:00
Rafael Oleza 6aed6433b0 Add getRunModuleStatement config param to configure the require() statements
Reviewed By: cpojer

Differential Revision: D7334078

fbshipit-source-id: c19340567c634e3173ee707e92389eaaa4e724e9
2018-03-20 07:12:53 -07:00
Rafael Oleza a396616e4b Make crawling Options type strict
Reviewed By: cpojer

Differential Revision: D7334076

fbshipit-source-id: 5aaf65d594b23a51287f97ce9f14aab09010f871
2018-03-20 07:12:53 -07:00
Rafael Oleza 69755c9a0d More cleanup of unneeded option params
Reviewed By: cpojer

Differential Revision: D7334077

fbshipit-source-id: ca3359e0e866a84cb57a298ae09c6dd6005d3242
2018-03-20 07:12:53 -07:00
Rafael Oleza 93c2f102b5 Small cleanup on Server
Reviewed By: cpojer

Differential Revision: D7320668

fbshipit-source-id: ff7c338ed079574ec86e86e7af87f9f9c6b3eda0
2018-03-20 07:12:53 -07:00
Rafael Oleza feaf638688 Remove DeltaTransformer + DeltaPatcher
Reviewed By: cpojer

Differential Revision: D7320669

fbshipit-source-id: 9e4e44e64c77e1d77a403517c154f64acd1e66ae
2018-03-20 07:12:53 -07:00
Rafael Oleza 5c6bdd35f0 Deprecate postProcessModules config param
Reviewed By: mjesun

Differential Revision: D7320671

fbshipit-source-id: 979108f0931f9ee0dd820025782137d4c726d19f
2018-03-20 07:12:53 -07:00
Rafael Oleza 2d77ecc6c0 Expose the buildGraph method as a public metro api
Reviewed By: mjesun

Differential Revision: D7320672

fbshipit-source-id: 251874edc28483d5ac6f810dcda77e04e4729049
2018-03-20 07:12:53 -07:00
Rafael Oleza add2826ebe Support concurrent bundle requests on the Server
Reviewed By: mjesun

Differential Revision: D7320670

fbshipit-source-id: 02090f85bf1b5376e9af879d17898bf31c31ce3a
2018-03-20 07:12:53 -07:00
Rafael Oleza 9bae90b2b8 Use the new Graph object for generating HMR bundles
Reviewed By: jeanlauliac

Differential Revision: D7275598

fbshipit-source-id: 912a60ebce7ccc291d138c6f1ef8b0fea2d5712b
2018-03-20 07:12:53 -07:00
Rafael Oleza 395e0494a6 Use the new Graph object for generating delta bundles
Reviewed By: mjesun

Differential Revision: D7275600

fbshipit-source-id: 29579594b88ea19ff81c6e4c1936611f8ecc42f7
2018-03-20 07:12:53 -07:00
Rafael Oleza 2a107aaafc Use the new Graph object for returning the RAM bundle info
Reviewed By: mjesun

Differential Revision: D7275597

fbshipit-source-id: 5a30c83f9ce756f457796a08d10034d03cbc3b75
2018-03-20 07:12:53 -07:00
Rafael Oleza 1b3d2e126d Use the new Graph object for symbolicating errors
Reviewed By: jeanlauliac

Differential Revision: D7275603

fbshipit-source-id: 94a127647f22f7deaaffe649bba6a7ec9353fc03
2018-03-20 07:12:53 -07:00
Rafael Oleza b9b541542b Use the new Graph object for generating dev bundle/sourcemaps
Reviewed By: mjesun

Differential Revision: D7275599

fbshipit-source-id: 4889d259005b3df19977925a6729805b9df68113
2018-03-20 07:12:52 -07:00
Rafael Oleza 12fe345e1b Use the new Graph object for returning bundle dependencies
Reviewed By: mjesun

Differential Revision: D7275602

fbshipit-source-id: 9c07d85b085c297ed5efe958e3b7efe001f3542f
2018-03-20 07:12:52 -07:00
Rafael Oleza 0520fb254b Use the new Graph object for generating assets
Reviewed By: mjesun

Differential Revision: D7275601

fbshipit-source-id: b7c03ec35ea1994e2441da2889a44466e9e2aa0f
2018-03-20 07:12:52 -07:00
Naor Matania ce2ee5a19c Revert D7319514: Create a local package of babel-plugin-transform-react
Differential Revision:
D7319514

Original commit changeset: bcad3dded2b2

fbshipit-source-id: 3aae57ba660846508ea06fe5a540f4adf5b0088e
2018-03-20 06:35:11 -07:00
Naor Matania 13a7535d31 Revert D7319513: Depend on local version of babel-plugin-react-transform
Differential Revision:
D7319513

Original commit changeset: 4945ec753087

fbshipit-source-id: 98de6a0fda19732c02ad780953497f9d9b451dea
2018-03-20 06:35:11 -07:00
Naor Matania 045cf843d1 Revert D7305051: Work around babel7 issue with duplicate declarations
Differential Revision:
D7305051

Original commit changeset: ac9a0130dc61

fbshipit-source-id: 6489a2385477be5c37e63387bf6367dd3ae97be1
2018-03-20 06:35:11 -07:00
Naor Matania 94c03a6cd3 Revert D7264205: Add babel-helper-module-imports to prepare react transform
Differential Revision:
D7264205

Original commit changeset: 515fc85739c6

fbshipit-source-id: f6c8cc8c36e939228dcdcbc4babd76b74a54df7f
2018-03-20 06:35:11 -07:00
Naor Matania 1864a83e6e Revert D7257551: Fix the react transform to work in babel 7
Differential Revision:
D7257551

Original commit changeset: 408104df411e

fbshipit-source-id: 5128bc475ae4d4cc02f6b6825a697bbb3ed1e6a3
2018-03-20 06:35:11 -07:00
Peter van der Zee 226e59a7e2 Fix the react transform to work in babel 7
Reviewed By: jeanlauliac

Differential Revision: D7257551

fbshipit-source-id: 408104df411e6f7011c148d0f5146341d7e90125
2018-03-20 05:19:38 -07:00
Peter van der Zee df5b71ec39 Add babel-helper-module-imports to prepare react transform
Reviewed By: rafeca

Differential Revision: D7264205

fbshipit-source-id: 515fc85739c6131bb8f61612e37af5042c7e3c06
2018-03-20 05:19:38 -07:00
Peter van der Zee 9f1bf87c22 Work around babel7 issue with duplicate declarations
Reviewed By: rafeca

Differential Revision: D7305051

fbshipit-source-id: ac9a0130dc616a87dcc0cdd02dd829e995cfc92f
2018-03-20 05:19:38 -07:00
Peter van der Zee 84f2e6f3a3 Depend on local version of babel-plugin-react-transform
Reviewed By: jeanlauliac

Differential Revision: D7319513

fbshipit-source-id: 4945ec753087206cd01eca4ba9464672d5fb05ba
2018-03-20 05:19:38 -07:00
Peter van der Zee b5f1b4ae25 Create a local package of babel-plugin-transform-react
Reviewed By: rafeca

Differential Revision: D7319514

fbshipit-source-id: bcad3dded2b2141f8a1c12b6a526335da6d6e8a1
2018-03-20 05:19:38 -07:00
Sam Goldman 8dd921a5d6 Upgrade to Flow v0.68.0
Reviewed By: gabelevi

Differential Revision: D7310349

fbshipit-source-id: 70d29815dd7912704aec8a015c970be3fafeeba3
2018-03-19 18:42:30 -07:00
Rafael Oleza d8eed45c37 Use Graph traversal logic for building polyfills
Reviewed By: mjesun

Differential Revision: D7240946

fbshipit-source-id: 5af729878cdf31831b15867c296cf89025ab6f58
2018-03-19 10:29:52 -07:00
Rafael Oleza 6be6b0805d Refactor production serializers to use directly the graph information
Reviewed By: mjesun

Differential Revision: D7158632

fbshipit-source-id: 91fad2e3ca617ea5f3b283e335c0d70edbb6ff3b
2018-03-19 10:29:52 -07:00
Rafael Oleza 3ac0bb47d9 Add new plainJSSerializer that uses directly the Graph object
Reviewed By: mjesun

Differential Revision: D7211546

fbshipit-source-id: 7e6a0a0123f46a9037ecae845d29daea43e1ebed
2018-03-19 10:29:52 -07:00
Rafael Oleza a4afdcb2e8 Move serializers test to the correct folder
Reviewed By: mjesun

Differential Revision: D7210700

fbshipit-source-id: 4d1cc709ffabb46f244ab66d96467f4cb1c90eaf
2018-03-19 10:29:52 -07:00
Rafael Oleza 40cce3b120 Convert entryPoint paths to absolute in the Server
Reviewed By: davidaurelio

Differential Revision: D7196392

fbshipit-source-id: a1927d66fd67e35382a5ac418896dc5a902a5a5c
2018-03-19 10:29:52 -07:00
Rafael Oleza ab25e7c475 Simplify the parameters needed to call the delta calculator
Reviewed By: BYK

Differential Revision: D7185274

fbshipit-source-id: 0bb4040556dfa96f288c9d4aef2314ded44bcd0d
2018-03-19 10:29:52 -07:00
Rafael Oleza 45123d822b Add multiple entrypoint support to the dependency traversal logic
Reviewed By: davidaurelio

Differential Revision: D7180692

fbshipit-source-id: 65b1992abbf10e753b6895623824ff90d7cadc24
2018-03-19 10:29:52 -07:00
Rafael Oleza 5e9cf9ec4b Start using the Graph object in the traverse dependencies logic
Reviewed By: davidaurelio

Differential Revision: D7180698

fbshipit-source-id: a7c39b73a7673f450e3a147e7feff4cfcc3061bf
2018-03-19 10:29:52 -07:00
Rafael Oleza 935b6b5e32 Expose Graph object from the delta bundler
Reviewed By: davidaurelio

Differential Revision: D7158629

fbshipit-source-id: bb10ad8449cc8f1566f02568adaaecbc54c76d2e
2018-03-19 10:29:52 -07:00
Miguel Jimenez Esun 21ccd2b269 Remove things that contain absolute paths
Reviewed By: rafeca

Differential Revision: D7306933

fbshipit-source-id: 497b0f6f71243180870a297d6ea8b09164112649
2018-03-19 05:13:00 -07:00
Miguel Jimenez Esun b581a3e2bb Add logging into cache class
Reviewed By: rafeca

Differential Revision: D7307863

fbshipit-source-id: 0365c5598cd8e56580ebab953dfdcf2d27a59276
2018-03-18 07:12:49 -07:00
Jean Lauliac 23bd78220b metro-memory-fs: add lstat() and fstat()
Reviewed By: mjesun

Differential Revision: D7257967

fbshipit-source-id: 56c59ca088bfd71fc111efdfda2f5393d6abbd9b
2018-03-16 09:00:22 -07:00
Rafael Oleza bfecccd180 Avoid parsing JSON files with babel
Summary:
Metro does not need to use babel to parse JSON files, it only needs to wrap the stringified JSON directly into the `define` function.

This makes the transformation of JSON files much faster, plus prevent out of memory exceptions when having huge JSON files.

This diff fixes https://github.com/facebook/metro/issues/146

Reviewed By: mjesun

Differential Revision: D7227095

fbshipit-source-id: 5d1a9cb2d1c7162a403c00dc43e46f781fbd1514
2018-03-16 01:44:09 -07:00
Rafael Oleza f2b6232c5d Bump metro@0.30.2
Reviewed By: BYK

Differential Revision: D7292431

fbshipit-source-id: 2d81e502e060ecd278977b838e0ef2db7e13b0e3
2018-03-15 18:41:36 -07:00
Rafael Oleza f231396260 Fix HMR connection issues when the client gets reconnects
Reviewed By: BYK

Differential Revision: D7288613

fbshipit-source-id: ac8b5800af0bfaf1c2a25108b564092e3a47273c
2018-03-15 15:37:41 -07:00