Commit Graph

23 Commits

Author SHA1 Message Date
Peter van der Zee 76be88b515 Upgrade fb-utils test stuff to babel 7
Reviewed By: davidaurelio

Differential Revision: D7728255

fbshipit-source-id: acb882fa4d4cc6fe648628eaee7b80e180662a5c
2018-04-24 04:53:14 -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
Peter van der Zee 9ca07d83c5 Fix some babel types that did not exist
Reviewed By: davidaurelio

Differential Revision: D7288340

fbshipit-source-id: 477b95e8dc543e643b823a55e9d7157e2a5bf18a
2018-03-15 09:40:54 -07:00
Peter van der Zee df9e523900 babylon7 -> metro-babylon7 and drop the alias
Reviewed By: arcanis

Differential Revision: D7194524

fbshipit-source-id: 85b11b7319c6e0985b166ba9ce990a2581ff1dd2
2018-03-15 05:51:56 -07:00
Peter van der Zee 243fe983b7 Improve Flow typing for @babel/template
Summary:
The current typing is incorrectly marking the second parameter as required. The options object is optional.

Also added the special defaults for clarity.

Reviewed By: davidaurelio

Differential Revision: D7168409

fbshipit-source-id: e01b651f92b33175b750d188f9e6db99bdc4ab64
2018-03-07 04:36:33 -08:00
Sophie Alpert 8242229b59 Update license headers for MIT license
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.

find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.

Reviewed By: TheSavior, yungsters

Differential Revision: D7007050

fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
2018-02-16 18:30:48 -08:00
Jan Kassens 2596f0f362 use babylon 7 to allow React fragments to parse
Summary: For React's new fragment syntax (`<>Foo</>`) to work, we need to upgrade from Babylon 6.

Reviewed By: dwwoelfel

Differential Revision: D6888282

fbshipit-source-id: 5212cc9439a2f79febc72e0f9eef1a7f6b700266
2018-02-05 14:47:39 -08:00
Peter van der Zee d23c3ca10b Rename `Ast` to a more appropriate `BabelNode` in the babel flow type
Summary:
An Ast consists of `Node` elements and the one Babel uses is specific to Babel (incompatible with Astree spec by default) so `BabelNode` seems more appropriate.

Keeping the other `ast` names for now to reduce the footprint of this diff.

Also makes sure `babel-core` properly exports the same node type as what the api returns making fixes to this type in the future easier to implement.

Reviewed By: davidaurelio

Differential Revision: D6834291

fbshipit-source-id: 4cb0eb2ee280a4988071b8412539edfad12cf56f
2018-02-01 03:23:50 -08:00
Peter van der Zee bd345427a8 Use the new `sync` versions of `translate` from babel core
Reviewed By: davidaurelio

Differential Revision: D6834295

fbshipit-source-id: 3a954d9c7b62042e15fbbfa428fde4fc81158247
2018-01-31 08:15:16 -08:00
Peter van der Zee 45be0395ce Use Babel 7 when building packages
Reviewed By: davidaurelio

Differential Revision: D6834296

fbshipit-source-id: 177c0ff41145961d8debe623eac3fbd2ca0919bf
2018-01-31 08:15:16 -08:00
Peter van der Zee d986aac32b Add flow types for Babel 7 (but not the library, these are only declares)
Reviewed By: davidaurelio

Differential Revision: D6834294

fbshipit-source-id: ffe66a6e7b683a4ed6361622049206869c635b71
2018-01-31 08:15:16 -08:00
Peter van der Zee 4403f81102 Rename `BabelRawMapping` to `BabelSourceMapSegment`
Reviewed By: mjesun

Differential Revision: D6702880

fbshipit-source-id: 4c800ef9571bcfed6f3ed8e39d0002a94bd9190f
2018-01-12 04:23:40 -08:00
Peter van der Zee 3ee6e5bfb5 Bringing clarity to the Mapping types
Reviewed By: rafeca

Differential Revision: D6702118

fbshipit-source-id: 0fc99454713042117ce41ddfe1d3f84c95265d74
2018-01-11 04:28:49 -08:00
Peter van der Zee 70858589ff Only added @format and @flow the rest is Prettier
Reviewed By: rafeca

Differential Revision: D6702012

fbshipit-source-id: 98b8cc45132334fc20e0f92d7ee4111198d0a95f
2018-01-11 03:15:19 -08:00
Peter van der Zee 0a9b45e01c Fix babel-generator Flow definition
Reviewed By: rafeca

Differential Revision: D6692040

fbshipit-source-id: d15709b1d1f6a3d8e9befbf17e44623838eef033
2018-01-10 03:37:35 -08:00
Peter van der Zee 8815c8329d Fix Flow type for babel-generator
Reviewed By: rafeca

Differential Revision: D6682632

fbshipit-source-id: befc2fe51c8e3b542b0f2b8b595ed78b39bd1801
2018-01-09 04:03:36 -08:00
Rafael Oleza 98ff5c785e Fix flow in assetTransformer
Differential Revision: D6592751

fbshipit-source-id: a0e08656bc830db1186df0249a01b8d2695c121e
2017-12-20 14:29:01 -08:00
Sam Goldman 539ddc50f4 Use `declare module.exports` syntax for flow libdefs
Summary:
**Summary**

We added this to Flow in v0.25 (about 2 years ago), but never actually
deprecated the legacy `declare var exports` syntax. Hoping to do that
soon, so clearing up uses that I can find.

**Test plan**

flow
Closes https://github.com/facebook/metro/pull/108

Reviewed By: cpojer

Differential Revision: D6577785

Pulled By: samwgoldman

fbshipit-source-id: 2ef499cebb70ce3d9312cca6e084815394ab6169
2017-12-15 02:46:50 -08:00
Miguel Jimenez Esun 0a292a2a58 Add code for generating remote assets
Reviewed By: davidaurelio

Differential Revision: D6201839

fbshipit-source-id: 78c81eae03c6137ba9bbe33cd7aab8b87020f8d2
2017-11-03 06:10:20 -07:00
Miguel Jimenez Esun b9023bd626 Backed out changeset c188b39e104f
Reviewed By: fkgozali

Differential Revision: D6111799

fbshipit-source-id: 34213f79135fb605aa2af60182cc1182b10aa602
2017-10-20 12:44:07 -07:00
Miguel Jimenez Esun 0fdf36d06d Support for remote assets
Reviewed By: davidaurelio

Differential Revision: D6030886

fbshipit-source-id: c188b39e104f5c3f65a98336fecbffc93091ff4c
2017-10-19 18:39:49 -07:00
David Aurelio 1a286a9945 Make preset a function to account for different dev settings
Summary: Makes `babel-preset-react-native` a factory function that allows to include/exclude dev tool transforms per transform.

Reviewed By: jeanlauliac

Differential Revision: D5237158

fbshipit-source-id: aa7be0fc0f471575b4ee1c5a0e266e2ed2477fc6
2017-06-14 09:38:25 -07:00
David Aurelio 1ce818dafc Move type definitions used for metro bundler from React Native
Summary: Moves type definitions for uglify and babel from React Native to Metro Bundler. We need it there.

Reviewed By: cpojer

Differential Revision: D5217795

fbshipit-source-id: 9ec349cd8caf077eaa3c6fa3d090ffd47893e967
2017-06-09 13:56:51 -07:00