Summary: This adds unit tests for the new buck worker code, including a test for source map generation.
Reviewed By: cpojer
Differential Revision: D4193657
fbshipit-source-id: 06f7bfb5efa4f411178543a728ac7e42511caa3c
Summary: This adds flow types to new code written for the Buck/Packager integration.
Reviewed By: cpojer
Differential Revision: D4175156
fbshipit-source-id: 38c3d2c9176c7b3cf22b8baed7d445a75d033d04
Summary:
The current transform for require calls replaces strings with module-local IDs. That means that each module would need a local require function.
To save hundreds of closure allocations, we can just use an array that maps local IDs to global IDs.
This diff changes the dependency collection and replacement transform to change a call like `require('React')` to something like `require(_dependencyMap[0])` rather than `require(0)`.
Reviewed By: cpojer
Differential Revision: D4153714
fbshipit-source-id: a63455834c6c2a75da6977cacb9aac9f2cb1b3aa
Summary:
DOCS
Android studio should be android section only
Closes https://github.com/facebook/react-native/pull/10984
Differential Revision: D4197586
Pulled By: JoelMarcey
fbshipit-source-id: 2fe3d737083f3ad301dbc39cdb4f8ff315370d76
Summary: This adds a new flag to the `unbundle` command: `--indexed-unbundle` allows to output the indexed file format even when building for android.
Reviewed By: cpojer
Differential Revision: D4189485
fbshipit-source-id: e56192456de764eb38c25b574ceaaf52eb8a6fca
Summary:
This is the next incremental step to rewrite node-haste. I apologize for the size of this diff but there is really no smaller way to do this. The current architecture passes a single file watcher instance into many classes that each subscribe to file changes. It's really hard to keep track of this. The new implementation reduces the listeners to two (will eventually be just one!) - one in DependencyGraph and one in it's parent's parent's parent (ugh! This doesn't make any sense). This should make it much more straightforward to understand what happens when a file changes.
I was able to remove a bunch of tests because jest's watcher takes care of things like ignore patterns. Some of the tests were specifically testing for whether the change events were invoked and they are now much more straightforward as well by manually invoking the `processFileChange` methods.
(Relanding a fixed version of D4161662)
Reviewed By: kentaromiura
Differential Revision: D4194378
fbshipit-source-id: 8c008247a911573f6b5f6b0b374d50d38f62a4f5
Summary:
`JSBigMmapString` needs to know too much about the details of the "optimized bundle" format. In honour of this fact, I'm renaming it to `JSBigOptimizedBundleString`. In a following diff, I will introduce a new class just for File-backed Strings, whose only responsibility is dealing with an mmaped region.
This diff already pulls in some fixes for formatting reference and pointer declarations from the linter.
Reviewed By: michalgr
Differential Revision: D4189391
fbshipit-source-id: b376c2a8d9ae5b83575da8457e607bbbfc648ebd
Summary:
The various RCTLog macros (`RCTLogWarn`, `RCTLogError`, etc..) are based on the `_RCTLog` macro, which, in its expanded form, has a semi-colon in DEV mode (i.e., when `RCTLOG_ENABLED` is set to 1), and doesn't have one when `RCTLOG_ENABLED` is set to 0.
This could lead to a situation where code will compile in DEV but will fail to compile for prod.
Fixing this by removing the semicolon from the DEV version (as should).
Reviewed By: javache
Differential Revision: D4189133
fbshipit-source-id: 54cb4e2c96d1e48d9df88464aa58b13af432c2bd
Summary: Updates objc version to use the same CSSLayout files as the android version
Reviewed By: emilsjolander
Differential Revision: D4182821
fbshipit-source-id: 81f18184b539fe0ef76ea868bc067b8283c2cccb
Summary: The java enum was recently changed from NOWRAP -> NO_WRAP so the translation from js failed. This fixes that.
Reviewed By: limichaelc
Differential Revision: D4186869
fbshipit-source-id: fe35211a6632d80356d35a01a079279ef4bd7006
Summary:
This should stop Circle CI from crashing.
Let's wait for the test to pass.
cc davidaurelio matryoshcow mkonicek
Closes https://github.com/facebook/react-native/pull/10962
Differential Revision: D4186949
Pulled By: kentaromiura
fbshipit-source-id: 2542376a6e4bf0d7dc423c574bd4573ae9bdfc96
Summary:
There was a bug in the view clipping logic.
Clipping works on uiview hierarchy, but I've been using `reactSuperview` to get clipping rect for my parent.
This is incorrect in a case where these two hierarchies don't match and there are some views between a view and its `reactSuperview`.
So we should really use normal `superview`. A minor complication is that `superview` is `nil` if we are clipped.
We could remember what our last `superview` was, but that's extra data we have to manage. Instead I use one clever trick to avoid doing so.
(Let me know if it makes sense based on my inline documentation.)
Reviewed By: mmmulani
Differential Revision: D4182647
fbshipit-source-id: 779cbcec0bd08eb270c3727c9c5cb9c080c4a2a4
Summary:
Add note to let users know of the **screen overlay permissions** for the application for a first time run.
Let users know of the **failure to connect** issue also for a first time deployment with a red screen which can be fixed by trying again.
Closes https://github.com/facebook/react-native/pull/10707
Differential Revision: D4184582
fbshipit-source-id: d9a19678b72359547c34109eb118d4aed5c74928
Summary: This is a simple change to allow not specifying xcodebuild's `-destination` flag if we just need to build the project without running the test.
Reviewed By: bestander
Differential Revision: D4173546
fbshipit-source-id: 0b77bb5fc01d8cb6a8c9bc765294796631839655
Summary:
**Motivation**
Currently to use the `hitSlop` property on Android you must define the object properties `left`, `top`, `right`, and `bottom` or it will crash. iOS allows omitting object properties from the hitSlop.
This change guards and allows the `hitSlop` object properties to be optional like iOS.
**Test plan (required)**
Run the [example](f930270b00/Examples/UIExplorer/js/TouchableExample.js (L318)) and omit a hitslop property and check it does not crash.
Closes https://github.com/facebook/react-native/pull/10952
Differential Revision: D4182815
Pulled By: ericvicenti
fbshipit-source-id: 07d7aca67b5739d5d1939b257476c24dcb10cbb0
Summary: Maintains a single persistent connection to the packager for the inspector. It supports getting the available pages and connecting to them.
Reviewed By: foghina
Differential Revision: D4088690
fbshipit-source-id: 0c445225f5a3de573b199e7868c8693b78f45729
Summary:
Implements a multi-device proxy for the Chrome debugging protocol. Each device connects
to the proxy over a single websocket connection that is able to multiplex messages to multiple
Javascript VMs. An inspector instance running in Chrome can connect to a specific VM via this
proxy.
Reviewed By: davidaurelio
Differential Revision: D4088492
fbshipit-source-id: 3ee934e98604b5a378da732e687ca05fe3d23ce0
Summary: This is how we compile internally
Reviewed By: emilsjolander
Differential Revision: D4182691
fbshipit-source-id: 314b1a1ead7d299677ce7f71549c986e1b796b3b