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

15372 Коммитов

Автор SHA1 Сообщение Дата
ferrannp e8a6cb5e18 Android: Adding sendIntent on Linking module (#22302)
Summary:
This PR implements "Add a standardized way to send intents on Android" discussed in https://github.com/react-native-community/discussions-and-proposals/issues/34.
Pull Request resolved: https://github.com/facebook/react-native/pull/22302

Differential Revision: D13374186

Pulled By: cpojer

fbshipit-source-id: 2f0b9b9f46e99f382b6c35b1914e75df23a7fd74
2018-12-06 21:13:58 -08:00
gtebbutt cc4211c72f Restore TouchableHighlight and TouchableOpacity behaviour on TV platforms (#21478)
Summary:
Since #18470, the default focus behaviour of `TouchableHighlight` and `TouchableOpacity` has been missing on tvOS. This uses the new `touchableHandleFocus` and `touchableHandleBlur` functions to restore the behaviour. Fixes #21295.
Pull Request resolved: https://github.com/facebook/react-native/pull/21478

Differential Revision: D13372959

Pulled By: cpojer

fbshipit-source-id: a5fa9d45214ac48a14a6573ccf014bba1ee0a103
2018-12-06 21:09:25 -08:00
James Treanor c090758c12 Fix build error for Android projects that use `apply plugin: "com.android.library"` (#22312)
Summary:
This PR allows Android projects that use `apply plugin: "com.android.library"` to build successfully. A recent regression caused by https://github.com/facebook/react-native/pull/20526 means that building one of these projects always fails with this error:

```
FAILURE: Build failed with an exception.

* Where:
Script '/Users/james/src/SampleLibrary/node_modules/react-native/react.gradle' line: 15

* What went wrong:
A problem occurred configuring project ':app'.
> Could not get unknown property 'applicationVariants' for object of type com.android.build.gradle.LibraryExtension.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
```

This change updates `react.gradle` to cater to both application and library projects by selectively using `android.applicationVariants` or `android.libraryVariants`.

Fixes https://github.com/facebook/react-native/issues/22310.
Pull Request resolved: https://github.com/facebook/react-native/pull/22312

Differential Revision: D13373742

Pulled By: cpojer

fbshipit-source-id: 64c35ab7a6d5d0d840a43729123e70dd8e0d36e0
2018-12-06 20:33:11 -08:00
Zack Sheppard 2831d9ef61 Extend reason message for `RCTFatalException` (#22532)
Summary:
Fixes #22530

As described in the issue, the previous behavior for the `RCTFatal` macro was to truncate the `reason` on the resulting `NSException` to 75 characters. This would ensure the reason would fit on a single line, but resulted in issues debugging errors that occurred in the wild, as many crash logging tools (like Sentry) discard the `name` value of the exception and use the `reason` as their primary identifier. At 75 characters, useful information like the location of the error would usually be truncated.

- [x] This extends the truncation threshold to 175 characters, which should be short enough to prevent full-screen-takeover length errors, but long enough to provide useful context to the error.
- [x] This adds a `userInfo` value to the resulting `NSException`. It copies over the `userInfo` from the `NSError` passed to the macro, and adds an "untruncated message" value that contains the untruncated version of the `NSException`'s reason.

[iOS] [Changed] - RCTFatalExceptions now include more information in their reason and a userInfo.

<!--

  CATEGORY may be:

  - [General]
  - [iOS]
  - [Android]

  TYPE may be:

  - [Added] for new features.
  - [Changed] for changes in existing functionality.
  - [Deprecated] for soon-to-be removed features.
  - [Removed] for now removed features.
  - [Fixed] for any bug fixes.
  - [Security] in case of vulnerabilities.

  For more detail, see https://keepachangelog.com/en/1.0.0/#how

  MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

  EXAMPLES:

  [General] [Added] - Add snapToOffsets prop to ScrollView component
  [General] [Fixed] - Fix various issues in snapToInterval on ScrollView component
  [iOS] [Fixed] - Fix crash in RCTImagePicker

-->
Pull Request resolved: https://github.com/facebook/react-native/pull/22532

Differential Revision: D13373469

Pulled By: cpojer

fbshipit-source-id: ac140d14ce76e1664869437c2c178bdd65ab6e0e
2018-12-06 20:22:25 -08:00
Christoph Nakazawa 983ddc78d0 Move middleware files into react-native-internal-cli
Summary: These files are used by `js1 run`. By copying them close to `runServer.js` we can soon remove `local-cli`.

Reviewed By: TheSavior

Differential Revision: D13337487

fbshipit-source-id: ef80317580d5a9b3e560ad1f27b681887cf50b6b
2018-12-06 20:15:46 -08:00
Christoph Nakazawa 168ac8d83d Use `findPlugins` from `react-native-local-cli`
Summary: This module now lives outside of the React Native repo.

Reviewed By: TheSavior

Differential Revision: D13337412

fbshipit-source-id: 548868e5f1f3812574fda3d235eb9d47c81d6522
2018-12-06 20:15:46 -08:00
Christoph Nakazawa 2e5e9fa88a Move asset related modules into `metro-buck`
Summary:
These files are some of the few standalone files from the `local-cli` that are used internally. This diff copies them into the one place where they are used. Note that I am leaving the old files in `local-cli`. Even if they are unused, moving them would break flow (require module verification).

This diff also moves the `assetPathUtils` file into `Libraries/Image`, which is where it is used. This was previously part of D13337412 but I had to squash them to make buck happy.

Reviewed By: TheSavior

Differential Revision: D13337304

fbshipit-source-id: 2d501109ba7d4ba94ca7e8f2953258221947b90e
2018-12-06 20:15:46 -08:00
Doug Russell ee7c702308 Accessibility Escape
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/22047

Differential Revision: D13146179

Pulled By: cpojer

fbshipit-source-id: b8a089114a5deafee47dd482e484d413c8c39137
2018-12-06 19:44:21 -08:00
Jamon Holmgren 900f2df351 Adds links to the README for roadmap, releases, RFCs. Fixes the help link (#22548)
Summary:
This PR only contains README updates.

1. Adds roadmap link
2. Adds releases repo link
3. Adds discussions and proposals repo link
4. Fixes the help link (pointed to abandoned forum)
Pull Request resolved: https://github.com/facebook/react-native/pull/22548

Differential Revision: D13372704

Pulled By: cpojer

fbshipit-source-id: 3c04d00ae08281298a851ddd6ec38ff67c6add30
2018-12-06 19:35:14 -08:00
Radovan Šmitala a2ef5b85d8 Use main.jsbundle in iOS template for production build (#22531)
Summary:
Default HelloWorld template for iOS doesn't make production main.jsbundle. This is little bit confusing in compare with Android building app when everything works one first run.

Make it seamless, reduce confuse.
Based on docs https://facebook.github.io/react-native/docs/running-on-device#3-configure-app-to-use-static-bundle

Fixes #22335
Fixes #18562
Pull Request resolved: https://github.com/facebook/react-native/pull/22531

Differential Revision: D13372773

Pulled By: cpojer

fbshipit-source-id: 888c675b7d11b1a323445e092ec9ff83924c42f4
2018-12-06 19:29:52 -08:00
David Aurelio 8f6521aacf Don't pass `std::string` by pointer
Summary:
@public

Pass strings by mutable ref rather than pointer.

Reviewed By: SidharthGuglani

Differential Revision: D13236159

fbshipit-source-id: 04fd35e8a9e106ba8cdd71cfab31e8d90edaac9e
2018-12-06 07:38:44 -08:00
David Aurelio 32d5da2eb8 Use bitfields for enum members of `YGStyle`
Summary:
@public

Puts all enum fields of `YGStyle` into bitfields. This saves 36 bytes (> 3%) per node.

Reviewed By: SidharthGuglani

Differential Revision: D13233686

fbshipit-source-id: 3ef7e0d6913f0254806acb942d9a9f5b78a5af9c
2018-12-06 07:38:44 -08:00
David Aurelio 32bc724fb0 Remove templates for setting/getting style properties
Summary:
@public

Replaces the `StyleProp` template with a simple setter macro / inlined getter code.

The template was introduced to replace more extensive macros that would generate function signatures, too.
Here, we keep the spirit of that change by only generating function bodies.

Reviewed By: SidharthGuglani

Differential Revision: D13233687

fbshipit-source-id: 218a7d5edb489b43a66c8c9d6156f74feefd2227
2018-12-06 07:38:44 -08:00
David Aurelio f9c575e352 `YGNodeBoundAxisWithinMinAndMax` accepts `YGFloatOptional`
Summary:
@public

Saves some calls to `.unwrap()`

Reviewed By: SidharthGuglani

Differential Revision: D13209153

fbshipit-source-id: 5658586e91496085f39b3522db6364aaeafcfe2f
2018-12-06 07:38:44 -08:00
David Aurelio 94ab9b429c inline `YGUnwrapFloatOptional`
Summary:
@public
Replaces C-style function call with C++ method invokation.

Reviewed By: SidharthGuglani

Differential Revision: D13209154

fbshipit-source-id: 14e650af4655efb3a659f3cd949a11df773aabcf
2018-12-06 07:38:44 -08:00
David Aurelio 517d07ddcf Remove unnecessary `static` keyword
Summary:
@public

Header-declared inline functions shouldn’t be decleared `static`

Reviewed By: SidharthGuglani

Differential Revision: D13209156

fbshipit-source-id: e2d643a67e6f6c33c96dc71b0a90d00bd9b6f36f
2018-12-06 07:38:44 -08:00
David Aurelio fa171b4fe7 Get rid of `static_cast` in `YGResolveValue`
Summary:
@public

Removes `static_cast` from `YGResolveValue`

Reviewed By: SidharthGuglani

Differential Revision: D13209155

fbshipit-source-id: 76c27c89f6217af9dfef9e2620d639c9f3e212f5
2018-12-06 07:38:43 -08:00
David Aurelio ceb6602422 Inline `YGFloatOptional` completely
Summary:
@public
`YGFLoatOptional` only contains trivial functionality. Make it header-only.

Reviewed By: SidharthGuglani

Differential Revision: D13209151

fbshipit-source-id: 3ecca015fa0ac6644ae694b44bc53d840fbc5635
2018-12-06 07:38:43 -08:00
David Aurelio a7757f6e5d Pass `YGFloatOptional` by value, not reference
Summary:
@public

`YGFloatOptional` is a 32bit type now, and can be passed by value efficiently.

Reviewed By: SidharthGuglani

Differential Revision: D13209150

fbshipit-source-id: c7b937a640258256c97e082ba2f832754e191b9a
2018-12-06 07:38:43 -08:00
David Aurelio 4157a49d8d Eliminate `YGFloatOptional::getValue()`
Summary:
@public

`YGFloatOptional::getValue()` has the unfortunate property of calling `std::exit` if the wrapped value is undefined.
That forces `x.isUndefined() ? fallback : x.getValue()` as access pattern.

Here, we replace that by introducing `YGFloatOptional::orElse(float)` which encapsulates that pattern. Other additions are `orElseGet([] { … })` and some extra operators.

Reviewed By: SidharthGuglani

Differential Revision: D13209152

fbshipit-source-id: 4e5deceaaaaf8eaed44846a8c152cc8b235e815c
2018-12-06 07:38:43 -08:00
David Aurelio cb7a9b2057 Store `YGFloatOptional` in 32 bits
Summary:
@public

After removing `-ffast-math`, `NaN` can again be used to represent `undefined`. That allows us to remove the additional flag from `YGFloatOptional`, and reduce memory usage.

Reviewed By: SidharthGuglani

Differential Revision: D13209157

fbshipit-source-id: 21b83c837a78f924a4ec23a9236ca2440b3c8606
2018-12-06 07:38:43 -08:00
David Aurelio e1c651340b Make equality operator for `YGValue` inlineable
Summary:
@public

Makes `operator==` for `YGValue` an inline function.

Reviewed By: SidharthGuglani

Differential Revision: D13189356

fbshipit-source-id: 7fe61035acf635e22ebb1a1071925d6b3dad0616
2018-12-06 07:38:43 -08:00
David Aurelio c37826a933 Move out `YGValue`
Summary:
@public

Creates a single header file for `YGValue`. This is in preparation of a more compact representation of `YGValue` within `YGStyle`.

Also fixes the incorrect definition of NAN.

Reviewed By: SidharthGuglani

Differential Revision: D13172444

fbshipit-source-id: 4250dbcf8fe15ec3ecdee3913360a73bab633ce3
2018-12-06 07:38:43 -08:00
David Aurelio 57a38263bf Roll back `-ffast-math`
Summary:
@public

`-ffast-math` does not have measurable performance benefits.

By using `NaN` for *undefined* values again, we can squeeze `YGFloatOptional` into 32 bits.
This will also enable us to store `YGValue` (or a variant of it) in 32 bits.

Reviewed By: SidharthGuglani

Differential Revision: D13119110

fbshipit-source-id: 4e6964240bf74ebc22d8783107b89d536a1a0842
2018-12-06 07:38:43 -08:00
Christoph Nakazawa deb2a94568 Add Flow types for `Platform.select` [5/5]
Summary: This change adds type information for `Platform.select` to make sure things are properly typed. This is the last diff in a stack that actually enables the newly fixed/added annotations and it will only land once all the type errors (320+) are fixed.

Reviewed By: sahrens

Differential Revision: D13318805

fbshipit-source-id: af0475d1a2f1e5ace4d513be48827e3659bd7f62
2018-12-06 02:54:19 -08:00
Christoph Nakazawa 060bd73e4e Fix `Platform.select` related flow errors [3/N]
Summary: This diff adds or fixes type annotations on a variety of files around RN.

Reviewed By: sahrens

Differential Revision: D13318808

fbshipit-source-id: dc466938167fda1ed7d6c9423c6cafe8040602e6
2018-12-05 21:48:55 -08:00
David Vacca 844e11967d Fix dispatch of OnLayout event for first render
Summary: This diff ensures that Events delivered from the C++ side are actually processed. This is done forcing the execution of AsyncEventBeat.beat() in these cases

Reviewed By: shergin

Differential Revision: D13313955

fbshipit-source-id: b2785647913a640c2d557f4fa08d447845a540e9
2018-12-05 18:00:39 -08:00
Rick Hanlon c5b80062ea Fix ActivityIndicator snapshot test, add toMatchShallowSnapshot
Summary:
This diff adds a custom matcher which will wrap a given component and shallow render it, snapshotting the result with the formatting users will see when they do the same.

I also update the ActivityIndicator test to use this new strategy, and add an additional check that the displayName is set.

For context see:
- https://github.com/facebook/react-native/pull/21950
- https://github.com/rajivshah3/rn-broken-snapshot/blob/broken-example/__tests__/App.spec.js#L3
- https://github.com/facebook/react-native/issues/21937

Reviewed By: TheSavior

Differential Revision: D13326689

fbshipit-source-id: 8ed2302a8aad12962fa2498a46d2502ccfb5c737
2018-12-05 17:23:42 -08:00
Marc Horowitz 3f0f25f73c Back out "Check for thread consistency in JSCRuntime"
Summary:
This check is too aggressive.  We will consider putting it back once we are
more certain nothing will trigger it.

Differential Revision: D13350907

fbshipit-source-id: 6033bdbfe7adb2a18bdf889c090cf271497605e5
2018-12-05 16:59:31 -08:00
Kevin Gozali 01d7aad548 Guard calls to debug features in fabric test
Summary:
In some setup, buck cxx test for android runs with `NDEBUG` set, hence we can't call debug symbols in the test cases. So guard those callsites with `#ifndef NDEBUG`.

Also, some dependencies for this test target depend on Android specific symbols, so we have to mark it as instrumentation test for now (FB-specific).

Reviewed By: sahrens

Differential Revision: D13337637

fbshipit-source-id: 02ff152df9937f2b0b8596f53789cdee8ee8a539
2018-12-05 15:03:27 -08:00
Kevin Gozali 4f9a3bc8f6 xplat: pass through config object to fabric UIManager layer
Summary: For configuration purpose, pass down config object from the hosting app and use it in UITemplateProcessor.

Reviewed By: sahrens

Differential Revision: D13290322

fbshipit-source-id: 8bb6d7f5a3f977b873e548e15603259876b46dc8
2018-12-05 15:03:27 -08:00
Kevin Gozali 3b6f229eb9 xplat: added ReactNativeConfig to access runtime specific config values
Summary: Each app may provide different impl for its runtime specific behaviors, then Fabric and other new infra can share the same config instance to configure stuffs.

Reviewed By: sahrens

Differential Revision: D13290319

fbshipit-source-id: 30e3eeedc6ff6ef250ed233b27e38cb7c1062b55
2018-12-05 15:03:27 -08:00
Héctor Ramos 44878ea9bc Fix code analysis bot failure to post lint warnings on pull requests
Summary:
The code analysis script takes the results of `eslint .` and filters out any messages for filepaths outside of what is modified in a given pull request. This diff fixes an issue where the bot will fail to post warnings if a pull request contains multiple commits, where the most recent commit is a rebase (e.g. 63c00f20a7 in https://github.com/facebook/react-native/pull/22470). This happens because the script looks for files changed in the most recent commit in a PR.

In this diff, we switch to a new GitHub API that returns the list of all files changed by a PR, obviating the need to go through individual commits in a PR to look for changed files.

Reviewed By: TheSavior

Differential Revision: D13324154

fbshipit-source-id: f9f50028439d1969b0feea65f0b3e8bf75ac1a33
2018-12-05 13:15:56 -08:00
Eli White 4dea677b4f Add detox tests for Switch (#22470)
Summary:
Reorganized some of the switch examples to be more testable:

Before:
![simulator screen shot - iphone xs - 2018-12-01 at 02 27 47](https://user-images.githubusercontent.com/249164/49327066-bcc35580-f510-11e8-860d-fc07a574f80c.png)

After:
![simulator screen shot - iphone xs - 2018-12-01 at 02 27 06](https://user-images.githubusercontent.com/249164/49327068-bf25af80-f510-11e8-95c6-7aa4a9095b91.png)

Tests pass!

```
yarn build-ios-e2e && yarn test-ios-e2e
```
<img width="711" alt="screen shot 2018-12-01 at 2 20 33 am" src="https://user-images.githubusercontent.com/249164/49327070-c64cbd80-f510-11e8-8cad-84c3fe42941e.png">

Changelog:
----------
Help reviewers and the release process by writing your own changelog entry. When the change doesn't impact React Native developers, it may be ommitted from the changelog for brevity. See below for an example.

[Internal] [Added] - Detox tests for Switch
Pull Request resolved: https://github.com/facebook/react-native/pull/22470

Reviewed By: RSNara

Differential Revision: D13290329

Pulled By: TheSavior

fbshipit-source-id: 91c1b895dd5e1acc4330618e6d3165c7f9215997
2018-12-05 12:59:04 -08:00
Max Sherman 1fe947d956 Record thread cpu time for native modules thread
Summary: I want the same instrumentation we did for the JS thread for the NM thread.  This diff adds thread cpu time.

Reviewed By: alexeylang

Differential Revision: D13328876

fbshipit-source-id: 7b310956c52907ffbd881f864e1f8e774853d7f5
2018-12-05 12:43:17 -08:00
Héctor Ramos 3f55e87d6f Merge appveyor.yml with .appveyor/config.yml (#22529)
Summary:
A recent PR was merged with changes to appveyor.yml, but that file recently moved to .appveyor/config.yml
Pull Request resolved: https://github.com/facebook/react-native/pull/22529

Differential Revision: D13342085

Pulled By: hramos

fbshipit-source-id: d243e233ef769ab279dacdd48444248fbdec9417
2018-12-05 10:19:01 -08:00
Dulmandakh 9d00d4d5bb Bump Android SDK to 28, Build Tools to 28.0.2, Gradle to 4.7, Gradle Plugin to 3.2.0 (#21632)
Summary:
This PR is bumping compileSdkVersion to 28, buildToolsVersion to 28.0.2, Gradle to 4.7, Android Gradle plugin to 3.2.0.

Gradle 4.7 added support for Java 10 and 11.

allow-large-files

Release Notes:
--------------
[ANDROID] [ENHANCEMENT] [SDK] - bump to 28

Pull Request resolved: https://github.com/facebook/react-native/pull/21632

Reviewed By: mdvacca

Differential Revision: D13084836

Pulled By: hramos

fbshipit-source-id: e0f493881e80e87faf8c3ef1ac77044495966a49
2018-12-05 09:06:31 -08:00
ifsnow c45d290b07 Fixed for supporting mediaPlaybackRequiresUserAction under iOS 10. (#22208)
Summary:
There is a problem that the `mediaPlaybackRequiresUserAction` property does not work in WKWebView(`useWebKit`) under iOS 10.

I fully know you are currently working to migrate the core's WebView to the standalone `react-native-webview` project. This has already been submitted to PR in `react-native-webview` and will be merged soon. I hope this fix applies to `react-native` before your migration is done.
Pull Request resolved: https://github.com/facebook/react-native/pull/22208

Differential Revision: D13334868

Pulled By: cpojer

fbshipit-source-id: f2a811a477054155ed5fe62ab31e4d63f70e7848
2018-12-04 20:46:42 -08:00
Thomas BARRAS 9facd81894 Flow ViewPropTypes (#22504)
Summary:
Related to #22100

Enhance ViewPropTypes flow types.
- I had some troubles with a TODO left for `onResponderGrant` hence the return type.
- I wasn't able to properly type `nativeBackgroundAndroid` and `nativeForegroundAndroid` at the moment.
Pull Request resolved: https://github.com/facebook/react-native/pull/22504

Reviewed By: cpojer

Differential Revision: D13334024

Pulled By: TheSavior

fbshipit-source-id: cada236e0d716ae78cb663172e5315cf11c6406a
2018-12-04 19:32:36 -08:00
Ian Park c3b3eb7f73 Fix bug in comparison logic of object property (#22348)
Summary:
`instance.hasOwnProperty` has potential danger because of some object could be eliminate own prototype chain. Update code be more reliable.

This PR is solution of #22308 issue. (Fixes #22308)
Pull Request resolved: https://github.com/facebook/react-native/pull/22348

Differential Revision: D13334882

Pulled By: cpojer

fbshipit-source-id: 9b9310a972e933af1962666d7b0c683ff43cc5b2
2018-12-04 19:25:11 -08:00
hyochan 198eb02697 Fix ListEmptyComponent is rendered upside down when using inverted flag. (#21496)
Summary:
Fix ListEmptyComponent is rendered upside down when using inverted flag.

Fixes #21196
Pull Request resolved: https://github.com/facebook/react-native/pull/21496

Differential Revision: D13334437

Pulled By: hramos

fbshipit-source-id: b34a9a0a153862d3d5dbe410ab0a6c66a8cfcffd
2018-12-04 18:49:00 -08:00
Thomas BARRAS 7e4f92bc19 Flow TouchableWithoutFeedback (#22479)
Summary:
Related to #22100

Enhance TouchableWithoutFeedback with press and target event types.
There are still work to do to update `UNSAFE_componentWillReceiveProps` and `touchableGetHitSlop` to make Flow not complain about `DeprecatedEdgeInsetsPropType` inexact type.
Pull Request resolved: https://github.com/facebook/react-native/pull/22479

Reviewed By: RSNara

Differential Revision: D13310764

Pulled By: TheSavior

fbshipit-source-id: 9002e542378491fb800c8e81c63f4fbe125b563c
2018-12-04 17:06:05 -08:00
Baldy Lukasz 87b6533937 Duration cannot be less then 10ms (#21858)
Summary:
Related to: #21853

Fixes #21853
Pull Request resolved: https://github.com/facebook/react-native/pull/21858

Differential Revision: D13322060

Pulled By: hramos

fbshipit-source-id: 00a8de018fce6507aa131a11ba3e95d57044e683
2018-12-04 14:45:59 -08:00
Igor Mandrigin f77aa4eb45 Avoid using `-[UITextView setAttributedString:]` while user is typing (#19809)
Summary:
iOS-specific.
For languages with complex input (such as Japanese or Chinese), a user has to type multiple characters that are then merged into a single one.
If `-[UITextView setAttributedString:]` is used while the user is still typing, it resets the input and characters are not being treated as typed together.

This PR avoids calling this method if possible, replacing it by just copying the attributes if the string has not been changed. That preserves the state and user can continue to type Korean or Chinese characters.

Fixes #19339

<!--
  Required: Write your motivation here.
  If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->

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

Essentially, the steps to reproduce are described in [the issue](https://github.com/facebook/react-native/issues/19339):

1. Type some Korean characters in TextInput, such as "하늘" (buttons `ㅎ`,`ㅏ`,`ㄴ`,`ㅡ`,`ㄹ`).
2. Then move the cursor to the beginning of the text, type "파란" (buttons `ㅍ`,`ㅏ`,`ㄹ`,`ㅏ`,`ㄴ`) this time.

**Behaviour before this fix (broken)**
Actual text: `ㅍㅏㄹㅏㄴ하늘`.
Expected text: `파란하늘`.
Characters aren't combined properly.

![ezgif com-resize](https://user-images.githubusercontent.com/466427/41613572-4256dda8-73f6-11e8-99a9-0ab833202b95.gif)

**Behaviour after this fix (correct)**
Actual text: `파란하늘`.
Expected text: `파란하늘`.
Characters are combined, the same behaviour is in vanilla iOS `UITextView`.

![input-with-fix](https://user-images.githubusercontent.com/466427/41613526-1aae2284-73f6-11e8-87f2-c1cef51cd83a.gif)

<!--
  Does this PR require a documentation change?
  Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->

<!--
  Required.
  Help reviewers and the release process by writing your own release notes. See below for an example.
-->

[IOS] [BUGFIX] [TextView] - Fix Korean/Chinese/Japanese input for multiline TextView on iOS.

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

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

 EXAMPLES:

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

Differential Revision: D13326614

Pulled By: shergin

fbshipit-source-id: 6a5cab3f7290f0f623a6f4c29353a573eb321b0b
2018-12-04 13:23:43 -08:00
Héctor Ramos 04af674c38 Bump RN OSS iOS tests to iOS SDK 12.1, Xcode 10.1
Summary:
Use Xcode 10.1 and iOS 12.1 SDK to run iOS tests on an iOS 12.1 iPhone XS Simulator, all of which are available on a default Xcode 10.1 install.

Note that we were previously running iOS tests using Xcode 10.1 and the 12.1 SDK in a separate `test_xcode10` workflow on Circle CI. This was in place to allow us to track Xcode 10 compatibility during the Xcode 10 beta. Now that Xcode 10 has been public for a while, we can drop the compatibility check and use Xcode 10 in our main iOS test workflow.

Reviewed By: TheSavior

Differential Revision: D13317891

fbshipit-source-id: 04c17bf3a2e9d3617f14a46b4ed30a5491a4f4a4
2018-12-04 12:06:59 -08:00
Marc Horowitz 424d4458d7 Delete dead code
Summary: It was made dead by the previous revisions

Reviewed By: amnn

Differential Revision: D13313263

fbshipit-source-id: b8c8402b5427dc5d3efbbd2ee871aebf1e14ee0d
2018-12-04 12:01:59 -08:00
Marc Horowitz 99c370959a Don't create the JSCRuntime until createJSExecutor() is called.
Summary:
This avoids an intermittent reentrancy bug in JSC on iOS 11
(https://bugs.webkit.org/show_bug.cgi?id=186827).  It also makes the
code more consistent with android.

Reviewed By: amnn

Differential Revision: D13313265

fbshipit-source-id: f42476b2f660e127ecfc9c72584554817eea1010
2018-12-04 12:01:59 -08:00
Marc Horowitz bdb084e8a8 Check for thread consistency in JSCRuntime
Summary:
In the version of JSC on iOS 11, creating a JSContext on one
thread and using it on another can trigger subtle and nearly
impossible to debug reentrancy-related crashes in the VM (see
https://bugs.webkit.org/show_bug.cgi?id=186827).  In !NDEBUG builds,
check for this case and throw an exception, so it can be detected
early.

Reviewed By: amnn

Differential Revision: D13313264

fbshipit-source-id: ee85435c20e23c8520495ce743d2f91f2eeada5c
2018-12-04 12:01:59 -08:00
gengjiawen 512676c65e Enable ci for windows (#22028)
Summary:
Enable ci for windows
appveyor pass.
https://github.com/facebook/react-native/pull/21835
 [GENERAL] [INTERNAL] [CI] - Enable ci for windows
Pull Request resolved: https://github.com/facebook/react-native/pull/22028

Differential Revision: D13318242

Pulled By: cpojer

fbshipit-source-id: be4b9b9fe6a4e21572f3d6c38b15a2acf8bb2662
2018-12-04 00:20:38 -08:00
Ivan Filenko 96ce6f9538 Bump ws package to 1.1.5 due to vulnerability issues (#21769)
Summary:
Update `ws` package from 1.1.0 to 1.1.5 due to vulnerability issues.

Here is `npm audit` report:
```

                       === npm audit security report ===

┌──────────────────────────────────────────────────────────────────────────────┐
│                                Manual Review                                 │
│            Some vulnerabilities require your attention to resolve            │
│                                                                              │
│         Visit https://go.npm.me/audit-guide for additional guidance          │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Denial of Service                                            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ws                                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >= 1.1.5 <2.0.0 || >=3.3.1                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ c635d8a886cde7688a0123f573cc5b1f0430780052ba848c8fa1dc8a4c3… │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ c635d8a886cde7688a0123f573cc5b1f0430780052ba848c8fa1dc8a4c3… │
│               │ > react-devtools-core > ws                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/550                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
```
Pull Request resolved: https://github.com/facebook/react-native/pull/21769

Reviewed By: hramos

Differential Revision: D10379892

Pulled By: cpojer

fbshipit-source-id: 9d03f8231a90c5f55eb95ccac029aedd45a49a2d
2018-12-03 22:21:56 -08:00