Compare commits

...
Author SHA1 Message Date
grabbou 86cad7d690 [0.61.5] Bump version numbers 2019-11-23 15:44:22 +01:00
Michał Pierzchałaandgrabbou 7d311f0ca7 - Bump CLI to ^3.0.0 (#27235)
Summary:
Upgrading CLI to latest. It's likely not yet compatible with master, because we depend on Metro 0.56, and master is on 0.57. This diff is intended to be cherry-picked to 0.61 and 0.62.

cc grabbou

## Changelog

[Internal] [Changed] - Bump CLI to ^3.0.0
Pull Request resolved: https://github.com/facebook/react-native/pull/27235

Test Plan: None

Differential Revision: D18527709

Pulled By: cpojer

fbshipit-source-id: 44448058c48a66d22a1d71abdc908f532f5aa547
2019-11-23 15:15:21 +01:00
Vincent Cheungandgrabbou 1a3360753b Fix multiple set-cookie not aggregated correctly in response headers (#27066)
Summary:
Multiple `set-cookie` headers should be aggregated as one `set-cookie` with values in a comma separated list. It is working as expected on iOS but not on Android. On Android, only the last one is preserved

The problem arises because `NetworkingModule.translateHeaders()` uses `WritableNativeMap` as the translated headers but uses both native and non-native methods. The mixup causes out of sync data that both sets of methods do no agree. A simple fix is to use `Bundle` as the storage and only convert it to `WritableMap` at the end in one go

Related issues: https://github.com/facebook/react-native/issues/26280, https://github.com/facebook/react-native/issues/21795, https://github.com/facebook/react-native/issues/23185

## Changelog

[Android] [Fixed] - Fix multiple headers of the same name (e.g. `set-cookie`) not aggregated correctly
Pull Request resolved: https://github.com/facebook/react-native/pull/27066

Test Plan:
A mock api, https://demo6524373.mockable.io/, will return 2 `set-cookie` as follows:
```
set-cookie: cookie1=value1
set-cookie: cookie2=value2
```

Verify the following will print the `set-cookie` with a value `cookie1=value1, cookie2=value2`
```javascript
  fetch('https://demo6524373.mockable.io/')
    .then(response => {
      console.log(response.headers);
    });
```
On iOS, `set-cookie` will have `cookie1=value1, cookie2=value2` while on Android it will have `cookie2=value2` (preserving only the last one)

Differential Revision: D18298933

Pulled By: cpojer

fbshipit-source-id: ce53cd41d7c6de0469700617900f30a7d0914c26
2019-11-23 15:15:08 +01:00
Kacper Wiszczukandgrabbou 51f74e706c fix: Bundle assets in monorepo (#26940)
Summary:
In monorepo environment, `metro` isn't able to resolve `react-native` because the path to it is hardcoded.

I've also added `packagingOptions` to RNTester to make Android builds work for me. Let me know if this is something that is only specific to my setup, and shouldn't be added.

## Changelog

[Android] [Fixed] - Fix `bundleReleaseJsAndAssets` in monorepo env
Pull Request resolved: https://github.com/facebook/react-native/pull/26940

Test Plan:
- [x] - Works in monorepo setup on MacOS
- [x] - Works with RNTester app

Differential Revision: D18323703

Pulled By: cpojer

fbshipit-source-id: b8eb15dfd8a32ae11fd862fc725af9cffea2cf96
2019-11-23 15:09:07 +01:00
grabbou 95a510180a [0.61.4] Bump version numbers 2019-11-04 20:34:36 +01:00
grabbou f7d9d5f07e Merge branch '0.61-stable' of github.com:facebook/react-native into 0.61-stable 2019-11-04 19:34:59 +01:00
Radek CzemerysandMike Grabowski d7c9173b07 Reverts "Timing: Fixes timer when app get into background (#24649)" (#27065)
This reverts commit 338298417f
2019-11-04 18:17:57 +01:00
Rick Hanlonandgrabbou 5e702a1da3 Don't wrap console methods for metro logging in Chrome debugger (#26883)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/26883

This diff fixes an issue reported in https://github.com/facebook/react-native/issues/26788 where logs in the Chrome console were showing a different location than previous versions.

In the change here, we stop wrapping the console functions to attach the metro websocket in any environment that isn't a native app environment. We do this by checking `global.nativeLoggingHook` which is bound only by native apps and not environments like the Chrome DevTools.

Changelog: [General][Fixed] - Fix wrong lines logging in Chrome debugger

Reviewed By: cpojer, gaearon

Differential Revision: D17951707

fbshipit-source-id: f045ea9abaa8aecc6afb8eca7db9842146a3d872
2019-11-04 18:10:25 +01:00
Ilia Burdukovskiandgrabbou bd12ca12d7 fix build with hermes on windows (#26556)
Summary:
On the Windows platform, with hermes-engine enabled, the assembly crashes with an error:
![image](https://user-images.githubusercontent.com/8634793/65568495-ab11d980-df8c-11e9-83a0-2a2d26447860.png)
The problem lies in calling hermes command without the leading arguments `"cmd", "/c"` ([react.gradle, line: 152](https://github.com/facebook/react-native/blob/e028ac7af2d5b48860f01055f3bbacf91f6b6956/react.gradle#L152) )

## Changelog

[General] [Fixed] - Added a platform check and running commandLine with the corresponding arguments
Pull Request resolved: https://github.com/facebook/react-native/pull/26556

Test Plan:
Under Windows, enable hermes-engine in _build.gradle_ and run the `gradlew assembleRelease` or `gradlew bundleRelease` command
Also check assembly on other available platforms

Differential Revision: D17587023

Pulled By: cpojer

fbshipit-source-id: bab10213b23fac5ab6a46ac4929759dcd43e39c2
2019-11-04 18:02:30 +01:00
Pavlos VinieratosandChristoph Nakazawa b85dffa87c Bump react to 16.9.0 (#27060)
* Bump react to 16.9.0

* Update package.json

* might as well do everything

* Update package.json
2019-10-31 10:43:23 +00:00
grabbou 35001d2c77 [0.61.3] Bump version numbers 2019-10-29 20:35:56 +01:00
grabbou 18cfb3162c Revert "Improve Flow Type for ScrollResponder"
This reverts commit 54bf3ae1cf.
2019-10-29 11:40:52 +01:00
grabbou 43593c7c0e Revert "Migrate scrollResponderScrollNativeHandleToKeyboard function to take nativeRef"
This reverts commit 09c4e7caf0.
2019-10-29 11:40:46 +01:00
grabbou 6f98e77ed4 Revert "Fix exception in scrollResponderScrollNativeHandleToKeyboard when ref is null"
This reverts commit 0da6a9bb45.
2019-10-29 11:40:11 +01:00
grabbou b2d488085b Revert release and remove extraneous commits
This reverts commit 7fa3eef2a1.
2019-10-29 11:39:30 +01:00
grabbou 7fa3eef2a1 [0.61.3] Bump version numbers 2019-10-29 11:27:42 +01:00
grabbou 55ee65df02 Invalidate cache 2019-10-29 11:01:34 +01:00
grabbou 2fac662f6e Revert "Fix ref type for Native Scroll View"
This reverts commit db662af5b2.
2019-10-28 22:37:04 +01:00
Peter Arganyandgrabbou 32c90eb8da Fix bug in iOS13 nested text rendering
Summary:
This fixes a bug reported by Oculus and OSS.

https://github.com/facebook/react-native/issues/26577

When rendering images nested in a `<Text/>` node, on the native side, `RCTTextShadowView` adds an empty NSTextAttachment to the attributed string to add some extra space. The image is then overlaid in the empty space  . This all works fine and dandy on iOS12 and below.

Starting in iOS13, an empty NSTextAttachment doesn't render as blank space. It renders as the "missing image" white page. When the real image is overlaid on the white page, it looks super broken. See github issue and test plan for examples.

This fix is to assign an empty image to `NSTextAttachment`. I tried seeing if there was any other attribute we could use to just add white space to an attributed string, but this seems like the best one.

Changelog: [iOS][Fixed] Fixed bug rendering nested text on iOS13

Reviewed By: xyin96

Differential Revision: D18048277

fbshipit-source-id: 711cee96934fc1937d694621a4417c152dde3a31
2019-10-28 17:27:36 +01:00
Albert Sunandgrabbou 5051bf21a7 Fix selecting videos from library in iOS 13
Summary:
In iOS 13, Apple made a change that results in video URLs returned by UIImagePickerController becoming invalidated as soon as the info object from the delegate callback is released. This commit works around this issue by retaining these info objects by default and giving the application a way to release them once it is done processing the video.

See also https://stackoverflow.com/questions/57798968/didfinishpickingmediawithinfo-returns-different-url-in-ios-13

Reviewed By: olegbl, mmmulani

Differential Revision: D17845889

fbshipit-source-id: 12d0e496508dafa2581ef12730f7537ef98c60e2
2019-10-28 17:27:02 +01:00
Eli Whiteandgrabbou d3288776c1 Fix ref type for Native Scroll View
Summary: These types were wrong, this is a HostComponent, not a ReactNative.NativeComponent

Reviewed By: lunaleaps

Differential Revision: D17862305

fbshipit-source-id: e1e7acc7a5892f124b07cdc39d73d6ce7d414063
2019-10-28 17:21:22 +01:00
Martin Sherburnandgrabbou 2027a61339 Fix TimingAnimation rounding error issue (Take 2)
Summary:
This fixes a bug where the frames array can contain a duplicate entry at the end.
For example, suppose the duration is 1000.0 then it would create an array with the following:

```
[ 0,
  0.0010119824303159884,
  0.00391003997863186,
  0.00851330482578147,
  0.01466951184383165,
  0.022249135687575607,
  0.03114100006836614,
  0.041248932923769244,
  0.05248918022066495,
  0.06478838042267626,
  0.07808196049642172,
  0.09231285402599128,
  0.1074304693764467,
  0.12338985513375342,
  0.14015102395653428,
  0.15767840628626964,
  0.17594041329987542,
  0.1949090949486824,
  0.21455988464815853,
  0.23487142789035506,
  0.25582549864491233,
  0.27740701626433145,
  0.2996041891505173,
  0.3224088345090182,
  0.34581696665965683,
  0.36982983491413496,
  0.394455794287552,
  0.4197139228812336,
  0.44564199741037275,
  0.4723190090623474,
  0.5000000572130084,
  0.5276809909376533,
  0.5543580025896278,
  0.5802860771187669,
  0.6055442057124484,
  0.6301701650858652,
  0.6541830333403433,
  0.6775911654909819,
  0.7003958108494828,
  0.7225929837356684,
  0.7441745013550876,
  0.7651285721096447,
  0.785440115351841,
  0.8050909050513173,
  0.8240595867001241,
  0.84232159371373,
  0.8598489760434653,
  0.876610144866246,
  0.8925695306235529,
  0.9076871459740083,
  0.9219180395035779,
  0.9352116195773232,
  0.9475108197793346,
  0.9587510670762303,
  0.9688589999316335,
  0.9777508643124241,
  0.9853304881561681,
  0.9914866951742183,
  0.996089960021368,
  0.9989880175696839,
  1,
  1 ]
```

With this change, it now generates the following array:

```
[ 0,
  0.0010119824303159884,
  0.00391003997863186,
  0.00851330482578147,
  0.01466951184383165,
  0.022249135687575607,
  0.03114100006836614,
  0.041248932923769244,
  0.05248918022066495,
  0.06478838042267626,
  0.07808196049642172,
  0.09231285402599128,
  0.1074304693764467,
  0.12338985513375342,
  0.14015102395653428,
  0.15767840628626964,
  0.17594041329987542,
  0.1949090949486824,
  0.21455988464815853,
  0.23487142789035506,
  0.25582549864491233,
  0.27740701626433145,
  0.2996041891505173,
  0.3224088345090182,
  0.34581696665965683,
  0.36982983491413496,
  0.394455794287552,
  0.4197139228812336,
  0.44564199741037275,
  0.4723190090623474,
  0.5000000572130084,
  0.5276809909376533,
  0.5543580025896278,
  0.5802860771187669,
  0.6055442057124484,
  0.6301701650858652,
  0.6541830333403433,
  0.6775911654909819,
  0.7003958108494828,
  0.7225929837356684,
  0.7441745013550876,
  0.7651285721096447,
  0.785440115351841,
  0.8050909050513173,
  0.8240595867001241,
  0.84232159371373,
  0.8598489760434653,
  0.876610144866246,
  0.8925695306235529,
  0.9076871459740083,
  0.9219180395035779,
  0.9352116195773232,
  0.9475108197793346,
  0.9587510670762303,
  0.9688589999316335,
  0.9777508643124241,
  0.9853304881561681,
  0.9914866951742183,
  0.996089960021368,
  0.9989880175696839,
  1 ]
```

Note that the duplicate 1 at the end is now gone. This is because previously when it accumulated dt for 60 frames. dt wasn't quite exactly 1000, it was instead 999.9999999999999 and so didn't break out of the loop when it should have. This adds a tolerance so that it does break out of the loop.

Reviewed By: dimach1977

Differential Revision: D17828204

fbshipit-source-id: 4483303de852071436cf9a82e50296baf3392329
2019-10-28 17:18:59 +01:00
Eli Whiteandgrabbou 2ddb76a927 Fix bug where ScrollView contentInset top set to undefined wouldn't default to 0
Summary:
If you passed
```
contentInset: { bottom: 10 }
```

then it wouldn't go into the if case and it could try to call `setOffset` with `undefined`. `setOffset` requires a number.

Changelog:
[Fix][ScrollView] ScrollView contentInset top now defaults to 0 in expected situations

Reviewed By: JoshuaGross

Differential Revision: D17796155

fbshipit-source-id: 951dbbb0de1052f64a6835963e8bbc564990c120
2019-10-28 17:18:43 +01:00
Eli Whiteandgrabbou 0da6a9bb45 Fix exception in scrollResponderScrollNativeHandleToKeyboard when ref is null
Summary:
We are seeing these errors in prod:

```
TypeError: Cannot read property '_nativeTag' of null

at
ReactNativeFiberHostComponent.prototype.measureLayout(ReactNativeRenderer-prod.fb.js:1594)
ScrollResponderMixin.scrollResponderScrollNativeHandleToKeyboard(ScrollResponder.js:557)
```

This error is coming from these lines: https://github.com/facebook/react-native/blob/69c38e5a639f34620038ae5724426c92c355e509/Libraries/Components/ScrollResponder.js#L563-L567

Either `nodeHandle` is null or `this.getInnerViewRef()`. If `nodeHandle` was null, we'd get an error that we can't call `measureLayout` on null. So `this.getInnerViewRef()` must be null.

In the React Native Renderer this error of `_nativeTag of null` is coming from this line: https://github.com/facebook/react/blob/db8afe4f6318dba422177a2054204ef089570ad8/packages/react-native-renderer/src/ReactNativeFiberHostComponent.js#L84

Which means indeed `this.getInnerViewRef()` is null.

So adding a null check here which is what we do at all the other product callsites of `measureLayout`. Flow should have caught this, but because ScrollView is one of the only components left using mixins (ScrollResponder), `this.getInnerViewRef` is typed as `any` instead of what it should be:

```
?React.ElementRef<Class<ReactNative.NativeComponent<mixed>>>
```

If `scrollResponder` was typed correctly then Flow would have caught this.

Changelog:
[Fixed] Exception in scrollResponderScrollNativeHandleToKeyboard when ref is null

Reviewed By: mmmulani

Differential Revision: D17717150

fbshipit-source-id: d7bc4c897ad259fb588e8100f37ccfb8a5d07874
2019-10-28 17:18:19 +01:00
Eli Whiteandgrabbou 09c4e7caf0 Migrate scrollResponderScrollNativeHandleToKeyboard function to take nativeRef
Summary:
We need to get rid of findNodeHandle calls so migrating scrollResponderScrollNativeHandleToKeyboard to take a ref to a host component.

I made this change with Flow, and tested by rendering UserJobApplicationForm

Reviewed By: mdvacca

Differential Revision: D17099280

fbshipit-source-id: 96af692006aace2c206f268f5416984b00f8a438
2019-10-28 17:18:12 +01:00
Eli Whiteandgrabbou 54bf3ae1cf Improve Flow Type for ScrollResponder
Summary: FlatList and VirtualizedList were typing this value as any instead of using the actual type from ScrollView. I started with that change and then fixed the type to solve the other callsites in the codebase.

Reviewed By: zackargyle

Differential Revision: D17089934

fbshipit-source-id: bfc22cec9993904d779cad37b1de7cb3c0484d2c
2019-10-28 17:18:08 +01:00
grabbou 1b39f67896 Revert "Bump SoLoader to 0.8.0 (#26759)"
This reverts commit 66ae1caccd.
2019-10-28 17:15:01 +01:00
Alaa Ben El Ahmarandgrabbou 66ae1caccd Bump SoLoader to 0.8.0 (#26759)
Summary:
This PR bumps bumps Soloader to 0.8.0. This fixes white screen/ crash issues when downloading from Google Play.

Related to:
https://github.com/facebook/react-native/issues/25927 #26400

## Changelog
[Android] [Changed] - Bump Soloader to 0.8.0
Pull Request resolved: https://github.com/facebook/react-native/pull/26759

Test Plan:
A few CI tests fail, but I don't see the link with what I changed, especially the ios tests.
It's working locally though, and for people on github who tried this solution as well.

Differential Revision: D17828891

Pulled By: mdvacca

fbshipit-source-id: 1c7809aa681b41b8ed9a4da96d041d52f3cfbb76
2019-10-12 00:33:39 +02:00
Janic Duplessisandgrabbou 766f47075d Release underlying resources when JS instance is GC'ed on Android try 2 (#26155)
Summary:
Reland https://github.com/facebook/react-native/pull/24767

The commit had to be reverted because it caused a crash when using remote debugging in chrome. This is normal since jsi is not available in that environment. The crash was caused by `jsContext.get()` being 0, then being dereferenced later in c++. We can simply skip initializing the blob collector in this case.

This also includes the fix from https://github.com/facebook/react-native/issues/25720 to fix a crash when using hermes.

## Changelog

[Android] [Fixed] - Release underlying resources when JS instance is GC'ed on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/26155

Test Plan:
Test using RN tester with jsc and hermes
Test remote debugging

Reviewed By: mdvacca, fred2028

Differential Revision: D17072644

Pulled By: makovkastar

fbshipit-source-id: 079d1d43501e854297fbbe586ba229920c892584
2019-10-12 00:33:13 +02:00
grabbou 3a96f4c6c1 [0.61.2] Bump version numbers 2019-10-02 20:52:46 +02:00
gaodengandgrabbou 7fd8bac5cd iOS13 status bar has now 3 styles (#26294)
Summary:
iOS13 status bar has now 3 styles
UIStatusBarStyleDefault, UIStatusBarStyleLightContent, UIStatusBarStyleDarkContent

UIStatusBarStyleDefault now acts as an automatic style which will set it’s value dynamically based on the the userinterfacestyle(One of the traits) of the viewcontroller that controls the status bar appearance.

## Changelog

[iOS] [Fixed] - iOS13 new status bar style UIStatusBarStyleDarkContent
Pull Request resolved: https://github.com/facebook/react-native/pull/26294

Differential Revision: D17314054

Pulled By: cpojer

fbshipit-source-id: ea109e729bb551dff314bc00a056860a8febb0e9
2019-10-02 20:29:32 +02:00
Vojtech Novakandgrabbou 0b734f6283 improve error message in NativeModuleRegistryBuilder.java (#26467)
Summary:
## Motivation

I have seen a spike in users reporting this error. Unfortunately I did not receive any repros that would confirm this, but my hypothesis is that they ran into situation when `new XYZPackage()` was present in `getPackages()` method and then the CLI kicked in with autolinking and they were left with this incomplete error.

someone more knowledgeable of autolinking should review this.
Pull Request resolved: https://github.com/facebook/react-native/pull/26467

Differential Revision: D17661242

Pulled By: cpojer

fbshipit-source-id: 63dfcd85a0d41d85a0dd52f84ab16cb7ceb64ba2
2019-10-02 20:22:32 +02:00
Janic Duplessisandgrabbou 5cf3d96ae3 Use warnOnce for excessive number of callbacks error (#26508)
Summary:
I happened to hit this error a couple times and the issue is that if there are let's say 1000 pending callbacks the error would be triggered 500 times and pretty much crash the app. I think it is reasonable to use warn once here so it only happens once.

## Changelog

[General] [Fixed] - Use `warnOnce` for excessive number of callbacks error
Pull Request resolved: https://github.com/facebook/react-native/pull/26508

Test Plan: Tested by reducing the number of pending callbacks required to trigger the error.

Reviewed By: TheSavior

Differential Revision: D17512917

Pulled By: JoshuaGross

fbshipit-source-id: 5ce8e2a0a166805cc6f3fe6d78e2716d6792a80e
2019-10-02 20:21:55 +02:00
Miguel Alatzarandgrabbou b944381bb4 Include transform in OUTER_PROPS (#26611)
Summary:
Without `transform` in `OUTER_PROPS`, the refresh control component would not include `transform: {scaleY: -1}` in its style and so pulling down, rather than up, on a scroll view would trigger a refresh.

Fixes https://github.com/facebook/react-native/issues/26181

## Changelog
[Android] [Fixed] - Fixed issue with refresh control not working properly on an inverted ScrollView
Pull Request resolved: https://github.com/facebook/react-native/pull/26611

Test Plan: Updated unit test in splitLayoutProps-test.js.

Differential Revision: D17661079

Pulled By: cpojer

fbshipit-source-id: 747da27b11c3ca59b7f639f393ae5ac137f5490a
2019-10-02 20:21:28 +02:00
grabbou df9073ad73 Revert "Set rounded rectangle mask on TouchableNativeFeedback's ripples (#25342)"
This reverts commit 14b455f69a.
2019-10-01 14:02:50 +02:00
Pavlos VinieratosandChristoph Nakazawa a7b9be4a17 Removing the workspace (#26566)
The workspace file is file to be added to git. Consider it as a lockfile for native ios :)
2019-09-30 10:22:09 +09:00
grabbou a33e809d7b Bring back RNTester manual step 2019-09-25 13:05:12 +02:00
grabbou c833f41177 [0.61.1] Bump version numbers 2019-09-25 11:30:06 +02:00
grabbou 3aaebe60ce Revert "Add generated xcshareddata folder to gitignore (#25451)"
This reverts commit d57cdac62b.
2019-09-25 11:27:04 +02:00
grabbou b2a7689061 Revert "[0.61.1] Bump version numbers"
This reverts commit 2577ca5340.
2019-09-25 11:25:15 +02:00
grabbou 2577ca5340 [0.61.1] Bump version numbers 2019-09-25 11:22:59 +02:00
Tom Targoszandgrabbou 4b1206c2ae Fix ShareSheet crash on iOS 13 (#26429)
Summary:
Currently on iOS 13 the app will crash if you:
- Open the share sheet
- Tap something like messages or photos
- Cancel the dialog
- Perform any other action

This is because `shareController.completionWithItemsHandler` is called when the dialog box is canceled and currently `failureCallback` or `successCallback` will always be called. In the situation above, `activityError` is `nil` so `successCallback` will be called even though `completed` is false. This leaves us in a state where the callback has been invoked but the ShareSheet is still active, meaning the success or error callback will be invoked again, leading to the crash.

This PR adds a check to make sure `completed` is true before calling `successCallback`. This way `successCallback` will only be called when the user has successfully completed an action and the ShareSheet is closed.

## Changelog

[iOS] [Fixed] - Fix crash in RCTActionSheetManager.m on iOS 13
Pull Request resolved: https://github.com/facebook/react-native/pull/26429

Test Plan:
- Saved an image successfully
- Opened and dismissed the `Photos` dialog multiple times without crashing

Differential Revision: D17369712

Pulled By: PeteTheHeat

fbshipit-source-id: 228b696243cd39fad1fa134f4412d95d845b1bc5
2019-09-25 11:14:11 +02:00
Krzysztof Magieraandgrabbou 42ad0bb627 Allow again for injecting custom root view via ReactActivityDelegate (#26495)
Summary:
This change restores the possibility of injecting custom root views via ReactAcitivtyDelegate. It has been used by react-native-gesture-handler library in order to replace default root view with a one that'd route touch events to gesture-handler internal pipeline.

The regression happened in d0792d4b8a where new `ReactDelegate` was introduced to provide support for rendering react native views in both Android fragments and activities. As a part of that change the logic responsible for creating root view has been moved from `ReactActivityDelegate` to `ReactDelegate` rendering `ReactActivityDelegate.createRootView` unused – that is there is no code path that leads to this method being called. Instead `ReactDelegate.createRootView` method has been added which now plays the same role. The custom root view injection was relying on overwriting that method and hence the method is no longer referenced overwriting it has no effect. Following the logic migration out of `ReactActivityDelegate` into `ReactDelegate` we could potentially now start overwriting methods of `ReactDelegate`. However when working with Android's activities in React Native we can only provide an instance of `ReactActivityDelegate` and in my opinion it does not make too much sense to expose also a way to provide own instance of `ReactDelegate`.

The proposed fix was to route `ReactDelegate.createRootView` to call `ReactActivityDelegate.createRootView` and this way regaining control over root view creation to `ReactActivityDelgate`. The change of the behavior has been implemented by subclassing `ReactDelegate` directly from `ReactActivityDelegate` and hooking the aforementioned methods together. Thanks to this approach, the change has no effect on `ReactDelegate` being used directly from fragments or in other scenarios where it is not being instantiated from `ReactActivityDelegate`.

This fixes an issue reported in https://github.com/kmagiera/react-native-gesture-handler/issues/745 and discussed on 0.61 release thread: https://github.com/react-native-community/releases/issues/140#issuecomment-532235945

## Changelog

[Internal] [Fixed] - Allow for custom root view to be injected via ReactActivityDelegate
Pull Request resolved: https://github.com/facebook/react-native/pull/26495

Test Plan:
1. Run RNTester, take layout snapshot, see the react root view being on the top of view hierarchy.
2. Run gesture-handler Example app (or some other app that overwrites ReactActivityDelegate.createRootView method), on layout snapshot see custom root view being used.

Differential Revision: D17482966

Pulled By: mdvacca

fbshipit-source-id: 866f551b8b077bafe1eb9e34e5dccb1240fa935e
2019-09-25 11:07:12 +02:00
grabbou 3293792b1f [0.61.0] Bump version numbers 2019-09-24 21:27:29 +02:00
grabbou 6830ec87ff Revert "Update Gradle wrapper to 5.6 (#26079)"
This reverts commit afd35296f2.
2019-09-24 21:05:26 +02:00
grabbou 8750eb2538 Revert "bump android gradle plugin to 3.5.0 (#26129)"
This reverts commit 8d4e8a3775.
2019-09-24 20:55:02 +02:00
Frieder Bluemleandgrabbou afd35296f2 Update Gradle wrapper to 5.6 (#26079)
Summary:
```
Welcome to Gradle 5.6!

Here are the highlights of this release:
 - Incremental Groovy compilation
 - Groovy compile avoidance
 - Test fixtures for Java projects
 - Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6/release-notes.html
```

## Changelog

[Android] [Changed] - Gradle wrapper 5.6
Pull Request resolved: https://github.com/facebook/react-native/pull/26079

Test Plan: Ran build and tests locally.

Differential Revision: D17054310

Pulled By: mdvacca

fbshipit-source-id: de7ba3a6d04058e51b8bc6a21d5a3f828ef8bc25
2019-09-24 20:41:49 +02:00
Dulmandakhandgrabbou 8d4e8a3775 bump android gradle plugin to 3.5.0 (#26129)
Summary:
Android Gradle Plugin 3.5.0 released with a lot of improvements and bug fixes. It's important to have this change merged before 0.61 release. See https://developer.android.com/studio/releases/gradle-plugin

## Changelog

[Android] [Changed] - bump android gradle plugin to 3.5.0
Pull Request resolved: https://github.com/facebook/react-native/pull/26129

Test Plan: RNTester builds and runs as expected

Reviewed By: mdvacca

Differential Revision: D17091520

Pulled By: osdnk

fbshipit-source-id: 232b9209526e62a7344d74422fd8471a03dec7f4
2019-09-24 20:41:43 +02:00
Alexander Kawrykowandgrabbou 245ac945fb React Partial Sync
Summary:
Base: 85d05b3a4d439c504ee43652d586ee253a01faf6

Author: Dan Abramov <dan.abramov@gmail.com>
Date:   Wed Sep 18 16:32:11 2019 +0100

    [Fresh] Always remount classes (#16823)

commit acfdc9760b4dc55d192b08de42b2c45e5e5bb531
Author: Ricky <rickhanlonii@gmail.com>
Date:   Wed Sep 18 15:31:00 2019 +0100

    [React Native] Fix for view config registrations (#16821)

commit dbe593d96c35b33fcc1f1bec70af86c24779392b
Author: Dominic Gannaway <trueadm@users.noreply.github.com>
Date:   Wed Sep 18 14:18:32 2019 +0200

    [react-core] Do not null fiber.sibling in detachFiber (#16820)

commit 30fa2f5ea3313b4b7932783d8ac71b5d59b8a8c7
Author: Dominic Gannaway <trueadm@users.noreply.github.com>
Date:   Tue Sep 17 17:30:22 2019 +0200

    [react-core] Clear more properties in detachFiber (#16807)

commit ea374e751b164ed029b35063b84c825305024a0a
Author: Dan Abramov <dan.abramov@gmail.com>
Date:   Wed Aug 28 16:55:56 2019 +0100

    Don't ignore dependencies for render phase update (#16574)

Reviewed By: gaearon

Differential Revision: D17456249

fbshipit-source-id: 87bad63fed4a571f65592ee904606828e3aa39af
2019-09-24 20:41:23 +02:00
sunnylqmandgrabbou 06c64f5f1b Bump hermes to v0.2.1 (#26451)
Summary:
Bump hermes to v0.2.1

allow-large-files

## Changelog

See https://github.com/facebook/hermes/releases/tag/v0.2.1

[Android] [Changed] - Bump hermes to v0.2.1
Pull Request resolved: https://github.com/facebook/react-native/pull/26451

Test Plan: RNTester builds and runs as expected

Differential Revision: D17394921

Pulled By: cpojer

fbshipit-source-id: 07ce5da3517b7aa24bfb5e1f6eefed6cdc9f5cb5
2019-09-19 09:38:41 +02:00
grabbou a5353c0361 Revert "Fix onDismiss in Modal"
This reverts commit bd2b7d6c03.
2019-09-19 09:36:45 +02:00
REDMOND\acoatesandgrabbou 930ffa28a3 Fix build break in MSVC (#26462)
Summary:
Merging react-native-windows to 0.60 - the visual studio compiler seems to take issue with the existing code

## Changelog

[Internal] [Fixed] - Build fix for react-native-windows (MSVC)
Pull Request resolved: https://github.com/facebook/react-native/pull/26462

Test Plan:
No real change, just making compilers happy.

### Side Note
We'll want this change cherry-pickered to RN 0.60 and RN 0.61 so users of react-native-windows dont have to use our fork of react-native.

Reviewed By: mhorowitz

Differential Revision: D17406081

Pulled By: TheSavior

fbshipit-source-id: bc056e1a545c6478fdcbd5645f3a8dea657162c8
2019-09-19 09:31:21 +02:00
Gabriel Furiniandgrabbou e0d9ceaa79 Fixing Yoga imports and includes on case-sensitive machines (#26416)
Summary:
In addition of the issue resolved by https://github.com/facebook/react-native/pull/26360 (already merged), machines with case-sensitive disks are still not able to build a project on Xcode due not found `<yoga/...` imports:

```
'yoga/Yoga.h' file not found
```

![Screen Shot 2019-09-12 at 11 15 54](https://user-images.githubusercontent.com/1728387/64791885-c58c9180-d54e-11e9-95cb-40befaab7acc.png)

## Changelog

[iOS] [Fixed] - Fix Yoga imports and includes
Pull Request resolved: https://github.com/facebook/react-native/pull/26416

Test Plan: `Build` command on Xcode now runs successfully in a Mac with disk in case-sensitive mode

Differential Revision: D17370392

Pulled By: PeteTheHeat

fbshipit-source-id: 2a225f47046113267adb154a4c6a9ef4664a12c3
2019-09-19 09:31:05 +02:00
grabbou fc6580e2e0 [0.61.0-rc.3] Bump version numbers 2019-09-10 19:01:50 +02:00
grabbou a648a7176a Rename Yoga 2019-09-10 13:44:11 +02:00
Max Thirouinandgrabbou cf5ca2659a Fix incorrect module.name_mapper in template .flowconfig (#26330)
Summary:
Has explained in https://github.com/facebook/react-native/issues/26233, current template is incorrect & can create error, like having require() of png that are considered as `string` instead of `number. This can probably hide tons of similar mistakes.

The change in this PR should resolve the previous behavior (& for example, some places in previous version of the flowconfig have the full path like here https://github.com/facebook/react-native/blob/35300147ca66677f42e8544264be72ac0e9d1b45/template/_flowconfig#L61)

Closes https://github.com/facebook/react-native/issues/26233

## Changelog

```
[General] [Fixed] Fix incorrect `module.name_mapper` in template .flowconfig
```

Alternatively, message could be

```
[General] [Internal] Fix incorrect `module.name_mapper` in template .flowconfig
```

As it hasn't this "bug" hasn't been released in a public stable release. You decide
Pull Request resolved: https://github.com/facebook/react-native/pull/26330

Test Plan: I just tested this in my project, thymikee might be able to confirm & approve this PR.

Differential Revision: D17258891

Pulled By: cpojer

fbshipit-source-id: 3904ffbc6f076ee0e435311249d694b8604fc7b8
2019-09-10 13:37:34 +02:00
James Treanorandgrabbou 231581c256 Add missing dependencies to React-CoreModules.podspec 2019-09-10 13:36:41 +02:00
James Treanorandgrabbou 2ec83bec5f Revert "Revert "Remove 's.static_framework = true' requirement for podspec (#25816)""
This reverts commit 612c033918.
2019-09-10 13:36:24 +02:00
Kevin Gozaliandgrabbou 50d9551f87 TM iOS: Disable in test environment
Summary:
For now, disable TM completely in test environment, like RNTester integration/unit tests. See details in T53341772

This also fixes the failure discussed in https://github.com/facebook/react-native/pull/26151

Reviewed By: PeteTheHeat

Differential Revision: D17147915

fbshipit-source-id: 1c48ebb9c3b81fc08bc33606dcc38c29297d6010
2019-09-10 13:33:40 +02:00
grabbou 0356b1fa13 [0.61.0-rc.2] Bump version numbers 2019-09-04 17:55:42 +02:00
grabbou b153a05e2f Update release script 2019-09-04 17:55:17 +02:00
grabbou dcf56a43fa Sync Podfile 2019-09-04 17:54:59 +02:00
Ram Nandgrabbou e0e9a1cb4f Update the version of yoga podspec to match the actual version of Yoga published
Summary: Yoga is currently published in cocoapods. While we don't use the Yoga from Cocoapods in React Native, we should atleast try to follow that version, so that other integrations with Yoga are possible

Reviewed By: shergin

Differential Revision: D17127625

fbshipit-source-id: bca2e1e33ad775e2a0d7a6f1e4177c3b480c023a
2019-09-04 17:32:51 +02:00
Ram Nandgrabbou 8d02e1723f Change podspec name of yoga to Yoga
Summary:
Needed to capitalize the name, since this is the convention used elsewhere too

[iOS] [Changed] - Renamed yoga podspec to Yoga

Reviewed By: shergin

Differential Revision: D17127104

fbshipit-source-id: 14047bf452edda000037701f4ba7f4a02a0e717b
2019-09-04 17:32:15 +02:00
Dan Abramovandgrabbou eb0216d8be Partial RN sync
Summary:
This cherry-picks one commit: https://github.com/facebook/react/commit/01fb68b9bf680ab8bbf96e86501e0fc540b3cc97

It fixes a bug in Fast Refresh.

Reviewed By: threepointone

Differential Revision: D17140543

fbshipit-source-id: a7654152d1cc7c27e7c4024380349b44ac496b22
2019-09-04 17:20:31 +02:00
Dan Abramovandgrabbou c0fa590a03 Fix Redbox on iOS
Summary:
Looks like we broke iOS redbox in D16812212. It stopped showing up because the feature detection stopped working, and we started calling noops. The fix is an explicit platform check.

Fixes #26260

Reviewed By: motiz88

Differential Revision: D17139310

fbshipit-source-id: 829eec23cbb49151ac250889c34ab28d36b05e6a
2019-09-04 17:20:17 +02:00
SachinTotaleandgrabbou ba5222f3cc Memory Leak due to JSStringRelease not called in multiple places in JSCRuntime.cpp (#25884)
Summary:
Memory Leak due to JSStringRelease not called in multiple places in JSCRuntime.cpp
Issue: https://github.com/facebook/react-native/issues/25664
Reproducible repo: https://github.com/bhandarijiwan/memory_issue_repro

## Changelog
[JSC] [JSCRuntime.cpp] - Added missing JSStringRelease calls in missing places
Pull Request resolved: https://github.com/facebook/react-native/pull/25884

Test Plan: Tested that is no memory leak with various NativeModule to JS call flows

Reviewed By: JoshuaGross

Differential Revision: D16928985

Pulled By: TheSavior

fbshipit-source-id: 65ce15ae32482d0db39bad7e22a2fed9ee04f230
2019-09-04 17:11:16 +02:00
grabbou c57bfea01e [0.61.0-rc.0] Bump version numbers 2019-08-27 16:20:02 +02:00
Mike GrabowskiandGitHub fafc58b62d Update CircleCI config as per support request 2019-08-27 16:18:55 +02:00
grabbou eded25d532 Revert "[0.61.0-rc.0] Bump version numbers"
This reverts commit bc28eee87f.
2019-08-27 16:16:31 +02:00
grabbou bc28eee87f [0.61.0-rc.0] Bump version numbers 2019-08-26 16:29:47 +02:00
Mehdi Mulaniandgrabbou 104b0cc862 Remove RCTUIImageViewAnimated WeakProxy gating
Summary:
To help determine how severe this issue is, put the fix behind a MC.
We will only pick the parent diff to the RC branch so that the fix immediately goes to master and we don't have to worry about fixing this any further.

Reviewed By: fkgozali

Differential Revision: D16940181

fbshipit-source-id: 91eb08181f82f51aea6a20b3fd489a33bdc0e424
2019-08-26 15:52:43 +02:00
Mehdi Mulaniandgrabbou 6d6b532f8f Add RCTWeakProxy to properly deallocate RCTUIImageViewAnimated
Summary:
@public
CADisplayLink strongly holds onto its target, so you have to use a weak proxy object to pass the target into the CADisplayLink.

Previously we passed a weak-self point (i.e. weakSelf) but this did not have the intended effect, since the pointer to self would still be passed to CADisplayLink, and thus it would hold onto the RCTUIImageViewAnimated strongly.

So is weakSelf doing anything other than using self?
It is but it's very minor and not useful. In the case that the object got de-allocated between assigning self to weakSelf and creating the CADisplayLink, then we would pass a nil target. This is actually impossible though because we are running an instance method, so self is implicitly retained! So semantically it is something different but in practice it is the same as passing self through.

Notes:
* This system was added originally in https://github.com/facebook/react-native/pull/24822
* https://github.com/facebook/react-native/pull/25636 then "enabled" this system by deprecating existing approach

Reviewed By: fkgozali

Differential Revision: D16939869

fbshipit-source-id: 7a0e947896f23aa30ad074d1dcb4d4db7543e00a
2019-08-26 15:52:37 +02:00
grabbou 1dd1152025 Revert "[0.61.0-rc.0] Bump version numbers"
This reverts commit 2575eb318f.
2019-08-26 15:52:30 +02:00
grabbou 2575eb318f [0.61.0-rc.0] Bump version numbers 2019-08-22 12:40:24 +02:00
grabbou 1dd68819ab Revert "[0.61.0-rc.0] Bump version numbers"
This reverts commit 9296ab1a61.
2019-08-22 12:39:59 +02:00
grabbou 9296ab1a61 [0.61.0-rc.0] Bump version numbers 2019-08-22 12:21:46 +02:00
grabbou 612c033918 Revert "Remove 's.static_framework = true' requirement for podspec (#25816)"
This reverts commit ca9e108110.
2019-08-22 08:59:52 +02:00
grabbou f827ea90b0 Revert "Remove vendored proguard annotation (#26069)"
This reverts commit 35fc0add2d.
2019-08-21 14:40:10 +02:00
Mike Grabowski b356ac7769 Tweak script to work with no global CLI 2019-08-20 23:20:02 +02:00
Mike Grabowski 5485238bb4 Bump test version for cache issues 2019-08-20 23:18:17 +02:00
79 changed files with 1393 additions and 750 deletions
+20 -13
View File
@@ -59,8 +59,8 @@ commands:
steps:
- restore_cache:
keys:
- v3-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
- v3-yarn-cache-{{ arch }}
- v4-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
- v4-yarn-cache-{{ arch }}
- run:
name: Run Yarn
command: |
@@ -72,14 +72,14 @@ commands:
- save_cache:
paths:
- ~/.cache/yarn
key: v3-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
key: v4-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
install_buck_tooling:
steps:
- restore_cache:
keys:
- v3-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}}
- v3-buck-v2019.01.10.01-
- v4-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}}
- v4-buck-v2019.01.10.01-
- run:
name: Install BUCK
command: |
@@ -92,7 +92,7 @@ commands:
paths:
- ~/buck
- ~/okbuck
key: v3-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}
key: v4-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}
brew_install:
parameters:
@@ -183,12 +183,12 @@ commands:
jobs:
setup:
parameters:
executor:
type: executor
default: node8
checkout_type:
type: string
default: node
executor:
type: executor
default: node8
checkout_type:
type: string
default: node
executor: << parameters.executor >>
steps:
- checkout
@@ -235,7 +235,6 @@ jobs:
DANGER_GITHUB_API_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" yarn danger ci --use-github-checks
when: always
# -------------------------
# JOBS: Analyze Code
# -------------------------
@@ -659,6 +658,14 @@ workflows:
- publish_npm_package:
requires:
- setup_android
filters:
# Both of the following conditions must be included!
# Ignore any commit on any branch by default.
branches:
ignore: /.*/
# Only act on version tags.
tags:
only: /v[0-9]+(\.[0-9]+)*(\-rc(\.[0-9]+)?)?/
analysis:
jobs:
@@ -166,7 +166,7 @@ RCT_EXPORT_METHOD(showShareActionSheetWithOptions:(NSDictionary *)options
shareController.completionWithItemsHandler = ^(NSString *activityType, BOOL completed, __unused NSArray *returnedItems, NSError *activityError) {
if (activityError) {
failureCallback(activityError);
} else {
} else if (completed) {
successCallback(@[@(completed), RCTNullIfNil(activityType)]);
}
};
@@ -0,0 +1,32 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @emails oncall+react_native
*/
'use strict';
const TimingAnimation = require('../animations/TimingAnimation');
describe('Timing Animation', () => {
it('should return array of 61 items', () => {
const timingAnim = new TimingAnimation({duration: 1000});
const config = timingAnim.__getNativeAnimationConfig();
expect(config.frames.length).toBe(61);
expect(config.frames[60]).toBe(1);
expect(config.frames[59]).toBeLessThan(1);
});
it('should cope with zero duration', () => {
const timingAnim = new TimingAnimation({duration: 0});
const config = timingAnim.__getNativeAnimationConfig();
expect(config.frames.length).toBe(1);
expect(config.frames[0]).toBe(1);
});
});
@@ -66,8 +66,9 @@ class TimingAnimation extends Animation {
__getNativeAnimationConfig(): any {
const frameDuration = 1000.0 / 60.0;
const frames = [];
for (let dt = 0.0; dt < this._duration; dt += frameDuration) {
frames.push(this._easing(dt / this._duration));
const numFrames = Math.round(this._duration / frameDuration);
for (let frame = 0; frame < numFrames; frame++) {
frames.push(this._easing(frame / numFrames));
}
frames.push(this._easing(1));
return {
+6 -3
View File
@@ -16,6 +16,7 @@ const Systrace = require('../Performance/Systrace');
const deepFreezeAndThrowOnMutationInDev = require('../Utilities/deepFreezeAndThrowOnMutationInDev');
const invariant = require('invariant');
const stringifySafe = require('../Utilities/stringifySafe');
const warnOnce = require('../Utilities/warnOnce');
export type SpyData = {
type: number,
@@ -225,11 +226,13 @@ class MessageQueue {
const method = debug && this._remoteMethodTable[debug[0]][debug[1]];
info[callID] = {module, method};
});
console.error(
warnOnce(
'excessive-number-of-pending-callbacks',
`Please report: Excessive number of pending callbacks: ${
this._successCallbacks.size
}. Some pending callbacks that might have leaked by never being called from native code:`,
info,
}. Some pending callbacks that might have leaked by never being called from native code: ${stringifySafe(
info,
)}`,
);
}
}
+29 -1
View File
@@ -35,6 +35,7 @@
NSMutableArray<UIImagePickerController *> *_pickers;
NSMutableArray<RCTResponseSenderBlock> *_pickerCallbacks;
NSMutableArray<RCTResponseSenderBlock> *_pickerCancelCallbacks;
NSMutableDictionary<NSString *, NSDictionary<NSString *, id> *> *_pendingVideoInfo;
}
RCT_EXPORT_MODULE(ImagePickerIOS);
@@ -131,6 +132,24 @@ RCT_EXPORT_METHOD(openSelectDialog:(NSDictionary *)config
cancelCallback:cancelCallback];
}
// In iOS 13, the URLs provided when selecting videos from the library are only valid while the
// info object provided by the delegate is retained.
// This method provides a way to clear out all retained pending info objects.
RCT_EXPORT_METHOD(clearAllPendingVideos)
{
[_pendingVideoInfo removeAllObjects];
_pendingVideoInfo = [NSMutableDictionary new];
}
// In iOS 13, the URLs provided when selecting videos from the library are only valid while the
// info object provided by the delegate is retained.
// This method provides a way to release the info object for a particular file url when the application
// is done with it, for example after the video has been uploaded or copied locally.
RCT_EXPORT_METHOD(removePendingVideo:(NSString *)url)
{
[_pendingVideoInfo removeObjectForKey:url];
}
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary<NSString *, id> *)info
{
@@ -146,7 +165,15 @@ didFinishPickingMediaWithInfo:(NSDictionary<NSString *, id> *)info
width = @(image.size.width);
}
if (imageURL) {
[self _dismissPicker:picker args:@[imageURL.absoluteString, RCTNullIfNil(height), RCTNullIfNil(width)]];
NSString *imageURLString = imageURL.absoluteString;
// In iOS 13, video URLs are only valid while info dictionary is retained
if (@available(iOS 13.0, *)) {
if (isMovie) {
_pendingVideoInfo[imageURLString] = info;
}
}
[self _dismissPicker:picker args:@[imageURLString, RCTNullIfNil(height), RCTNullIfNil(width)]];
return;
}
@@ -174,6 +201,7 @@ didFinishPickingMediaWithInfo:(NSDictionary<NSString *, id> *)info
_pickers = [NSMutableArray new];
_pickerCallbacks = [NSMutableArray new];
_pickerCancelCallbacks = [NSMutableArray new];
_pendingVideoInfo = [NSMutableDictionary new];
}
[_pickers addObject:imagePicker];
@@ -698,10 +698,7 @@ class ScrollView extends React.Component<Props, State> {
this.props.contentOffset ? this.props.contentOffset.y : 0,
);
this._scrollAnimatedValue.setOffset(
/* $FlowFixMe(>=0.98.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.98 was deployed. To see the error delete this
* comment and run Flow. */
this.props.contentInset ? this.props.contentInset.top : 0,
this.props.contentInset ? this.props.contentInset.top || 0 : 0,
);
this._stickyHeaderRefs = new Map();
this._headerLayoutYs = new Map();
+8 -3
View File
@@ -46,16 +46,19 @@ export interface Spec extends TurboModule {
stack: Array<StackFrame>,
exceptionId: number,
) => void;
// TODO(T53311281): This is a noop on iOS now. Implement it.
+reportException?: (data: ExceptionData) => void;
+updateExceptionMessage: (
message: string,
stack: Array<StackFrame>,
exceptionId: number,
) => void;
// Android only
// TODO(T53311281): This is a noop on iOS now. Implement it.
+dismissRedbox?: () => void;
}
const Platform = require('../Utilities/Platform');
const NativeModule = TurboModuleRegistry.getEnforcing<Spec>(
'ExceptionsManager',
);
@@ -83,12 +86,14 @@ const ExceptionsManager = {
NativeModule.updateExceptionMessage(message, stack, exceptionId);
},
dismissRedbox(): void {
if (NativeModule.dismissRedbox) {
if (Platform.OS !== 'ios' && NativeModule.dismissRedbox) {
// TODO(T53311281): This is a noop on iOS now. Implement it.
NativeModule.dismissRedbox();
}
},
reportException(data: ExceptionData): void {
if (NativeModule.reportException) {
if (Platform.OS !== 'ios' && NativeModule.reportException) {
// TODO(T53311281): This is a noop on iOS now. Implement it.
NativeModule.reportException(data);
return;
}
+4 -4
View File
@@ -1,17 +1,17 @@
/**
* @generated by scripts/bump-oss-version.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @generated by scripts/bump-oss-version.js
* @flow
*/
exports.version = {
major: 0,
minor: 0,
patch: 0,
minor: 61,
patch: 5,
prerelease: null,
};
+50 -17
View File
@@ -11,6 +11,10 @@
import Platform from '../Utilities/Platform';
declare var console: typeof console & {
_isPolyfilled: boolean,
};
/**
* Sets up developer tools for React Native.
* You can use this module directly, or just require InitializeCore.
@@ -54,25 +58,54 @@ if (__DEV__) {
JSInspector.registerAgent(require('../JSInspector/NetworkAgent'));
}
// Note we can't check if console is "native" because it would appear "native" in JSC and Hermes.
// We also can't check any properties that don't exist in the Chrome worker environment.
// So we check a navigator property that's set to a particular value ("Netscape") in all real browsers.
const isLikelyARealBrowser =
global.navigator != null &&
/* _
* | |
* _ __ ___| |_ ___ ___ __ _ _ __ ___
* | '_ \ / _ \ __/ __|/ __/ _` | '_ \ / _ \
* | | | | __/ |_\__ \ (_| (_| | |_) | __/
* |_| |_|\___|\__|___/\___\__,_| .__/ \___|
* | |
* |_|
*/
global.navigator.appName === 'Netscape'; // Any real browser
if (!Platform.isTesting) {
const HMRClient = require('../Utilities/HMRClient');
[
'trace',
'info',
'warn',
'log',
'group',
'groupCollapsed',
'groupEnd',
'debug',
].forEach(level => {
const originalFunction = console[level];
// $FlowFixMe Overwrite console methods
console[level] = function(...args) {
HMRClient.log(level, args);
originalFunction.apply(console, args);
};
});
if (console._isPolyfilled) {
// We assume full control over the console and send JavaScript logs to Metro.
[
'trace',
'info',
'warn',
'log',
'group',
'groupCollapsed',
'groupEnd',
'debug',
].forEach(level => {
const originalFunction = console[level];
// $FlowFixMe Overwrite console methods
console[level] = function(...args) {
HMRClient.log(level, args);
originalFunction.apply(console, args);
};
});
} else {
// We assume the environment has a real rich console (like Chrome), and don't hijack it to log to Metro.
// It's likely the developer is using rich console to debug anyway, and hijacking it would
// lose the filenames in console.log calls: https://github.com/facebook/react-native/issues/26788.
HMRClient.log('log', [
`JavaScript logs will appear in your ${
isLikelyARealBrowser ? 'browser' : 'environment'
} console`,
]);
}
}
require('./setUpReactRefresh');
@@ -1125,6 +1125,14 @@ namespace facebook {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "openSelectDialog", @selector(openSelectDialog:successCallback:cancelCallback:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeImagePickerIOSSpecJSI_clearAllPendingVideos(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "clearAllPendingVideos", @selector(clearAllPendingVideos), args, count);
}
static facebook::jsi::Value __hostFunction_NativeImagePickerIOSSpecJSI_removePendingVideo(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "removePendingVideo", @selector(removePendingVideo:), args, count);
}
NativeImagePickerIOSSpecJSI::NativeImagePickerIOSSpecJSI(id<RCTTurboModule> instance, std::shared_ptr<JSCallInvoker> jsInvoker)
: ObjCTurboModule("ImagePickerIOS", instance, jsInvoker) {
@@ -1143,6 +1151,12 @@ namespace facebook {
setMethodArgConversionSelector(@"openSelectDialog", 0, @"JS_NativeImagePickerIOS_SpecOpenSelectDialogConfig:");
methodMap_["clearAllPendingVideos"] = MethodMetadata {0, __hostFunction_NativeImagePickerIOSSpecJSI_clearAllPendingVideos};
methodMap_["removePendingVideo"] = MethodMetadata {1, __hostFunction_NativeImagePickerIOSSpecJSI_removePendingVideo};
}
@@ -1143,6 +1143,8 @@ namespace JS {
- (void)openSelectDialog:(JS::NativeImagePickerIOS::SpecOpenSelectDialogConfig &)config
successCallback:(RCTResponseSenderBlock)successCallback
cancelCallback:(RCTResponseSenderBlock)cancelCallback;
- (void)clearAllPendingVideos;
- (void)removePendingVideo:(NSString *)url;
@end
namespace facebook {
+20
View File
@@ -80,6 +80,26 @@ const ImagePickerIOS = {
cancelCallback,
);
},
/**
* In iOS 13, the video URLs returned by the Image Picker are invalidated when
* the picker is dismissed, unless reference to it is held. This API allows
* the application to signal when it's finished with the video so that the
* reference can be cleaned up.
* It is safe to call this method for urlsthat aren't video URLs;
* it will be a no-op.
*/
removePendingVideo: function(url: string): void {
invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
NativeImagePickerIOS.removePendingVideo(url);
},
/**
* WARNING: In most cases, removePendingVideo should be used instead because
* clearAllPendingVideos could clear out pending videos made by other callers.
*/
clearAllPendingVideos: function(): void {
invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
NativeImagePickerIOS.clearAllPendingVideos();
},
};
module.exports = ImagePickerIOS;
+2
View File
@@ -33,6 +33,8 @@ export interface Spec extends TurboModule {
successCallback: (imageURL: string, height: number, width: number) => void,
cancelCallback: () => void,
) => void;
+clearAllPendingVideos: () => void;
+removePendingVideo: (url: string) => void;
}
export default (TurboModuleRegistry.get<Spec>('ImagePickerIOS'): ?Spec);
+1
View File
@@ -6,6 +6,7 @@
*/
#import <React/RCTAnimatedImage.h>
#import <React/RCTDefines.h>
@interface RCTUIImageViewAnimated : UIImageView
+2 -2
View File
@@ -6,6 +6,7 @@
*/
#import <React/RCTUIImageViewAnimated.h>
#import <React/RCTWeakProxy.h>
#import <mach/mach.h>
#import <objc/runtime.h>
@@ -146,8 +147,7 @@ static NSUInteger RCTDeviceFreeMemory() {
- (CADisplayLink *)displayLink
{
if (!_displayLink) {
__weak __typeof(self) weakSelf = self;
_displayLink = [CADisplayLink displayLinkWithTarget:weakSelf selector:@selector(displayDidRefresh:)];
_displayLink = [CADisplayLink displayLinkWithTarget:[RCTWeakProxy weakProxyWithTarget:self] selector:@selector(displayDidRefresh:)];
NSString *runLoopMode = [NSProcessInfo processInfo].activeProcessorCount > 1 ? NSRunLoopCommonModes : NSDefaultRunLoopMode;
[_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:runLoopMode];
}
+25 -3
View File
@@ -12,8 +12,11 @@
const AppContainer = require('../ReactNative/AppContainer');
const I18nManager = require('../ReactNative/I18nManager');
const PropTypes = require('prop-types');
const NativeEventEmitter = require('../EventEmitter/NativeEventEmitter');
import NativeModalManager from './NativeModalManager';
const Platform = require('../Utilities/Platform');
const React = require('react');
const PropTypes = require('prop-types');
const ScrollView = require('../Components/ScrollView/ScrollView');
const StyleSheet = require('../StyleSheet/StyleSheet');
const View = require('../Components/View/View');
@@ -23,6 +26,12 @@ import type {DirectEventHandler} from '../Types/CodegenTypes';
import type {SyntheticEvent} from '../Types/CoreEventTypes';
import type EmitterSubscription from '../vendor/emitter/EmitterSubscription';
import RCTModalHostView from './RCTModalHostViewNativeComponent';
const ModalEventEmitter =
Platform.OS === 'ios' && NativeModalManager != null
? new NativeEventEmitter(NativeModalManager)
: null;
/**
* The Modal component is a simple way to present content above an enclosing view.
*
@@ -174,9 +183,22 @@ class Modal extends React.Component<Props> {
};
}
componentDidMount() {
if (ModalEventEmitter) {
this._eventSubscription = ModalEventEmitter.addListener(
'modalDismissed',
event => {
if (event.modalID === this._identifier && this.props.onDismiss) {
this.props.onDismiss();
}
},
);
}
}
componentWillUnmount() {
if (this.props.onDismiss != null) {
this.props.onDismiss();
if (this._eventSubscription) {
this._eventSubscription.remove();
}
}
@@ -79,6 +79,14 @@ type NativeProps = $ReadOnly<{|
*/
onShow?: ?DirectEventHandler<null>,
/**
* The `onDismiss` prop allows passing a function that will be called once
* the modal has been dismissed.
*
* See https://facebook.github.io/react-native/docs/modal.html#ondismiss
*/
onDismiss?: ?BubblingEventHandler<null>,
/**
* Deprecated. Use the `animationType` prop instead.
*/
@@ -6901,7 +6901,11 @@ function scheduleFibersWithFamiliesRecursively(
if (staleFamilies.has(family)) {
needsRemount = true;
} else if (updatedFamilies.has(family)) {
needsRender = true;
if (tag === ClassComponent) {
needsRemount = true;
} else {
needsRender = true;
}
}
}
}
@@ -11122,6 +11126,11 @@ function renderWithHooks(
do {
didScheduleRenderPhaseUpdate = false;
numberOfReRenders += 1;
{
// Even when hot reloading, allow dependencies to stabilize
// after first render to prevent infinite render phase updates.
ignorePreviousDependencies = false;
}
// Start over from the beginning of the list
nextCurrentHook = current !== null ? current.memoizedState : null;
@@ -17860,6 +17869,7 @@ function commitNestedUnmounts(root, renderPriorityLevel) {
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
// Cut off the return pointers to disconnect it from the tree. Ideally, we
// should clear the child pointer of the parent alternate to let this
// get GC:ed but we don't know which for sure which parent is the current
@@ -17870,13 +17880,13 @@ function detachFiber(current$$1) {
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
if (alternate !== null) {
alternate.return = null;
alternate.child = null;
alternate.memoizedState = null;
alternate.updateQueue = null;
alternate.dependencies = null;
detachFiber(alternate);
}
}
@@ -6897,7 +6897,11 @@ function scheduleFibersWithFamiliesRecursively(
if (staleFamilies.has(family)) {
needsRemount = true;
} else if (updatedFamilies.has(family)) {
needsRender = true;
if (tag === ClassComponent) {
needsRemount = true;
} else {
needsRender = true;
}
}
}
}
@@ -11118,6 +11122,11 @@ function renderWithHooks(
do {
didScheduleRenderPhaseUpdate = false;
numberOfReRenders += 1;
{
// Even when hot reloading, allow dependencies to stabilize
// after first render to prevent infinite render phase updates.
ignorePreviousDependencies = false;
}
// Start over from the beginning of the list
nextCurrentHook = current !== null ? current.memoizedState : null;
@@ -17856,6 +17865,7 @@ function commitNestedUnmounts(root, renderPriorityLevel) {
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
// Cut off the return pointers to disconnect it from the tree. Ideally, we
// should clear the child pointer of the parent alternate to let this
// get GC:ed but we don't know which for sure which parent is the current
@@ -17866,13 +17876,13 @@ function detachFiber(current$$1) {
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
if (alternate !== null) {
alternate.return = null;
alternate.child = null;
alternate.memoizedState = null;
alternate.updateQueue = null;
alternate.dependencies = null;
detachFiber(alternate);
}
}
@@ -5002,6 +5002,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo);
}
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
null !== alternate && detachFiber(alternate);
}
function commitWork(current$$1, finishedWork) {
switch (finishedWork.tag) {
case 0:
@@ -6239,18 +6253,7 @@ function commitRootImpl(root, renderPriorityLevel) {
snapshot.sibling.return = snapshot.return;
snapshot = snapshot.sibling;
}
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
(alternate.memoizedState = null),
(alternate.updateQueue = null),
(alternate.dependencies = null));
detachFiber(prevProps);
}
nextEffect = nextEffect.nextEffect;
}
@@ -6313,20 +6316,20 @@ function commitRootImpl(root, renderPriorityLevel) {
case 3:
var _updateQueue = current$$1$jscomp$0.updateQueue;
if (null !== _updateQueue) {
alternate = null;
current$$1 = null;
if (null !== current$$1$jscomp$0.child)
switch (current$$1$jscomp$0.child.tag) {
case 5:
alternate =
current$$1 =
current$$1$jscomp$0.child.stateNode.canonical;
break;
case 1:
alternate = current$$1$jscomp$0.child.stateNode;
current$$1 = current$$1$jscomp$0.child.stateNode;
}
commitUpdateQueue(
current$$1$jscomp$0,
_updateQueue,
alternate,
current$$1,
currentRef
);
}
@@ -5002,6 +5002,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo);
}
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
null !== alternate && detachFiber(alternate);
}
function commitWork(current$$1, finishedWork) {
switch (finishedWork.tag) {
case 0:
@@ -6239,18 +6253,7 @@ function commitRootImpl(root, renderPriorityLevel) {
snapshot.sibling.return = snapshot.return;
snapshot = snapshot.sibling;
}
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
(alternate.memoizedState = null),
(alternate.updateQueue = null),
(alternate.dependencies = null));
detachFiber(prevProps);
}
nextEffect = nextEffect.nextEffect;
}
@@ -6313,20 +6316,20 @@ function commitRootImpl(root, renderPriorityLevel) {
case 3:
var _updateQueue = current$$1$jscomp$0.updateQueue;
if (null !== _updateQueue) {
alternate = null;
current$$1 = null;
if (null !== current$$1$jscomp$0.child)
switch (current$$1$jscomp$0.child.tag) {
case 5:
alternate =
current$$1 =
current$$1$jscomp$0.child.stateNode.canonical;
break;
case 1:
alternate = current$$1$jscomp$0.child.stateNode;
current$$1 = current$$1$jscomp$0.child.stateNode;
}
commitUpdateQueue(
current$$1$jscomp$0,
_updateQueue,
alternate,
current$$1,
currentRef
);
}
@@ -5354,6 +5354,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo);
}
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
null !== alternate && detachFiber(alternate);
}
function commitWork(current$$1, finishedWork) {
switch (finishedWork.tag) {
case 0:
@@ -6345,18 +6359,7 @@ function commitRootImpl(root, renderPriorityLevel) {
snapshot.sibling.return = snapshot.return;
snapshot = snapshot.sibling;
}
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
(alternate.memoizedState = null),
(alternate.updateQueue = null),
(alternate.dependencies = null));
detachFiber(prevProps);
}
nextEffect = nextEffect.nextEffect;
}
@@ -6378,10 +6381,10 @@ function commitRootImpl(root, renderPriorityLevel) {
) {
var effectTag$jscomp$0 = nextEffect.effectTag;
if (effectTag$jscomp$0 & 36) {
current$$1 = effectTag;
prevProps = effectTag;
var current$$1$jscomp$1 = nextEffect.alternate;
currentRef = nextEffect;
alternate = current$$1$jscomp$0;
current$$1 = current$$1$jscomp$0;
switch (currentRef.tag) {
case 0:
case 11:
@@ -6413,26 +6416,26 @@ function commitRootImpl(root, renderPriorityLevel) {
currentRef,
updateQueue,
instance$jscomp$0,
alternate
current$$1
);
break;
case 3:
var _updateQueue = currentRef.updateQueue;
if (null !== _updateQueue) {
current$$1 = null;
prevProps = null;
if (null !== currentRef.child)
switch (currentRef.child.tag) {
case 5:
current$$1 = currentRef.child.stateNode.canonical;
prevProps = currentRef.child.stateNode.canonical;
break;
case 1:
current$$1 = currentRef.child.stateNode;
prevProps = currentRef.child.stateNode;
}
commitUpdateQueue(
currentRef,
_updateQueue,
current$$1,
alternate
prevProps,
current$$1
);
}
break;
@@ -6458,7 +6461,7 @@ function commitRootImpl(root, renderPriorityLevel) {
currentRef.treeBaseDuration,
currentRef.actualStartTime,
commitTime,
current$$1.memoizedInteractions
prevProps.memoizedInteractions
);
break;
case 13:
@@ -5354,6 +5354,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo);
}
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
null !== alternate && detachFiber(alternate);
}
function commitWork(current$$1, finishedWork) {
switch (finishedWork.tag) {
case 0:
@@ -6345,18 +6359,7 @@ function commitRootImpl(root, renderPriorityLevel) {
snapshot.sibling.return = snapshot.return;
snapshot = snapshot.sibling;
}
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
(alternate.memoizedState = null),
(alternate.updateQueue = null),
(alternate.dependencies = null));
detachFiber(prevProps);
}
nextEffect = nextEffect.nextEffect;
}
@@ -6378,10 +6381,10 @@ function commitRootImpl(root, renderPriorityLevel) {
) {
var effectTag$jscomp$0 = nextEffect.effectTag;
if (effectTag$jscomp$0 & 36) {
current$$1 = effectTag;
prevProps = effectTag;
var current$$1$jscomp$1 = nextEffect.alternate;
currentRef = nextEffect;
alternate = current$$1$jscomp$0;
current$$1 = current$$1$jscomp$0;
switch (currentRef.tag) {
case 0:
case 11:
@@ -6413,26 +6416,26 @@ function commitRootImpl(root, renderPriorityLevel) {
currentRef,
updateQueue,
instance$jscomp$0,
alternate
current$$1
);
break;
case 3:
var _updateQueue = currentRef.updateQueue;
if (null !== _updateQueue) {
current$$1 = null;
prevProps = null;
if (null !== currentRef.child)
switch (currentRef.child.tag) {
case 5:
current$$1 = currentRef.child.stateNode.canonical;
prevProps = currentRef.child.stateNode.canonical;
break;
case 1:
current$$1 = currentRef.child.stateNode;
prevProps = currentRef.child.stateNode;
}
commitUpdateQueue(
currentRef,
_updateQueue,
current$$1,
alternate
prevProps,
current$$1
);
}
break;
@@ -6458,7 +6461,7 @@ function commitRootImpl(root, renderPriorityLevel) {
currentRef.treeBaseDuration,
currentRef.actualStartTime,
commitTime,
current$$1.memoizedInteractions
prevProps.memoizedInteractions
);
break;
case 13:
@@ -6478,7 +6478,11 @@ function scheduleFibersWithFamiliesRecursively(
if (staleFamilies.has(family)) {
needsRemount = true;
} else if (updatedFamilies.has(family)) {
needsRender = true;
if (tag === ClassComponent) {
needsRemount = true;
} else {
needsRender = true;
}
}
}
}
@@ -10699,6 +10703,11 @@ function renderWithHooks(
do {
didScheduleRenderPhaseUpdate = false;
numberOfReRenders += 1;
{
// Even when hot reloading, allow dependencies to stabilize
// after first render to prevent infinite render phase updates.
ignorePreviousDependencies = false;
}
// Start over from the beginning of the list
nextCurrentHook = current !== null ? current.memoizedState : null;
@@ -17436,6 +17445,7 @@ function commitNestedUnmounts(root, renderPriorityLevel) {
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
// Cut off the return pointers to disconnect it from the tree. Ideally, we
// should clear the child pointer of the parent alternate to let this
// get GC:ed but we don't know which for sure which parent is the current
@@ -17446,13 +17456,13 @@ function detachFiber(current$$1) {
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
if (alternate !== null) {
alternate.return = null;
alternate.child = null;
alternate.memoizedState = null;
alternate.updateQueue = null;
alternate.dependencies = null;
detachFiber(alternate);
}
}
@@ -6474,7 +6474,11 @@ function scheduleFibersWithFamiliesRecursively(
if (staleFamilies.has(family)) {
needsRemount = true;
} else if (updatedFamilies.has(family)) {
needsRender = true;
if (tag === ClassComponent) {
needsRemount = true;
} else {
needsRender = true;
}
}
}
}
@@ -10695,6 +10699,11 @@ function renderWithHooks(
do {
didScheduleRenderPhaseUpdate = false;
numberOfReRenders += 1;
{
// Even when hot reloading, allow dependencies to stabilize
// after first render to prevent infinite render phase updates.
ignorePreviousDependencies = false;
}
// Start over from the beginning of the list
nextCurrentHook = current !== null ? current.memoizedState : null;
@@ -17432,6 +17441,7 @@ function commitNestedUnmounts(root, renderPriorityLevel) {
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
// Cut off the return pointers to disconnect it from the tree. Ideally, we
// should clear the child pointer of the parent alternate to let this
// get GC:ed but we don't know which for sure which parent is the current
@@ -17442,13 +17452,13 @@ function detachFiber(current$$1) {
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
if (alternate !== null) {
alternate.return = null;
alternate.child = null;
alternate.memoizedState = null;
alternate.updateQueue = null;
alternate.dependencies = null;
detachFiber(alternate);
}
}
@@ -4838,6 +4838,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel);
}
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
null !== alternate && detachFiber(alternate);
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
}
@@ -6418,20 +6432,9 @@ function commitRootImpl(root, renderPriorityLevel) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
prevProps = nextEffect;
unmountHostComponents(prevProps, current$$1);
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
(alternate.memoizedState = null),
(alternate.updateQueue = null),
(alternate.dependencies = null));
(prevProps = nextEffect),
unmountHostComponents(prevProps, current$$1),
detachFiber(prevProps);
}
nextEffect = nextEffect.nextEffect;
}
@@ -6494,19 +6497,19 @@ function commitRootImpl(root, renderPriorityLevel) {
case 3:
var _updateQueue = current$$1$jscomp$0.updateQueue;
if (null !== _updateQueue) {
alternate = null;
current$$1 = null;
if (null !== current$$1$jscomp$0.child)
switch (current$$1$jscomp$0.child.tag) {
case 5:
alternate = current$$1$jscomp$0.child.stateNode;
current$$1 = current$$1$jscomp$0.child.stateNode;
break;
case 1:
alternate = current$$1$jscomp$0.child.stateNode;
current$$1 = current$$1$jscomp$0.child.stateNode;
}
commitUpdateQueue(
current$$1$jscomp$0,
_updateQueue,
alternate,
current$$1,
currentRef
);
}
@@ -4838,6 +4838,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel);
}
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
null !== alternate && detachFiber(alternate);
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
}
@@ -6418,20 +6432,9 @@ function commitRootImpl(root, renderPriorityLevel) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
prevProps = nextEffect;
unmountHostComponents(prevProps, current$$1);
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
(alternate.memoizedState = null),
(alternate.updateQueue = null),
(alternate.dependencies = null));
(prevProps = nextEffect),
unmountHostComponents(prevProps, current$$1),
detachFiber(prevProps);
}
nextEffect = nextEffect.nextEffect;
}
@@ -6494,19 +6497,19 @@ function commitRootImpl(root, renderPriorityLevel) {
case 3:
var _updateQueue = current$$1$jscomp$0.updateQueue;
if (null !== _updateQueue) {
alternate = null;
current$$1 = null;
if (null !== current$$1$jscomp$0.child)
switch (current$$1$jscomp$0.child.tag) {
case 5:
alternate = current$$1$jscomp$0.child.stateNode;
current$$1 = current$$1$jscomp$0.child.stateNode;
break;
case 1:
alternate = current$$1$jscomp$0.child.stateNode;
current$$1 = current$$1$jscomp$0.child.stateNode;
}
commitUpdateQueue(
current$$1$jscomp$0,
_updateQueue,
alternate,
current$$1,
currentRef
);
}
@@ -5194,6 +5194,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel);
}
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
null !== alternate && detachFiber(alternate);
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
}
@@ -6517,20 +6531,9 @@ function commitRootImpl(root, renderPriorityLevel) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
prevProps = nextEffect;
unmountHostComponents(prevProps, current$$1);
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
(alternate.memoizedState = null),
(alternate.updateQueue = null),
(alternate.dependencies = null));
(prevProps = nextEffect),
unmountHostComponents(prevProps, current$$1),
detachFiber(prevProps);
}
nextEffect = nextEffect.nextEffect;
}
@@ -6552,10 +6555,10 @@ function commitRootImpl(root, renderPriorityLevel) {
) {
var effectTag$jscomp$0 = nextEffect.effectTag;
if (effectTag$jscomp$0 & 36) {
current$$1 = effectTag;
prevProps = effectTag;
var current$$1$jscomp$1 = nextEffect.alternate;
currentRef = nextEffect;
alternate = current$$1$jscomp$0;
current$$1 = current$$1$jscomp$0;
switch (currentRef.tag) {
case 0:
case 11:
@@ -6587,26 +6590,26 @@ function commitRootImpl(root, renderPriorityLevel) {
currentRef,
updateQueue,
instance$jscomp$0,
alternate
current$$1
);
break;
case 3:
var _updateQueue = currentRef.updateQueue;
if (null !== _updateQueue) {
current$$1 = null;
prevProps = null;
if (null !== currentRef.child)
switch (currentRef.child.tag) {
case 5:
current$$1 = currentRef.child.stateNode;
prevProps = currentRef.child.stateNode;
break;
case 1:
current$$1 = currentRef.child.stateNode;
prevProps = currentRef.child.stateNode;
}
commitUpdateQueue(
currentRef,
_updateQueue,
current$$1,
alternate
prevProps,
current$$1
);
}
break;
@@ -6626,7 +6629,7 @@ function commitRootImpl(root, renderPriorityLevel) {
currentRef.treeBaseDuration,
currentRef.actualStartTime,
commitTime,
current$$1.memoizedInteractions
prevProps.memoizedInteractions
);
break;
case 13:
@@ -5194,6 +5194,20 @@ function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel);
}
}
function detachFiber(current$$1) {
var alternate = current$$1.alternate;
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
current$$1.alternate = null;
current$$1.firstEffect = null;
current$$1.lastEffect = null;
current$$1.pendingProps = null;
current$$1.memoizedProps = null;
null !== alternate && detachFiber(alternate);
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
}
@@ -6517,20 +6531,9 @@ function commitRootImpl(root, renderPriorityLevel) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
prevProps = nextEffect;
unmountHostComponents(prevProps, current$$1);
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
(alternate.memoizedState = null),
(alternate.updateQueue = null),
(alternate.dependencies = null));
(prevProps = nextEffect),
unmountHostComponents(prevProps, current$$1),
detachFiber(prevProps);
}
nextEffect = nextEffect.nextEffect;
}
@@ -6552,10 +6555,10 @@ function commitRootImpl(root, renderPriorityLevel) {
) {
var effectTag$jscomp$0 = nextEffect.effectTag;
if (effectTag$jscomp$0 & 36) {
current$$1 = effectTag;
prevProps = effectTag;
var current$$1$jscomp$1 = nextEffect.alternate;
currentRef = nextEffect;
alternate = current$$1$jscomp$0;
current$$1 = current$$1$jscomp$0;
switch (currentRef.tag) {
case 0:
case 11:
@@ -6587,26 +6590,26 @@ function commitRootImpl(root, renderPriorityLevel) {
currentRef,
updateQueue,
instance$jscomp$0,
alternate
current$$1
);
break;
case 3:
var _updateQueue = currentRef.updateQueue;
if (null !== _updateQueue) {
current$$1 = null;
prevProps = null;
if (null !== currentRef.child)
switch (currentRef.child.tag) {
case 5:
current$$1 = currentRef.child.stateNode;
prevProps = currentRef.child.stateNode;
break;
case 1:
current$$1 = currentRef.child.stateNode;
prevProps = currentRef.child.stateNode;
}
commitUpdateQueue(
currentRef,
_updateQueue,
current$$1,
alternate
prevProps,
current$$1
);
}
break;
@@ -6626,7 +6629,7 @@ function commitRootImpl(root, renderPriorityLevel) {
currentRef.treeBaseDuration,
currentRef.actualStartTime,
commitTime,
current$$1.memoizedInteractions
prevProps.memoizedInteractions
);
break;
case 13:
@@ -13,11 +13,14 @@
const splitLayoutProps = require('../splitLayoutProps');
test('splits style objects', () => {
const style = {width: 10, margin: 20, padding: 30};
const style = {width: 10, margin: 20, padding: 30, transform: {scaleY: -1}};
const {outer, inner} = splitLayoutProps(style);
expect(outer).toMatchInlineSnapshot(`
Object {
"margin": 20,
"transform": Object {
"scaleY": -1,
},
"width": 10,
}
`);
+1
View File
@@ -36,6 +36,7 @@ const OUTER_PROPS = Object.assign(Object.create(null), {
right: true,
bottom: true,
top: true,
transform: true,
});
function splitLayoutProps(
+7
View File
@@ -177,6 +177,12 @@
- (NSAttributedString *)attributedTextWithMeasuredAttachmentsThatFitSize:(CGSize)size
{
static UIImage *placeholderImage;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
placeholderImage = [UIImage new];
});
NSMutableAttributedString *attributedText =
[[NSMutableAttributedString alloc] initWithAttributedString:[self attributedTextWithBaseTextAttributes:nil]];
@@ -195,6 +201,7 @@
maximumSize:size];
NSTextAttachment *attachment = [NSTextAttachment new];
attachment.bounds = (CGRect){CGPointZero, fittingSize};
attachment.image = placeholderImage;
[attributedText addAttribute:NSAttachmentAttributeName value:attachment range:range];
}
];
+10
View File
@@ -557,6 +557,11 @@ if (global.nativeLoggingHook) {
assert: consoleAssertPolyfill,
};
Object.defineProperty(console, '_isPolyfilled', {
value: true,
enumerable: false,
});
// If available, also call the original `console` method since that is
// sometimes useful. Ex: on OS X, this will let you see rich output in
// the Safari Web Inspector console.
@@ -608,4 +613,9 @@ if (global.nativeLoggingHook) {
debug: log,
table: log,
};
Object.defineProperty(console, '_isPolyfilled', {
value: true,
enumerable: false,
});
}
+196 -194
View File
@@ -1,14 +1,14 @@
PODS:
- boost-for-react-native (1.63.0)
- DoubleConversion (1.1.6)
- FBLazyVector (1000.0.0)
- FBReactNativeSpec (1000.0.0):
- FBLazyVector (0.61.3)
- FBReactNativeSpec (0.61.3):
- Folly (= 2018.10.22.00)
- RCTRequired (= 1000.0.0)
- RCTTypeSafety (= 1000.0.0)
- React-Core (= 1000.0.0)
- React-jsi (= 1000.0.0)
- ReactCommon/turbomodule/core (= 1000.0.0)
- RCTRequired (= 0.61.3)
- RCTTypeSafety (= 0.61.3)
- React-Core (= 0.61.3)
- React-jsi (= 0.61.3)
- ReactCommon/turbomodule/core (= 0.61.3)
- Folly (2018.10.22.00):
- boost-for-react-native
- DoubleConversion
@@ -19,234 +19,236 @@ PODS:
- DoubleConversion
- glog
- glog (0.3.5)
- RCTRequired (1000.0.0)
- RCTTypeSafety (1000.0.0):
- FBLazyVector (= 1000.0.0)
- RCTRequired (0.61.3)
- RCTTypeSafety (0.61.3):
- FBLazyVector (= 0.61.3)
- Folly (= 2018.10.22.00)
- RCTRequired (= 1000.0.0)
- React-Core (= 1000.0.0)
- React (1000.0.0):
- React-Core (= 1000.0.0)
- React-Core/DevSupport (= 1000.0.0)
- React-Core/RCTWebSocket (= 1000.0.0)
- React-RCTActionSheet (= 1000.0.0)
- React-RCTAnimation (= 1000.0.0)
- React-RCTBlob (= 1000.0.0)
- React-RCTImage (= 1000.0.0)
- React-RCTLinking (= 1000.0.0)
- React-RCTNetwork (= 1000.0.0)
- React-RCTSettings (= 1000.0.0)
- React-RCTText (= 1000.0.0)
- React-RCTVibration (= 1000.0.0)
- React-ART (1000.0.0):
- React-Core/ARTHeaders (= 1000.0.0)
- React-Core (1000.0.0):
- RCTRequired (= 0.61.3)
- React-Core (= 0.61.3)
- React (0.61.3):
- React-Core (= 0.61.3)
- React-Core/DevSupport (= 0.61.3)
- React-Core/RCTWebSocket (= 0.61.3)
- React-RCTActionSheet (= 0.61.3)
- React-RCTAnimation (= 0.61.3)
- React-RCTBlob (= 0.61.3)
- React-RCTImage (= 0.61.3)
- React-RCTLinking (= 0.61.3)
- React-RCTNetwork (= 0.61.3)
- React-RCTSettings (= 0.61.3)
- React-RCTText (= 0.61.3)
- React-RCTVibration (= 0.61.3)
- React-ART (0.61.3):
- React-Core/ARTHeaders (= 0.61.3)
- React-Core (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/ARTHeaders (1000.0.0):
- React-Core/Default (= 0.61.3)
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/ARTHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/CoreModulesHeaders (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/CoreModulesHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/Default (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/Default (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/DevSupport (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/DevSupport (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default (= 1000.0.0)
- React-Core/RCTWebSocket (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- React-jsinspector (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTActionSheetHeaders (1000.0.0):
- React-Core/Default (= 0.61.3)
- React-Core/RCTWebSocket (= 0.61.3)
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- React-jsinspector (= 0.61.3)
- Yoga
- React-Core/RCTActionSheetHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTAnimationHeaders (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/RCTAnimationHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTBlobHeaders (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/RCTBlobHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTImageHeaders (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/RCTImageHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTLinkingHeaders (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/RCTLinkingHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTNetworkHeaders (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/RCTNetworkHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTPushNotificationHeaders (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/RCTPushNotificationHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTSettingsHeaders (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/RCTSettingsHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTTextHeaders (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/RCTTextHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTVibrationHeaders (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/RCTVibrationHeaders (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-Core/RCTWebSocket (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-Core/RCTWebSocket (0.61.3):
- Folly (= 2018.10.22.00)
- glog
- React-Core/Default (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsiexecutor (= 1000.0.0)
- yoga (= 1000.0.0.React)
- React-CoreModules (1000.0.0):
- FBReactNativeSpec (= 1000.0.0)
- React-Core/Default (= 0.61.3)
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsiexecutor (= 0.61.3)
- Yoga
- React-CoreModules (0.61.3):
- FBReactNativeSpec (= 0.61.3)
- Folly (= 2018.10.22.00)
- React-Core/CoreModulesHeaders (= 1000.0.0)
- ReactCommon/turbomodule/core (= 1000.0.0)
- React-cxxreact (1000.0.0):
- RCTTypeSafety (= 0.61.3)
- React-Core/CoreModulesHeaders (= 0.61.3)
- React-RCTImage (= 0.61.3)
- ReactCommon/turbomodule/core (= 0.61.3)
- React-cxxreact (0.61.3):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-jsinspector (= 1000.0.0)
- React-jsi (1000.0.0):
- React-jsinspector (= 0.61.3)
- React-jsi (0.61.3):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-jsi/Default (= 1000.0.0)
- React-jsi/Default (1000.0.0):
- React-jsi/Default (= 0.61.3)
- React-jsi/Default (0.61.3):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-jsiexecutor (1000.0.0):
- React-jsiexecutor (0.61.3):
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-jsinspector (1000.0.0)
- React-RCTActionSheet (1000.0.0):
- React-Core/RCTActionSheetHeaders (= 1000.0.0)
- React-RCTAnimation (1000.0.0):
- React-Core/RCTAnimationHeaders (= 1000.0.0)
- React-RCTBlob (1000.0.0):
- React-Core/RCTBlobHeaders (= 1000.0.0)
- React-Core/RCTWebSocket (= 1000.0.0)
- React-jsi (= 1000.0.0)
- React-RCTNetwork (= 1000.0.0)
- React-RCTImage (1000.0.0):
- React-Core/RCTImageHeaders (= 1000.0.0)
- React-RCTNetwork (= 1000.0.0)
- React-RCTLinking (1000.0.0):
- React-Core/RCTLinkingHeaders (= 1000.0.0)
- React-RCTNetwork (1000.0.0):
- React-Core/RCTNetworkHeaders (= 1000.0.0)
- React-RCTPushNotification (1000.0.0):
- React-Core/RCTPushNotificationHeaders (= 1000.0.0)
- React-RCTSettings (1000.0.0):
- React-Core/RCTSettingsHeaders (= 1000.0.0)
- React-RCTTest (1000.0.0):
- React-Core (= 1000.0.0)
- React-RCTText (1000.0.0):
- React-Core/RCTTextHeaders (= 1000.0.0)
- React-RCTVibration (1000.0.0):
- React-Core/RCTVibrationHeaders (= 1000.0.0)
- ReactCommon/jscallinvoker (1000.0.0):
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- React-jsinspector (0.61.3)
- React-RCTActionSheet (0.61.3):
- React-Core/RCTActionSheetHeaders (= 0.61.3)
- React-RCTAnimation (0.61.3):
- React-Core/RCTAnimationHeaders (= 0.61.3)
- React-RCTBlob (0.61.3):
- React-Core/RCTBlobHeaders (= 0.61.3)
- React-Core/RCTWebSocket (= 0.61.3)
- React-jsi (= 0.61.3)
- React-RCTNetwork (= 0.61.3)
- React-RCTImage (0.61.3):
- React-Core/RCTImageHeaders (= 0.61.3)
- React-RCTNetwork (= 0.61.3)
- React-RCTLinking (0.61.3):
- React-Core/RCTLinkingHeaders (= 0.61.3)
- React-RCTNetwork (0.61.3):
- React-Core/RCTNetworkHeaders (= 0.61.3)
- React-RCTPushNotification (0.61.3):
- React-Core/RCTPushNotificationHeaders (= 0.61.3)
- React-RCTSettings (0.61.3):
- React-Core/RCTSettingsHeaders (= 0.61.3)
- React-RCTTest (0.61.3):
- React-Core (= 0.61.3)
- React-RCTText (0.61.3):
- React-Core/RCTTextHeaders (= 0.61.3)
- React-RCTVibration (0.61.3):
- React-Core/RCTVibrationHeaders (= 0.61.3)
- ReactCommon/jscallinvoker (0.61.3):
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-cxxreact (= 1000.0.0)
- ReactCommon/turbomodule/core (1000.0.0):
- React-cxxreact (= 0.61.3)
- ReactCommon/turbomodule/core (0.61.3):
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-Core (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- ReactCommon/jscallinvoker (= 1000.0.0)
- ReactCommon/turbomodule/samples (1000.0.0):
- React-Core (= 0.61.3)
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- ReactCommon/jscallinvoker (= 0.61.3)
- ReactCommon/turbomodule/samples (0.61.3):
- DoubleConversion
- Folly (= 2018.10.22.00)
- glog
- React-Core (= 1000.0.0)
- React-cxxreact (= 1000.0.0)
- React-jsi (= 1000.0.0)
- ReactCommon/jscallinvoker (= 1000.0.0)
- ReactCommon/turbomodule/core (= 1000.0.0)
- yoga (1000.0.0.React)
- React-Core (= 0.61.3)
- React-cxxreact (= 0.61.3)
- React-jsi (= 0.61.3)
- ReactCommon/jscallinvoker (= 0.61.3)
- ReactCommon/turbomodule/core (= 0.61.3)
- Yoga (1.14.0)
DEPENDENCIES:
- DoubleConversion (from `../third-party-podspecs/DoubleConversion.podspec`)
@@ -280,10 +282,10 @@ DEPENDENCIES:
- ReactCommon/jscallinvoker (from `../ReactCommon`)
- ReactCommon/turbomodule/core (from `../ReactCommon`)
- ReactCommon/turbomodule/samples (from `../ReactCommon`)
- yoga (from `../ReactCommon/yoga`)
- Yoga (from `../ReactCommon/yoga`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
https://github.com/CocoaPods/Specs.git:
- boost-for-react-native
EXTERNAL SOURCES:
@@ -341,40 +343,40 @@ EXTERNAL SOURCES:
:path: "../Libraries/Vibration"
ReactCommon:
:path: "../ReactCommon"
yoga:
Yoga:
:path: "../ReactCommon/yoga"
SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
FBLazyVector: 34431b7e61740bed29b082ff81500b0ffafaffa0
FBReactNativeSpec: e9febd2d5cc091662f172724165922b2e28d10a3
FBLazyVector: 5bc5b1606fc9a7ac6956de049f6e30901ed31c49
FBReactNativeSpec: f7be9bcc5ce259f7c39509f3f4caf59020d11d4c
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
RCTRequired: 33f3b89d2d82ef01c02b9b4f8146c43762e509d8
RCTTypeSafety: 2b1cb2d92b779aa9a3522f67bd4f07e6b6d0797e
React: 28a654b69575941571c073a656bc06795825e7f7
React-ART: a5da06a892342d03896e0db45a7072525981f63c
React-Core: 47b8ab211d9325292811e62ee23c54b464853111
React-CoreModules: 38d8cc34497674ae3d411e644a9b17ad75ef3f74
React-cxxreact: 7c4242192149ce0205b53efaa03e3bf86ba4337c
React-jsi: 98d1f9d8a79d2720ba6a44c2d928a77f315b7e4f
React-jsiexecutor: c0ab8c80a6e88380d63f583690a50d4a723b47b5
React-jsinspector: ea0a218071a11c3687cef2480580180caa6a64c0
React-RCTActionSheet: 090e7bd7c5774d919c47c4eeff78223a7fd8c19c
React-RCTAnimation: 73d536fff417a101724d9529189c95a94263710c
React-RCTBlob: 86017e0ba937b94445c5f680fef27ab831700fe7
React-RCTImage: 7f5c9bff34905f1bc216be512ba0ae68f872208a
React-RCTLinking: d7d7f792e63a8d57380cecbb9b7a3b31f92d1bb6
React-RCTNetwork: c8f9d40297f35ea3792ea81866f33e8b45c25935
React-RCTPushNotification: acffa8af6a20e6d41b041a8c4cb4bea0de9df0dd
React-RCTSettings: dd4009546ce88c3647c32f0b5922459ab313fdca
React-RCTTest: 73df09ec226fcad6e7e058a313e5dd16cccf86a8
React-RCTText: 9078167d3bc011162326f2d8ef4dd580ec1eca17
React-RCTVibration: 63c20d89204937ff8c7bbc1e712383347e6fbd90
ReactCommon: 63d1a6355d5810a21a61efda9ac93804571a1b8b
yoga: b72aa5b3708cc93c5897f8297122d6eba1331e07
RCTRequired: a72523286ea3381f97b28d87529c265baad3ad7d
RCTTypeSafety: e3cc0537400222250f0be37bd69f4b339d3c0a0f
React: 3dc877fc32548b0c7108ca7f301466f4956cbff8
React-ART: 55db015e460cb03665a5d016bc115d05f13a02c3
React-Core: ca94e2e7d22cdcc266a405c4d2ad5e5675145776
React-CoreModules: aa415458b5d7dacd10ac1b324d679f6e17cd8685
React-cxxreact: bac5da3d62ee98abd3c1bf7338a7cc6205da7f69
React-jsi: 8bcf5836caa8a759c135ab9ef97f3e023a7b94af
React-jsiexecutor: ae078e9df9c65bcdcf68f9a17656657932d95528
React-jsinspector: a8939cc6909607eb5e8a5ecfff7c6226984e174d
React-RCTActionSheet: 94671eef55b01a93be735605822ef712d5ea208e
React-RCTAnimation: 524ae33e73de9c0fe6501a7a4bda8e01d26499d9
React-RCTBlob: 5481c2db702f57207af7e7a9b32d90524b821b72
React-RCTImage: b472cc0606f8a7c1ac270d6ccc57123a09439a32
React-RCTLinking: 9cfc7bfdfda078489736695ac476de1f265b9f82
React-RCTNetwork: 967547e4eeac92e55d41573a82da7fff4003052a
React-RCTPushNotification: 52f31a4b90627015ee18914a1193293581e423f3
React-RCTSettings: 6ab7911172056b5077dacd9240f057eeeb1b121b
React-RCTTest: 21cec896e73ff22ef7e7cd0e0ad11bd11d5e07f0
React-RCTText: b8f895b94aa0e7778fef28d13f3d71eed4a10c3d
React-RCTVibration: 262588c97551b0b1c675468cda857466ba5af18f
ReactCommon: c2c63d9290b422ca6ad5b3663073a015dd892ae9
Yoga: 02036f6383c0008edb7ef0773a0e6beb6ce82bd1
PODFILE CHECKSUM: 060903e270072f1e192b064848e6c34528af1c87
COCOAPODS: 1.7.1
COCOAPODS: 1.8.1
+8 -6
View File
@@ -64,7 +64,6 @@ plugins {
*/
project.ext.react = [
cliPath: "$rootDir/cli.js",
bundleAssetName: "RNTesterApp.android.bundle",
entryFile: file("../../js/RNTesterApp.android.js"),
root: "$rootDir",
@@ -150,13 +149,16 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
packagingOptions {
pickFirst '**/armeabi-v7a/libc++_shared.so'
pickFirst '**/x86/libc++_shared.so'
pickFirst '**/arm64-v8a/libc++_shared.so'
pickFirst '**/x86_64/libc++_shared.so'
}
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libjsc.so'
pickFirst 'lib/arm64-v8a/libjsc.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
}
}
dependencies {
+1 -1
View File
@@ -96,6 +96,6 @@ Pod::Spec.new do |s|
s.dependency "React-cxxreact", version
s.dependency "React-jsi", version
s.dependency "React-jsiexecutor", version
s.dependency "yoga", "#{version}.React"
s.dependency "Yoga"
s.dependency "glog"
end
+6
View File
@@ -93,6 +93,12 @@ NSString *RCTBridgeModuleNameForClass(Class cls)
static BOOL turboModuleEnabled = NO;
BOOL RCTTurboModuleEnabled(void)
{
#if RCT_DEBUG
// TODO(T53341772): Allow TurboModule for test environment. Right now this breaks RNTester tests if enabled.
if (RCTRunningInTestEnvironment()) {
return NO;
}
#endif
return turboModuleEnabled;
}
+5 -5
View File
@@ -21,11 +21,11 @@ NSDictionary* RCTGetReactNativeVersion(void)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(0),
RCTVersionMinor: @(0),
RCTVersionPatch: @(0),
RCTVersionPrerelease: [NSNull null],
};
RCTVersionMajor: @(0),
RCTVersionMinor: @(61),
RCTVersionPatch: @(5),
RCTVersionPrerelease: [NSNull null],
};
});
return __rnVersion;
}
+16
View File
@@ -0,0 +1,16 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
@interface RCTWeakProxy : NSObject
@property (nonatomic, weak, readonly) id target;
+ (instancetype)weakProxyWithTarget:(id)target;
@end
+30
View File
@@ -0,0 +1,30 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "RCTWeakProxy.h"
@implementation RCTWeakProxy
- (instancetype)initWithTarget:(id)target
{
if (self = [super init]) {
_target = target;
}
return self;
}
+ (instancetype)weakProxyWithTarget:(id)target
{
return [[RCTWeakProxy alloc] initWithTarget:target];
}
- (id)forwardingTargetForSelector:(SEL)aSelector
{
return _target;
}
@end
@@ -39,6 +39,8 @@ Pod::Spec.new do |s|
}
s.dependency "FBReactNativeSpec", version
s.dependency "RCTTypeSafety", version
s.dependency "React-RCTImage", version
s.dependency "Folly", folly_version
s.dependency "React-Core/CoreModulesHeaders", version
s.dependency "ReactCommon/turbomodule/core", version
+64 -35
View File
@@ -14,17 +14,44 @@
#if !TARGET_OS_TV
@implementation RCTConvert (UIStatusBar)
RCT_ENUM_CONVERTER(UIStatusBarStyle, (@{
@"default": @(UIStatusBarStyleDefault),
@"light-content": @(UIStatusBarStyleLightContent),
@"dark-content": @(UIStatusBarStyleDefault),
}), UIStatusBarStyleDefault, integerValue);
+ (UIStatusBarStyle)UIStatusBarStyle:(id)json RCT_DYNAMIC
{
static NSDictionary *mapping;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
if (@available(iOS 13.0, *)) {
mapping = @{
@"default" : @(UIStatusBarStyleDefault),
@"light-content" : @(UIStatusBarStyleLightContent),
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
@"dark-content" : @(UIStatusBarStyleDarkContent)
#else
@"dark-content": @(UIStatusBarStyleDefault)
#endif
};
RCT_ENUM_CONVERTER(UIStatusBarAnimation, (@{
@"none": @(UIStatusBarAnimationNone),
@"fade": @(UIStatusBarAnimationFade),
@"slide": @(UIStatusBarAnimationSlide),
}), UIStatusBarAnimationNone, integerValue);
} else {
mapping = @{
@"default" : @(UIStatusBarStyleDefault),
@"light-content" : @(UIStatusBarStyleLightContent),
@"dark-content" : @(UIStatusBarStyleDefault)
};
}
});
return _RCT_CAST(
type, [RCTConvertEnumValue("UIStatusBarStyle", mapping, @(UIStatusBarStyleDefault), json) integerValue]);
}
RCT_ENUM_CONVERTER(
UIStatusBarAnimation,
(@{
@"none" : @(UIStatusBarAnimationNone),
@"fade" : @(UIStatusBarAnimationFade),
@"slide" : @(UIStatusBarAnimationSlide),
}),
UIStatusBarAnimationNone,
integerValue);
@end
#endif
@@ -36,8 +63,9 @@ static BOOL RCTViewControllerBasedStatusBarAppearance()
static BOOL value;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
value = [[[NSBundle mainBundle] objectForInfoDictionaryKey:
@"UIViewControllerBasedStatusBarAppearance"] ?: @YES boolValue];
value =
[[[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIViewControllerBasedStatusBarAppearance"]
?: @YES boolValue];
});
return value;
@@ -47,8 +75,7 @@ RCT_EXPORT_MODULE()
- (NSArray<NSString *> *)supportedEvents
{
return @[@"statusBarFrameDidChange",
@"statusBarFrameWillChange"];
return @[ @"statusBarFrameDidChange", @"statusBarFrameWillChange" ];
}
#if !TARGET_OS_TV
@@ -56,8 +83,14 @@ RCT_EXPORT_MODULE()
- (void)startObserving
{
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self selector:@selector(applicationDidChangeStatusBarFrame:) name:UIApplicationDidChangeStatusBarFrameNotification object:nil];
[nc addObserver:self selector:@selector(applicationWillChangeStatusBarFrame:) name:UIApplicationWillChangeStatusBarFrameNotification object:nil];
[nc addObserver:self
selector:@selector(applicationDidChangeStatusBarFrame:)
name:UIApplicationDidChangeStatusBarFrameNotification
object:nil];
[nc addObserver:self
selector:@selector(applicationWillChangeStatusBarFrame:)
name:UIApplicationWillChangeStatusBarFrameNotification
object:nil];
}
- (void)stopObserving
@@ -74,11 +107,11 @@ RCT_EXPORT_MODULE()
{
CGRect frame = [notification.userInfo[UIApplicationStatusBarFrameUserInfoKey] CGRectValue];
NSDictionary *event = @{
@"frame": @{
@"x": @(frame.origin.x),
@"y": @(frame.origin.y),
@"width": @(frame.size.width),
@"height": @(frame.size.height),
@"frame" : @{
@"x" : @(frame.origin.x),
@"y" : @(frame.origin.y),
@"width" : @(frame.size.width),
@"height" : @(frame.size.height),
},
};
[self sendEventWithName:eventName body:event];
@@ -94,15 +127,14 @@ RCT_EXPORT_MODULE()
[self emitEvent:@"statusBarFrameWillChange" forNotification:notification];
}
RCT_EXPORT_METHOD(getHeight:(RCTResponseSenderBlock)callback)
RCT_EXPORT_METHOD(getHeight : (RCTResponseSenderBlock)callback)
{
callback(@[@{
@"height": @(RCTSharedApplication().statusBarFrame.size.height),
}]);
callback(@[ @{
@"height" : @(RCTSharedApplication().statusBarFrame.size.height),
} ]);
}
RCT_EXPORT_METHOD(setStyle:(UIStatusBarStyle)statusBarStyle
animated:(BOOL)animated)
RCT_EXPORT_METHOD(setStyle : (UIStatusBarStyle)statusBarStyle animated : (BOOL)animated)
{
if (RCTViewControllerBasedStatusBarAppearance()) {
RCTLogError(@"RCTStatusBarManager module requires that the \
@@ -110,14 +142,12 @@ RCT_EXPORT_METHOD(setStyle:(UIStatusBarStyle)statusBarStyle
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[RCTSharedApplication() setStatusBarStyle:statusBarStyle
animated:animated];
[RCTSharedApplication() setStatusBarStyle:statusBarStyle animated:animated];
}
#pragma clang diagnostic pop
}
RCT_EXPORT_METHOD(setHidden:(BOOL)hidden
withAnimation:(UIStatusBarAnimation)animation)
RCT_EXPORT_METHOD(setHidden : (BOOL)hidden withAnimation : (UIStatusBarAnimation)animation)
{
if (RCTViewControllerBasedStatusBarAppearance()) {
RCTLogError(@"RCTStatusBarManager module requires that the \
@@ -125,17 +155,16 @@ RCT_EXPORT_METHOD(setHidden:(BOOL)hidden
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[RCTSharedApplication() setStatusBarHidden:hidden
withAnimation:animation];
[RCTSharedApplication() setStatusBarHidden:hidden withAnimation:animation];
#pragma clang diagnostic pop
}
}
RCT_EXPORT_METHOD(setNetworkActivityIndicatorVisible:(BOOL)visible)
RCT_EXPORT_METHOD(setNetworkActivityIndicatorVisible : (BOOL)visible)
{
RCTSharedApplication().networkActivityIndicatorVisible = visible;
}
#endif //TARGET_OS_TV
#endif // TARGET_OS_TV
@end
-30
View File
@@ -97,7 +97,6 @@ static const NSTimeInterval kIdleCallbackFrameDeadline = 0.001;
NSTimer *_sleepTimer;
BOOL _sendIdleEvents;
BOOL _inBackground;
UIBackgroundTaskIdentifier _backgroundTaskIdentifier;
}
@synthesize bridge = _bridge;
@@ -113,7 +112,6 @@ RCT_EXPORT_MODULE()
_paused = YES;
_timers = [NSMutableDictionary new];
_inBackground = NO;
_backgroundTaskIdentifier = UIBackgroundTaskInvalid;
for (NSString *name in @[UIApplicationWillResignActiveNotification,
UIApplicationDidEnterBackgroundNotification,
@@ -137,35 +135,10 @@ RCT_EXPORT_MODULE()
- (void)dealloc
{
[self markEndOfBackgroundTaskIfNeeded];
[_sleepTimer invalidate];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)markStartOfBackgroundTaskIfNeeded
{
if (_backgroundTaskIdentifier == UIBackgroundTaskInvalid) {
__weak typeof(self) weakSelf = self;
// Marks the beginning of a new long-running background task. We can run the timer in the background.
_backgroundTaskIdentifier = [[UIApplication sharedApplication] beginBackgroundTaskWithName:@"rct.timing.gb.task" expirationHandler:^{
typeof(self) strongSelf = weakSelf;
if (!strongSelf) {
return;
}
// Mark the end of background task
[strongSelf markEndOfBackgroundTaskIfNeeded];
}];
}
}
- (void)markEndOfBackgroundTaskIfNeeded
{
if (_backgroundTaskIdentifier != UIBackgroundTaskInvalid) {
[[UIApplication sharedApplication] endBackgroundTask:_backgroundTaskIdentifier];
_backgroundTaskIdentifier = UIBackgroundTaskInvalid;
}
}
- (dispatch_queue_t)methodQueue
{
return RCTJSThread;
@@ -190,7 +163,6 @@ RCT_EXPORT_MODULE()
- (void)appDidMoveToForeground
{
[self markEndOfBackgroundTaskIfNeeded];
_inBackground = NO;
[self startTimers];
}
@@ -288,7 +260,6 @@ RCT_EXPORT_MODULE()
}
if (_inBackground) {
if (timerCount) {
[self markStartOfBackgroundTaskIfNeeded];
[self scheduleSleepTimer:nextScheduledTarget];
}
} else if (!_sendIdleEvents && timersToCall.count == 0) {
@@ -367,7 +338,6 @@ RCT_EXPORT_METHOD(createTimer:(nonnull NSNumber *)callbackID
}
if (_inBackground) {
[self markStartOfBackgroundTaskIfNeeded];
[self scheduleSleepTimer:timer.target];
} else if (_paused) {
if ([timer.target timeIntervalSinceNow] > kMinimumSleepInterval) {
+8 -2
View File
@@ -10,6 +10,7 @@
#import "RCTBridge.h"
#import "RCTModalHostView.h"
#import "RCTModalHostViewController.h"
#import "RCTModalManager.h"
#import "RCTShadowView.h"
#import "RCTUtils.h"
@@ -80,10 +81,15 @@ RCT_EXPORT_MODULE()
- (void)dismissModalHostView:(RCTModalHostView *)modalHostView withViewController:(RCTModalHostViewController *)viewController animated:(BOOL)animated
{
dispatch_block_t completionBlock = ^{
if (modalHostView.identifier) {
[[self.bridge moduleForClass:[RCTModalManager class]] modalDismissed:modalHostView.identifier];
}
};
if (_dismissalBlock) {
_dismissalBlock([modalHostView reactViewController], viewController, animated, nil);
_dismissalBlock([modalHostView reactViewController], viewController, animated, completionBlock);
} else {
[viewController.presentingViewController dismissViewControllerAnimated:animated completion:nil];
[viewController.presentingViewController dismissViewControllerAnimated:animated completion:completionBlock];
}
}
+17
View File
@@ -0,0 +1,17 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
@interface RCTModalManager : RCTEventEmitter <RCTBridgeModule>
- (void)modalDismissed:(NSNumber *)modalID;
@end
+42
View File
@@ -0,0 +1,42 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "RCTModalManager.h"
@interface RCTModalManager ()
@property BOOL shouldEmit;
@end
@implementation RCTModalManager
RCT_EXPORT_MODULE();
- (NSArray<NSString *> *)supportedEvents
{
return @[ @"modalDismissed" ];
}
- (void)startObserving
{
_shouldEmit = YES;
}
- (void)stopObserving
{
_shouldEmit = NO;
}
- (void)modalDismissed:(NSNumber *)modalID
{
if (_shouldEmit) {
[self sendEventWithName:@"modalDismissed" body:@{ @"modalID": modalID }];
}
}
@end
+1 -1
View File
@@ -256,6 +256,7 @@ def getNdkBuildFullPath() {
task buildReactNdkLib(dependsOn: [prepareJSC, prepareHermes, prepareBoost, prepareDoubleConversion, prepareFolly, prepareGlog], type: Exec) {
inputs.dir("$projectDir/../ReactCommon")
inputs.dir("src/main/jni")
inputs.dir("src/main/java/com/facebook/react/modules/blob")
outputs.dir("$buildDir/react-ndk/all")
commandLine(getNdkBuildFullPath(),
"NDK_DEBUG=" + (nativeBuildType.equalsIgnoreCase("debug") ? "1" : "0"),
@@ -356,7 +357,6 @@ android {
dependencies {
api("com.facebook.infer.annotation:infer-annotation:0.11.2")
api("com.facebook.yoga:proguard-annotations:1.14.1")
api("javax.inject:javax.inject:1")
api("androidx.appcompat:appcompat:1.0.2")
api("com.facebook.fresco:fresco:${FRESCO_VERSION}")
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-master
VERSION_NAME=0.61.5
GROUP=com.facebook.react
POM_NAME=ReactNative
@@ -0,0 +1,22 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.facebook.proguard.annotations;
import static java.lang.annotation.RetentionPolicy.CLASS;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Add this annotation to a class, method, or field to instruct Proguard to not strip it out.
*
* <p>This is useful for methods called via reflection that could appear as unused to Proguard.
*/
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
@Retention(CLASS)
public @interface DoNotStrip {}
@@ -52,7 +52,8 @@ public class NativeModuleRegistryBuilder {
+ name
+ " tried to override "
+ existingNativeModule.getClassName()
+ ". Check the getPackages() method in MainApplication.java, it might be that module is being created twice. If this was your intention, set canOverrideExistingModule=true");
+ ". Check the getPackages() method in MainApplication.java, it might be that module is being created twice. If this was your intention, set canOverrideExistingModule=true. "
+ "This error may also be present if the package is present only once in getPackages() but is also automatically added later during build time by autolinking. Try removing the existing entry and rebuild.");
}
mModules.remove(existingNativeModule);
}
@@ -47,7 +47,7 @@ public class ReactActivityDelegate {
}
protected ReactRootView createRootView() {
return mReactDelegate.createRootView();
return new ReactRootView(getContext());
}
/**
@@ -73,7 +73,12 @@ public class ReactActivityDelegate {
String mainComponentName = getMainComponentName();
mReactDelegate =
new ReactDelegate(
getPlainActivity(), getReactNativeHost(), mainComponentName, getLaunchOptions());
getPlainActivity(), getReactNativeHost(), mainComponentName, getLaunchOptions()) {
@Override
protected ReactRootView createRootView() {
return ReactActivityDelegate.this.createRootView();
}
};
if (mMainComponentName != null) {
loadApp(mainComponentName);
}
@@ -16,6 +16,7 @@ rn_android_library(
],
deps = [
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("libraries/soloader/java/com/facebook/soloader:soloader"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_dep("third-party/java/okhttp:okhttp3"),
@@ -24,6 +25,7 @@ rn_android_library(
react_native_target("java/com/facebook/react/bridge:bridge"),
react_native_target("java/com/facebook/react/common:common"),
react_native_target("java/com/facebook/react/module/annotations:annotations"),
react_native_target("java/com/facebook/react/modules/blob/jni:jni"),
react_native_target("java/com/facebook/react/modules/network:network"),
react_native_target("java/com/facebook/react/modules/websocket:websocket"),
],
@@ -0,0 +1,27 @@
package com.facebook.react.modules.blob;
import com.facebook.react.bridge.JavaScriptContextHolder;
import com.facebook.react.bridge.ReactContext;
import com.facebook.soloader.SoLoader;
/* package */ class BlobCollector {
static {
SoLoader.loadLibrary("reactnativeblob");
}
static void install(final ReactContext reactContext, final BlobModule blobModule) {
reactContext.runOnJSQueueThread(
new Runnable() {
@Override
public void run() {
JavaScriptContextHolder jsContext = reactContext.getJavaScriptContextHolder();
// When debugging in chrome the JS context is not available.
if (jsContext.get() != 0) {
nativeInstall(blobModule, jsContext.get());
}
}
});
}
private static native void nativeInstall(Object blobModule, long jsContext);
}
@@ -12,6 +12,7 @@ import android.net.Uri;
import android.provider.MediaStore;
import android.webkit.MimeTypeMap;
import androidx.annotation.Nullable;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
@@ -143,6 +144,11 @@ public class BlobModule extends ReactContextBaseJavaModule {
super(reactContext);
}
@Override
public void initialize() {
BlobCollector.install(getReactApplicationContext(), this);
}
@Override
public String getName() {
return NAME;
@@ -170,11 +176,16 @@ public class BlobModule extends ReactContextBaseJavaModule {
}
public void store(byte[] data, String blobId) {
mBlobs.put(blobId, data);
synchronized (mBlobs) {
mBlobs.put(blobId, data);
}
}
@DoNotStrip
public void remove(String blobId) {
mBlobs.remove(blobId);
synchronized (mBlobs) {
mBlobs.remove(blobId);
}
}
public @Nullable byte[] resolve(Uri uri) {
@@ -193,17 +204,19 @@ public class BlobModule extends ReactContextBaseJavaModule {
}
public @Nullable byte[] resolve(String blobId, int offset, int size) {
byte[] data = mBlobs.get(blobId);
if (data == null) {
return null;
synchronized (mBlobs) {
byte[] data = mBlobs.get(blobId);
if (data == null) {
return null;
}
if (size == -1) {
size = data.length - offset;
}
if (offset > 0 || size != data.length) {
data = Arrays.copyOfRange(data, offset, offset + size);
}
return data;
}
if (size == -1) {
size = data.length - offset;
}
if (offset > 0 || size != data.length) {
data = Arrays.copyOfRange(data, offset, offset + size);
}
return data;
}
public @Nullable byte[] resolve(ReadableMap blob) {
@@ -0,0 +1,21 @@
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := reactnativeblob
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_CFLAGS += -fvisibility=hidden -fexceptions -frtti
LOCAL_STATIC_LIBRARIES := libjsi libjsireact
LOCAL_SHARED_LIBRARIES := libfolly_json libfb libreactnativejni
include $(BUILD_SHARED_LIBRARY)
@@ -0,0 +1,22 @@
load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "FBJNI_TARGET", "react_native_target", "react_native_xplat_dep", "rn_xplat_cxx_library")
rn_xplat_cxx_library(
name = "jni",
srcs = glob(["*.cpp"]),
headers = glob(["*.h"]),
header_namespace = "",
compiler_flags = [
"-fexceptions",
"-frtti",
"-std=c++14",
"-Wall",
],
platforms = ANDROID,
soname = "libreactnativeblob.$(ext)",
visibility = ["PUBLIC"],
deps = [
react_native_target("jni/react/jni:jni"),
FBJNI_TARGET,
react_native_xplat_dep("jsi:jsi"),
],
)
@@ -0,0 +1,63 @@
// Copyright 2004-present Facebook. All Rights Reserved.
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#include "BlobCollector.h"
#include <fb/fbjni.h>
#include <memory>
#include <mutex>
using namespace facebook;
namespace facebook {
namespace react {
static constexpr auto kBlobModuleJavaDescriptor =
"com/facebook/react/modules/blob/BlobModule";
BlobCollector::BlobCollector(
jni::global_ref<jobject> blobModule,
const std::string &blobId)
: blobModule_(blobModule), blobId_(blobId) {}
BlobCollector::~BlobCollector() {
jni::ThreadScope::WithClassLoader([&] {
static auto removeMethod = jni::findClassStatic(kBlobModuleJavaDescriptor)
->getMethod<void(jstring)>("remove");
removeMethod(blobModule_, jni::make_jstring(blobId_).get());
});
}
void BlobCollector::nativeInstall(
jni::alias_ref<jhybridobject> jThis,
jni::alias_ref<jobject> blobModule,
jlong jsContextNativePointer) {
auto &runtime = *((jsi::Runtime *) jsContextNativePointer);
auto blobModuleRef = jni::make_global(blobModule);
runtime.global().setProperty(
runtime,
"__blobCollectorProvider",
jsi::Function::createFromHostFunction(
runtime,
jsi::PropNameID::forAscii(runtime, "__blobCollectorProvider"),
1,
[blobModuleRef](
jsi::Runtime &rt,
const jsi::Value &thisVal,
const jsi::Value *args,
size_t count) {
auto blobId = args[0].asString(rt).utf8(rt);
auto blobCollector =
std::make_shared<BlobCollector>(blobModuleRef, blobId);
return jsi::Object::createFromHostObject(rt, blobCollector);
}));
}
void BlobCollector::registerNatives() {
registerHybrid(
{makeNativeMethod("nativeInstall", BlobCollector::nativeInstall)});
}
} // namespace react
} // namespace facebook
@@ -0,0 +1,39 @@
// Copyright 2004-present Facebook. All Rights Reserved.
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#pragma once
#include <fb/fbjni.h>
#include <jsi/jsi.h>
namespace facebook {
namespace react {
class BlobCollector : public jni::HybridClass<BlobCollector>,
public jsi::HostObject {
public:
BlobCollector(
jni::global_ref<jobject> blobManager,
const std::string &blobId);
~BlobCollector();
static constexpr auto kJavaDescriptor =
"Lcom/facebook/react/modules/blob/BlobCollector;";
static void nativeInstall(
jni::alias_ref<jhybridobject> jThis,
jni::alias_ref<jobject> blobModule,
jlong jsContextNativePointer);
static void registerNatives();
private:
friend HybridBase;
jni::global_ref<jobject> blobModule_;
const std::string blobId_;
};
} // namespace react
} // namespace facebook
@@ -0,0 +1,13 @@
// Copyright 2004-present Facebook. All Rights Reserved.
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#include <fb/fbjni.h>
#include "BlobCollector.h"
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
return facebook::jni::initialize(
vm, [] { facebook::react::BlobCollector::registerNatives(); });
}
@@ -7,6 +7,7 @@
package com.facebook.react.modules.network;
import android.net.Uri;
import android.os.Bundle;
import android.util.Base64;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
@@ -625,18 +626,18 @@ public final class NetworkingModule extends ReactContextBaseJavaModule {
}
private static WritableMap translateHeaders(Headers headers) {
WritableMap responseHeaders = Arguments.createMap();
Bundle responseHeaders = new Bundle();
for (int i = 0; i < headers.size(); i++) {
String headerName = headers.name(i);
// multiple values for the same header
if (responseHeaders.hasKey(headerName)) {
if (responseHeaders.containsKey(headerName)) {
responseHeaders.putString(
headerName, responseHeaders.getString(headerName) + ", " + headers.value(i));
} else {
responseHeaders.putString(headerName, headers.value(i));
}
}
return responseHeaders;
return Arguments.fromBundle(responseHeaders);
}
@ReactMethod
@@ -16,7 +16,7 @@ import java.util.Map;
public class ReactNativeVersion {
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
"major", 0,
"minor", 0,
"patch", 0,
"minor", 61,
"patch", 5,
"prerelease", null);
}
@@ -9,6 +9,8 @@ package com.facebook.react.views.view;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.os.Build;
@@ -28,8 +30,7 @@ public class ReactDrawableHelper {
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public static Drawable createDrawableFromJSDescription(
ReactViewGroup view, ReadableMap drawableDescriptionDict) {
Context context = view.getContext();
Context context, ReadableMap drawableDescriptionDict) {
String type = drawableDescriptionDict.getString("type");
if ("ThemeAttrAndroid".equals(type)) {
String attr = drawableDescriptionDict.getString("attribute");
@@ -74,7 +75,7 @@ public class ReactDrawableHelper {
if (!drawableDescriptionDict.hasKey("borderless")
|| drawableDescriptionDict.isNull("borderless")
|| !drawableDescriptionDict.getBoolean("borderless")) {
mask = view.getBorderRadiusMask();
mask = new ColorDrawable(Color.WHITE);
}
ColorStateList colorStateList =
new ColorStateList(new int[][] {new int[] {}}, new int[] {color});
@@ -18,15 +18,12 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RoundRectShape;
import android.os.Build;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStructure;
import android.view.animation.Animation;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.infer.annotation.Assertions;
@@ -289,31 +286,6 @@ public class ReactViewGroup extends ViewGroup
getOrCreateReactViewBackground().setBorderStyle(style);
}
@NonNull
public Drawable getBorderRadiusMask() {
final float[] outerRadii;
if (mReactBackgroundDrawable == null) {
outerRadii = null;
} else {
final float[] borderRadii = getBorderRadii(mReactBackgroundDrawable);
outerRadii =
new float[] {
borderRadii[0],
borderRadii[0],
borderRadii[1],
borderRadii[1],
borderRadii[2],
borderRadii[2],
borderRadii[3],
borderRadii[3]
};
}
final ShapeDrawable shapeDrawable =
new ShapeDrawable(new RoundRectShape(outerRadii, null, null));
shapeDrawable.getPaint().setColor(Color.WHITE);
return shapeDrawable;
}
@Override
public void setRemoveClippedSubviews(boolean removeClippedSubviews) {
if (removeClippedSubviews == mRemoveClippedSubviews) {
@@ -760,11 +732,92 @@ public class ReactViewGroup extends ViewGroup
bottom -= borderWidth.bottom;
}
final float borderRadii[] = getBorderRadii(mReactBackgroundDrawable);
final float topLeftBorderRadius = borderRadii[0];
final float topRightBorderRadius = borderRadii[1];
final float bottomRightBorderRadius = borderRadii[2];
final float bottomLeftBorderRadius = borderRadii[3];
final float borderRadius = mReactBackgroundDrawable.getFullBorderRadius();
float topLeftBorderRadius =
mReactBackgroundDrawable.getBorderRadiusOrDefaultTo(
borderRadius, ReactViewBackgroundDrawable.BorderRadiusLocation.TOP_LEFT);
float topRightBorderRadius =
mReactBackgroundDrawable.getBorderRadiusOrDefaultTo(
borderRadius, ReactViewBackgroundDrawable.BorderRadiusLocation.TOP_RIGHT);
float bottomLeftBorderRadius =
mReactBackgroundDrawable.getBorderRadiusOrDefaultTo(
borderRadius, ReactViewBackgroundDrawable.BorderRadiusLocation.BOTTOM_LEFT);
float bottomRightBorderRadius =
mReactBackgroundDrawable.getBorderRadiusOrDefaultTo(
borderRadius, ReactViewBackgroundDrawable.BorderRadiusLocation.BOTTOM_RIGHT);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
final boolean isRTL = mLayoutDirection == View.LAYOUT_DIRECTION_RTL;
float topStartBorderRadius =
mReactBackgroundDrawable.getBorderRadius(
ReactViewBackgroundDrawable.BorderRadiusLocation.TOP_START);
float topEndBorderRadius =
mReactBackgroundDrawable.getBorderRadius(
ReactViewBackgroundDrawable.BorderRadiusLocation.TOP_END);
float bottomStartBorderRadius =
mReactBackgroundDrawable.getBorderRadius(
ReactViewBackgroundDrawable.BorderRadiusLocation.BOTTOM_START);
float bottomEndBorderRadius =
mReactBackgroundDrawable.getBorderRadius(
ReactViewBackgroundDrawable.BorderRadiusLocation.BOTTOM_END);
if (I18nUtil.getInstance().doLeftAndRightSwapInRTL(getContext())) {
if (YogaConstants.isUndefined(topStartBorderRadius)) {
topStartBorderRadius = topLeftBorderRadius;
}
if (YogaConstants.isUndefined(topEndBorderRadius)) {
topEndBorderRadius = topRightBorderRadius;
}
if (YogaConstants.isUndefined(bottomStartBorderRadius)) {
bottomStartBorderRadius = bottomLeftBorderRadius;
}
if (YogaConstants.isUndefined(bottomEndBorderRadius)) {
bottomEndBorderRadius = bottomRightBorderRadius;
}
final float directionAwareTopLeftRadius =
isRTL ? topEndBorderRadius : topStartBorderRadius;
final float directionAwareTopRightRadius =
isRTL ? topStartBorderRadius : topEndBorderRadius;
final float directionAwareBottomLeftRadius =
isRTL ? bottomEndBorderRadius : bottomStartBorderRadius;
final float directionAwareBottomRightRadius =
isRTL ? bottomStartBorderRadius : bottomEndBorderRadius;
topLeftBorderRadius = directionAwareTopLeftRadius;
topRightBorderRadius = directionAwareTopRightRadius;
bottomLeftBorderRadius = directionAwareBottomLeftRadius;
bottomRightBorderRadius = directionAwareBottomRightRadius;
} else {
final float directionAwareTopLeftRadius =
isRTL ? topEndBorderRadius : topStartBorderRadius;
final float directionAwareTopRightRadius =
isRTL ? topStartBorderRadius : topEndBorderRadius;
final float directionAwareBottomLeftRadius =
isRTL ? bottomEndBorderRadius : bottomStartBorderRadius;
final float directionAwareBottomRightRadius =
isRTL ? bottomStartBorderRadius : bottomEndBorderRadius;
if (!YogaConstants.isUndefined(directionAwareTopLeftRadius)) {
topLeftBorderRadius = directionAwareTopLeftRadius;
}
if (!YogaConstants.isUndefined(directionAwareTopRightRadius)) {
topRightBorderRadius = directionAwareTopRightRadius;
}
if (!YogaConstants.isUndefined(directionAwareBottomLeftRadius)) {
bottomLeftBorderRadius = directionAwareBottomLeftRadius;
}
if (!YogaConstants.isUndefined(directionAwareBottomRightRadius)) {
bottomRightBorderRadius = directionAwareBottomRightRadius;
}
}
}
if (topLeftBorderRadius > 0
|| topRightBorderRadius > 0
@@ -803,97 +856,6 @@ public class ReactViewGroup extends ViewGroup
}
}
@NonNull
private float[] getBorderRadii(@NonNull ReactViewBackgroundDrawable backgroundDrawable) {
final float borderRadius = backgroundDrawable.getFullBorderRadius();
float topLeftBorderRadius =
backgroundDrawable.getBorderRadiusOrDefaultTo(
borderRadius, ReactViewBackgroundDrawable.BorderRadiusLocation.TOP_LEFT);
float topRightBorderRadius =
backgroundDrawable.getBorderRadiusOrDefaultTo(
borderRadius, ReactViewBackgroundDrawable.BorderRadiusLocation.TOP_RIGHT);
float bottomLeftBorderRadius =
backgroundDrawable.getBorderRadiusOrDefaultTo(
borderRadius, ReactViewBackgroundDrawable.BorderRadiusLocation.BOTTOM_LEFT);
float bottomRightBorderRadius =
backgroundDrawable.getBorderRadiusOrDefaultTo(
borderRadius, ReactViewBackgroundDrawable.BorderRadiusLocation.BOTTOM_RIGHT);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
final boolean isRTL = mLayoutDirection == View.LAYOUT_DIRECTION_RTL;
float topStartBorderRadius =
backgroundDrawable.getBorderRadius(
ReactViewBackgroundDrawable.BorderRadiusLocation.TOP_START);
float topEndBorderRadius =
backgroundDrawable.getBorderRadius(
ReactViewBackgroundDrawable.BorderRadiusLocation.TOP_END);
float bottomStartBorderRadius =
backgroundDrawable.getBorderRadius(
ReactViewBackgroundDrawable.BorderRadiusLocation.BOTTOM_START);
float bottomEndBorderRadius =
backgroundDrawable.getBorderRadius(
ReactViewBackgroundDrawable.BorderRadiusLocation.BOTTOM_END);
if (I18nUtil.getInstance().doLeftAndRightSwapInRTL(getContext())) {
if (YogaConstants.isUndefined(topStartBorderRadius)) {
topStartBorderRadius = topLeftBorderRadius;
}
if (YogaConstants.isUndefined(topEndBorderRadius)) {
topEndBorderRadius = topRightBorderRadius;
}
if (YogaConstants.isUndefined(bottomStartBorderRadius)) {
bottomStartBorderRadius = bottomLeftBorderRadius;
}
if (YogaConstants.isUndefined(bottomEndBorderRadius)) {
bottomEndBorderRadius = bottomRightBorderRadius;
}
final float directionAwareTopLeftRadius = isRTL ? topEndBorderRadius : topStartBorderRadius;
final float directionAwareTopRightRadius =
isRTL ? topStartBorderRadius : topEndBorderRadius;
final float directionAwareBottomLeftRadius =
isRTL ? bottomEndBorderRadius : bottomStartBorderRadius;
final float directionAwareBottomRightRadius =
isRTL ? bottomStartBorderRadius : bottomEndBorderRadius;
topLeftBorderRadius = directionAwareTopLeftRadius;
topRightBorderRadius = directionAwareTopRightRadius;
bottomLeftBorderRadius = directionAwareBottomLeftRadius;
bottomRightBorderRadius = directionAwareBottomRightRadius;
} else {
final float directionAwareTopLeftRadius = isRTL ? topEndBorderRadius : topStartBorderRadius;
final float directionAwareTopRightRadius =
isRTL ? topStartBorderRadius : topEndBorderRadius;
final float directionAwareBottomLeftRadius =
isRTL ? bottomEndBorderRadius : bottomStartBorderRadius;
final float directionAwareBottomRightRadius =
isRTL ? bottomStartBorderRadius : bottomEndBorderRadius;
if (!YogaConstants.isUndefined(directionAwareTopLeftRadius)) {
topLeftBorderRadius = directionAwareTopLeftRadius;
}
if (!YogaConstants.isUndefined(directionAwareTopRightRadius)) {
topRightBorderRadius = directionAwareTopRightRadius;
}
if (!YogaConstants.isUndefined(directionAwareBottomLeftRadius)) {
bottomLeftBorderRadius = directionAwareBottomLeftRadius;
}
if (!YogaConstants.isUndefined(directionAwareBottomRightRadius)) {
bottomRightBorderRadius = directionAwareBottomRightRadius;
}
}
}
return new float[] {
topLeftBorderRadius, topRightBorderRadius, bottomRightBorderRadius, bottomLeftBorderRadius
};
}
public void setOpacityIfPossible(float opacity) {
mBackfaceOpacity = opacity;
setBackfaceVisibilityDependantOpacity();
@@ -52,9 +52,6 @@ public class ReactViewManager extends ViewGroupManager<ReactViewGroup> {
private static final int CMD_SET_PRESSED = 2;
private static final String HOTSPOT_UPDATE_KEY = "hotspotUpdate";
private @Nullable ReadableMap mNativeBackground;
private @Nullable ReadableMap mNativeForeground;
@ReactProp(name = "accessible")
public void setAccessible(ReactViewGroup view, boolean accessible) {
view.setFocusable(accessible);
@@ -121,14 +118,6 @@ public class ReactViewManager extends ViewGroupManager<ReactViewGroup> {
} else {
view.setBorderRadius(borderRadius, index - 1);
}
if (mNativeBackground != null) {
setNativeBackground(view, mNativeBackground);
}
if (mNativeForeground != null) {
setNativeForeground(view, mNativeForeground);
}
}
@ReactProp(name = "borderStyle")
@@ -169,17 +158,19 @@ public class ReactViewManager extends ViewGroupManager<ReactViewGroup> {
@ReactProp(name = "nativeBackgroundAndroid")
public void setNativeBackground(ReactViewGroup view, @Nullable ReadableMap bg) {
mNativeBackground = bg;
view.setTranslucentBackgroundDrawable(
bg == null ? null : ReactDrawableHelper.createDrawableFromJSDescription(view, bg));
bg == null
? null
: ReactDrawableHelper.createDrawableFromJSDescription(view.getContext(), bg));
}
@TargetApi(Build.VERSION_CODES.M)
@ReactProp(name = "nativeForegroundAndroid")
public void setNativeForeground(ReactViewGroup view, @Nullable ReadableMap fg) {
mNativeForeground = fg;
view.setForeground(
fg == null ? null : ReactDrawableHelper.createDrawableFromJSDescription(view, fg));
fg == null
? null
: ReactDrawableHelper.createDrawableFromJSDescription(view.getContext(), fg));
}
@ReactProp(
@@ -79,3 +79,4 @@ include $(REACT_SRC_DIR)/turbomodule/core/jni/Android.mk
include $(REACT_SRC_DIR)/jscexecutor/Android.mk
include $(REACT_SRC_DIR)/../hermes/reactexecutor/Android.mk
include $(REACT_SRC_DIR)/../hermes/instrumentation/Android.mk
include $(REACT_SRC_DIR)/modules/blob/jni/Android.mk
+3 -1
View File
@@ -630,7 +630,9 @@ jsi::String JSCRuntime::createStringFromUtf8(
size_t length) {
std::string tmp(reinterpret_cast<const char*>(str), length);
JSStringRef stringRef = JSStringCreateWithUTF8CString(tmp.c_str());
return createString(stringRef);
auto result = createString(stringRef);
JSStringRelease(stringRef);
return result;
}
std::string JSCRuntime::utf8(const jsi::String& str) {
+1 -1
View File
@@ -347,7 +347,7 @@ class PropNameID : public Pointer {
using Pointer::Pointer;
PropNameID(Runtime& runtime, const PropNameID& other)
: PropNameID(runtime.clonePropNameID(other.ptr_)) {}
: Pointer(runtime.clonePropNameID(other.ptr_)) {}
PropNameID(PropNameID&& other) = default;
PropNameID& operator=(PropNameID&& other) = default;
@@ -15,8 +15,8 @@ else
end
Pod::Spec.new do |spec|
spec.name = 'yoga'
spec.version = "#{version}.React"
spec.name = 'Yoga'
spec.version = '1.14.0'
spec.license = { :type => 'MIT' }
spec.homepage = 'https://yogalayout.com'
spec.documentation_url = 'https://yogalayout.com/docs/'
@@ -28,6 +28,7 @@ Pod::Spec.new do |spec|
spec.source = source
spec.module_name = 'yoga'
spec.header_dir = 'yoga'
spec.requires_arc = false
spec.compiler_flags = [
'-fno-omit-frame-pointer',
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "1000.0.0",
"version": "0.61.5",
"bin": "./cli.js",
"description": "A framework for building native apps using React",
"license": "MIT",
@@ -85,9 +85,9 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"@react-native-community/cli": "^3.0.0-alpha.1",
"@react-native-community/cli-platform-android": "^3.0.0-alpha.1",
"@react-native-community/cli-platform-ios": "^3.0.0-alpha.1",
"@react-native-community/cli": "^3.0.0",
"@react-native-community/cli-platform-android": "^3.0.0",
"@react-native-community/cli-platform-ios": "^3.0.0",
"abort-controller": "^3.0.0",
"art": "^0.10.0",
"base64-js": "^1.1.2",
@@ -97,7 +97,7 @@
"event-target-shim": "^5.0.1",
"fbjs": "^1.0.0",
"fbjs-scripts": "^1.1.0",
"hermes-engine": "^0.1.1",
"hermes-engine": "^0.2.1",
"invariant": "^2.2.4",
"jsc-android": "^245459.0.0",
"metro-babel-register": "^0.56.0",
@@ -170,4 +170,4 @@
}
}
}
}
}
+23 -10
View File
@@ -85,6 +85,19 @@ afterEvaluate {
// Additional node and packager commandline arguments
def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"]
def extraPackagerArgs = config.extraPackagerArgs ?: []
def npx = Os.isFamily(Os.FAMILY_WINDOWS) ? "npx.cmd" : "npx"
def execCommand = []
if (config.cliPath || config.nodeExecutableAndArgs) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
execCommand.addAll(["cmd", "/c", *nodeExecutableAndArgs, cliPath])
} else {
execCommand.addAll([*nodeExecutableAndArgs, cliPath])
}
} else {
execCommand.addAll([npx, "react-native"])
}
def enableHermes = enableHermesForVariant(variant)
@@ -126,15 +139,10 @@ afterEvaluate {
extraArgs.add(bundleConfig);
}
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine("cmd", "/c", *nodeExecutableAndArgs, cliPath, bundleCommand, "--platform", "android", "--dev", "${devEnabled}",
"--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir,
"--sourcemap-output", enableHermes ? jsPackagerSourceMapFile : jsOutputSourceMapFile, *extraArgs)
} else {
commandLine(*nodeExecutableAndArgs, cliPath, bundleCommand, "--platform", "android", "--dev", "${devEnabled}",
"--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir,
"--sourcemap-output", enableHermes ? jsPackagerSourceMapFile : jsOutputSourceMapFile, *extraArgs)
}
commandLine(*execCommand, bundleCommand, "--platform", "android", "--dev", "${devEnabled}",
"--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir,
"--sourcemap-output", enableHermes ? jsPackagerSourceMapFile : jsOutputSourceMapFile, *extraArgs)
if (enableHermes) {
doLast {
@@ -149,7 +157,12 @@ afterEvaluate {
hermesFlags = config.hermesFlagsDebug
if (hermesFlags == null) hermesFlags = []
}
commandLine(getHermesCommand(), "-emit-binary", "-out", hbcTempFile, jsBundleFile, *hermesFlags)
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine("cmd", "/c", getHermesCommand(), "-emit-binary", "-out", hbcTempFile, jsBundleFile, *hermesFlags)
} else {
commandLine(getHermesCommand(), "-emit-binary", "-out", hbcTempFile, jsBundleFile, *hermesFlags)
}
}
ant.move(
file: hbcTempFile,
+1 -1
View File
@@ -38,7 +38,7 @@ def use_react_native! (options={})
pod 'React-jsinspector', :path => "#{prefix}/ReactCommon/jsinspector"
pod 'ReactCommon/jscallinvoker', :path => "#{prefix}/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "#{prefix}/ReactCommon"
pod 'yoga', :path => "#{prefix}/ReactCommon/yoga"
pod 'Yoga', :path => "#{prefix}/ReactCommon/yoga"
pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec"
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec"
+4 -2
View File
@@ -91,6 +91,8 @@ grep -E "com.facebook.react:react-native:\\+" "${project_name}/android/app/build
success "New sample project generated at /tmp/${project_name}"
cd "/tmp/${project_name}"
info "Test the following on Android:"
info " - Disable Fast Refresh. It might be enabled from last time (the setting is stored on the device)"
info " - Verify 'Reload JS' works"
@@ -98,7 +100,7 @@ info ""
info "Press any key to run the sample in Android emulator/device"
info ""
read -n 1
cd "/tmp/${project_name}" && react-native run-android
yarn react-native run-android
info "Test the following on iOS:"
info " - Disable Fast Refresh. It might be enabled from last time (the setting is stored on the device)"
@@ -111,7 +113,7 @@ info ""
info "Press any key to open the project in Xcode"
info ""
read -n 1
open "/tmp/${project_name}/ios/${project_name}.xcodeproj"
yarn react-native run-ios
cd "$repo_root"
+3 -3
View File
@@ -36,9 +36,9 @@ module.file_ext=.ios.js
munge_underscores=true
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/Libraries/react-native/react-native-implementation'
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/\1'
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
-1
View File
@@ -20,7 +20,6 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
xcshareddata
# Android/IntelliJ
#
-9
View File
@@ -176,15 +176,6 @@ android {
}
}
packagingOptions {
pickFirst '**/armeabi-v7a/libc++_shared.so'
pickFirst '**/x86/libc++_shared.so'
pickFirst '**/arm64-v8a/libc++_shared.so'
pickFirst '**/x86_64/libc++_shared.so'
pickFirst '**/x86/libjsc.so'
pickFirst '**/armeabi-v7a/libjsc.so'
}
}
dependencies {
+1 -1
View File
@@ -28,7 +28,7 @@ target 'HelloWorld' do
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
+12 -10
View File
@@ -6,20 +6,22 @@
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest"
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"react": "16.8.1",
"react-native": "1000.0.0"
"react": "16.9.0",
"react-native": "0.61.5"
},
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/runtime": "^7.5.0",
"@react-native-community/eslint-config": "^0.0.3",
"babel-jest": "^24.1.0",
"jest": "^24.1.0",
"metro-react-native-babel-preset": "^0.51.1",
"react-test-renderer": "16.8.1"
"@babel/core": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
+95 -28
View File
@@ -1074,12 +1074,19 @@
"@types/istanbul-reports" "^1.1.1"
"@types/yargs" "^12.0.9"
"@react-native-community/cli-platform-android@^3.0.0-alpha.1":
version "3.0.0-alpha.1"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-3.0.0-alpha.1.tgz#cab918daf901ab2ed795d67fd503a16d6a5dedda"
integrity sha512-0UYwPZTfBZzwneIx1QGHfGLDarYeDGBJJOyUx3x2leSRGAdLiF0a06I3W+Ci5Ml2WsSUoIO0fzZ82qKtph2g5Q==
"@react-native-community/cli-debugger-ui@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-3.0.0.tgz#d01d08d1e5ddc1633d82c7d84d48fff07bd39416"
integrity sha512-m3X+iWLsK/H7/b7PpbNO33eQayR/+M26la4ZbYe1KRke5Umg4PIWsvg21O8Tw4uJcY8LA5hsP+rBi/syBkBf0g==
dependencies:
"@react-native-community/cli-tools" "^2.8.3"
serve-static "^1.13.1"
"@react-native-community/cli-platform-android@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-3.0.0.tgz#9122591fa59f91626766899c3307b6b1ff09d597"
integrity sha512-9yxv86+qIRGKeVROEmcUIFi21I6bpd7qooOcJ0dD/4pBRR5tUVZpv+y8EKEd9PZw7WSkUtD8WRoDeWaBs2kC3w==
dependencies:
"@react-native-community/cli-tools" "^3.0.0"
chalk "^2.4.2"
execa "^1.0.0"
jetifier "^1.6.2"
@@ -1087,35 +1094,42 @@
slash "^3.0.0"
xmldoc "^1.1.2"
"@react-native-community/cli-platform-ios@^3.0.0-alpha.1":
version "3.0.0-alpha.1"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-3.0.0-alpha.1.tgz#21cd4d447a88c19170de29178674f25847c7096a"
integrity sha512-pPXRjhhuTHVrmXiFhpEojbR+D65z3+UarM6faf8DS1xzFeEaIjb6l3oA4K+vpLZMxnWDIJg48fia76pa7H7aSw==
"@react-native-community/cli-platform-ios@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-3.0.0.tgz#3a48a449c0c33af3b0b3d19d3256de99388fe15f"
integrity sha512-QoNVlDj8eMXRZk9uktPFsctHurQpv9jKmiu6mQii4NEtT2npE7g1hbWpRNojutBsfgmCdQGDHd9uB54eeCnYgg==
dependencies:
"@react-native-community/cli-tools" "^2.8.3"
"@react-native-community/cli-tools" "^3.0.0"
chalk "^2.4.2"
js-yaml "^3.13.1"
xcode "^2.0.0"
"@react-native-community/cli-tools@^2.8.3":
version "2.8.3"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-2.8.3.tgz#0e2249f48cf4603fb8d740a9f0715c31ac131ceb"
integrity sha512-N5Pz+pR+GFq3JApjd0SW4jp9KC7kbKsMH65QLRh30JNsxdPvNkYox6/ZZdkvdXaI5ev3EckR7eqlcwi5gpVTYQ==
"@react-native-community/cli-tools@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-3.0.0.tgz#fe48b80822ed7e49b8af051f9fe41e22a2a710b1"
integrity sha512-8IhQKZdf3E4CR8T7HhkPGgorot/cLkRDgneJFDSWk/wCYZAuUh4NEAdumQV7N0jLSMWX7xxiWUPi94lOBxVY9g==
dependencies:
chalk "^2.4.2"
lodash "^4.17.5"
mime "^2.4.1"
node-fetch "^2.5.0"
"@react-native-community/cli@^3.0.0-alpha.1":
version "3.0.0-alpha.1"
resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-3.0.0-alpha.1.tgz#3b4d4ea89893c39b6e5fee58743664b461a14f49"
integrity sha512-TD8M2WQ1uGvFg6Pwo6w58SM4dzguFXyxp1cqBQMHmmn1uBtGzad1AM4g+askzb5WRP1hBv/xPc4dAmgnXo/Xtw==
"@react-native-community/cli-types@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-3.0.0.tgz#488d46605cb05e88537e030f38da236eeda74652"
integrity sha512-ng6Tm537E/M42GjE4TRUxQyL8sRfClcL7bQWblOCoxPZzJ2J3bdALsjeG3vDnVCIfI/R0AeFalN9KjMt0+Z/Zg==
"@react-native-community/cli@^3.0.0":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-3.0.1.tgz#d7dfec14c867a17793bb981dd90eef2d8fc7808a"
integrity sha512-fh7hZHNmGciBOIJHUdS4D6/7KaIlmdJLG0i/efxm7spuMI0uviWwz4IcjNRanFbAgYu3Yp4rfke+Gm/gcHSRaA==
dependencies:
"@hapi/joi" "^15.0.3"
"@react-native-community/cli-platform-android" "^3.0.0-alpha.1"
"@react-native-community/cli-platform-ios" "^3.0.0-alpha.1"
"@react-native-community/cli-tools" "^2.8.3"
"@react-native-community/cli-debugger-ui" "^3.0.0"
"@react-native-community/cli-tools" "^3.0.0"
"@react-native-community/cli-types" "^3.0.0"
chalk "^2.4.2"
command-exists "^1.2.8"
commander "^2.19.0"
compression "^1.7.1"
connect "^3.6.5"
@@ -1124,6 +1138,7 @@
envinfo "^7.1.0"
errorhandler "^1.5.0"
execa "^1.0.0"
find-up "^4.1.0"
fs-extra "^7.0.1"
glob "^7.1.1"
graceful-fs "^4.1.3"
@@ -1140,9 +1155,12 @@
open "^6.2.0"
ora "^3.4.0"
plist "^3.0.0"
semver "^5.0.3"
semver "^6.3.0"
serve-static "^1.13.1"
shell-quote "1.6.1"
strip-ansi "^5.2.0"
sudo-prompt "^9.0.0"
wcwidth "^1.0.1"
ws "^1.1.0"
"@react-native-community/eslint-plugin@1.0.0":
@@ -2120,6 +2138,11 @@ combined-stream@1.0.6, combined-stream@~1.0.6:
dependencies:
delayed-stream "~1.0.0"
command-exists@^1.2.8:
version "1.2.8"
resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.8.tgz#715acefdd1223b9c9b37110a149c6392c2852291"
integrity sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw==
commander@^2.11.0, commander@^2.19.0:
version "2.19.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
@@ -3149,6 +3172,14 @@ find-up@^3.0.0:
dependencies:
locate-path "^3.0.0"
find-up@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
dependencies:
locate-path "^5.0.0"
path-exists "^4.0.0"
flat-cache@^1.2.1:
version "1.3.4"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.4.tgz#2c2ef77525cc2929007dfffa1dd314aa9c9dee6f"
@@ -3464,10 +3495,10 @@ has@^1.0.1, has@^1.0.3:
dependencies:
function-bind "^1.1.1"
hermes-engine@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.1.1.tgz#33d5da1a3b7289667f121dc1aca3566171e86fd8"
integrity sha512-5nPNtJg3ZiUT14SfU5KcETWrDFadn9R0hv2FCihiLZUeNHuLxaoiFy0bAMrXukKPyXG76XZ4zl5iGXr7E7Nhpw==
hermes-engine@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.2.1.tgz#25c0f1ff852512a92cb5c5cc47cf967e1e722ea2"
integrity sha512-eNHUQHuadDMJARpaqvlCZoK/Nitpj6oywq3vQ3wCwEsww5morX34mW5PmKWQTO7aU0ck0hgulxR+EVDlXygGxQ==
home-or-tmp@^3.0.0:
version "3.0.0"
@@ -4319,7 +4350,7 @@ js-yaml@^3.11.0, js-yaml@^3.9.0:
argparse "^1.0.7"
esprima "^4.0.0"
js-yaml@^3.13.0:
js-yaml@^3.13.0, js-yaml@^3.13.1:
version "3.13.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
@@ -4602,6 +4633,13 @@ locate-path@^3.0.0:
p-locate "^3.0.0"
path-exists "^3.0.0"
locate-path@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
dependencies:
p-locate "^4.1.0"
lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
@@ -5488,6 +5526,13 @@ p-limit@^2.0.0:
dependencies:
p-try "^2.0.0"
p-limit@^2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537"
integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==
dependencies:
p-try "^2.0.0"
p-locate@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
@@ -5502,6 +5547,13 @@ p-locate@^3.0.0:
dependencies:
p-limit "^2.0.0"
p-locate@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
dependencies:
p-limit "^2.2.0"
p-reduce@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa"
@@ -5552,6 +5604,11 @@ path-exists@^3.0.0:
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=
path-exists@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
@@ -6261,11 +6318,16 @@ scheduler@0.15.0, scheduler@^0.15.0:
loose-envify "^1.1.0"
object-assign "^4.1.1"
"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1:
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1:
version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
semver@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
send@0.16.2:
version "0.16.2"
resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1"
@@ -6683,6 +6745,11 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1:
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
sudo-prompt@^9.0.0:
version "9.1.1"
resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.1.1.tgz#73853d729770392caec029e2470db9c221754db0"
integrity sha512-es33J1g2HjMpyAhz8lOR+ICmXXAqTuKbuXuUWLhOLew20oN9oUCgCJx615U/v7aioZg7IX5lIh9x34vwneu4pA==
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"