Граф коммитов

15010 Коммитов

Автор SHA1 Сообщение Дата
Ram N c91a2b36d7 Remove view managers from @ReactModuleList
Summary: The annotation ReactModuleList that was processed by ReactModuleSpecProcessor.java does not use ViewManagers. Removing this method from the annotation so that there is no confusion on how view managers are added to individual packages.

Reviewed By: achen1

Differential Revision: D9115363

fbshipit-source-id: 43d12e09b0e9b8e1732533f9a4456327778a0eaf
2018-10-29 12:22:38 -07:00
Kudo Chien a70625abd7 Upgrade folly to v2018.10.22.00 for iOS (#21976)
Summary:
Fixes #20302 (For iOS)

Note:
------

1. Checked the changes did not break CocoaPods integration.
2. The change for glog copying header into exported/ is to prevent build break for folly.
    `folly/detail/Demangle.h` will try to use libstdc++'s demangle.h. Unfortunately, glog also has a demangle.h in source code. So I copy exported headers and only search headers in exported/ folder during build.
Pull Request resolved: https://github.com/facebook/react-native/pull/21976

Reviewed By: hramos

Differential Revision: D12818131

Pulled By: fkgozali

fbshipit-source-id: b3c637d09d1b3adde0ea15c82eb56e28f846885b
2018-10-29 12:13:11 -07:00
Kudo Chien a316dc6ec3 Upgrade folly to v2018.10.22.00 for Android (#21977)
Summary:
Fixes #20302 (For Android)

Note:
------
1. New folly will have build break for a gcc-4.9 and gcc-4.9 seems to be deprecated for latest folly.
    As we only use partial folly implementations, I just fixed the build break part.
    To support building RN on Windows, the patches are written by gradle ReplaceTokens.

2. The change for glog copying header into exported/ is to prevent build break for folly.
    `folly/detail/Demangle.h` will try to use libstdc++'s demangle.h. Unfortunately, glog also has a demangle.h in source code. So I copy exported headers and only search headers in exported/ folder during build.
Pull Request resolved: https://github.com/facebook/react-native/pull/21977

Reviewed By: hramos

Differential Revision: D12818133

Pulled By: fkgozali

fbshipit-source-id: 2c1f6f012663204581a86141d0c9ed0eb9d8c698
2018-10-29 12:06:37 -07:00
Alexandre Kirszenberg 1eedf05651 Update the Delta/HMR format
Summary:
Makes the delta bundle data structures more consistent.

The changes are as follows:
* There are now two types of JSON bundles that can be downloaded from the delta endpoint. Base bundles (`Bundle` type), and Delta bundles (`DeltaBundle` type).
* The `reset` boolean is renamed to `base`.
* `pre` and `post` properties are now strings.
* Only `Bundle` can define `pre` and `post` properties.
* The `delta` property is renamed to `modules`.
* Deleted modules are now listed inside of the `deleted` property, which is only defined by `DeltaBundle`.

Reviewed By: mjesun

Differential Revision: D10446831

fbshipit-source-id: 40e229a2811d48950f0bad8dd341ece189089e9b
2018-10-29 08:58:30 -07:00
Héctor Ramos bb93abf5ca Fix checkout_code: Remove Metro cache check (#21998)
Summary:
This was a specific check that was prone to break at some point. That time has come. Removing it as it is not providing any useful signal.
Pull Request resolved: https://github.com/facebook/react-native/pull/21998

Differential Revision: D12823839

Pulled By: hramos

fbshipit-source-id: e870670d7803af78c4559052613ea364ce1478df
2018-10-29 08:46:09 -07:00
Rafael Oleza 88882951e1 Bump metro@0.48.3
Summary: shipit-splash

Reviewed By: mjesun

Differential Revision: D12813972

fbshipit-source-id: 89a804206dee178055e1f299023fc299d611fc98
2018-10-28 17:20:47 -07:00
Emily Janzer df2eaa9eb6 Modularize InitializeCore
Summary: Split up InitializeCore into a bunch of modules. The idea here is to make it easier for apps to just get the initialization logic they want and leave behind what they don't; for example, if you don't want the Map/Set polyfills, instead of requiring InitializeCore you can require the modules you want from it.

Reviewed By: yungsters

Differential Revision: D10842564

fbshipit-source-id: 3b12d54fddea8c4ee75886022338c214987a015c
2018-10-28 15:45:14 -07:00
Marc Horowitz 5d38264f9e Make SystemJSC on macosx actually use the system JSC framework
Reviewed By: mzlee

Differential Revision: D10475231

fbshipit-source-id: 67f6859cf93aa4fb91c174ee222694271c0d72ed
2018-10-26 17:08:04 -07:00
Marc Horowitz 2a44054e99 Refactor shutdown so that debug asserts can pass
Summary:
We were not accounting for shutdown properly when counting
jsi Objects at shutdown.

Reviewed By: danzimm

Differential Revision: D10451732

fbshipit-source-id: 7f0eb357aa3a011b7b2a97e44c22549e06e311c5
2018-10-26 17:08:04 -07:00
Rafael Oleza f867db366a Bump metro@0.48.2
Summary: corgi_shipit_gif

Reviewed By: mjesun

Differential Revision: D10854719

fbshipit-source-id: bf81e2e09e2b315f3bea3cffce1731d0c8662765
2018-10-26 16:28:38 -07:00
Eli White 88e736c6cd Add no-dupe-class-members to RN ESLint fonfig
Summary: This should catch errors with people redefining component lifecycle methods or other class members. We have this for object properties already but must not have updated the config for classes.

Reviewed By: helouree

Differential Revision: D11540725

fbshipit-source-id: d56091170aecf31bbd50ef3c76fc3970ca45466d
2018-10-26 12:28:49 -07:00
Dustin Shahidehpour 6534718a18 Fix LazilyLoadView lookup so that it can drop RCT prefixes.
Summary:
While debugging internally, we have found that modules are almost always registered
with their "RK" or "RCT" prefixes dropped.

However, if a view is named `RCTFooView` and needs `RCTFooViewManager` to render natively, it will almost never find it because `RCT` was dropped from the key to the ViewManager instance.

In the event you look for a `ViewManager` and don't find it, this strips any "React" prefixes from your key and tries ones more time.

Reviewed By: spredolac

Differential Revision: D10734005

fbshipit-source-id: 2bfa6f19830f14f09af2fe7dc7e44b7e26e0ac3f
2018-10-26 11:50:01 -07:00
Rafael Oleza 1b4fd64325 Upgrade jest to v24.0.0-alpha.2
Summary:
This diff updates all `xplat/js` to use the latest version of `jest`.

This version provides performance improvements and fixes to make some tests less flaky

Reviewed By: mjesun

Differential Revision: D10466639

fbshipit-source-id: faa769dac1475c61e00bcd76ed30760b176a2898
2018-10-26 06:26:13 -07:00
Avik Chaudhuri 11552a7a7a @allow-large-files flow 0.84 xplat deploy
Reviewed By: samwgoldman

Differential Revision: D10851695

fbshipit-source-id: 951c628844bbbc7331d4e75f62485db88e5ba7c4
2018-10-25 18:16:30 -07:00
Emily Janzer 9687090b5b Add end point for initializecore
Summary: Instead of having a single point at the top of InitializeCore, let's just create a subspan for it. Initially I just wanted to use this point to track JS start time, but it'll be useful to see how long initializeCore takes, too.

Reviewed By: alexeylang

Differential Revision: D10521595

fbshipit-source-id: 3025c34ffab39b79efc966f0c0eb6f502c91c550
2018-10-25 16:15:19 -07:00
Sidharth Guglani d743989dab Replaced default constructors with member assignments
Reviewed By: davidaurelio

Differential Revision: D10466125

fbshipit-source-id: ed92d1e054a8b5b9a6c8c09035173b11da45c368
2018-10-25 08:04:06 -07:00
Ryan Sundberg 7d4e94edcc Quote "$NODE_BINARY" in react-native-xcode.sh (#21383)
Summary:
Fix build errors when path to $NODE_BINARY contains spaces:

error: Can't find '/Path/With Spaces/To/node' binary to build React Native bundle

Why would $NODE_BINARY contain spaces? In my case, I am using sentry-cli which wraps the NODE_BINARY in it's own executable. The local path to the project, and thus the $NODE_BINARY, contains a space on my GoCD build agent.

'/Users/go/Library/Application Support/Go Agent/pipelines/my-ios-app/node_modules/sentry/cli/sentry-cli

See https://github.com/getsentry/react-native-sentry/issues/484 https://github.com/getsentry/react-native-sentry/issues/389
Pull Request resolved: https://github.com/facebook/react-native/pull/21383

Differential Revision: D10851141

Pulled By: yungsters

fbshipit-source-id: f46853ac8b57957864e0d1a76b8513403223fccb
2018-10-25 00:52:19 -07:00
Dulmandakh 99632e16d9 fix android ci (#21913)
Summary:
This PR adds support-annotations to devsupport buck dependency, which fixes Android CI.
Pull Request resolved: https://github.com/facebook/react-native/pull/21913

Differential Revision: D10842175

Pulled By: hramos

fbshipit-source-id: f3f3e0e6a3a5e9ceb18db11ac67e820a7f10937a
2018-10-24 14:48:42 -07:00
Sunny Luo 88981a8e12 Make google repo priority higher than jcenter (#21910)
Summary:
Fixes https://github.com/facebook/react-native/issues/21907#issuecomment-432319128 and prevent similar issues happening again
Pull Request resolved: https://github.com/facebook/react-native/pull/21910

Differential Revision: D10842256

Pulled By: hramos

fbshipit-source-id: f4abaa1c8ff8df6f0fb57b1bad745f4df9da7143
2018-10-24 14:45:21 -07:00
Eli White af4903ed73 Cleanup legacyImplementation code from FlatList
Summary:
This functionality was removed here: 636d01bbd0

This is just a step of cleanup

Reviewed By: yungsters

Differential Revision: D10515512

fbshipit-source-id: 6d24cc9c53c71924a82c67a4058585ee978de2d9
2018-10-24 14:22:54 -07:00
Andrew Chen (Eng) dc74975c5f Remove hard crash when root view is reused
Summary: Alternative to D10499861. If an app does not have an exception handler, context.handleException will still hard crash. Since this error is just saying that we're reusing an unexpected RootView, it might be safe to continue execution. Let's remove the exception for now while we investigate further

Reviewed By: mmmulani

Differential Revision: D10560413

fbshipit-source-id: 6c08a16cd250a019d2aef5afcaf3ba61534d29f7
2018-10-24 13:08:41 -07:00
Max Sherman b141363943 Instrument native library load time
Summary: I'm interested in measuring this.

Reviewed By: alexeylang

Differential Revision: D10510275

fbshipit-source-id: e833153524413bc5ec6159ff100ade92b29e6d0c
2018-10-24 09:00:22 -07:00
Matt Hargett 174644846d Add deprecation warnings for a few IOS components
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/21901

Differential Revision: D10502816

Pulled By: TheSavior

fbshipit-source-id: 1890aa35251cff0ac2c15760ecd5aabeb7652558
2018-10-22 23:17:13 -07:00
Eli White ec6829087e Upgrade eslint-plugin-react-native to handle false positives with no-inline-styles
Summary: https://github.com/Intellicode/eslint-plugin-react-native/pull/188 was merged which fixes some false positives with no-inline-styles.

Reviewed By: alex288ms

Differential Revision: D10500330

fbshipit-source-id: 9f3331416e99293770c3e2823e1e46ce556f4608
2018-10-22 17:36:51 -07:00
Andrew Chen (Eng) f671f8868f Don't crash when ReactRootView's id is already set
Summary:
This is a bandaid fix to address a crash with a stack trace involving

```
com.facebook.react.uimanager.IllegalViewOperationException: Trying to add a root view with an explicit id already set. React Native uses the id field to track react tags and will overwrite this field. If that is fine, explicitly overwrite the id field to View.NO_ID before calling addRootView.
0+com.facebook.react.uimanager.NativeViewHierarchyManager.addRootViewGroup(NativeViewHierarchyManager.java:546) [inlined]
1+com.facebook.react.uimanager.NativeViewHierarchyManager.addRootView(NativeViewHierarchyManager.java:538) [inlined]
2+com.facebook.react.uimanager.UIViewOperationQueue.addRootView(UIViewOperationQueue.java:678) [inlined]
3+com.facebook.react.uimanager.UIImplementation.registerRootView(UIImplementation.java:216) [inlined]
4+com.facebook.react.uimanager.UIManagerModule.addRootView(UIManagerModule.java:355)
5+com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1032)
6+com.facebook.react.ReactInstanceManager.attachRootView(ReactInstanceManager.java:726) [inlined]
7+com.facebook.react.ReactRootView.attachToReactInstanceManager(ReactRootView.java:524)
8+com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:377)
```

This crash seems to be happening because the root view's id is set to a non NO_ID value, but further up in the stack trace, UIManager.addRootView() is called which always sets the root view's id to NO_ID. It's not clear how this error is happening, but in this code path it's expected that addRootView should always ensure that the id is always reset. In order to avoid crashing for this, let's remove the exception and log the issue instead.

In the future, we should not be overloading the android view id field with these types of react native implementation details. The react tag should be stored as a view tag instead.

Reviewed By: mmmulani

Differential Revision: D10499861

fbshipit-source-id: 4dffedab4e7a34eee7f64bb43ec8209699521c73
2018-10-22 17:28:17 -07:00
Ramanpreet Nara 614d773e51 Refactor
Summary: I did a bit more refactoring to NetworkOverlay.

Reviewed By: TheSavior

Differential Revision: D10476158

fbshipit-source-id: da26251f8dfd12dd592da3ae5367efa37ec07669
2018-10-22 17:11:50 -07:00
alanfoster efa6016c0d Convert network overlay to use flatlist
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/21837

Reviewed By: TheSavior

Differential Revision: D10449940

Pulled By: RSNara

fbshipit-source-id: 28dcd5906c64070ef50867425ae7517d391300e2
2018-10-22 17:11:50 -07:00
Peter Argany 3e0bc634b9 Refactor ReactBridgeStartupData to work with QPL and remove unused fields
Summary:
This class contains metrics about RN bridge startup that was being sent via FBAnalytics.

This diff refactors out any timespans being collected into a separate method. This refactor is NOT ENOUGH to format the data into a format QPL accepts. I still need to refactor these timespans into _start and _end points for QPL points to work correctly. This diff is a starting point.

Reviewed By: ejanzer

Differential Revision: D10466982

fbshipit-source-id: 4bc1159c4e53328f2252a8c606c8d6ff8d657489
2018-10-22 16:18:33 -07:00
Emily Janzer a07de97754 Add point to InitializeCore
Summary: Adding perf marker point to the beginning of InitializeCore.

Reviewed By: TheSavior

Differential Revision: D10496350

fbshipit-source-id: 56c77414e0c31cf918377e95e3b0c236a5672e35
2018-10-22 16:13:25 -07:00
Eli White 0ceda1b0a5 Add back removal notice of BackAndroid
Summary:
This was deleted as part of 774cd73663

I forgot that we normally keep the getter at the bottom of the module with an invariant so that people get clearer messages when they upgrade.

Reviewed By: yungsters

Differential Revision: D10475667

fbshipit-source-id: fcc527cd8117a506096a910a602272e092b8672d
2018-10-22 11:46:03 -07:00
Jonathan Kim 13378e6aa0 Make fb_native work with oss
Reviewed By: scottrice

Differential Revision: D10491637

fbshipit-source-id: 50e5d51e59b10054e4a2c28a9c05e5477999c447
2018-10-22 10:53:45 -07:00
nd-02110114 2014ce49ed remove createReactClass from ProgressViewIOS.ios.js (#21887)
Summary:
Related to #21581 .
Removed createReactClass from the Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android
[GENERAL] [ENHANCEMENT] [Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js] - remove createReactClass dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/21887

Differential Revision: D10491704

Pulled By: RSNara

fbshipit-source-id: a38f87b9c151aaac8885edd22ce852ee2f2cf746
2018-10-22 10:34:35 -07:00
Rafael Oleza 2a7e02edf6 Fix polyfilling of regeneratorRuntime to avoid setting it to undefined in some situations
Summary:
This diff fixes an issue that caused the problem with `regeneratorRuntime` last Friday (more info: https://fb.facebook.com/groups/frontendsupport/permalink/2427883350560427/).

The root issue is that both `InitializeCore` and `FBInitializeCore` are included in the same bundle, this fix just prevents the bundle from being invalid once this happens..

*copied from: https://our.intern.facebook.com/intern/diff/D10444264/?transaction_id=595485237532887*

The way that `regeneratorRuntime` is polyfilled is not correct:

```
polyfillGlobal('regeneratorRuntime', () => {
  // The require just sets up the global, so make sure when we first
  // invoke it the global does not exist
  delete global.regeneratorRuntime;
  require('regenerator-runtime/runtime');
  return global.regeneratorRuntime;
});
```

Since a `require`d module is only evaluated once (no matter how many times it's required), defining (and calling) a getter for `global.regeneratorRuntime` twice will end up storing `undefined` to `global.regeneratorRuntime`.

There were no issues before this diff because the ordering of requires made things work by coincidence, e.g the following code will work:

```
// Set up regenerator for the first time
polyfillGlobal('regeneratorRuntime', () => {
  delete global.regeneratorRuntime;
  require('regenerator-runtime/runtime');
  return global.regeneratorRuntime;
});

// Set up regenerator for the second time. This will just override the previous getter (which has not even got executed so
// the `regenerator-runtime/runtime` module has not been evaluated yet.
polyfillGlobal('regeneratorRuntime', () => {
  // The require just sets up the global, so make sure when we first
  // invoke it the global does not exist
  delete global.regeneratorRuntime;
  require('regenerator-runtime/runtime');
  return global.regeneratorRuntime;
});

// Now access regenerator
global.regeneratorRuntime;
```

But the following code won't work:

```
// Set up regenerator for the first time
polyfillGlobal('regeneratorRuntime', () => {
  delete global.regeneratorRuntime;
  require('regenerator-runtime/runtime');
  return global.regeneratorRuntime;
});

// Access regenerator. This will cause the previous getter to be called, and the `regenerator-runtime/runtime` module will get evaluated.
// Here, `global.regeneratorRuntime` will have a correct value.
global.regeneratorRuntime;

// Set up regenerator for the second time. This will define a new getter for `global.regeneratorRuntime`, which will delete `delete global.regeneratorRuntime`
// and return undefined (note that `require('regenerator-runtime/runtime');` is a noop since the module has been already evaluated).
polyfillGlobal('regeneratorRuntime', () => {
  // The require just sets up the global, so make sure when we first
  // invoke it the global does not exist
  delete global.regeneratorRuntime;
  require('regenerator-runtime/runtime');
  return global.regeneratorRuntime;
});
```

Reviewed By: fromcelticpark

Differential Revision: D10483975

fbshipit-source-id: 5b3ef6e11c4fc4f79e3857c1ade9e7bc2beb6a39
2018-10-22 07:29:05 -07:00
David Vacca 0984196220 Make image to work
Summary: ImageManager is used to update the LocalData of Image views, as part of this process we call ImageManager::requestImage in cross platform code. Event if Android doesn't use ImageRequest we need to return an empty non-operation version of this object.

Reviewed By: shergin

Differential Revision: D10429663

fbshipit-source-id: 3621ece72f7291e2e6ab6a84b238ac16b595fc18
2018-10-22 01:07:45 -07:00
David Vacca 6debfdf6d6 RN crash when processing Exception with null message
Summary: This diff fixes a crash that happens when a component throws an exception that contains a null message

Reviewed By: achen1

Differential Revision: D10429661

fbshipit-source-id: 9faed36906844b51f5a3dc2b3cbc80ede6b93457
2018-10-22 01:07:45 -07:00
Tim Yung b51a1d5791 RN: Export ImageLoadEvent Type
Summary: Exports the `ImageLoadEvent` type so that components passing through the `onLoad` callback can be properly typed.

Reviewed By: TheSavior

Differential Revision: D10481050

fbshipit-source-id: f0a48163c6221087b0f9869c033c653316471af9
2018-10-21 00:43:53 -07:00
David Vacca b002df945b Re-introduce UIImplementationProvider
Summary: UIImplementationProvider was removed as part of D8650376, this was a breaking change that caused problems in OSS. This diff introduces the concept of a deprecated UIImplementationProvider again to allow OSS community to upgrade to latest version of RN.

Reviewed By: achen1

Differential Revision: D10456317

fbshipit-source-id: 6817629524f927dfcb5ebc054dbfd983877b7606
2018-10-20 11:27:50 -07:00
Eli White 0bf520a821 Remove react-timer-mixin
Summary:
This mixin is no longer used!

closes https://github.com/facebook/react-native/issues/21485

Reviewed By: RSNara

Differential Revision: D10451307

fbshipit-source-id: 2315244b2f292cfff71241f95a3afcd9788d74be
2018-10-19 17:59:50 -07:00
Ryan Dy 774cd73663 Remove BackAndroid, which has had a deprecation warning (#21866)
Summary:
Remove BackAndroid, which has had a deprecation warning and only forwarded to BackHandler since March 2018.

Test Plan
---------
React-native init bundle and RNTester bundle works.

Release Notes:
--------------
[ ANDROID  ] [ BREAKING ] [ BackAndroid ] - Deprecate BackAndroid since BackHandler should be used in its place.
Pull Request resolved: https://github.com/facebook/react-native/pull/21866

Differential Revision: D10472419

Pulled By: TheSavior

fbshipit-source-id: 3d76e1ce4c74bb783fee7fd8232bb366f2e7ea12
2018-10-19 16:02:48 -07:00
Marc Horowitz 6b0e924915 lint fixes
Reviewed By: QueryConnectionException

Differential Revision: D10458992

fbshipit-source-id: f57b0ef3c51a0bcf5703e187d36960aa3b944002
2018-10-19 11:35:06 -07:00
Héctor Ramos 47fb387455 Update copyright headers
Summary: Use MIT License copyright headers in JSI source code.

Reviewed By: axe-fb

Differential Revision: D10454031

fbshipit-source-id: d584073bb885fb7d977df1a45a6666ef6f52dcd6
2018-10-19 11:08:57 -07:00
Emily Janzer c95071e7d2 Remove explicit requires of Map and Set
Summary: Removing explicit requires of Map and Set (since those are polyfilled), and fixing resulting flow errors.

Reviewed By: yungsters

Differential Revision: D10350673

fbshipit-source-id: 2fefe8ed1ae1f2cc9e5b7923ad630e73eda9e856
2018-10-19 10:57:24 -07:00
Ramanpreet Nara b7349f9857 Use "Legacy Build System"
Summary:
React Native needs to be updated to support XCode 10 (GitHub issue: [19573](https://github.com/facebook/react-nåative/issues/19573)). Until we make that change, our CI needs to rely on the legacy build system in XCode 10 to build `RNTester`, as opposed to the new build system made default in XCode 10. This diff uses the `-UseModernBuildSystem=NO` `xcodebuild` flag to enforce that requirement.

**Note:** I did a search within `react-native-github/scripts` for `xcodebuild` and passed in the `-UseModernBuildSystem=NO` flag. I figured that every time we use `xcodebuild`, we should enforce the build system.

� This should hopefully fix the `react-native-oss-ios` test.

Reviewed By: hramos

Differential Revision: D10456139

fbshipit-source-id: 795f32b3ceba6a5a24ab6ccbf4f5160d42746801
2018-10-19 08:45:31 -07:00
Eli White 99471f87b9 Add deprecation notice to SwipeableListView
Summary: ListView is deprecated and SwipeableListView uses ListView. Thus, it is deprecated as well.

Reviewed By: RSNara

Differential Revision: D10437408

fbshipit-source-id: a08391d5b099e74b6ec179cd940ac404b2e702f4
2018-10-18 15:38:39 -07:00
Michał Pierzchała 5e997f9d51 use requireActual and requireMock from jest instead of require (#21849)
Summary:
A while back Jest introduced `jest.requireActual` and `jest.requireMock` which are aliases to `require.requireActual` and `require.requireMock`. We believe that users should use official Jest API and are planning to deprecate the latter.
Pull Request resolved: https://github.com/facebook/react-native/pull/21849

Differential Revision: D10448849

Pulled By: TheSavior

fbshipit-source-id: 34fffde97f48c26098c74ee222a56d99071703a6
2018-10-18 15:32:15 -07:00
Slobodan Predolac dbc864c9cd Relax the requirement that lazy module cannot be initialized on the main thread
Summary:
[RN] Relax the requirement that lazy module cannot be initialized on the main thread
I tried to understand the D5364734 that intoduced this, and I am not sure, but belive that asserting here is too strict. If you have a module that you want to lazily initialize, and module does not demand the main queue, it should be just a warning if you run on the main queue, not necessarily an error.

Reviewed By: mmmulani

Differential Revision: D10429880

fbshipit-source-id: 018c211d45b98dd8c552bf0289fe517d05e56d47
2018-10-18 15:26:27 -07:00
Eli White 44217d48ff Blacklist react-native-implementation.js from haste
Summary:
We don't want people requiring from this file via haste. This file is the main for the react-native yarn workspace requireable via require('react-native').

https://pxl.cl/jnWC

Reviewed By: mostafaeweda, RSNara

Differential Revision: D10444200

fbshipit-source-id: 3832857e3df01def128525f32c9735e928802b59
2018-10-18 15:23:16 -07:00
Ramanpreet Nara 4d917c8207 Additional Flow changes to files that use this component
Summary:
This diff includes:
1. Touchups to the `CameraRollView` typings.
2. Typings for `CameraRollViewExmaple`.
3. Flow fixes for internal callsites.

Reviewed By: yungsters

Differential Revision: D10362686

fbshipit-source-id: 48bf3fba0566e9c5c062aee3342d669f6c143d9f
2018-10-18 12:28:28 -07:00
Ramanpreet Nara 8465094523 Remove createReactClass from CameraRollView
Summary:
Related to #21581

Remove createReactClass from CameraRollView.

Reviewed By: TheSavior

Differential Revision: D10351036

fbshipit-source-id: 394545ac143917e3b483dfc6186e5f45732c602a
2018-10-18 12:28:28 -07:00
Mehdi Mulani 67afaefa78 Remove previously scheduled NetInfo callbacks if they haven't fired
Summary:
@public
If you call NetInfo.getCurrentConnectivity multiple times in succession, we'll create a bunch of callbacks but lose them in the ether.
With this fix, we'll unschedule them before creating a new one, which should resolve some crashes we're seeing.

Reviewed By: PeteTheHeat

Differential Revision: D10409486

fbshipit-source-id: 6065b09fa626f7f06aed9bf0e278c0a6a6169f58
2018-10-18 12:15:44 -07:00