Commit Graph

8734 Commits

Author SHA1 Message Date
Martin Konicek 5852684f7b Blogpost about react-native-git-upgrade
Reviewed By: mkonicek

Differential Revision:
D4277012
Ninja: OSS blog

fbshipit-source-id: bdb7db675f208f1103f0c34b9d71d3b0fdd5e875
2016-12-05 07:58:29 -08:00
Emil Sjolander 097d3173e9 Fix library name of yogacore
Reviewed By: bestander

Differential Revision: D4276884

fbshipit-source-id: c791aa3bb27fcf4b48d84427011eae6119fe6edf
2016-12-05 07:43:29 -08:00
Martin Konicek bf55df15db Git upgrade: Tweak wording
Reviewed By: mkonicek

Differential Revision:
D4276739
Ninja: OSS

fbshipit-source-id: 7480a3ee77ed8f6ab0d35f92b43a806bfe29a151
2016-12-05 06:28:34 -08:00
Martin Konicek caa9ab19bf Fix a bug in determining if yarn is available
Reviewed By: mkonicek

Differential Revision:
D4276707
Ninja: OSS

fbshipit-source-id: 79cb2942f27179681d1a8ebfd3bc5a97f544f7af
2016-12-05 06:13:33 -08:00
Martin Konicek f0490d67ff Git upgrade: Tweak README, bump version, fix a bug
Reviewed By: mkonicek

Differential Revision:
D4276644
Ninja: OSS only

fbshipit-source-id: 7bed331770d06addedf51e2ed09d0b9bde5b45ad
2016-12-05 05:58:29 -08:00
Emil Sjolander f4cde4f65c Add #pragma once and extern C to YGEnums.h
Reviewed By: gkassabli

Differential Revision: D4274156

fbshipit-source-id: 9fa0ae146bb9e5bd40d93fa3c56f83424ebd2bf9
2016-12-05 05:13:30 -08:00
Martin Konicek 682f540b41 Git upgrade: add a README
Reviewed By: mkonicek

Differential Revision:
D4276245
Ninja: OSS docs only

fbshipit-source-id: b7a7561932e3209dc34322f12a512eb5724791c3
2016-12-05 03:13:31 -08:00
Emil Sjolander b8708edf0f Update java package name to yoga
Differential Revision: D4271420

fbshipit-source-id: b3cf150569a2331868410339cd19e5c694f2059e
2016-12-05 02:58:32 -08:00
David Aurelio f9f32eb426 Load Indexed RAM format on android
Reviewed By: javache

Differential Revision: D4268243

fbshipit-source-id: fc969cfc69810d0477c926ffc79c23584fcbd7eb
2016-12-04 16:13:30 -08:00
Martin Konicek fb3906994e Unpublish blogpost that was published too early
Reviewed By: mkonicek

Differential Revision:
D4274302
Ninja: OSS only

fbshipit-source-id: 874c2c8ddbae93f6b6e362ccedcd3951267c455d
2016-12-04 11:28:27 -08:00
Emil Sjolander fd2fb6cd65 Update yoga library name
Reviewed By: bestander

Differential Revision: D4273387

fbshipit-source-id: 91373c6ef1e94b330fa249235ba97fec480e17c7
2016-12-04 05:28:29 -08:00
Jake Dawkins 6234a5dfa2 Fix iOS Picker Item Colors
Summary:
I want to resolve #11170 by passing the `color` prop from `PickerIOS.Item` to its implementation.

In `RCTPicker.m`, the label.textColor was already being set and used, but there was nothing referencing the past prop. I passed the prop to the implementation, checked if it exists, and if not, set the default color, like before.

I visually tested the **Colorful Pickers** example in UIExplorer. Those picker `Item`s pass in a `color` prop.

![dec-01-2016 22-07-46](https://cloud.githubusercontent.com/assets/9259509/20821696/ae45d704-b812-11e6-9720-0045d6c0bcd4.gif)

The basic picker does not pass the color prop to the picker `Item`, and there are no errors. Basic functionality is still in tact:

![dec-01-2016 22-09-35](https://cloud.githubusercontent.com/assets/9259509/20821730/ee544f74-b812-11e6-9294-a1b45e78d9f7.gif)
Closes https://github.com/facebook/react-native/pull/11260

Differential Revision: D4272370

fbshipit-source-id: 5fa33c40526dda59ca2ab527c31351bcd27e5cf3
2016-12-03 18:58:29 -08:00
Tim Yung ebe0c85fbe JS: Modernize SignedSource
Reviewed By: cpojer

Differential Revision: D4271506

fbshipit-source-id: b3eff94de9ce2c179d62d57eace9a40797aed397
2016-12-03 12:13:28 -08:00
Tim Yung dd97443f2b RN: Delete Dead `sign` Module
Reviewed By: cpojer

Differential Revision: D4271550

fbshipit-source-id: ffab21055f3e51fccf8640a568703aa8cc20bd0f
2016-12-03 11:58:33 -08:00
Emil Sjolander b9cedaefa6 Rename java API
Reviewed By: IanChilds

Differential Revision: D4265345

fbshipit-source-id: 69ecfd8fac214f86b8b70647b9b909acd83d78b5
2016-12-03 04:44:10 -08:00
Emil Sjolander 85ac5fc354 Rename C api
Differential Revision: D4259190

fbshipit-source-id: 26c8b356ca464d4304f5f9dc4192bff10cea2dc9
2016-12-03 04:44:10 -08:00
David Aurelio b1a23914fa JSIndexedRAMBundle: Don't read null bytes for scripts
Summary:
`JSIndexedRAMBundle` used to read scripts including the terminating null bytes. That worked on iOS, but not on Android, where we have an ascii-only optimization.
This changes that behavior to only read the actual script data excluding the terminal null.

Reviewed By: javache

Differential Revision: D4265374

fbshipit-source-id: 7e6f943666aee610d79939cef09b103305803c69
2016-12-03 02:28:37 -08:00
Connor Garber 9c0ea77684 Android home path reminder visible twice on linux
Summary:
The line
`Please make sure you export the correct path for 'ANDROID_HOME' if you did not install the Android SDK using Android Studio.`
was visible twice (one on top of another) in the docs when viewing linux instructions. I removed the block that set it visible on both linux and windows and incorporated it into the existing windows block.
Closes https://github.com/facebook/react-native/pull/11276

Differential Revision: D4269783

Pulled By: hramos

fbshipit-source-id: 423fca3219567cf96d91aefc43d1ddabb2403728
2016-12-02 20:43:28 -08:00
Sagiv Ofek f9ab788c6b Add more info link for warnedMissingNativeAnimated
Summary:
Add link with more details of how to resolve warnedMissingNativeAnimated warning.
Closes https://github.com/facebook/react-native/pull/11224

Differential Revision: D4268352

fbshipit-source-id: 679574570aea2f4ec7083247d5b6dcba378e8560
2016-12-02 15:28:31 -08:00
Damien Varron e9d459275a Add missing closing brace in docs
Summary:
This is a minor documentation fix

fixes #11150
Closes https://github.com/facebook/react-native/pull/11253

Differential Revision: D4268276

fbshipit-source-id: 67c8f9b4c77a2c781c09376bf4fc15a61b3db490
2016-12-02 15:28:31 -08:00
Ben Kalman fb4f71f4ac Add missing backtick in PanResponder.js docs
Summary: Closes https://github.com/facebook/react-native/pull/11274

Differential Revision: D4268360

fbshipit-source-id: 8d92300830e4568de14350a539c11b8773c425c0
2016-12-02 15:13:34 -08:00
Ben Clayton 833961e05d <Text> Expose Android's includeFontPadding property to JavaScript.
Summary:
By default Android will put extra space above text to allow for upper-case accents or other ascenders. With some fonts, this can make text look slightly misaligned when centered vertically.

We have found that the effect is very noticeable with certain custom fonts on Android. On iOS the font aligns vertically as expected.

Android exposes a property `includeFontPadding` that will remove this extra padding if set to false. This PR exposes that to JS, and adds it to the documentation and UIExplorer.
Closes https://github.com/facebook/react-native/pull/9323

Differential Revision: D4266713

Pulled By: lacker

fbshipit-source-id: f9711254bc26c09b4586a865f0e95ef4bf77cf3f
2016-12-02 12:58:36 -08:00
Nicolas Cuillery 9c5efa34fb Announcement of react-native-git-upgrade
Summary:
Ping mkonicek

![fireshot capture 4 - easy upgrades relying on git_ - http___localhost_8079_react-native_](https://cloud.githubusercontent.com/assets/4425455/20825225/fe93bcb2-b862-11e6-8f0d-123ef2c9071f.png)
Closes https://github.com/facebook/react-native/pull/11263

Differential Revision: D4265603

Pulled By: mkonicek

fbshipit-source-id: 8e496f0d76536744f2b25848a974f240bb5fae3e
2016-12-02 11:58:36 -08:00
Mike Grabowski 59ed3f8351 Update docs with releases information
Summary:
We have changed the release schedule but haven't updated docs yet. This is a small PR that aims to fix it where applicable.

Likely to be cherry-picked to 0.40 branch since its the new one following that system.

Differential Revision: D4266155

Pulled By: mkonicek

fbshipit-source-id: 952af7a0f35a3d984aeadb6efe02f0990830ed8b
2016-12-02 11:28:54 -08:00
Jean Lauliac 3bb6ee4bac packager: Server/index.js: moar @flow
Summary:
Let's continue to bring Flow goodness to the codebase, as it will facilitate future refactorings.

I fixed a few of the typing issues by changing the local logic at times, but in a way that should not cause any difference globally.

Reviewed By: cpojer

Differential Revision: D4265347

fbshipit-source-id: a2a7afd7d93cf00ba58e8c9879a9bb6d5bf30358
2016-12-02 10:58:31 -08:00
Andrew Imm 67828a52bd Allow custom platforms for the RN Packager on a per-project basis
Reviewed By: cpojer

Differential Revision: D4255979

fbshipit-source-id: bf900b67ee30e2f994e96c9a6103ed2e53a87f88
2016-12-02 09:43:31 -08:00
Charles Dick 59dd2133cb ignore heap captures
Reviewed By: mkonicek

Differential Revision: D4265530

fbshipit-source-id: 0933fea4ee2c2ee89805ab9c8d8819a928087c7b
2016-12-02 08:28:32 -08:00
Nicolas Cuillery 53178b48d1 Fix the parse error when specifying an unknown version.
Summary:
**Motivation**

When running `react-native-git-upgrade` with an unknown version, the error message isn't very helpful

**Test Plan**

- Publish the `master` branch to Sinopia
- Run `react-native-git-upgrade 0.666.0` inside a RN project
- Error message is `SyntaxError: Unexpected end of JSON input`
- Publish this branch to Sinopia
- Run `react-native-git-upgrade 0.666.0` inside a RN project
- Error message should be `Error: The specified version of React Native 0.666.0 doesn't exist.
Re-run the react-native-git-upgrade command with an existing version,
for example: "react-native-git-upgrade 0.38.0",
or without arguments to upgrade to the latest: "react-native-git-upgrade".`
Closes https://github.com/facebook/react-native/pull/11264

Differential Revision: D4265553

Pulled By: mkonicek

fbshipit-source-id: 8597eb09cc3397bfa6d2205a9b3bb30acfad530f
2016-12-02 08:28:32 -08:00
Nicolas Cuillery f917c073aa Remove trailing space in template file
Summary:
Simple removal of a trailing space in a template file which leads to a warning when using `react-native-gitupgrade`:
<img width="1187" alt="capture d ecran 2016-12-02 a 12 44 26" src="https://cloud.githubusercontent.com/assets/4425455/20832904/2c039f80-b88d-11e6-855a-78287d29585f.png">

**Test plan**
To repro:
- Install the `react-native-git-upgrade` package (see #11110)
- Upgrade from 0.39.0 to 0.40.0-rc.0

Ping mkonicek
Closes https://github.com/facebook/react-native/pull/11270

Differential Revision: D4265540

Pulled By: mkonicek

fbshipit-source-id: 7b05f2de4711818b25fcd09260ae9c75d187d9ad
2016-12-02 07:43:59 -08:00
Jean Lauliac e5de8bce61 packager: make legocastle script to write to the global cache
Reviewed By: davidaurelio

Differential Revision: D4251001

fbshipit-source-id: bde1e50c82c2cb8f2c2577139061498c809aa37e
2016-12-02 06:58:29 -08:00
Emil Sjolander 779508c0ba Rename enums
Differential Revision: D4244360

fbshipit-source-id: c9fcbdd231098c9ff230a6055676bbc7cbd11001
2016-12-02 05:58:45 -08:00
Emil Sjolander 476973e789 Remove force_static
Reviewed By: gkassabli

Differential Revision: D4258293

fbshipit-source-id: 053f9e607503707830e3766b1f268ab31d3081ff
2016-12-02 05:13:32 -08:00
Mike Grabowski 830d7f6426 Update `releases` to refer to month instead of two weeks
Summary: We also have to update internal guides.

Differential Revision: D4265258

fbshipit-source-id: 72ee394138464f8145075b499b862561e7a2ed40
2016-12-02 04:58:34 -08:00
Janic Duplessis 56fb3db693 Fix packager asset requests on windows
Summary:
6554ad5983 broke assets on windows, this fixes it and add a test to avoid regressions.

Ideally we'd run all the Dependency graph tests on both posix and win32 filesystems but that would probably require doing some sort of factory function to create the tests because I don't think we want to duplicate every test (file is big enough already :)). So for now I just copied that one test and changed the paths manually.

**Test plan**
Run the new test without the fix -> fails
Run the new test with the fix -> succeeds
Closes https://github.com/facebook/react-native/pull/11254

Differential Revision: D4265157

Pulled By: cpojer

fbshipit-source-id: 511470276bd950c2943e94c2dce6840df0fe6d69
2016-12-02 04:58:34 -08:00
Martin Konicek 6bee16a63d Use Yarn if available
Summary:
**Motivation**

If the project is using yarn to manage its dependencies, we should be running 'yarn add' to upgrade the React Native dependency, rather than 'npm install'.

**Test plan (required)**

Running in a project that's in a bad state:

    Error: react-native version in "package.json" (0.29.2) doesn't match the installed version in "node_modules" (0.38.0).
    Try running "yarn" to fix this.

Removed yarn.lock file, ran again:

    Error: react-native version in "package.json" (0.29.2) doesn't match the installed version in "node_modules" (0.38.0).
    Try running "npm install" to fix this.

Running inside a folder that doesn't contain a `package.json` file:

    Error: Unable to find "/Users/mkonicek/Zero29App/package.json" or "/Users/mkonicek/Zero29App/node_modules/react-native/package.json". Make sure you ran "yarn" and that you are inside a React Native project.

Removed yarn.lock file, ran again:

    Error: Unable to find "/Users/mkonicek/Zero29App/package.json" or "/Users/
Closes https://github.com/facebook/react-native/pull/11225

Differential Revision: D4261102

Pulled By: mkonicek

fbshipit-source-id: b44ae91fe46f2c81b14616ca2868cc171692c895
2016-12-02 00:13:32 -08:00
Adam Comella 23423774ba iOS: Fix an image loader crash
Summary:
Fixes #10433

The code didn't account for the fact that cancelLoad is set by two different threads. It gets set on the URL request queue when the request completes successfully and it gets set on the UI queue during cancelation. This oversight lead to a couple of different kinds of crashes.

1. Attempt to invoke a nil function -- We check that cancelLoad is non-nil and on the next line we call it. However, cancelLoad could have been set to nil by the other thread between the time it was verified to be non-nil and the time it was called. Consequently, the program will attempt to call nil and crash.

2. Block deallocated while it's executing -- Suppose cancelLoad points to a block, it is verified to be non-nil, and it is successfully invoked. In the middle of executing the block, cancelLoad, the last reference to the block, is set to nil. This causes the block to be deallocated and its captured values to be freed. However, the block continues executing and the next time it attempts to use a captured value
Closes https://github.com/facebook/react-native/pull/11145

Differential Revision: D4261499

Pulled By: javache

fbshipit-source-id: 46424c6dd8cfa085cef32d945308de07798040bc
2016-12-01 21:28:33 -08:00
Héctor Ramos 964635848b Fix blocks mixed up between mac, linux and windows in Getting Started doc
Summary:
Fixes #11220
Closes https://github.com/facebook/react-native/pull/11229

Differential Revision: D4253097

Pulled By: hramos

fbshipit-source-id: 9821912e25cbf2f3a5a86ea8dc27a85d070af34f
2016-12-01 20:13:28 -08:00
Ray Cohen 0a66acebdc update android gradle plugin version to 2.2.2
Summary:
Similar to 6bfabee0f8 but upgrading to 2.2.2 which is the what android studio suggests using

http://tools.android.com/tech-docs/new-build-system

<img width="625" alt="screen shot 2016-12-01 at 3 06 25 pm" src="https://cloud.githubusercontent.com/assets/20404/20810456/d1e759e8-b7d7-11e6-9fa3-fc79f1112f5e.png">
Closes https://github.com/facebook/react-native/pull/11252

Differential Revision: D4262769

fbshipit-source-id: 78bc910a573fcf5b2722d3b29a5604639029a662
2016-12-01 16:58:33 -08:00
Richard Evans 0b5ff0d2b1 Make run-ios find if a device is booted better
Summary:
**Motivation**
This morning I was trying to test on iPhone 7 with iOS 10 so I booted that device and ran "react-native run-ios" expecting it to notice I had a simulator running and install my app to it. Instead it switched my device to the iPhone 6s iOS 9.2. After digging it was found that run-ios did not handle multiple versions of iOS being installed very well when it came to checking for the booted device. This PR resolves that.

**Test plan (required)**
Tests were added for the situation of multiple iOS versions being installed and a slight change to the code was completed to make the new tests pass and continue to keep the old tests passing.
Closes https://github.com/facebook/react-native/pull/10558

Differential Revision: D4163616

Pulled By: hramos

fbshipit-source-id: 26b44fb73ef402ce252e7a754036279e15359170
2016-12-01 09:58:32 -08:00
Lukas Piatkowski 81b1a2c6a5 Propagate bytecode offset in SamplingProfiler and use it to name unnamed functions
Reviewed By: cwdick

Differential Revision: D4251568

fbshipit-source-id: 2343d8f6a5b2f247a7af1bbd0112bed8edadcbfe
2016-12-01 09:43:37 -08:00
Lukas Piatkowski 48b95f08fb Refactory of SamplingProfiler, CpuProfileGenerator and jscProfilerMiddleware
Reviewed By: cwdick

Differential Revision: D4251541

fbshipit-source-id: ccd221beadd87f6a8cf27a1d68ae06599cf54333
2016-12-01 09:43:37 -08:00
Don Yu 946913e9fa Add in UI Explorer example for showing annotation callouts by default in <MapView>
Reviewed By: martinbigio

Differential Revision: D4253281

fbshipit-source-id: b4bd9fedf7042d3d43d2a50bdb7474caa875781f
2016-12-01 08:58:34 -08:00
Emil Sjolander 8117a029cb Fix error from refactor of setMeasuredDimensionsIfEmptyOrFixedSize
Reviewed By: gkassabli

Differential Revision: D4258254

fbshipit-source-id: e22e36e67260114081e483527fc7ce378f7f0df9
2016-12-01 07:28:30 -08:00
Pieter De Baets 81c8a3f2ea Fix headers for UIExplorerUnitTests
Reviewed By: davidaurelio

Differential Revision: D4258382

fbshipit-source-id: 0538deb409e9dc000a5a339d6d0c76302b52c8d5
2016-12-01 07:13:33 -08:00
Pieter De Baets 0e6895f270 Fix typo
Reviewed By: amnn

Differential Revision: D4258150

fbshipit-source-id: d41c5426b801d32db6099cf8b29596689f369ba6
2016-12-01 06:58:31 -08:00
Nicolas Cuillery a0f3a93f0b Upgrade React and React Native at the same time
Summary:
**Motivation**
As NoelBroda pointed out in https://github.com/facebook/react-native/pull/11104 and https://github.com/facebook/react-native/pull/11123, NPM often produces an unmet peerDependency when upgrading React Native. It causes a failure when running "npm install" with NPM2.

During the git-upgrade, we have to take care of the `react` peerDep: this PR checks if the installed `react` package matches the `react` peerDep of the new `react-native` version. If so, R & RN are upgraded at the same time (in the same `npm install`).

**Test plan**
- Publish `react-native-git-upgrade` to Sinopia,
- Run `react-native-git-upgrade` inside a RN project with version < 0.37,
- Verify that no "unmet peer dependency" warning is displayed
- Open the `package.json` and verify that both R & RN have been updated
Closes https://github.com/facebook/react-native/pull/11226

Differential Revision: D4258007

Pulled By: mkonicek

fbshipit-source-id: cff466d4710807d97fc6161f47bb974097b75261
2016-12-01 03:43:28 -08:00
Héctor Ramos c5da1068f8 Update JDK download link for Mac OS Android set up
Summary:
*First PR to React Native.*

After performing a clean install of macOS Sierra on my machine I tried to get RN set up again and noticed that the link provided for installing Java (required by Android Studio) pointed to the [wrong location](https://www.java.com/en/download/mac_download.jsp). After some time researching I found the right package required by Android Studio [here](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).

I tried looking for a more general link (as this points to the JDK version 8 and has a weird path: _jdk8-downloads-2133151.html_ - Sadly this was the best I could find.

I also looked through listed issues to try and find a previous attempt to fix this error but couldn't find any references, sorry if I missed anything.

**TL;DR:** JDK download link is incorrect, PR updates it to the correct one.
Closes https://github.com/facebook/react-native/pull/11201

Differential Revision: D4253304

Pulled By: hramos

fbshipit-source-id: be8ffe059bf60f5d7aa1876e5581b270187864c2
2016-11-30 17:58:34 -08:00
Joel Sánchez 921921237f Add alternative lsof command for killing a process running on port 8081.
Summary:
I was running RN 0.31 on ArchLinux (kernel 4.7), and "react-native start"
was refusing to run on the default (and sometimes required, as I have
noticed) port. I tried executing the suggested lsof command, but that did not
work. Somewhere I found the lsof command I include in this commit, and that
worked (it was a node.js process). So I'm including it, since I found it
helpful.
Closes https://github.com/facebook/react-native/pull/9402

Reviewed By: lacker

Differential Revision: D4144400

Pulled By: hramos

fbshipit-source-id: 6203549455555efc59b7bab0a3ec23957d80b956
2016-11-30 17:13:30 -08:00
Charles Dick 48d3cd7d26 Pull aggrow from facebookincubator/tracery-prerelease
Reviewed By: bnham

Differential Revision: D4250937

fbshipit-source-id: b5f2cfdeb06c04399670e463b8b2498e2fe0074b
2016-11-30 12:58:35 -08:00
Charles Dick 3094c36c81 remove old heap capture in preparation for pull from tracery-prerelease
Reviewed By: bnham

Differential Revision: D4250926

fbshipit-source-id: 7cfbb8d8aae5ef150f0260c92e946d569e41f7fb
2016-11-30 12:58:35 -08:00