Commit Graph

2136 Commits

Author SHA1 Message Date
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 ab73426926 Add NPM_TOKEN to the npmrc configuration to be able to publish the npm package from circleci
Reviewed By: mjesun

Differential Revision: D7586241

fbshipit-source-id: eaba25453c1aca00c07bf0eae961878e1de2e391
2018-04-11 10:53:53 -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
Peter van der Zee b05f9692e7 Fix non-existing babel types
Reviewed By: jeanlauliac

Differential Revision: D7534831

fbshipit-source-id: ff5d068596a42c560ee926155889bdd8710b0208
2018-04-09 17:58:00 -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 c5582d073d Use npm to publish metro
Reviewed By: mjesun

Differential Revision: D7335671

fbshipit-source-id: a8007b514b9efd5ff1fdabf73f08cd423be84b43
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