Commit Graph

8086 Commits

Author SHA1 Message Date
Tim Yung c4fc13b997 RN: Change `onlyChild => React.Children.only`
Reviewed By: sebmarkbage

Differential Revision: D4025440

fbshipit-source-id: efbcb44dcc89a6059688cf5a00cf28ada8a6a4c4
2016-10-14 18:59:10 -07:00
Tim Yung 331c13d4dc RN: Require {react/lib/ => }ReactNative
Reviewed By: sebmarkbage

Differential Revision: D4024375

fbshipit-source-id: cd2226a3580a7a4ff319d6a93b67b68f2942eb00
2016-10-14 18:59:10 -07:00
Tim Yung c7d68238ec RN: Stop Exporting `Perf` and `TestUtils`
Reviewed By: sebmarkbage

Differential Revision: D4024221

fbshipit-source-id: d35e3dfbff8cc9ce08d34f854b9eb8c79fc1d4af
2016-10-14 18:59:10 -07:00
Tim Yung 421e7880d9 RN: Fix References to ReactComponent / ReactElement
Reviewed By: sebmarkbage

Differential Revision: D4023832

fbshipit-source-id: 6074efe614380119da4f8aa93b47593eeb981fbd
2016-10-14 18:59:09 -07:00
Felix Oghina 9df93c1071 Fix and re-enable TimingModuleTest
Summary:
For some reason the transitive dependency isn't picked up in OSS, so make it hard.

bestander
Closes https://github.com/facebook/react-native/pull/10397

Differential Revision: D4024350

Pulled By: bestander

fbshipit-source-id: 32182857dcc88744ebf6ce0e5cf8eaee390bf067
2016-10-14 15:28:43 -07:00
Stephen Poter 8b55e50d1d Fix error in react-native run-ios when Product Name and Scheme are inequal
Summary:
In xcode, you can modify the Product Name per build configuration.  During the build, the app file name is made using that value.  For example, I name my app "MyApp Dev", it will build into "MyApp Dev.app".

react-native run-ios doesn't extract the proper app name.  Instead it uses the scheme name + ".app".  So if in the example above I use the default Scheme "MyApp", which references the build configuration whose name is "MyApp Dev".  The build will succeed, but when runIOS.js goes to run the app, it fails because the file name doesn't exist.

My fix parses the build output and extracts the app name from the line "export FULL_PRODUCT_NAME=$(appfilename)" and uses that instead of the scheme.  If there is any issue parsing, the scheme name is used like it currently is.

**Test plan (required)**

1) Change the Product Name in xcode project manager to be something different than the scheme name.
2) Run react-native run-ios and ensure it works.
Closes https://github.com/facebook/react-native/pull/10178

Differential Revision: D4022116

Pulled By: javache

fbshipit-source-id: c1bd8e7a1f6364d681c505557a96955a293bc05c
2016-10-14 14:43:52 -07:00
Scott Wolchok 3f472e0bfa Fix cxxreact build error with -Wmissing-prototypes
Differential Revision: D4022143

fbshipit-source-id: 6afbd29a030ff51915cfb552f74737e9146b2ffd
2016-10-14 13:28:36 -07:00
Ovidiu Viorel Iepure ceb9ce36ae Rate limit HasteMap
Reviewed By: davidaurelio

Differential Revision: D4021676

fbshipit-source-id: 383f9a17ac8ede72f41939192ec25a6277a36864
2016-10-14 12:13:41 -07:00
Pieter De Baets 8355ef91ad Add a default context name to RCTJSCExecutor
Reviewed By: mmmulani

Differential Revision: D4015748

fbshipit-source-id: 077287b8438aa13f2a1479d68eacb0662bf295aa
2016-10-14 11:43:43 -07:00
Konstantin Raev 82d6ac1a51 disabled broken test in jdk8
Summary:
Disabled test

cc kentaromiura
Closes https://github.com/facebook/react-native/pull/10395

Differential Revision: D4022410

Pulled By: kentaromiura

fbshipit-source-id: 9084badb457b18c146dca3853137e40c5b53b576
2016-10-14 11:13:54 -07:00
David Aurelio d26af5811d Monkey-patch `fs` with graceful-fs before anything else runs
Reviewed By: matryoshcow, kentaromiura

Differential Revision: D4020645

fbshipit-source-id: a7985109476b78b588c3e2a75ae6f25ea8f09237
2016-10-14 11:13:54 -07:00
Martin Kralik 46a3bea350 removed unused unrelated test
Summary:
This test wasn't being run externally (it's not added to the xcode project) or internally.
It doesn't even test anything related to RN.

Reviewed By: javache

Differential Revision: D4021791

fbshipit-source-id: fee3fd5e1c3ef47f5bc8480cdc98a10b4da21815
2016-10-14 10:58:43 -07:00
Ben Hughes 41f4f1eaaf CLI errors if no package.json is found
Summary:
If you don't have a `package.json` in your project you can't do anything with the cli as it errors. This fixes that by wrapping the reading of the `package.json` file and returns `my-react-native-app` if an error is caught.
Closes https://github.com/facebook/react-native/pull/10207

Differential Revision: D4022113

Pulled By: javache

fbshipit-source-id: ffe940160f9d0b58e630adfab5e0dc9d34b859e5
2016-10-14 10:58:43 -07:00
Tim Yung b77b760810 RN: Fix Remaining ReactElement References
Summary: Fixes remaining references to `ReactElement` that did not already have `React` in scope.

Reviewed By: bestander, vjeux

Differential Revision: D4022022

fbshipit-source-id: 4aeacee0cdbb2c825feba10282208316d064c578
2016-10-14 10:45:11 -07:00
Tim Yung e8198aed8d Cleanup: Prefer `React.Element` over `React$?Element`
Reviewed By: vjeux

Differential Revision: D4013049

fbshipit-source-id: 18a447fdbc584418d6a51770363bcd221e7fb7dc
2016-10-14 08:59:37 -07:00
kevyu的马甲 beca25083a fix typo in Alert.js
Summary:
after adding new parameter options in alert method, parameter type is the 5th.
Closes https://github.com/facebook/react-native/pull/10370

Differential Revision: D4021511

Pulled By: javache

fbshipit-source-id: 09476162b879d2081f0c0ac95260e673327871b8
2016-10-14 08:13:55 -07:00
kentaromiura 5d15ed0285 Force CircleCI to use JDK 8
Summary:
Circle CI is failing sometimes on the `buck && ant` task with a `Require JDK 8 or higher` error.

**Test plan (required)**
Make sure tests pass on Circle CI.
Closes https://github.com/facebook/react-native/pull/10390

Differential Revision: D4021546

Pulled By: bestander

fbshipit-source-id: 355657936bf90e70a10df418b378ad07978c0e5e
2016-10-14 08:13:55 -07:00
Konstantin Raev 80cb5efbb6 switched fast-fs to use fs for API calls
Summary:
When debugging graceful-fs I noticed that I don't get close() calls https://github.com/isaacs/node-graceful-fs/blob/master/graceful-fs.js#L37.
This is because fastfs uses fs returned from graceful-fs https://github.com/facebook/react-native/blob/master/packager/react-packager/src/node-haste/fastfs.js#L14 and graceful-fs returns close() of a clone object https://github.com/isaacs/node-graceful-fs/blob/master/graceful-fs.js#L27 that is not patched by graceful-fs yet.

Reviewed By: cpojer

Differential Revision: D4021446

fbshipit-source-id: 87e50ff779dfea13b8db2b97575bff0bfd7778eb
2016-10-14 07:47:22 -07:00
Sandro Machado 56ac2a45d7 Add the RCTNetwork to the podfile
Summary:
The pod `RCTNetwork` is missing from the `Podfile` documentation. Without it the view controller does not run.

This probably also closes #8449.
Closes https://github.com/facebook/react-native/pull/10389

Differential Revision: D4021432

Pulled By: JoelMarcey

fbshipit-source-id: 689ed540c6750bf4ccaee1e7943d9175ac50d6c5
2016-10-14 07:13:41 -07:00
Emil Sjolander 9a33f3f40e Don't assume a node with a measure function is a leaf node
Reviewed By: gkassabli

Differential Revision: D4021096

fbshipit-source-id: 7e039239b1697a0ac42dce9f4b7e252a931bad7e
2016-10-14 04:43:38 -07:00
Cristian Carlesso 9ffe2ee0d8 Updating jest to 16.0.1
Reviewed By: cpojer

Differential Revision: D4001464

fbshipit-source-id: cbbf6a9d77605657151c86334fbc03d21f16e5fd
2016-10-13 13:13:46 -07:00
Sandro Machado ae9cc004b9 Remove setUseOldBridge from the documentation
Summary:
This PR removes the `.setUseOldBridge(true)` from the documentation. The method was removed from the `ReactInstanceManager` class at [this](1a690d5674 (diff-dc0f3a09c238b372cb1c27aa5f7dcbce)) commit and currently it is not available.
Closes https://github.com/facebook/react-native/pull/10368

Differential Revision: D4016564

Pulled By: JoelMarcey

fbshipit-source-id: 0d9f83c1708dc85043d80a82ecd4fad6b9d42cf5
2016-10-13 12:13:46 -07:00
Alex Kotliarskyi 5f548e15f9 Show packager progress in UI
Reviewed By: javache

Differential Revision: D3941904

fbshipit-source-id: 4ea3b61e9d636eeaddbadbe4ba6c62069955f022
2016-10-13 11:43:41 -07:00
David Aurelio ef91708fdb Add support for JSON files to `js_file` rule
Reviewed By: cpojer

Differential Revision: D3981152

fbshipit-source-id: 94b5018a1afa27c635ddff5e26c1ff2bed09baf9
2016-10-13 11:14:04 -07:00
Georgiy Kassabli ef021348af Compatibility with Apple TVOS
Reviewed By: emilsjolander

Differential Revision: D4001901

fbshipit-source-id: f095b4ac0ba91addb28d877b411ec27ecff4aad6
2016-10-13 10:58:47 -07:00
Dan Caspi ce179d4b43 Properly removing bytecode caching from iOS
Reviewed By: alexeylang

Differential Revision: D4003142

fbshipit-source-id: 9decdba54417bce8240a5e8f34c0c32b16c9f494
2016-10-13 06:58:45 -07:00
Scott Wolchok 863459064f Fix build with -Wmissing-prototypes
Reviewed By: mzlee

Differential Revision: D4012611

fbshipit-source-id: f56949d464e0ce602138b60f4abfd45b211be3b2
2016-10-12 21:13:45 -07:00
Evgrafov Denis 924c9927d0 Update Modal.js
Summary: Closes https://github.com/facebook/react-native/pull/9825

Differential Revision: D4010331

Pulled By: mmmulani

fbshipit-source-id: 81c0a07716d47429dae8f28d08c9b5b13d30bf26
2016-10-12 21:13:45 -07:00
Tim Yung a3868722f8 Cleanup: Remove `@typechecks`
Reviewed By: spicyj

Differential Revision: D4010629

fbshipit-source-id: b243b2ca09cdfcaeec49b5f6850139d0461b80c5
2016-10-12 19:28:42 -07:00
Connor McEwen 9c3bfe0cbb Prevent app from crashing when getCurrentActivity is null
Summary:
We're seeing a lot of crashes from `PermissionsModule` not being able to access the current activity, mentioned in #10009 and here: https://github.com/facebook/react-native/issues/9310#issuecomment-245657347

As far as I can tell, there is no way to ensure the Activity exists since the `ReactContext` holds a `WeakReference` to the current Activity and it appears that the lifecycle calls are happening in the right order (so not the same as #9310).

This will at least allow people to catch the error in JS and update the UI or try again as opposed to crashing the app.

I'm working on some bigger changes in #10221 but this is a smaller change and important to get fixed I think.
Closes https://github.com/facebook/react-native/pull/10351

Differential Revision: D4010242

fbshipit-source-id: 7a76973bb2b3e45817d4283917740c89a10ec0b0
2016-10-12 12:58:49 -07:00
Gaëtan Renaudeau 0010df514e iOS: Fix CameraRoll to support custom user groups
Summary:
on iOS, if you pull photo from one of user's custom album, the app crashes on the assertion `RCTAssert(resolvedPromise == NO, @"Resolved the promise before we finished processing the results.");` . assertion that was assumed to never been reached.

According to iOS doc, the enumerateGroupsWithTypes `usingBlock` block is called with `group=nil` when the iteration is over, but in current react-native implementation, it is stopping in other circumstance (because the `else` case) which is probably a mistake.

You have probably never seen the bug because you didn't tried to use getPhotos with something else than the pre-defined groups, but it should be possible to do so *(and it seems to work fine as soon as I included my fix. Later I should provide a PR that includes a way to list user groups :) but at least I need this to gets in, otherwise it crashes)*.

For instance, User have a Photo Folder (or "album", whatever you call it) called "Instagram", when I call `CameraRoll.getPhotos({ groupName: "Instagram",
Closes https://github.com/facebook/react-native/pull/10272

Differential Revision: D4009342

Pulled By: javache

fbshipit-source-id: a73ca828133b4f0d880c229f9b675538854020de
2016-10-12 11:28:50 -07:00
Pieter De Baets 8802db3cc0 Update checked-in xcodeproj for RCTHTTPRequestHandler.mm
Reviewed By: majak

Differential Revision: D4009309

fbshipit-source-id: a88021d935a2ac21a220956e77f167c8598eaf1c
2016-10-12 10:58:53 -07:00
Ovidiu Viorel Iepure 5cffc035a3 Add details to Activity events
Summary: Update Activity API to allow adding more details to events for telemetry purposes.

Reviewed By: davidaurelio

Differential Revision: D3982691

fbshipit-source-id: 07f3ed5d1ec4eddbbdeb00feb02ea75e1168705e
2016-10-12 10:43:59 -07:00
Emil Sjolander 1f36d98874 Add tests for java jni bindings
Reviewed By: lucasr

Differential Revision: D4008411

fbshipit-source-id: c896a3925ff3f7fa368176a3d03c84eb7188ef60
2016-10-12 09:58:37 -07:00
leeight c9960817ee Add viewConfig to RCTSlider Component, fix #10158
Summary:
And check componet.viewConfig before call component.setNativeProps method.

FIX #10158
Closes https://github.com/facebook/react-native/pull/10238

Differential Revision: D4008640

Pulled By: javache

fbshipit-source-id: 1bf9b34c0e56f1ffbcd31ae64b3cbafe77a9a1fd
2016-10-12 08:59:05 -07:00
Pieter De Baets 4b7f84aee8 Add lock to RCTHTTPRequestHandler
Reviewed By: mmmulani

Differential Revision: D4001762

fbshipit-source-id: 3a388bbeddeb7b5f6923274137abfc5e20d001b1
2016-10-12 08:59:04 -07:00
Omeid 54f48de48a ios:websocket:exectuor : Grab port from Bundle URL
Summary:
Grabbing the port from Bundle URL allows concurrent Remote JS Debugging using the same machine with running multiple instances of packager on different ports.

This improves the developer experience when developing and debugging cross-platform components.
Closes https://github.com/facebook/react-native/pull/10007

Differential Revision: D4008630

Pulled By: javache

fbshipit-source-id: fcf8495e564fd9ac7baf26a87ed3904898132aa0
2016-10-12 08:43:37 -07:00
Pieter De Baets 1df5c251ab Fix website generation
Reviewed By: kentaromiura

Differential Revision: D4003655

fbshipit-source-id: c67a6d82bd4f8cbc28745489c3b6bcde1fd713ac
2016-10-12 08:28:50 -07:00
leeight ddb1e44b43 Warning: bind(): You are binding a component method to the component
Summary:
Warning: bind(): You are binding a component method to the component.
React does this for you automatically in a high-performance way, so you can safely remove this call. See TouchableOpacity
Closes https://github.com/facebook/react-native/pull/10349

Differential Revision: D4008552

Pulled By: javache

fbshipit-source-id: d98fe9a0d694dee74ea872e51b02fbd75a133e43
2016-10-12 08:28:50 -07:00
Felix Oghina d91a5c4ffb add headless js guide
Summary:
**Test plan (required)**

Run the website, check everything renders.
Closes https://github.com/facebook/react-native/pull/10325

Differential Revision: D4008427

Pulled By: bestander

fbshipit-source-id: 2ba78d33efab2bf2267a806bfc8d3b0ec50f54f5
2016-10-12 06:28:35 -07:00
Konstantin Raev 47537183ec Integrated generic install-node-modules for React Native
Reviewed By: yungsters

Differential Revision: D3996416

fbshipit-source-id: 078b2ca5c076c2c6e2e7209945e59aaa31ebc4aa
2016-10-12 04:43:57 -07:00
Emil Sjolander fb245cca83 Rename init() -> reinit() to be more in line with what it now does
Reviewed By: lucasr

Differential Revision: D3992811

fbshipit-source-id: 61a10acc873ec028b2789007a400d89e62cf31d6
2016-10-12 03:58:45 -07:00
Emil Sjolander 64455ced5d Rename reset() -> free() to be more in line with what it now does
Reviewed By: lucasr

Differential Revision: D3992808

fbshipit-source-id: 8428ae33268d1417ce8642b741e47150a17bf077
2016-10-12 03:58:44 -07:00
Emil Sjolander 38bd937b40 Automatically init native memory when allocating java wrapper
Reviewed By: lucasr

Differential Revision: D3992802

fbshipit-source-id: 06d65821f1802ed8f2b2db651cef69f6851803f2
2016-10-12 03:58:44 -07:00
Emil Sjolander 6dae68306e JNI version is the default, its name should reflect that
Reviewed By: lucasr

Differential Revision: D3992777

fbshipit-source-id: cdd4cc58f3c15b5db1158f6f794394eb5c44a44d
2016-10-12 03:58:44 -07:00
Emil Sjolander 5c728a47b9 Clearly mark java CSSNode as deprecated. It will go away very soon
Reviewed By: lucasr

Differential Revision: D3992775

fbshipit-source-id: b3ceca277e5c7426eb51f8cbeacf5e2fe451c6ec
2016-10-12 02:59:18 -07:00
David Perrenoud a13b373c94 <br /> doesn't exist in React Native
Summary:
Replace `<br />` with `{'\n'}` in order to provide an example of working line breaks in React Native.
Closes https://github.com/facebook/react-native/pull/10323

Differential Revision: D3995544

Pulled By: JoelMarcey

fbshipit-source-id: 8404db8f23eeb606a5a5ed98ca1b7f9b20917e46
2016-10-11 15:13:46 -07:00
Dan Caspi 9408461405 Disabling bytecode caching for custom JSC
Reviewed By: michalgr

Differential Revision: D4002399

fbshipit-source-id: 7ac836873ee4b0d5fc0e9529d7e4257fe577e852
2016-10-11 13:43:42 -07:00
Pieter De Baets 26be005b0a Cancel network requests from the correct queue
Summary: Fix suggested by sooth-sayer (https://github.com/facebook/react-native/pull/10280)

Reviewed By: mmmulani

Differential Revision: D4001618

fbshipit-source-id: cc28d19d02a29b62d2bdbddcd30f94b1c1bcfd76
2016-10-11 12:43:40 -07:00
Alex Kotliarskyi 84eaeb0adf Add multipart response download task (2nd edition)
Reviewed By: mmmulani

Differential Revision: D3976605

fbshipit-source-id: c15cc859aa1288e831f70256566f743f4a8d9cd2
2016-10-11 12:28:42 -07:00