Summary: React Native is a lot more powerful an environment than the browser, so we need an alternate mapping, as specified [here](https://github.com/defunctzombie/node-browser-resolve#browser-field)
An example:
```js
{
"browser": {
"./lib/server": false
},
"react-native": {
"dgram": "react-native-udp",
"fs": "react-native-level-fs"
},
"chromeapp": {
"dgram": "chrome-dgram",
"fs": "level-filesystem"
}
}
```
on the other hand, if "react-native" is not present in package.json, you should fall back to "browser"
other than the one (nesting) test added, the tests are unchanged, just done for both "react-native" and "browser"
(I've implemented [react-native-udp](https://npmjs.org/package/react-native-udp) and [react-native-level-fs](https://npmjs.org/package/react-native-level-fs), but they obviously don't belong in the traditional "browser" field as they won't run anywhere except in React Native.)
Closes https://github.com/facebook/react-native/pull/2208
Reviewed By: svcscm
Differential Revision: D2691236
Pulled By: vjeux
fb-gh-sync-id: 34041ed50bda4ec07f31d1dc50dcdfa428af2512
Summary: The anonymous class had an implicit reference back to FrescoModule that would in turn retain the context.
public
Reviewed By: astreet
Differential Revision: D2690747
fb-gh-sync-id: 8a97c102e461b903c6adf7c65956baf364fa5faf
Summary: public
We pass in a `ReactContext` but we really only need a context. Make sure we're using the application one.
Reviewed By: astreet
Differential Revision: D2690692
fb-gh-sync-id: 857d6571c9c01d35e12f09be4c8733cca007306f
Summary: public
Adding the babel helpers that are necessary to support ES2015 imports.
Fixes: https://gist.github.com/ehd/49cb2465df9da6b39710
Reviewed By: mkonicek
Differential Revision: D2690772
fb-gh-sync-id: b1b6c0c048bad809a5c58cdd0a2cbeaa11c72ea7
Summary: public
Bad typo in `RCTProfile.m`, was using `__x86__` instead of the right one `__i386__`.
Reviewed By: jspahrsummers
Differential Revision: D2690557
fb-gh-sync-id: 537eb0502f5df22cd93665cabfddeead12cad9db
Summary: If a redbox error is too long it's not shown at all:
{F24443416}
This diff truncates it to its first 10000 chars, which should be good enough:
{F24443417}
The reason is a limitation of UILabel which backs text property on the used UITableViewCell.
Ideally we would use a custom cell with UITextView, but I don't feel there is any value in displaying super long error messages in a redbox.
public
Reviewed By: jspahrsummers, nicklockwood
Differential Revision: D2690638
fb-gh-sync-id: d9b3fcecd2602e8c2618afe1bb97221c2e506605
Summary: public
The common case is to hit an error when the server isn't running. We shouldn't spew a stack trace for it.
Reviewed By: foghina
Differential Revision: D2685706
fb-gh-sync-id: d230af170b92a05452f04a90f23172f15e62dce6
Summary: This code generation executes eagerly and these functions are fairly large and takes time to compile.
However, I'm mostly doing this change because it significantly increases the Prepack binary file size.
In theory, there might be a slight impact on the first use of these interpolators but I couldn't really tell.
An alternative would be to create a factory that is called by the components at an appropriate time, or to just refactor the whole thing to use Animated.
I didn't want to dig too deeply for a single component though.
public
Reviewed By: vjeux
Differential Revision: D2687296
fb-gh-sync-id: 6fc8cdf54dfb6f0b50c11db973d67d114bbc7400
Summary: public
Any uncaught exception inside an event emitter handler was reported as softError, which didn't crash the app, but left the app running in an unknown state. Since there's no way for the app to catch these softerror (to provide a fallback error view, etc), let's change it to report fatal error for uncaught exception for the time being.
Reviewed By: javache
Differential Revision: D2685322
fb-gh-sync-id: 52956d3db20809cc90448bd080795754b899435e
Summary: public
The VSYNC markers got lost at some point when refactoring RCTBatchedBridge, restore it, but keep it in RCTProfile.
Reviewed By: jspahrsummers
Differential Revision: D2685805
fb-gh-sync-id: 1acad330de7baf004a83b41f90ba4b6532605de6
Summary: public
This moves Android touch events to parity with iOS. The locationX,Y value passed to js now is view relative to the view that is handling the touch.
The pageX,Y is now relative to the root view.
Reviewed By: andreicoman11
Differential Revision: D2670028
fb-gh-sync-id: 5438640d6c78633629b9a308a59cc306bb07815e
Summary: public
The gesture that moves scene around should only be attached when the
move starts at the moment that the first move is granted.
No move would ever be granted if the move event is prevented by the
decendent children (e.g. a slider component).
For now, the move gesture is attached at `onPanResponderGrant`
instead of `onPanResponderMove` thus we'd create "ghost-move-gesture"
when no actual moves is received my the navigator.
Reviewed By: fkgozali
Differential Revision: D2683802
fb-gh-sync-id: 50ae877787167511df48378304bd2ad665c73300