Summary: This will lock down the plugins to babel version 7-beta.40
Reviewed By: davidaurelio
Differential Revision: D7707160
fbshipit-source-id: 6aec7f98348cac6ddd680c73ea4e36e0fb23e2a8
Summary: This allows toggling fabric renderer via the same renderApplication()
Reviewed By: mdvacca
Differential Revision: D7682524
fbshipit-source-id: 59be1d2bea15f5e13e64e2d72304d79f9cb7d084
Summary:
The `sourceType` option is a new mandatory option for Babel which determines whether to parse the file with the module or script goal. The value "disambiguous" determines this state by parsing.
See https://github.com/babel/babel/pull/7417
Reviewed By: mjesun
Differential Revision: D7685610
fbshipit-source-id: 3958c5ad396592bb1d790e2df4ce315737421a2f
Summary:
This should (at least partially) fix testing for OSS as per f8d6b97140 (r28647044)
Might be related to not locking down the Babel version, will do that in a different commit.
Reviewed By: mjesun
Differential Revision: D7685279
fbshipit-source-id: f00febfad2cec31b7e11996ee8efa2c96b44477b
Summary: Fix the path lookup for files to be considered to run in nodejs.
Reviewed By: mjesun
Differential Revision: D7685278
fbshipit-source-id: c921d40b60d795820448842aec464e7ff82b6eab
Summary:
Just removing a comment
As per f8d6b97140 (r28569388)
While the comment was more to notify about this in general, I suppose it doesn't matter.
Reviewed By: rafeca
Differential Revision: D7685277
fbshipit-source-id: 2d526aeccc2e89b42ae25cbce21af5fe96f1348d
Summary:
This was causing tvOS builds to fail because .m files weren’t being included.
- Add `tvOS` subspec to your project with a tvOS target.
- Build
- Profit.
[TVOS] [BREAKING] [React.podspec] - Fix building for tvOS with CocoaPods
Closes https://github.com/facebook/react-native/pull/18812
Differential Revision: D7680224
Pulled By: hramos
fbshipit-source-id: c6c3b6fb0acd2004579d85c3f72e4edd88e26ed8
Summary:
Add devDependencies support to React Native templates.
Template can have a devDependencies.json file with devDependencies inside.
Using separate files to dependencies and devDependencies, it maintains compatibility with the current version.
Allows React Native templates to have devDependencies, which can help applications to have better organization, quality and testability. It's possible start a new app with some dependencies for dev support like prettier, reactotron, eslint packages and others.
Add a devDependencies.json file with at least one dependency (like prettier)
[CLI] [FEATURE] [local-cli/generator/templates.js] - Add support to devDependencies for react native templates
Closes https://github.com/facebook/react-native/pull/18164
Differential Revision: D7660744
Pulled By: hramos
fbshipit-source-id: 6fbb13832d2d1bd0c06bada0842c890dd99cf331
Summary:
Switch the equality check to avoid crash on the first item. The check can be on a null object and return the correct result.
Fixes#18709
Just a simple switch on equals, to make sure we're not bombing out by having a null scheme.
No related PRs and does not require a document change.
[ANDROID][BUGFIX][BlobModule] Switch equality check in BlobModule.java
Closes https://github.com/facebook/react-native/pull/18893
Differential Revision: D7658036
Pulled By: hramos
fbshipit-source-id: db61b98dae178dbbb645070f7b0d73ab43d30541
Summary:
Fixes issue #11828 that causes layout animations for removed views to
remove some adjacent views as well. This happens because the animated
views are still present in the ViewGroup, which throws off subsequent
operations that rely on view indices having updated.
This issue was addressed in #11962, which was closed in favour of a more
reliable solution that addresses the issue globally since it’s difficult
to account for animated views everywhere. janicduplessis [recommended][0]
handling the issue through ViewManager.
Since API 11, Android provides `ViewGroup#startViewTransition(View)`
that can be used to keep child views visible even if they have been
removed from the group. ViewGroup keeps an array of these views, which
is only used for drawing. Methods such as `ViewGroup#getChildCount()`
and `ViewGroup#getChildAt(int)` will ignore them.
I believe relying on these framework methods within ViewManager is the
most reliable way to solve this issue because it also works if callers
ignore ViewManager and reach into the native view indices and counts
directly.
[0]: https://github.com/facebook/react-native/pull/11962#pullrequestreview-21862640
I wrote a minimal test app that you can find here:
<https://gist.github.com/lnikkila/87f3825442a5773f17ead433a810d53f>
The expected result is that the red and green squares disappear, a blue
one appears, and the black one stays in place. iOS has this behaviour,
but Android removes the black square as well.
We can see the bug with some breakpoint logging.
Without LayoutAnimation:
```
NativeViewHierarchyOptimizer: Removing node from parent with tag 2 at index 0
NativeViewHierarchyOptimizer: Removing node from parent with tag 4 at index 1
NativeViewHierarchyManager: Removing indices [0] with tags [2]
RootViewManager: Removing child view at index 0 with tag 2
NativeViewHierarchyManager: Removing indices [1] with tags [4]
RootViewManager: Removing child view at index 1 with tag 4
```
With LayoutAnimation tag 3 gets removed when it shouldn’t be:
```
NativeViewHierarchyOptimizer: Removing node from parent with tag 2 at index 0
NativeViewHierarchyOptimizer: Removing node from parent with tag 4 at index 1
NativeViewHierarchyManager: Removing indices [0] with tags [2]
NativeViewHierarchyManager: Removing indices [1] with tags [4]
-> RootViewManager: Removing child view at index 1 with tag 3
RootViewManager: Removing child view at index 2 with tag 4
(Animation listener kicks in here)
RootViewManager: Removing child view at index 1 with tag 2
```
Here are some GIFs to compare, click to expand:
<details>
<summary><b>Current master (iOS vs Android)</b></summary>
<p></p>
<img src="https://user-images.githubusercontent.com/1291143/38695083-fbc29cd4-3e93-11e8-9150-9b8ea75b87aa.gif" height="400" /><img src="https://user-images.githubusercontent.com/1291143/38695108-06eb73a6-3e94-11e8-867a-b95d7f926ccd.gif" height="400" />
</details><p></p>
<details>
<summary><b>With this patch (iOS vs Android, fixed)</b></summary>
<p></p>
<img src="https://user-images.githubusercontent.com/1291143/38695083-fbc29cd4-3e93-11e8-9150-9b8ea75b87aa.gif" height="400" /><img src="https://user-images.githubusercontent.com/1291143/38695137-1090f782-3e94-11e8-94c8-ce33a5d7ebdb.gif" height="400" />
</details><p></p>
Previously addressed in #11962, which wasn’t merged.
Tangentially related to my other LayoutAnimation PR #18651.
No documentation changes needed.
[ANDROID] [BUGFIX] [LayoutAnimation] - Removal LayoutAnimations no longer remove adjacent views as well in certain cases.
Closes https://github.com/facebook/react-native/pull/18830
Reviewed By: achen1
Differential Revision: D7612904
Pulled By: mdvacca
fbshipit-source-id: a04cf47ab80e0e813fa043125b1f907e212b1ad4
Summary:
Before, any calls to ReactContext would either use the default DevSupportManager's exception handler in debug mode OR throw exceptions immediately in non debug mode. In order to intercept these kinds of native exceptions, we should reuse the NativeModuleCallExceptionHandler provided by the ReactInstanceManager. For those who don't specify a NativeModuleCallExceptionHandler, the resulting behavior remains the same. For those who do specify a NativeModuleCallExceptionHandler,
the main difference is that it will now be responsible for handling exceptions for ReactContext.handleException
Reviewed By: mdvacca
Differential Revision: D7641772
fbshipit-source-id: 8f175df687723fcbb8a7620f90d8a08c94798738
Summary: Still gross but less gross.
Reviewed By: sebmarkbage
Differential Revision: D7107180
fbshipit-source-id: 31f1639a8f44e4ab247c338001a4a5c9b4b83cdf