Commit Graph

8656 Commits

Author SHA1 Message Date
Kazuki Sakamoto 0d0f44439c Fix memory func test
Reviewed By: emilsjolander

Differential Revision: D4193712

fbshipit-source-id: a4aba84d054d98a7baf438e213a90bd7ef34e979
2016-11-17 07:43:27 -08:00
Zaan fa1f6fd543 Update IntegrationWithExistingApps.md
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
2016-11-17 07:13:23 -08:00
Jean Lauliac eb2cbeac9f packager: DependencyGraphHelpers: @flow
Reviewed By: cpojer

Differential Revision: D4190148

fbshipit-source-id: 320496bb683288a19605bd667de1472c7fc9c6b4
2016-11-17 05:13:27 -08:00
Michał Gregorczyk 32670371e4 Evacuate unpacking logic from RN
Reviewed By: amnn

Differential Revision: D4186902

fbshipit-source-id: 02d8fe176940a678dc8f8d9c0bcf43732f45bde5
2016-11-17 03:13:44 -08:00
David Aurelio 112bdc99dc Add `--indexed-unbundle` flag to force iOS ra-bundle format
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
2016-11-17 02:43:26 -08:00
Christoph Pojer a9338d6af1 New file watching implementation
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
2016-11-16 20:13:26 -08:00
AgtLucas 84553ebf06 Improve doc code consistency
Summary:
For the sake of consistency. 😃
Closes https://github.com/facebook/react-native/pull/10978

Differential Revision: D4193554

Pulled By: JoelMarcey

fbshipit-source-id: c79de8192ecdd0a38c9693a996de84cf63cc89b1
2016-11-16 18:13:26 -08:00
Ashok Menon 2de1c3507a Introducing `JSBigFileString`
Reviewed By: michalgr

Differential Revision: D4189896

fbshipit-source-id: 0f3cebcd7e76d5c763c29ebc1119ae24b643e5ad
2016-11-16 15:13:39 -08:00
Ashok Menon 79fa6d41a1 Rename JSBigMmapString -> JSBigOptimizedBundleString
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
2016-11-16 15:13:39 -08:00
Ashok Menon 89d81b34db Use folly for error checking
Summary: Small refactor, making error checking clearer.

Reviewed By: lexs

Differential Revision: D4189090

fbshipit-source-id: f3a24eacfe6dd154d29662f510ce19dbe55f89a6
2016-11-16 15:13:39 -08:00
Ashok Menon f22dfa3efb Make Bytecode Header errors non-fatal
Reviewed By: michalgr

Differential Revision: D4182575

fbshipit-source-id: 1e7c229bb6d0bdbfdfc01e93af53441ba2cba9f9
2016-11-16 15:13:39 -08:00
Pieter De Baets c3448236da Include RCTSamplingProfiler in React-tvOS
Reviewed By: ericvicenti

Differential Revision: D4190591

fbshipit-source-id: f8c81c644ba801c27d4c9776b1e8ccaf22df6822
2016-11-16 11:58:33 -08:00
Jean Lauliac 79822ea9d3 packager worker: more @flow
Reviewed By: matryoshcow

Differential Revision: D4160528

fbshipit-source-id: 5f43cb47717288c5344c1204cf435ec727ca752e
2016-11-16 10:43:25 -08:00
Héctor Ramos 364113fa5e Add note on Algolia DocSearch
Summary:
Our Algolia DocSearch box supports version-specific queries. If any commit will be drastically changing the way versions are listed  in versions.html, we need to make sure https://github.com/algolia/docsearch-configs/blob/master/configs/react-native-versions.json is updated accordingly. This PR adds a note to that effect.
Closes https://github.com/facebook/react-native/pull/10960

Differential Revision: D4190100

Pulled By: ericvicenti

fbshipit-source-id: de960338f0814444aa1d37580635cf1173605f1c
2016-11-16 10:28:31 -08:00
Martin Konicek 14ac051c19 Revert D4161662: [RNP] New file watching implementation
Differential Revision: D4161662

fbshipit-source-id: 00604387b4f4b808f95275458f1c653981f91b86
2016-11-16 10:28:31 -08:00
Dan Caspi 42d14bef04 Enforcing semi-colon consistency between dev and release modes when calling RCTLog*
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
2016-11-16 07:28:32 -08:00
Dan Caspi 3b4ac79583 Exposing RCTDevMenuItem when not in DEV mode and adding a missing header
Reviewed By: javache

Differential Revision: D4189179

fbshipit-source-id: c9ad45b20bab884e5d0fcd17efc494fc37ab7d92
2016-11-16 07:28:32 -08:00
Andres Suarez 13ae1a3c03 redux, react-redux and redux-thunk to devDeps
Reviewed By: davidaurelio

Differential Revision: D4189290

fbshipit-source-id: 31c08688c2ecd74fa259096060034ae3083e1909
2016-11-16 06:58:47 -08:00
Andy Street ca69ea435a Update objc build to use CSSLayout in ReactCommon
Summary: Updates objc version to use the same CSSLayout files as the android version

Reviewed By: emilsjolander

Differential Revision: D4182821

fbshipit-source-id: 81f18184b539fe0ef76ea868bc067b8283c2cccb
2016-11-16 04:43:27 -08:00
Christoph Pojer e8a623a2ab New file watching implementation
Reviewed By: davidaurelio

Differential Revision: D4161662

fbshipit-source-id: 9a2a399304c83b411a8b0b74ea015c18b599fbaf
2016-11-16 01:13:40 -08:00
Andres Suarez c22b00e58f Revert D4182752: redux, react-redux and redux-thunk to devDeps
Differential Revision: D4182752

fbshipit-source-id: ba6af3a754ae4a719605aa68f730c741da192a55
2016-11-16 00:58:31 -08:00
Andres Suarez 262a0fab76 redux, react-redux and redux-thunk to devDeps
Reviewed By: davidaurelio

Differential Revision: D4182752

fbshipit-source-id: e224310be4bb7ff91467d408ecf053e98e0029b5
2016-11-16 00:13:51 -08:00
Kazuki Sakamoto e864c40be8 Introduce CSSLayoutSetMemoryFuncs
Reviewed By: emilsjolander

Differential Revision: D4178386

fbshipit-source-id: a79dbdaf82a512f42cc43f99dbc49faba296903b
2016-11-15 20:28:30 -08:00
Emil Sjolander a07abe7188 Correctly translate nowrap -> NO_WRAP
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
2016-11-15 18:58:37 -08:00
Konstantin Raev 7e8bef872a limited max workers in packager to 1 to stop crashes in Ci…
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
2016-11-15 18:58:37 -08:00
Martin Kralik 26e373c903 fix view clipping to operate on ui hierachy
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
2016-11-15 17:13:48 -08:00
Dan Caspi b123cc279e Another fix
Reviewed By: benhiller

Differential Revision: D4185166

fbshipit-source-id: 940dbfbd65c94455979c7e88375784a5c68647a5
2016-11-15 14:58:36 -08:00
Oyewale Ademola 1d99f0d91b Add note to let users know of the screen overlay permissions for a first time run and also the "connect" error issue
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
2016-11-15 12:58:40 -08:00
Kevin Gozali a217c8bc9c Allow specifying no destination for the uiexplorer test run
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
2016-11-15 12:58:40 -08:00
Dan Caspi 851aed262d Fixing a missing colon
Reviewed By: javache

Differential Revision: D4183368

fbshipit-source-id: b7a8bdfa40bf13d3fd5caae8a0985492f1e8b901
2016-11-15 11:17:49 -08:00
Dan Caspi 9fc6204efc Add support for JSC's sampling profiler on iOS for RN
Reviewed By: javache

Differential Revision: D4107919

fbshipit-source-id: ecfe2cacdb78b857e461f7006b29e4d1fe1a1862
2016-11-15 09:29:06 -08:00
Andrew Jack c2a55baf80 Prevent hitslop crash on Android
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
2016-11-15 09:29:06 -08:00
Alexander Blom 2cc57d05a4 Support loading source maps
Reviewed By: davidaurelio

Differential Revision: D4121492

fbshipit-source-id: e2f9c42de3e28cd231580d8b7d3230d47e300d2e
2016-11-15 08:59:02 -08:00
Alexander Blom f571d28e68 Allow launching inspector from dev menu
Reviewed By: davidaurelio

Differential Revision: D4095356

fbshipit-source-id: 46e43578cdcd663316efb82dffde27b77294c5c0
2016-11-15 08:59:02 -08:00
Alexander Blom 18184a83f1 Make Android connect to the inspector proxy
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
2016-11-15 08:59:02 -08:00
Alexander Blom 655fe2796a Add packager inspector proxy
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
2016-11-15 08:59:02 -08:00
Andy Street c94a71e5bd Sort BUCK deps in open source
Reviewed By: emilsjolander

Differential Revision: D4182733

fbshipit-source-id: 245982d8155a5c3676befc2b0f2056f43f648dbc
2016-11-15 08:59:01 -08:00
Emil Sjolander ffcdf25281 Autogenerate enum defenitions for all languages
Reviewed By: gkassabli

Differential Revision: D4174263

fbshipit-source-id: 478961a8f683e196704d3c6ea1505a05c85fcb10
2016-11-15 08:44:30 -08:00
Saleeh 27ae04cabd Fixed #7564
Summary:
Fix for some firewall with ModSecurity
 rules for MULTIPART_STRICT_ERROR, namely MULTIPART_BOUNDARY_QUOTED.
Closes https://github.com/facebook/react-native/pull/10876

Reviewed By: javache

Differential Revision: D4176229

Pulled By: ericvicenti

fbshipit-source-id: 8db819bd3e9b23fa3c1802c48091bb4c44358381
2016-11-15 08:44:30 -08:00
Andy Street c04ab92192 Use -O3 to compile CSSLayout in open source
Summary: This is how we compile internally

Reviewed By: emilsjolander

Differential Revision: D4182691

fbshipit-source-id: 314b1a1ead7d299677ce7f71549c986e1b796b3b
2016-11-15 08:28:56 -08:00
Andres Suarez 0c9eeef88e Keep flow-bin only in devDeps
Reviewed By: davidaurelio, jeffmo

Differential Revision: D4182434

fbshipit-source-id: 71f46e4af6df01dc211599294867d17899318fd1
2016-11-15 07:58:42 -08:00
Christoph Pojer 3bd949cac7 Update Jest + jest-haste-map
Reviewed By: voideanvalue

Differential Revision: D4180887

fbshipit-source-id: f6ee6901e63206824f0639c81b64167b66da2168
2016-11-15 06:58:45 -08:00
Andy Street 3b20a39f7b Move ReactCommon/CSSLayout to ReactCommon/CSSLayout/CSSLayout
Reviewed By: emilsjolander

Differential Revision: D4182345

fbshipit-source-id: 05cb4f0b0e7971d4f66e656ea89d876264a61bd4
2016-11-15 06:28:45 -08:00
Andy Street 7cf27cfea6 Add jni-hack to RN OSS
Summary: See committed README.md. This is part of the migration to the jni implementation of CSSLayout.

Reviewed By: emilsjolander

Differential Revision: D4177009

fbshipit-source-id: f1860f5d4ffafa1375a9658227e0ac10b7df4845
2016-11-15 05:13:37 -08:00
Andres Suarez 72157cf991 Remove parse
Reviewed By: davidaurelio

Differential Revision: D4174312

fbshipit-source-id: 024ae3da56c1afd882f808c15a3b90db35627587
2016-11-15 04:59:48 -08:00
Jean Lauliac 2ed588751d packager: JSTransformer/index.js: @flow
Reviewed By: cpojer

Differential Revision: D4167006

fbshipit-source-id: db0deb2262fe2c53735cb46d9de6e6da1b375180
2016-11-15 04:28:53 -08:00
Jean Lauliac 31b4648a8a packager: DependencyGraph-test: require extractDependencies only once
Reviewed By: davidaurelio

Differential Revision: D4182071

fbshipit-source-id: 622cb3e011b67c2a7df0c6308fbcb7a9ea1ebb96
2016-11-15 03:43:42 -08:00
Jean Lauliac 15baa16ada packager: DependencyGraph-test: mock child_process
Reviewed By: cpojer

Differential Revision: D4182064

fbshipit-source-id: e645e6d952e3aeaadaf35e29d6fcaf6395e590a7
2016-11-15 03:43:42 -08:00
Martin Hernan Giachetti c9e5a64940 Update error-guard.js
Summary:
This vars should be let instead of const because they are reassigned.
Closes https://github.com/facebook/react-native/pull/10818

Differential Revision: D4179219

Pulled By: javache

fbshipit-source-id: b09959c5ff31ad1a896d454011dffd915a0a44c4
2016-11-15 00:13:42 -08:00
Adam Comella fde7c35449 Make resolveAssetSource public
Summary:
When building a native component which takes an image reference as a prop, `resolveAssetSource` needs to be called on the image reference. If this isn't done, the native component may receive the opaque type returned by `require` (e.g. `require('./foo.png')`) which is useless to the native component. `resolveAssetSource` is used by builtin components that take image references such as `Image`, `WebView` and `MapView`.

This change makes `resolveAssetSource` public so that third-party native components can correctly handle image references.

**Test plan (required)**

Verified that `Image.resolveAssetSource` works in a test app. Also, my team is using this change in our app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/10904

Differential Revision: D4177803

Pulled By: ericvicenti

fbshipit-source-id: ffc511b9340325f7d1111002309cd8558ab8e6b0
2016-11-14 21:14:10 -08:00