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

10692 Коммитов

Автор SHA1 Сообщение Дата
Héctor Ramos a15ec83e6c Updated Android Studio steps
Summary:
Clarified some steps unique to the Windows installer.
Closes https://github.com/facebook/react-native/pull/13983

Differential Revision: D5065884

Pulled By: hramos

fbshipit-source-id: ab47ad7e7fcf10f8b44ab209807d661c465b76a3
2017-05-16 11:31:06 -07:00
Andrew Y. Chen 4a225f79a3 Make ReactShadowNode's toString useful
Reviewed By: AaaChiuuu

Differential Revision: D5054307

fbshipit-source-id: af548077e9efabcdd9d86c3c06f6408a022762b8
2017-05-16 11:16:28 -07:00
Nitin George 06993fb780 Fix - NetInfoModule intialization
Reviewed By: AaaChiuuu

Differential Revision: D5065578

fbshipit-source-id: 618fbd036bbcbdcafe751802380c1047375ccf19
2017-05-16 10:47:14 -07:00
Pieter De Baets 8525aac769 Ensure enqueueJSCall's completion block is always dispatched after the actual JS call
Reviewed By: mhorowitz

Differential Revision: D4985694

fbshipit-source-id: 50ab14e7088a53e03d5ee70c8ea1e245f531dac1
2017-05-16 09:46:54 -07:00
Valentin Shergin ff42878a5c Introducing `-[RCTUIManager shadowViewForReactTag:]`
Reviewed By: javache

Differential Revision: D5042093

fbshipit-source-id: 7c154b660f51de6d575f3c4a70321415512e92a2
2017-05-16 09:46:53 -07:00
Jean Lauliac 98fc4373fc packager: ResolutionRequest: unify asset resolution
Summary:
The existing resolution logic of assets:

* goes over all the files of the asset's directory for every resolution request;
* duplicates the parsing logic of `AssetPaths` by building up a custom regex for each resolution request.

This changeset proposes to tweak this by building an index for each particular directory in which we're looking for assets, so that we don't have to crawl a single directory twice, and so that it reuses the logic of `AssetPaths.tryParse()` for determining variants.

Reviewed By: davidaurelio

Differential Revision: D5062435

fbshipit-source-id: 708fc5612f57b14565499fad741701269438c806
2017-05-16 09:19:36 -07:00
David Aurelio 280ec6e1eb Append `sourceMappingURL` in bundle building function
Summary:
We appended a `sourceMappingURL` in the same place where we write out the files. This will break output that is not a plain text file, like Random Access Bundles.
This moves the corresponding logic into the function that builds the bundle.

Reviewed By: cpojer

Differential Revision: D5061039

fbshipit-source-id: 17fadb5a687c8d4b1f29439e8bf946bae58eb2d9
2017-05-16 05:16:28 -07:00
Jean Lauliac 40a53918ec packager: TransformCache: trivial optimization wins
Reviewed By: davidaurelio

Differential Revision: D5068811

fbshipit-source-id: 74e4c3218581b2cb081cb7da7639356d0a7d0430
2017-05-16 05:16:28 -07:00
Yoichi Tagaya 7eb876e269 Fix a typo in IntegrationWithExistingApps.md.
Summary:
- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] (N/A) Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.

Fixed a typo in documentation `IntegrationWithExistingApps.md`.

`"Your should see"` -> `"You should see"`

**Screenshots**

Before:

<img width="702" alt="screen shot 2017-05-10 at 12 31 53" src="https://cloud.githubusercontent.com/assets/965994/25917480/13d4bbde-357d-11e7-8977-5e5c2f43e3b9.png">

After:

<img width="699" alt="screen shot 2017-05-10 at 12 33 34" src="https://cloud.githubusercontent.com/assets/965994/25917494/1a0e4c40-357d-11e7-9ba7-8e418e2e3280.png">
Closes https://github.com/facebook/react-native/pull/13903

Differential Revision: D5044045

Pulled By: javache

fbshipit-source-id: fa4355cb26cae7de1b7fa12c3afbe9d39d7f230e
2017-05-16 02:30:31 -07:00
Dmitry Petukhov 36405d13ff Implemented linear gradient fill in Android
Summary:
Partial implementation of "TODO(6352048): Support gradients etc.": linear gradient fill implemented.

We implemented a custom Color Picker based on ReactART.

<img width="268" alt="screen shot 2016-12-19 at 12 27 09 pm" src="https://cloud.githubusercontent.com/assets/18415611/21309512/5033b5a4-c5e7-11e6-9558-5571d18210e9.png">
Closes https://github.com/facebook/react-native/pull/11541

Differential Revision: D5061836

Pulled By: ericvicenti

fbshipit-source-id: ec8b7a0a6f3d2d1a2c1b394d4960d3365ad6fb44
2017-05-16 00:03:08 -07:00
Eli White dc339f77f3 Adding mocks for missing native modules
Reviewed By: fkgozali

Differential Revision: D5052517

fbshipit-source-id: 649e0f01c3d8534b898690f9140d5fc610676041
2017-05-15 15:45:26 -07:00
Paco Estevez Garcia 93f07ed31d Inspector crashes with NetworkOnMainThreadException in Android
Reviewed By: johnislarry

Differential Revision: D5062290

fbshipit-source-id: 0307d2d950b6f54c36f882470c3ac4c5cfb1c5b7
2017-05-15 12:18:02 -07:00
Pieter De Baets 49c4c0c942 Fix packager reload command not working
Reviewed By: yungsters, mmmulani

Differential Revision: D5061001

fbshipit-source-id: 8b75c95525f90955a8dc2054861ad3b6e25eab1d
2017-05-15 10:30:36 -07:00
Dmitry Zakharov f8b683b3ee Copy-free Source loading implementation
Reviewed By: amnn

Differential Revision: D4914165

fbshipit-source-id: 38851679cb696c41f59edfd0d2005faf37813b23
2017-05-15 09:15:29 -07:00
Georgiy Kassabli c4fb32fa40 Correct YGNodeCanUseCachedMeasurement to account for non-existent scale factor
Reviewed By: emilsjolander

Differential Revision: D5061016

fbshipit-source-id: 907ef987bd0ead29cf02f6945a3f03d4ffb58a2e
2017-05-15 08:49:38 -07:00
Pieter De Baets 0c1e009ad9 Disable SamplingProfiler for OSS builds
Summary:
It depends on symbols that are not available.
Closes https://github.com/facebook/react-native/pull/13950

Reviewed By: cwdick

Differential Revision: D5053724

Pulled By: javache

fbshipit-source-id: 9d5676ce5e4ad3ceeb20aeb8c48429319d48799e
2017-05-15 08:01:56 -07:00
Jean Lauliac 2f5524d04e packager: simplify getAssetDataFromName?
Summary:
Not only is this function is building a custom Regex for every single file, but it's also duplicating some of the work of the inner function, that is already splitting up the platform/extension. This changeset refactors both function to have a more strict and legible logic to extract asset information. We extract the base name first, then we extract the resolution from it, instead of rematching platform and extension.

I stumbled on this while looking into refactoring the asset resolution logic of `ResolutionRequest#_loadAsAssetFile()`. The next step would be to reuse the exact same function for resolving assets instead of using a custom regex there as well.

Reviewed By: davidaurelio

Differential Revision: D5060589

fbshipit-source-id: b48d9a5d8e963be76cad5384c6bfb3e214a73587
2017-05-15 06:48:03 -07:00
Georgiy Kassabli baf93e46d0 Adding ability to account for rounding in YGNodeCanUseCachedMeasurement
Reviewed By: emilsjolander

Differential Revision: D5059560

fbshipit-source-id: d729e991758a8c668a4b373105b71337961875cd
2017-05-15 06:23:45 -07:00
Aaron Chiu 28c07f8698 allow inspector to show if not Systrace profiling
Reviewed By: gaearon

Differential Revision: D5060716

fbshipit-source-id: 9a00f80be8ef28da37d7aa672a4c0805182c1582
2017-05-15 05:16:48 -07:00
Pieter De Baets 65aaa9c045 Fix memory leak in RN fbsystrace support
Reviewed By: alexeylang

Differential Revision: D5060485

fbshipit-source-id: f2ab38023f1870992c16bea08ee887261d0ca34b
2017-05-15 03:47:15 -07:00
Pieter De Baets 6221053179 Improve systrace markers
Reviewed By: mhorowitz

Differential Revision: D4860135

fbshipit-source-id: ce963010883e6b9cc8e34f7ff01b4018cd195eba
2017-05-12 18:07:49 -07:00
Arsen Ghazaryan 49e6d3965f Add missing license to UnimplementedView.js
Summary:
Added a missing license header to UnimplementedView.js

No code logic got changed, just added a comment. So the regular CircleCI tests should be fine.
Closes https://github.com/facebook/react-native/pull/13952

Differential Revision: D5056778

Pulled By: javache

fbshipit-source-id: feb106946a9a34cfdf2df63de21305ac779296f4
2017-05-12 17:49:03 -07:00
Spencer Ahrens 962e664c33 Fix prop-types warning in LayoutAnimation
Summary:
And clean it up.

**TestPlan**

No more warning when launching RNTester

LayoutAnimationExample still works, also without warnings.

Reviewed By: fkgozali

Differential Revision: D5055050

fbshipit-source-id: a3a6cdf25632dc4f9455d795e8a2e3c00f968e09
2017-05-12 15:06:17 -07:00
Michael Lee fb99f55939 Fix compilation due to missing flag
Reviewed By: mhorowitz

Differential Revision: D5053975

fbshipit-source-id: cfb5e71d7c9c318fa1942ce9d4dc72b4f7c1e054
2017-05-12 13:31:24 -07:00
ivmarkov 28748f165b Support custom packager port when debugging on Android
Summary:
This three liner addresses the issue described by Rovack here: #9935

Basically, changing the React Native Packager port from 8081 to, say, 8088 does work, *except* if you want to debug your code with ChromeDevTools (i.e. selecting "Debug JS Remotely" from the Android app dev menu).

The analysis of Rovack, pointing to a hard-coded port in DevServerHelper.getHostForJSProxy() was *spot on* - many thanks to him.
Closes https://github.com/facebook/react-native/pull/12095

Differential Revision: D5044330

Pulled By: mkonicek

fbshipit-source-id: c07f59f700683ffba84f03d44f82b394e2e899c1
2017-05-12 13:31:24 -07:00
David Aurelio dc783d97e8 Make `postMinifyProcess` non-optional
Reviewed By: cpojer

Differential Revision: D5052315

fbshipit-source-id: 4c3573fc6e97b4f561f371179ea2dd6f89fac05a
2017-05-12 11:45:37 -07:00
Jean Lauliac 4ae8e5e21a packager: HasteMap: @flow + fixes
Summary: Add Flow types, revealing a few problems, such as `isHaste` having the wrong return value in the "pseudo-mocks". But since the buck worker is in fact working, I guess these functions were never called... The point of typing this file is that I'm going to start aggressively pruning dead code in `node-haste` and hopefully, eventually, get rid of `Moduleish` and `Packageish`.

Reviewed By: davidaurelio

Differential Revision: D5052379

fbshipit-source-id: dab3f18f05fcf43fbbc48b589170b1cf367d6a48
2017-05-12 10:37:03 -07:00
Jean Lauliac ffe18867f2 packager: remove replacePatterns module
Summary: This does not appear to be used anywhere anymore.

Reviewed By: cpojer

Differential Revision: D5052224

fbshipit-source-id: 142fdcdf48f4ad16a04bb747b41d623f214f7a68
2017-05-12 10:37:03 -07:00
Jean Lauliac 174f84cc8a packager: getInverseDependencies: @flow
Reviewed By: davidaurelio

Differential Revision: D5052190

fbshipit-source-id: ebfa2a698233e914b016fe50f790ee8aa758c4f2
2017-05-12 10:37:03 -07:00
Jean Lauliac d0c2b068d7 packager: DependencyGraph: remove re-exported functions
Reviewed By: davidaurelio, cpojer

Differential Revision: D5052149

fbshipit-source-id: 43f3877ceea038762ded6c42ab0481d215db2118
2017-05-12 10:37:03 -07:00
Jean Lauliac 2b5b729bbb packager: remove getPlatformExtension default platforms
Summary: Default arguments are dangerous, and it shows here again. `Server` was calling that function without passing down the platforms, meaning custom platform would not be accounted for, possibly causing all kinds of bugs for OSS use cases. Additional, the typing of `platform` across the stack was wrong: it can be `null`, in which case we resolve the files without extension. The reason Flow didn't detect that issue before is because we use `Object.assign` to re-export the function from `DependencyGraph`, but Flow is not smart enough to propagate the types in that particular case. I'll remove all the other re-export, as it may uncover further type errors.

Reviewed By: davidaurelio

Differential Revision: D5052070

fbshipit-source-id: 7b427ec036ca74b5dcd7c88f7dfa0df541b8eb6b
2017-05-12 10:37:03 -07:00
David Aurelio e1306565db Use `this` rather than `global` in prelude
Summary: in new-style builds, the prelude is not wrapped into an IIFE, so `global` is not available. Since the bundle as a whole is not running in strict mode, we can access the global object with `this`.

Reviewed By: jeanlauliac

Differential Revision: D5051731

fbshipit-source-id: 4003b5e57ba8626e38e68e92d5778c2c59ca69a5
2017-05-12 09:46:04 -07:00
Emil Sjolander 0a4ce80868 Fix typo causing wrapped children to be sized by wrong axis margin
Reviewed By: passy

Differential Revision: D5044470

fbshipit-source-id: 7d203dd48b258a5fe5c4b3c493099092a1d334db
2017-05-12 09:18:56 -07:00
Emil Sjolander 67b96fc0ce Include margin when calculating if children overflow
Reviewed By: passy

Differential Revision: D5044471

fbshipit-source-id: e7c1eb694445ffb898bcf375d9deefc558c49f11
2017-05-12 09:18:56 -07:00
Emil Sjolander 54548894d0 Fix flex basis not accounting for max size constraint
Reviewed By: gkassabli

Differential Revision: D5044314

fbshipit-source-id: d9f9db832e4943a57a89c9d162ff6077b709795a
2017-05-12 09:18:56 -07:00
Dominic Gannaway 56e44a7fdd Change packager project root path so RNTester can start
Summary:
A quick fix to ensure RNTest works. This PR changes the process root for where packager is run, resulting in the right `cwd` directory path when RN launches RNTester.
Closes https://github.com/facebook/react-native/pull/13947

Differential Revision: D5052093

Pulled By: davidaurelio

fbshipit-source-id: 506a8cd63f1709c948bcc4586467020d380ba85e
2017-05-12 09:02:41 -07:00
Dan Abramov 7210a060e6 Enable JSX source plugin in DEV and integrate it with React DevTools
Summary:
The `env` option has been broken in Babel for a while (https://github.com/babel/babel/issues/4539), and will be deprecated (https://github.com/babel/babel/issues/5276).

I am changing this code to the way Babel < 6.10 interpreted the `env` option. This should fix the `__source` JSX transform which was applied in DEV in the past, but stopped getting applied because of the Babel bug.

I also changed the `filename` passed by Babel to be relative (currently, to `fbsource` but open to other options). This way DEV builds are still reproducible.

This still needs some help from davidaurelio to make the root location more foolproof. I'd also appreciate zertosh taking a look in case there's a better way to "anchor" the relative path. All I need is to for `react-third-party/react-devtools/react-devtools` and `babelTransformer.js` to agree on what the relative path base is.

Closes https://github.com/facebook/react-native/pull/13893

Reviewed By: gaearon

Differential Revision: D5035892

Pulled By: davidaurelio

fbshipit-source-id: 19ffeb867d7ed5928e9de05dcec9ba85bf961dd5
2017-05-12 08:50:11 -07:00
Pieter De Baets 6e2c07534e Fix Circle CI builds
Summary: Closes https://github.com/facebook/react-native/pull/13945

Differential Revision: D5052083

Pulled By: javache

fbshipit-source-id: eeda8253d26c2dfd0d20b93b238377fe92e3ca3c
2017-05-12 08:35:30 -07:00
Jean Lauliac afe19d8ac5 packager: never allow platform-specific asset resolution
Summary: I stumbled on this while refactoring that function, and i realised that, I believe it doesn't make sense to take into account the platform extension of the "potiential" file path. The reason is, if you try to require "foo.ios.png", the returned asset name would be "foo", and thus we'd try to find "foo.${ext}.png" where `ext` could actually be `android` or anything else! So it's confusing. There's no reason we should allow callsites to specify platform anyway I think. With this changeset we're not losing any functionality, but it might require people to fix some incorrect callsites.

Reviewed By: cpojer

Differential Revision: D5051791

fbshipit-source-id: 2a1ec7a8bfa6791b6016213305a72bc0b81f23b9
2017-05-12 07:39:10 -07:00
Jean Lauliac 3bf3c83a5b packager: add transform-class-properties transform
Summary: I found myself a few times wanting that transform, that makes it slightly simpler to have bound method. So I propose we add it. Not a big deal though. Note it also allows static properties with the same syntax, that is handy.

Reviewed By: davidaurelio

Differential Revision: D5051579

fbshipit-source-id: 7ebf7c709bf52a30a525550c1eda1a6a2f7b8e1e
2017-05-12 07:39:10 -07:00
Emil Sjolander 81b9e108bb Big refactor moving most logic into DebugComponent
Reviewed By: passy

Differential Revision: D5027780

fbshipit-source-id: 95a95b3572747aa2088f8f9b35a160257eb59269
2017-05-12 04:03:30 -07:00
Jean Regisser 562f6c55fa Ship third-party-podspecs in the npm package
Summary:
Hi,

Today I upgraded from RN 0.44 to 0.45.0-rc.0 and noticed I add to include either `CxxBridge` or `BatchedBridge` in the React subspecs in my Podfile to get my project to compile again (https://github.com/facebook/react-native/issues/13010).

Adding `BatchedBridge` works fine. However I wanted to try `CxxBridge` as described in 5aca739cc2 but couldn't do it since the required `third-party-podspecs` folder with `Folly.podspec`, `GLog.podspec` and `DoubleConversion.podspec` hadn't been included in the npm release.

So here is the fix for that.
It should be included in the next 0.45.0-rc release.

Let me know what you think.
Closes https://github.com/facebook/react-native/pull/13922

Differential Revision: D5051477

Pulled By: javache

fbshipit-source-id: e5c527f1ee9c84734d3e3a3d85ec3f1e5d648bef
2017-05-12 03:02:13 -07:00
Pieter De Baets afbab66a44 Define rn_xplat_cxx_library for OSS builds
Reviewed By: bestander

Differential Revision: D5044673

fbshipit-source-id: 41c9fe4b2ae128eed6f299dd8ea9dbfc4ca75917
2017-05-12 02:45:19 -07:00
Aaron Chiu d334cdd590 remove yellow box from systrace
Reviewed By: alexeylang

Differential Revision: D5024794

fbshipit-source-id: 5551135c16adb6f93d2f5957171f41d63b9a6bf9
2017-05-11 21:00:50 -07:00
Aaron Chiu c7317c5e61 make the CREATE_MODULE marker actually end
Reviewed By: fkgozali

Differential Revision: D5024378

fbshipit-source-id: 6f25ecd15e25a6d9aabaa52013c2abe24a3f8fb9
2017-05-11 20:00:21 -07:00
David Aurelio 2fbe3b799e Pass local paths to transformers
Summary:
Pass `localPath` to transformers to allow usage of plugins like `transform-react-jsx-source` that don’t conflict with x-machine caches, e.g. Buck or our own global cache.
These caches don’t work properly if paths local to a specific machine are part of cached outputs.

Reviewed By: jeanlauliac

Differential Revision: D5044147

fbshipit-source-id: 1177afb48d6dd9351738fcd4da8f9f6357e25e81
2017-05-11 16:47:43 -07:00
David Aurelio 143beaf95d Use local paths for global cache
Summary:
Changes the global cache to use *local paths* rather than base names of files for the cache key. This is to enable correct usage of babel transforms like `transform-react-jsx-source` that use file paths in their output.

It remains a responsibility of the transform implementer to pass relative paths to babel if the global cache is being used.

Reviewed By: jeanlauliac

Differential Revision: D5044028

fbshipit-source-id: 2ef1e1545e510a18ab49a307053d91b4f40269b2
2017-05-11 16:47:43 -07:00
David Aurelio ee8e721c33 Add glossary, some renames
Reviewed By: jeanlauliac

Differential Revision: D5043919

fbshipit-source-id: ba6f47102747c0762a153cd860f8f61f090cf5d7
2017-05-11 16:47:43 -07:00
David Aurelio c44e37bf74 Require transformer options to be present throughout
Summary: `transformModulePath` used to be an optional string, because `ConfigT` allowed for an optional `getTransformModulePath` method. Effectively, we required it to be present. This builds on top of the cleanups around `ConfigT` and gets rid of the flow error suppressions

Reviewed By: jeanlauliac

Differential Revision: D5037466

fbshipit-source-id: bc5c9cbc566e7aa74e7f6397e69fa87cdac7bc00
2017-05-11 16:47:43 -07:00
Aaron Chiu 105d219935 make systrace look more like prod
Reviewed By: alexeylang

Differential Revision: D5023354

fbshipit-source-id: ed9d4b43d042c9aa12d7c74901b026a105b31d9c
2017-05-11 15:21:27 -07:00