Commit Graph

12740 Commits

Author SHA1 Message Date
Andres Suarez bba19e846e Upgrade to ESLint v4.17.0 (plus update related deps)
Reviewed By: adamjernst

Differential Revision: D6956725

fbshipit-source-id: d223aa238dbb67190a1c244c7d482fc95005ccb0
2018-02-09 22:01:16 -08:00
Héctor Ramos 51b6749c07 bump Android cache key
Summary: Closes https://github.com/facebook/react-native/pull/17934

Differential Revision: D6956755

Pulled By: hramos

fbshipit-source-id: 518171156638effc279f17b38c379e029ed23ba0
2018-02-09 17:31:14 -08:00
Héctor Ramos 5e80d95e03 React sync for revisions 4eed18d...467b103
Reviewed By: bvaughn

Differential Revision: D6953225

fbshipit-source-id: f96e3cec57cce397d46d49115dd3734a33427992
2018-02-09 16:05:29 -08:00
Jonathan Kim e233646d09 Clean up unused macros after consolidation
Reviewed By: mzlee

Differential Revision: D6954781

fbshipit-source-id: 0ec78e6f7f2780951ac008e9b12f41cfd5441ed5
2018-02-09 16:05:29 -08:00
Wei Sun 1a790f8703 Use ConcurrentHashMap for handling concurrent Android websockets, and…
Summary:
… prevent unknown websocket IDs from crashing on Android (show warning on development builds instead)

This PR addresses #3346; an unknown websocket ID should produce a warning during development, but not cause crashes in production RN apps. This PR was created by satya164's request, and was inspired by tanthanh289's suggestion on #3346's thread.

On Android, create a websocket using a service like Pusher (`pusher-js` npm package) or manually, and then induce removal of its websocket ID. Result should be a red warning screen during development, and no crash in the app's release variant.

 [ANDROID] [BUGFIX] [WebSocket] - Prevent unknown websocket IDs from crashing on Android
Closes https://github.com/facebook/react-native/pull/17884

Differential Revision: D6954038

Pulled By: hramos

fbshipit-source-id: b346d80d7568996b8819c0de54552abb534cbfae
2018-02-09 14:47:56 -08:00
Nikolai Tillmann 01a58d182a Fixing Prepack model for latest global.nativeExtensions changes.
Differential Revision: D6943293

fbshipit-source-id: cb67b063b77e8f89712fb437fc5471b7f874c482
2018-02-09 14:00:10 -08:00
Héctor Ramos b973fe45bd Stop using GitHub bot commands for now
Summary: Closes https://github.com/facebook/react-native/pull/17929

Differential Revision: D6953331

Pulled By: hramos

fbshipit-source-id: d7b50b18a2c2e5826ed2af5f5ef08ed9aa2878bf
2018-02-09 13:29:01 -08:00
Andres Suarez 488b6825c5 Namespace custom ESLint rules through eslint-plugin-lint
Reviewed By: mzlee

Differential Revision: D6934651

fbshipit-source-id: 3cb0c3550ad628e3b5c0bdaec8cde9d5579ea0af
2018-02-09 11:16:47 -08:00
Brian Vaughn e7010348d8 Removed ReactNativeFeatureFlags
Reviewed By: flarnie

Differential Revision: D6938455

fbshipit-source-id: 1ad08ebf01dcae76f50b26fb993425233da1ae16
2018-02-09 10:58:55 -08:00
Héctor Ramos 27b6348f86 Added progress updates for all XMLHttpRequest upload types / fix crash on closed connection
Reviewed By: mdvacca

Differential Revision: D6937754

fbshipit-source-id: 89b963e16adf1bd3200806fd7374d28aa618b62f
2018-02-09 10:34:56 -08:00
Pritesh Nandgaonkar fdef3784f0 Add flag in YGConfig for running experiments
Reviewed By: emilsjolander

Differential Revision: D6948702

fbshipit-source-id: 009fe2d64b6098f8c3a0289f0e6939dea5ce0d37
2018-02-09 06:16:36 -08:00
Pritesh Nandgaonkar 400a29e151 Fix memory leak by not duplicating the YGConfig
Reviewed By: emilsjolander

Differential Revision: D6945022

fbshipit-source-id: 5fd3c3e2ac1cd94d459d5aa06e0daa8f107779ac
2018-02-09 04:56:49 -08:00
Alex Dvornikov 1a1a956831 JSIExecutor Bundle Splitting Support
Reviewed By: mhorowitz

Differential Revision: D6847638

fbshipit-source-id: d9ae3d182d6f07bcac81cfd06dcc19f8139bb1e4
2018-02-09 03:45:37 -08:00
Kevin Gozali 854c2330eb fixed blobmanager inserting nil when there's no mime type
Summary:
Upon handling symbolication response when a redbox occurs, the blob manager inserted `nil` mime type because the response header doesn't specify any. This crashed the app with exception:

```
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[4]'
terminating with uncaught exception of type NSException
```

Reviewed By: shergin

Differential Revision: D6945632

fbshipit-source-id: 9298bd2674447106763c73e1a5035417bd30f29c
2018-02-08 19:31:25 -08:00
Kevin Gozali fa0ac92b2c call into native FabricUIManager from JS
Reviewed By: mdvacca

Differential Revision: D6945104

fbshipit-source-id: ac66c6105c0d18bef003cdd08d06dbb49c61e669
2018-02-08 19:31:25 -08:00
David Vacca 2d35bde101 Introduce new Fabric API in RNAndroid
Summary: Introduce new Fabric FabricUIManagerModule RNAndroid

Reviewed By: achen1

Differential Revision: D6833154

fbshipit-source-id: 9ab7ff8bf0c407d833c512eb3455969573f138da
2018-02-08 18:14:54 -08:00
Héctor Ramos 4f883bd0bc Restore copyright header
Summary:
Restoring the copyright header on some files, in order to fix an internal lint failure that is raised whenever these files are edited on open source.
Closes https://github.com/facebook/react-native/pull/17912

Differential Revision: D6938189

Pulled By: hramos

fbshipit-source-id: 6447d8ad6d7ecce0ef5f1821f63e44957bbf6d15
2018-02-08 17:52:11 -08:00
Héctor Ramos 2ef9b7f2da Checkout code prior to deploy
Summary: Closes https://github.com/facebook/react-native/pull/17917

Differential Revision: D6944553

Pulled By: hramos

fbshipit-source-id: 013f5e75bd61d939fe650729c9c388a78bede330
2018-02-08 17:17:56 -08:00
Héctor Ramos 40b17926bb Move approval to separate deploy workflow
Summary: Closes https://github.com/facebook/react-native/pull/17916

Differential Revision: D6943605

Pulled By: hramos

fbshipit-source-id: 0e86f01aa38c15e5bc179c5e517f079eb34d495f
2018-02-08 15:53:41 -08:00
Héctor Ramos 4f078d3fe2 Consolidate checkout and yarn steps
Summary:
Add checkout steps to reduce number of checkout/yarn calls

Tested on Circle CI.
Closes https://github.com/facebook/react-native/pull/17915

Differential Revision: D6942564

Pulled By: hramos

fbshipit-source-id: 72aff33eb099e24d63a80ec7d0630afedc21b630
2018-02-08 15:20:09 -08:00
Jakub Grzmiel a8c95d2417 Convert fb_xplat_cxx to Skylark
Reviewed By: ttsugriy

Differential Revision: D6937683

fbshipit-source-id: 472c95b393d054c29413a46b86bf03559aff8741
2018-02-08 13:16:55 -08:00
Brian Vaughn 6f007e8957 Ran rename-unsafe-lifecycles codemod on xplat/js
Reviewed By: trueadm

Differential Revision: D6889214

fbshipit-source-id: e815cda4b09f3650ae3b0b9a44ae6f5fcb48fe25
2018-02-08 10:58:31 -08:00
Ben Nham fa334ce464 always create debugger websocket connection
Reviewed By: Hypuk, pakoito

Differential Revision: D6918269

fbshipit-source-id: 3175c75d4e8459a61d7907555ab9bd4e95002853
2018-02-08 10:29:40 -08:00
Eric Rozell a40bfa730e Enable platforms to configure CLI commands
Summary:
This change adds hooks via the `package.json` for a platform plugin to specify hooks for generating platform configurations. This change also adds hooks to allow platform plugins to participate in `link` and `unlink` commands. The goal is to move platform-specific code for platform plugins into their own repositories / node_modules.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

We need to be able to configure the CLI commands for plugin platforms (e.g., react-native-windows) in their own repositories.

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

- All jest tests, including new tests, pass.
- `link` and `unlink` commands are successful on iOS and Android.

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)

https://github.com/Microsoft/react-native-windows/pull/1601

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[CLI][FEATURE][local-cli/core/index.js] - Allow platform plugins to contribute to the RNConfig.
[CLI][FEATURE][local-cli/link/link.js] - Allow platform plugins to participate in the `link` command.
[CLI][FEATURE][local-cli/link/unlink.js] - Allow platform plugins to participate in the `unlink` command.
Closes https://github.com/facebook/react-native/pull/17745

Differential Revision: D6883558

Pulled By: hramos

fbshipit-source-id: ea32fe21cedd4cc02c5c0d48229f2cdb2ac8142b
2018-02-08 09:47:28 -08:00
Taras Tsugrii 79a63d040f Skylarkify RN defs.
Reviewed By: adamjernst

Differential Revision: D6934209

fbshipit-source-id: 59f50b739482a53473c157f9e0183024dc88dc67
2018-02-08 09:47:28 -08:00
Héctor Ramos a5e135aed6 Add CountingOutputStream
Reviewed By: mdvacca

Differential Revision: D6932872

fbshipit-source-id: 226f30833a786d0c03564f25ec8c4f43d94c48f4
2018-02-08 09:32:14 -08:00
Héctor Ramos 2f02dd4c8c Revert PR #17312 due to buck failures in continuous integration tests
Summary:
Circle is currently failing on the `android` step due to a dependency issue introduced by the aforementioned PR. I am currently waiting for an internal diff to be reviewed which will restore this PR alongside the necessary dependency.
Closes https://github.com/facebook/react-native/pull/17902

Differential Revision: D6937173

Pulled By: hramos

fbshipit-source-id: f732a397521cc5df36f503e618318ef6d69aeaa6
2018-02-08 07:38:37 -08:00
Dmitry Zakharov 47fe52380a Migrate SourceCode from Native Module to a Native Extension.
Reviewed By: danzimm

Differential Revision: D6848275

fbshipit-source-id: c50305018aa2bdf014f5f665f370f65866197c3b
2018-02-08 06:37:01 -08:00
Pritesh Nandgaonkar 528bbacf6b Expose a function which marks all descendants dirty
Reviewed By: emilsjolander

Differential Revision: D6911869

fbshipit-source-id: e0a3abcf5653f921297edfdca473d83b947cc627
2018-02-08 05:04:02 -08:00
Jonathan Kim af0c863570 Remove fbobjc's RN copy
Reviewed By: mzlee

Differential Revision: D6748752

fbshipit-source-id: 95a646948e4daa43d2e812782e0c8c3a88efe986
2018-02-07 19:20:55 -08:00
Spencer Ahrens d37cdd97ae FIGCardHeader updates
Reviewed By: TheSavior

Differential Revision: D6914352

fbshipit-source-id: 7ee12999d19d665509e225d15cb263cbafafe258
2018-02-07 17:37:56 -08:00
Marshall Roch 7aba456b04 @allow-large-files [flow] upgrade to v0.65.0
Reviewed By: gabelevi

Differential Revision: D6927764

fbshipit-source-id: 1cb21c6bf27e12624c23387485b263ee8e77f5e0
2018-02-07 17:37:56 -08:00
Pritesh Nandgaonkar f75e21f1ca call margin method on child instead of node
Reviewed By: emilsjolander

Differential Revision: D6918367

fbshipit-source-id: cee90e015f9e45a717a7307f59fd3b9ef6f399b6
2018-02-07 17:37:56 -08:00
Vishwesh Jainkuniya 09b43e479e textinput: Maintain cursor position when secureTextEntry toggles.
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

On current [master](8235a49a33), text input cursor resets to start when `secureTextEntry` prop toggles on Android. This motivate me to maintain position when `secureTextEntry ` prop toggles for better user experience.

On current [master](8235a49a33)
![ezgif com-video-to-gif-3](https://user-images.githubusercontent.com/18511177/35776882-bdc3b182-09ca-11e8-8f4e-218fae0a24a1.gif)

On this PR
![ezgif com-video-to-gif-4](https://user-images.githubusercontent.com/18511177/35776883-be082d94-09ca-11e8-9424-6164110bdf03.gif)

[ANDROID] [BUGFIX] [TextInput] - Fix: cursor positions resets to start on toggling `secureTextEntry` prop.

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/17851

Differential Revision: D6925711

Pulled By: hramos

fbshipit-source-id: 6d53ad2dbed2dca20cd21e5b1b0578be13a91aad
2018-02-07 11:03:31 -08:00
Rafael Oleza 9e6f3b8aff Bump metro@0.25.1
Reviewed By: cpojer

Differential Revision: D6924028

fbshipit-source-id: f643bd912b201a5333778f124b0c21acf84814df
2018-02-07 09:32:24 -08:00
Pritesh Nandgaonkar 64d530ba07 Fix screenshot test due main axis justification refactor
Reviewed By: emilsjolander

Differential Revision: D6923178

fbshipit-source-id: d8f81b06d9127c75daecffb73b5e6c5abbad8ade
2018-02-07 08:45:46 -08:00
Miguel Jimenez Esun 46f4d3e1bc Upgrade Jest to v22.2.1
Reviewed By: rafeca

Differential Revision: D6923664

fbshipit-source-id: 0751ee6f0eb72193b0b22bb38d0398b3d83592a3
2018-02-07 08:32:12 -08:00
Dmitry Zakharov 0c49c1f332 Native Modules -> Native Extensions
Reviewed By: danzimm

Differential Revision: D6887988

fbshipit-source-id: 475c05f60a2e1ddcfaa9263ab363bff8a528236a
2018-02-07 08:07:13 -08:00
David Aurelio 06d8f96a64 Inline format strings in `DevServerHelper`
Summary: Having format strings and values to interpolate separated makes reading the respective calls difficult. It has also led to situations where format strings were reused with slightly different values, instead of creating a parameterized method.

Reviewed By: pakoito

Differential Revision: D6900905

fbshipit-source-id: 68b56af6a86c0b46bc8cf9c44fbe0fb93ee151ac
2018-02-07 06:31:16 -08:00
Jakub Grzmiel d3db764f38 Convert intent_binary_defs to Skylark
Reviewed By: ttsugriy

Differential Revision: D6910777

fbshipit-source-id: b661be9f2383ca93b940dc7b625f46ae9725ebd7
2018-02-06 22:32:41 -08:00
Kevin Gozali b1e5c01483 iOS: Added scaffolding for FabricUIManager native module
Summary: Experimental scaffolding for FabricUIManager.

Reviewed By: mdvacca

Differential Revision: D6908587

fbshipit-source-id: 646fcc72f54dce736378a7777e5753ed56efc2f6
2018-02-06 21:49:37 -08:00
Kevin Gozali 94dac23583 Added ReactFabric shim
Summary:
A simple shim just like ReactNative.js
Plus a fork of renderApplication that exclusively will call ReactFabric.

Reviewed By: mdvacca

Differential Revision: D6919080

fbshipit-source-id: 5807105a6c45dd99584eb92a5570c6076e2d56b9
2018-02-06 21:49:37 -08:00
Spencer Ahrens 8a882fe6d6 Fix adjustsFontSizeToFit to only shrink, not grow, text
Reviewed By: shergin

Differential Revision: D6913407

fbshipit-source-id: 3fdeeee1a28917f623fc9f804c1b28216cba5375
2018-02-06 21:19:09 -08:00
Moti Zilberman 6c38972327 Support non-integer modulus in ModulusAnimatedNode on Android
Summary:
`Animated.modulo(value, modulus)` supports a non-integer modulus in the iOS and JS implementations but crashes on Android when `useNativeDriver` is set to `true`.

Unfortunately, I'm not fluent enough with this codebase to add a Java test for this fix - especially as I couldn't find any analogous tests to extrapolate from. However, the fix itself seems straightforward enough.

None needed

[ANDROID] [BUGFIX] [Animated] - Support non-integer modulus in .modulo()
Closes https://github.com/facebook/react-native/pull/17860

Differential Revision: D6918799

Pulled By: hramos

fbshipit-source-id: 8d15e4bc881ed41a4123c6f811c0c72119f67be0
2018-02-06 16:59:30 -08:00
Héctor Ramos a1c479fb3b Declare HMRClient module to fix Flow issues in OSS
Summary: Closes https://github.com/facebook/react-native/pull/17881

Differential Revision: D6918186

Pulled By: hramos

fbshipit-source-id: ebcdbde1623eab497062fb50bccb393734b3578f
2018-02-06 16:01:23 -08:00
David Aurelio f88c9d6382 Remove unused method
Summary: Removes `BundleDownloader#cancelDownloadBundleFromURL`

Reviewed By: pakoito

Differential Revision: D6900903

fbshipit-source-id: d9297344d6296d79a984aeecb3e014c9ed23a165
2018-02-06 15:12:08 -08:00
David Aurelio 1019bda930 Extract delta client
Summary: Extracts the delta client from the bundle downloader. This will allow us to extract an interface, and provide a different implementation for C++ delta bundling (where we will pass deltas directly to native code).

Reviewed By: pakoito

Differential Revision: D6900904

fbshipit-source-id: 358705615eecc15afa0de3e50478468ad840d250
2018-02-06 15:12:08 -08:00
David Aurelio 6e44356c9b Clean up `DevServerHelper`
Summary:
- Makes methods private that are not used elsewhere
- Moves a method to `DevSupportManagerImpl`
- Removes unused methods

Reviewed By: pakoito

Differential Revision: D6900907

fbshipit-source-id: c8d9f748effd396fe610f0d4d87e0bc388e155d6
2018-02-06 15:12:08 -08:00
David Aurelio 644123aa6f Consolidate bundle URL creation
Summary:
`DevServerHelper` had multiple places that created bundle URLs.
This consolidates that logic into a single place, and uses an enum for different "bundle types" (bundle, bundle deltas, source maps).

Reviewed By: pakoito

Differential Revision: D6900906

fbshipit-source-id: 64ed9360ea85dc5755308d822d5fc55fe8cb5a55
2018-02-06 15:12:08 -08:00
Héctor Ramos 1ea3065feb Ignore dangerfile
Summary: Closes https://github.com/facebook/react-native/pull/17880

Differential Revision: D6915622

Pulled By: hramos

fbshipit-source-id: 1dff643575c206e51d7486b4bebfd9a6a23e0c14
2018-02-06 13:33:28 -08:00