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

361 Коммитов

Автор SHA1 Сообщение Дата
ericlewis 97e6ea1371 Fabric: working podspecs & works in RNTester (#23803)
Summary:
This is the couple of hacks I used after I finished #23802 in order to get fabric working on RNTester. This is inspired from prior work by kmagiera.

The goal of this PR is to show others what I’m struggling with, and to eventually merge it sans hacks.

- Yarn Install
- Uncomment the commented out pods in RNTester's pod file
- Open RNTesterPods workspace
- Run App

- this is only for pods, the non-pod RNTester will no longer work until updated with fabric too.
- `SurfaceHostingView` & `SurfaceHostingProxyRootView` both try to start the surface immediately, this leads to a race condition due to the javascript not having loaded yet, the hack here is:
   1. Swizzle the `start` method on `RCTFabricSurface` to no-op when called.
   2. Add observer for `RCTJavaScriptDidLoadNotification`
   3. Call private method `_startAllSurfaces` on `_surfacePresenter` in AppDelegate when we receive `RCTJavaScriptDidLoadNotification`.

[General] [Added] - Use Fabric in RNTester
Pull Request resolved: https://github.com/facebook/react-native/pull/23803

Reviewed By: shergin, mdvacca

Differential Revision: D14450726

Pulled By: fkgozali

fbshipit-source-id: 8ae2d48634fecb60db539aaf0a2c89ba1f572c27
2019-03-15 23:59:22 -07:00
Adam Ernst 0ceaaf0cf6 Revert D14472633: [react-native][PR] Update React Native to use latest CLI
Differential Revision:
D14472633

Original commit changeset: b7ea92ee130d

fbshipit-source-id: ed5bce3ba4a39c8b60e787cb678747231583f6f5
2019-03-15 14:07:54 -07:00
Mike Grabowski 1fe4799a88 Update React Native to use latest CLI (#23940)
Summary:
Latest CLI requires `reactNativePath` to be explicitly set when `react-native` is not present under `node_modules` (which is the case when running from source).

Fixes #23936

This PR also updates CLI to latest version and removes private calls to `findPlugins` (it's now exposed under public interface).

We also remove custom `rn-cli.config.js` options that are no longer needed that we have `--reactNativePath`. I added them a month ago as a temporary workaround.

[GENERAL] [FIXED] - Internal - Update to the latest CLI
Pull Request resolved: https://github.com/facebook/react-native/pull/23940

Differential Revision: D14472633

Pulled By: cpojer

fbshipit-source-id: b7ea92ee130da6730aa0093265958aa1b8c2ab97
2019-03-15 11:07:48 -07:00
Michael Lee c0ea099c85 Clean up instances of scripts/signedsource.py
Summary: Reorganize signedsource tool

Reviewed By: scottrice

Differential Revision: D14414767

fbshipit-source-id: 6a0b0876b285ac00c7c409124d215bf4de683593
2019-03-14 13:42:27 -07:00
Peter van der Zee dcd4e90d9a Bump Prettier to 1.16.4
Summary:
@public
This bumps Prettier to v1.16.4
Only format source files were updated.

Reviewed By: mjesun

Differential Revision: D14454893

fbshipit-source-id: 72f9872fe764a79dbf0d9fab9bebb1456b039f2f
2019-03-14 07:00:27 -07:00
Bruno Lemos 22b3528e7b - Allow overriding ENTRY_FILE on react-native-xcode.sh script (#23667)
Summary:
1. Feature parity with Android, that already have this extensibility point on `build.gradle`:
7c9805ce16/react.gradle (L12)

2. Helps with using react-native on a monorepo project (yarn workspaces) without having to use the no-hoist feature (e.g. in my case the `ENTRY_FILE` is on `root/packages/mobile/index.js` instead of `root/index.ios.js`)

[iOS] [Added] - Allow overriding ENTRY_FILE on react-native-xcode.sh script
Pull Request resolved: https://github.com/facebook/react-native/pull/23667

Differential Revision: D14247236

Pulled By: hramos

fbshipit-source-id: 2f678c65eb898fc04549ab738b62e5864d753afd
2019-02-27 13:37:22 -08:00
Guillaume Hain 8d2e8fdca4 macOS : request interactive input when killing the packager (#19663)
Summary:
Do not request interactive input when running on a CI

When I'm running the build on my CI server, many Terminal windows are remaining on the server because of the `read` command.

This PR prevent this behaviour when the `CI` environment variable is defined so that it doesn't alter the behaviour on local machines.
Pull Request resolved: https://github.com/facebook/react-native/pull/19663

Differential Revision: D14206458

Pulled By: cpojer

fbshipit-source-id: 476067ebebb07c6e708469fa8829a06e05c58200
2019-02-24 22:48:17 -08:00
Eric Lewis 9ca7565563 Enable js e2e tests (#23571)
Summary:
Part of #23561. Small refactor to use 1 marker for the different tests, as it doesn't matter where it is- so long as we can detect it.

[General] [Fixed] - turn on JS e2e tests
Pull Request resolved: https://github.com/facebook/react-native/pull/23571

Differential Revision: D14172069

Pulled By: hramos

fbshipit-source-id: cdde369a09d3528d05fec01d015613b3397714e6
2019-02-21 13:16:42 -08:00
Eric Lewis 4a01be47cd Fix iOS e2e test (#23566)
Summary:
As part of #23561 this is an attempt at fixing iOS.

[iOS] [Fixed] - e2e test
Pull Request resolved: https://github.com/facebook/react-native/pull/23566

Differential Revision: D14162780

Pulled By: cpojer

fbshipit-source-id: b55d32e30f88370100f7fbddf9dfb208280844f4
2019-02-20 22:01:12 -08:00
Héctor Ramos 9820c88877 No longer run disabled tests on Héctor's PRs (#23562)
Summary:
Do not run disabled tests, even when the commit / PR is pushed by hramos. See the existing functionality at https://circleci.com/gh/facebook/react-native/73844?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link:

![screen shot 2019-02-20 at 8 21 39 am](https://user-images.githubusercontent.com/165856/53106776-90ecb600-34e8-11e9-9b02-a7f3990407b2.png)

There are a handful of tests that are known to be broken in Circle CI. This has been the case since at least Fall 2017, when we migrated to Circle 2.0. These tests haven't been fixed for several reasons, one of them being that once they were removed from the Circle CI config, the pressure to fix them has been lowered.

Last year, I added these disabled tests back to Circle CI, but used a script to prevent them from running unless the job was initiated by myself. This would allow us to get good signal from Circle CI without polluting results with known failing tests, while still showing me which tests needed some work before getting re-enabled again.

In practice, this functionality is introducing more friction as I work on fixing new CI failures: my own fixup PRs are marked as failing due to these "disabled tests" (see test_android on https://github.com/facebook/react-native/pull/23558). To ensure we don't lose track of these failures, I've created an umbrella issue at https://github.com/facebook/react-native/issues/23561.
Pull Request resolved: https://github.com/facebook/react-native/pull/23562

Differential Revision: D14161172

Pulled By: cpojer

fbshipit-source-id: 040500dcb433d3127c64a42b31f94af6bbaa6ed1
2019-02-20 18:46:22 -08:00
Nimish 9f4ee25cf7 fix: remove the unused packages and convert minimist to yargs (#23467)
Summary:
`Minimist` package functionality can be done easily using `yargs` package. Also removed couple of unused dependencies.

[General] [changed] - used `yarns` package instead of `minimist` package

Pull Request resolved: https://github.com/facebook/react-native/pull/23467

Differential Revision: D14099638

Pulled By: cpojer

fbshipit-source-id: 59de2086e4204e09c91fd2c99d209ca32c0ef82c
2019-02-15 05:54:10 -08:00
Héctor Ramos 937c79e2f2 Suggest running yarn lint --fix (#23413)
Summary:
This PR expands the code analysis script to allow for customizing the GitHub Review left by analysis-bot whenever it finds code-level issues.

Some, but not all, `eslint` errors are fixable by running `yarn lint --fix`. When the `eslint` converter finds warnings or errors, the bot will suggest running the command as part of the review.

The script could be adjusted to only suggest this when `eslint` returns a non-zero `fixableErrorCount` or `fixableWarningCount`, but I think this is a good first step to get people to unblock themselves when they see this type of review from the bot.

I've also excluded `bots/` and `scripts/` from eslint as these have several `eslint` errors that need to be addressed. These directories do not contain core RN code, so they can be excluded for now.

[GENERAL] [Changed] - analysis-bot will suggest fixing eslint warnings on code reviews
Pull Request resolved: https://github.com/facebook/react-native/pull/23413

Differential Revision: D14065757

Pulled By: cpojer

fbshipit-source-id: cc588643f7ddb3c4631d89c26b799f7a7244e616
2019-02-13 08:46:03 -08:00
Janic Duplessis 9ccde378b6 Allow changing the project path in react-native-xcode.sh (#23273)
Summary:
When using react-native inside a monorepo with yarn workspaces the react-native installation can get hoisted and the assumption that the project is located in the folder where node_modules is is no longer true.

To handle this case I added an option to pass the path of the project root.

For example when using yarn workspace we can use something like this in the xcode scripts:

Assumes the following folder structure
/packages/myapp
/node_modules/react-native

```sh
export NODE_BINARY=node
export PROJECT_ROOT=$PWD/..
../../../node_modules/react-native/scripts/react-native-xcode.sh
```

It could be possible to change the default to `$PWD/..` since pwd is where the xcode project is located but then it would break if the native project structure is not the one we assume. To avoid the breaking change I decided to just keep the existing behaviour and allow changing the path with `PROJECT_ROOT`.

[ios] [added] - Allow changing the project path in react-native-xcode.sh
Pull Request resolved: https://github.com/facebook/react-native/pull/23273

Differential Revision: D13941793

Pulled By: cpojer

fbshipit-source-id: f394641b1c9d01f32bc4169097e39fc14df8191f
2019-02-04 08:01:24 -08:00
Mike Grabowski 9a9370481f Fix Detox tests after upgrading to latest CLI (#23191)
Summary:
Latest changes inside CLI now require that Metro configuration is provided when building RNTester app. This is to let CLI know that instead of looking for "react-native" under "node_modules" (that is obviously not present since we are running from source), it should check the paths provided.

When running "npm start", it finds the configuration at the root. However, when building through Xcode (e.g. "react-native bundle" or "xcodebuild" in Release scheme), it runs "react-native-xcode.sh" that works in different folder and makes Metro not detect the configuration file.

This PR explicitly sets path to the configuration via `BUNDLE_CONFIG`.

It also removes `pwd` from being prepended to all `BUNDLE_CONFIG` values. In my case, `pwd` was `/Users/grabbou` and the RNTester files where inside `/Users/grabbou/Repositories/react-native`. I was unable to point the script to correct location without making it aware of the folder structure - which is not going to work on the CI.
Pull Request resolved: https://github.com/facebook/react-native/pull/23191

Differential Revision: D13851741

Pulled By: hramos

fbshipit-source-id: d920353fd68d39468bd33bd1ad47e03b017a7727
2019-01-28 20:29:58 -08:00
Sergey Zolotarev 1024dc251e Change location of iOS build cache directory to ~/Library/Caches/ (#22688)
Summary:
Instead of using ~/.rncache use the special Caches directory designed for caching files. This fixes #21780.

Changelog:
----------

[iOS] [Changed] - Moved iOS build cache directory from ~/.rncache to ~/Library/Caches/com.facebook.ReactNativeBuild
Pull Request resolved: https://github.com/facebook/react-native/pull/22688

Differential Revision: D13817171

Pulled By: cpojer

fbshipit-source-id: af03dda66f9d49f4fe88bd050b359ccb7abb889a
2019-01-25 03:26:32 -08:00
Takagi Kensuke c3bbce449c - Fix failing to bundle in Release build with ndenv of anyenv by supporting anyenv (#22875)
Summary:
refer: https://github.com/riywo/anyenv

Changelog:
----------

[iOS] [Fixed] - Fix failing to bundle in Release build with ndenv of anyenv by supporting anyenv
Pull Request resolved: https://github.com/facebook/react-native/pull/22875

Differential Revision: D13682773

Pulled By: hramos

fbshipit-source-id: 0baacc95bd215d4724ba418ff187d51b11126326
2019-01-15 16:49:44 -08:00
Dulmandakh 8a8a11b77a fix validate-android-test-env.sh (#22961)
Summary:
fix validate-android-test-env.sh to not parse .gradle files for build tools versions, because it was removed.

Changelog:
----------
[CI] [Changed] - fix validate-android-test-env.sh to not try parse .gradle files
Pull Request resolved: https://github.com/facebook/react-native/pull/22961

Differential Revision: D13655750

Pulled By: hramos

fbshipit-source-id: 1accb6ac7a7c74ab335dd92977b0b090820a622c
2019-01-14 10:54:18 -08:00
Héctor Ramos 700c713671 Bump to Android Build Tools 28.0.3, Gradle 4.10.2, Gradle Plugin 3.2.1
Summary: Bump Android Build Tools to Version 28.0.3, Gradle to 4.10.2, and the Android Gradle Plugin to 3.2.1.

Reviewed By: mdvacca

Differential Revision: D13631120

fbshipit-source-id: 709aa25a7a8e1ff0bfc0a969ba6e7cd92850bc0f
2019-01-11 12:24:59 -08:00
Ignacio Olaciregui 2c3f807ace Fix no shadow warnings (#22190)
Summary:
Fixes `no-shadow` eslint errors.
Pull Request resolved: https://github.com/facebook/react-native/pull/22190

Differential Revision: D13564238

Pulled By: cpojer

fbshipit-source-id: 96ba36b397088fa406e8f5781b1538a0b6804a8d
2019-01-01 17:13:15 -08:00
Kudo Chien 3fae388424 Fix CircleCI build error (#22822)
Summary:
----------

side effect of gradle task name changed from f3e5cce474

Changelog:
----------

[Android] [Fixed] - Fix CircleCI build error
Pull Request resolved: https://github.com/facebook/react-native/pull/22822

Differential Revision: D13562455

Pulled By: RSNara

fbshipit-source-id: a39a19350dcd91b2f06e064c3aec62b94d009fab
2018-12-30 10:47:10 -08:00
Héctor Ramos 86d0611c5a test_ios → : Update iOS Snapshots, remove tvOS tests, disable failing tests (#22720)
Summary:
The following tests are disabled in this PR:

- testTimersTest is failing due to undefined this.setTimeout, probably introduced back in 61346d3. Tracking a fix in https://github.com/facebook/react-native/issues/22695
- testTheTester_ExpectError is failing as RCTTestRunner is not properly passing through the error. Tracking a fix in https://github.com/facebook/react-native/issues/22697

I've added a comment regarding testWebSocketTest and how to ensure it passes locally.

This PR also fixes all remaining snapshot tests, which were failing due to the use of iPhone XS as a iOS Simulator on Circle CI. We are using iPhone 6s for SST internally, and this allows us to be consistent.
Pull Request resolved: https://github.com/facebook/react-native/pull/22720

Differential Revision: D13532788

Pulled By: hramos

fbshipit-source-id: 75681236032839bf88180611ee68826b53cc96eb
2018-12-20 15:08:47 -08:00
Héctor Ramos 0407d8c8fd Update RNTester snapshots
Summary:
The iOS snapshots have been out of date for months, but the failure was not caught in open source's  `test_objc` job because `xcpretty` was swallowing the non-zero error code.

To fix this, I enabled recording mode in RNTesterSnapshotTests.m temporarily, and re-ran the tests in order to update the snapshots. I've also switched the test device used by Circle CI to iPhone 6s to be consistent with the snapshot tests that run internally at Facebook.

Integration tests are not fully fixed yet, but I can confirm the following tests are fixed by this diff:

```
-[RNTesterIntegrationTests testImageSnapshotTest]
-[RNTesterIntegrationTests testSimpleSnapshotTest]
-[RNTesterSnapshotTests testARTExample]
-[RNTesterSnapshotTests testLayoutExample]
-[RNTesterSnapshotTests testSliderExample]
-[RNTesterSnapshotTests testSwitchExample]
-[RNTesterSnapshotTests testTabBarExample]
-[RNTesterSnapshotTests testTextExample]
-[RNTesterSnapshotTests testViewExample]
```

I've also fixed a few shellcheck warnings in related scripts.

Reviewed By: fkgozali

Differential Revision: D13506865

fbshipit-source-id: dab985130c2ff3cb9dea19d1f87c8ee65d8c141e
2018-12-18 16:20:10 -08:00
Sunny Luo 0314fca63a Use relative path for SCRIPTDIR (#22598)
Summary:
Fixes https://github.com/facebook/react-native/issues/22521

The current approach has an issue with white spaces when compiling in Xcode 10.1

![space](https://user-images.githubusercontent.com/615282/49782648-07836f80-fd52-11e8-952f-b93f8c593c60.png)

Change back to relative path fixes this issue
Pull Request resolved: https://github.com/facebook/react-native/pull/22598

Differential Revision: D13421446

Pulled By: hramos

fbshipit-source-id: 688157b2e951399059cb6c95e2a6ce8d176e9b9c
2018-12-11 13:30:07 -08:00
Héctor Ramos 5194495e97 Propagate exit code in test_objc (#22562)
Summary:
Any failures in `test_objc` within the objc-test.sh script have been kept hidden as `xcpretty` was swallowing the exit code from xcodebuild.

Fixes the issue TheSavior brought up in #22470 where failing snapshot tests were not reflected on Circle.

Run on Circle CI and confirm `test_objc` fails (iOS tests *are* broken on master).
Pull Request resolved: https://github.com/facebook/react-native/pull/22562

Differential Revision: D13406987

Pulled By: hramos

fbshipit-source-id: 3f3da01ab4c0ad87077813b06d2fdf788f32f6b8
2018-12-10 20:34:12 -08:00
Christoph Nakazawa 63a6bb7637 Remove remaining references to local-cli
Summary: This removes the remaining references to `local-cli`. We already have a `cli.js` file on the root that was just forwarding to the local-cli folder, so I removed that. It also seems that `setupBabel.js` is no longer necessary in RN.

Reviewed By: TheSavior

Differential Revision: D13396218

fbshipit-source-id: a945cb91dae39c4b58c5cabcca6b0f0328fc4717
2018-12-10 19:08:10 -08:00
Christoph Nakazawa 896bb8a21e Move react-native template
Summary: This diff moves the React Native template from `local-cli/templates/HelloWorld` to `template`. Keeping it in the react-native repo will allow us to make changes to the template and version it together with react-native, instead of moving it out into a separate repo and trying to keep the template in sync with RN.

Reviewed By: TheSavior

Differential Revision: D13372949

fbshipit-source-id: e68e267b4dcf6384535d7b48fc11e297a12e9676
2018-12-07 07:49:19 -08:00
Héctor Ramos 44878ea9bc Fix code analysis bot failure to post lint warnings on pull requests
Summary:
The code analysis script takes the results of `eslint .` and filters out any messages for filepaths outside of what is modified in a given pull request. This diff fixes an issue where the bot will fail to post warnings if a pull request contains multiple commits, where the most recent commit is a rebase (e.g. 63c00f20a7 in https://github.com/facebook/react-native/pull/22470). This happens because the script looks for files changed in the most recent commit in a PR.

In this diff, we switch to a new GitHub API that returns the list of all files changed by a PR, obviating the need to go through individual commits in a PR to look for changed files.

Reviewed By: TheSavior

Differential Revision: D13324154

fbshipit-source-id: f9f50028439d1969b0feea65f0b3e8bf75ac1a33
2018-12-05 13:15:56 -08:00
Dulmandakh 9d00d4d5bb Bump Android SDK to 28, Build Tools to 28.0.2, Gradle to 4.7, Gradle Plugin to 3.2.0 (#21632)
Summary:
This PR is bumping compileSdkVersion to 28, buildToolsVersion to 28.0.2, Gradle to 4.7, Android Gradle plugin to 3.2.0.

Gradle 4.7 added support for Java 10 and 11.

allow-large-files

Release Notes:
--------------
[ANDROID] [ENHANCEMENT] [SDK] - bump to 28

Pull Request resolved: https://github.com/facebook/react-native/pull/21632

Reviewed By: mdvacca

Differential Revision: D13084836

Pulled By: hramos

fbshipit-source-id: e0f493881e80e87faf8c3ef1ac77044495966a49
2018-12-05 09:06:31 -08:00
Héctor Ramos 04af674c38 Bump RN OSS iOS tests to iOS SDK 12.1, Xcode 10.1
Summary:
Use Xcode 10.1 and iOS 12.1 SDK to run iOS tests on an iOS 12.1 iPhone XS Simulator, all of which are available on a default Xcode 10.1 install.

Note that we were previously running iOS tests using Xcode 10.1 and the 12.1 SDK in a separate `test_xcode10` workflow on Circle CI. This was in place to allow us to track Xcode 10 compatibility during the Xcode 10 beta. Now that Xcode 10 has been public for a while, we can drop the compatibility check and use Xcode 10 in our main iOS test workflow.

Reviewed By: TheSavior

Differential Revision: D13317891

fbshipit-source-id: 04c17bf3a2e9d3617f14a46b4ed30a5491a4f4a4
2018-12-04 12:06:59 -08:00
Kuchitama 003dbaa3d3 Accept node arguments when iOS app is built (#22423)
Summary:
Fixes #22421

If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.

_Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_
Pull Request resolved: https://github.com/facebook/react-native/pull/22423

Differential Revision: D13287099

Pulled By: TheSavior

fbshipit-source-id: e4ac0fb930107dde092541fd17d4c81907c8cc34
2018-11-30 17:31:47 -08:00
Ignacio Olaciregui 6ebee18d13 Remove unused variables (#22097)
Summary:
Fix unused variable ESLint warnings.
Pull Request resolved: https://github.com/facebook/react-native/pull/22097

Differential Revision: D12919249

Pulled By: TheSavior

fbshipit-source-id: f680fa7277c58cf685e70dfb911753a30fe01c1d
2018-11-04 10:41:46 -08:00
Ignacio Olaciregui ae8ec39397 Fix linting issues (#22062)
Summary:
Fixes lots of ESLint warnings. Many of them where in PR #20877 by janicduplessis which requested to split the linting fixes from configuration and package changes.

I solved only the issues that I was most certain about but I would love to get hands on all of them with a little bit of input.
Pull Request resolved: https://github.com/facebook/react-native/pull/22062

Differential Revision: D12889447

Pulled By: TheSavior

fbshipit-source-id: 35f7a08104a5b859c860afdde4af2b32c0685c50
2018-11-01 14:29:16 -07:00
Tim Yung a689711f68 RN: Missing Copyright Headers
Summary: Adds copyright headers to all files that are missing them.

Reviewed By: hramos

Differential Revision: D12837494

fbshipit-source-id: 6330a18919676dec9ff2c03b7c9329ed9127d930
2018-10-31 01:37:26 -07:00
Kudo Chien a70625abd7 Upgrade folly to v2018.10.22.00 for iOS (#21976)
Summary:
Fixes #20302 (For iOS)

Note:
------

1. Checked the changes did not break CocoaPods integration.
2. The change for glog copying header into exported/ is to prevent build break for folly.
    `folly/detail/Demangle.h` will try to use libstdc++'s demangle.h. Unfortunately, glog also has a demangle.h in source code. So I copy exported headers and only search headers in exported/ folder during build.
Pull Request resolved: https://github.com/facebook/react-native/pull/21976

Reviewed By: hramos

Differential Revision: D12818131

Pulled By: fkgozali

fbshipit-source-id: b3c637d09d1b3adde0ea15c82eb56e28f846885b
2018-10-29 12:13:11 -07:00
Héctor Ramos bb93abf5ca Fix checkout_code: Remove Metro cache check (#21998)
Summary:
This was a specific check that was prone to break at some point. That time has come. Removing it as it is not providing any useful signal.
Pull Request resolved: https://github.com/facebook/react-native/pull/21998

Differential Revision: D12823839

Pulled By: hramos

fbshipit-source-id: e870670d7803af78c4559052613ea364ce1478df
2018-10-29 08:46:09 -07:00
Ryan Sundberg 7d4e94edcc Quote "$NODE_BINARY" in react-native-xcode.sh (#21383)
Summary:
Fix build errors when path to $NODE_BINARY contains spaces:

error: Can't find '/Path/With Spaces/To/node' binary to build React Native bundle

Why would $NODE_BINARY contain spaces? In my case, I am using sentry-cli which wraps the NODE_BINARY in it's own executable. The local path to the project, and thus the $NODE_BINARY, contains a space on my GoCD build agent.

'/Users/go/Library/Application Support/Go Agent/pipelines/my-ios-app/node_modules/sentry/cli/sentry-cli

See https://github.com/getsentry/react-native-sentry/issues/484 https://github.com/getsentry/react-native-sentry/issues/389
Pull Request resolved: https://github.com/facebook/react-native/pull/21383

Differential Revision: D10851141

Pulled By: yungsters

fbshipit-source-id: f46853ac8b57957864e0d1a76b8513403223fccb
2018-10-25 00:52:19 -07:00
Ramanpreet Nara b7349f9857 Use "Legacy Build System"
Summary:
React Native needs to be updated to support XCode 10 (GitHub issue: [19573](https://github.com/facebook/react-nåative/issues/19573)). Until we make that change, our CI needs to rely on the legacy build system in XCode 10 to build `RNTester`, as opposed to the new build system made default in XCode 10. This diff uses the `-UseModernBuildSystem=NO` `xcodebuild` flag to enforce that requirement.

**Note:** I did a search within `react-native-github/scripts` for `xcodebuild` and passed in the `-UseModernBuildSystem=NO` flag. I figured that every time we use `xcodebuild`, we should enforce the build system.

� This should hopefully fix the `react-native-oss-ios` test.

Reviewed By: hramos

Differential Revision: D10456139

fbshipit-source-id: 795f32b3ceba6a5a24ab6ccbf4f5160d42746801
2018-10-19 08:45:31 -07:00
Héctor Ramos 5c5af3e1c9 Enforce lockfile is kept up to date (#21739)
Summary:
Adds a new script that runs Yarn with --frozen-lockfile, and fails if Yarn finds the lockfile is out of sync.

Keeping the lockfile in sync with package.json will ensure our internal open source tests can run offline, as our offline mirror is updated whenever the lockfile changes.

Reverted yarn.lock to https://raw.githubusercontent.com/facebook/react-native/6eeff75849c9b8bf91592c1b7906b4dab8fba518/yarn.lock, then ran `scripts/circleci/validate_yarn_lockfile.sh`, and verified the script failed as expected.

I then ran Yarn without the --frozen-lockfile flag, and reran the validation script. This time, the script finished successfully.
Pull Request resolved: https://github.com/facebook/react-native/pull/21739

Differential Revision: D10365642

Pulled By: hramos

fbshipit-source-id: 9ab7f03919427a86b12901d4c422ef04dd0839f6
2018-10-12 14:17:09 -07:00
Mike McCartney b44c5ae92e Fix Xcode 10 errors relating to third-party (#21458)
Summary:
Fixes #20774

The new Xcode build system uses parallel execution to run build steps that don't have an obvious dependency.  Our Xcode project was written with the assumption that the **Install Third Party** build step is run _before_ compiling the `third-party` libraries.  To address this issue, this PR adds dependency information to the project to teach Xcode that `ios-install-third-party.sh` is generating the files under `third-party`.  With this additional information, Xcode correctly waits for `ios-install-third-party.sh` to finish before advancing to the compile step.

In addition to the Xcode project changes, I had to make some changes to the script `ios-install-third-party.sh` so that
1. it would always execute the `ios-configure-glog.sh` script regardless of how it was invoked
2. it would always install the libraries even if Xcode had partially created the tree or if a previous install was interrupted
Pull Request resolved: https://github.com/facebook/react-native/pull/21458

Differential Revision: D10365495

Pulled By: hramos

fbshipit-source-id: c88042583f21d2447a16f6ae2b6abb929c659a26
2018-10-12 13:51:59 -07:00
Dulmandakh 436cf154bb bump Android NDK to r17c (#21628)
Summary:
bump Android NDK to r17c, which is only available revision to download for r17. And it includes bug fixes.
Pull Request resolved: https://github.com/facebook/react-native/pull/21628

Differential Revision: D10352162

Pulled By: hramos

fbshipit-source-id: d372e55443260242a44a1f73698977a3e361f001
2018-10-11 22:08:37 -07:00
Héctor Ramos 6967a4fa56 Flag code analysis issues once per converter used (#21503)
Summary:
Fixes issue where the bot would leave multiple lines in the top review comment if, say, eslint found 30 issues, there would be 30 mentions of eslint having found issues.

See https://github.com/facebook/react-native/pull/21492 for an example of such a case, where `analysis-bot` left a spammy review at https://github.com/facebook/react-native/pull/21492#pullrequestreview-161837975.
Pull Request resolved: https://github.com/facebook/react-native/pull/21503

Differential Revision: D10219439

Pulled By: hramos

fbshipit-source-id: 75d32ef3bfeaa91ab614763a19494659ad1be0dd
2018-10-05 11:33:38 -07:00
Héctor Ramos b030fcbbf5 Update path to code analysis script (#21443)
Summary:
The script was moved after the original ShellCheck PR was opened, and this was lost during the rebase.
Pull Request resolved: https://github.com/facebook/react-native/pull/21443

Differential Revision: D10133498

Pulled By: hramos

fbshipit-source-id: da61b782362ab2d13cb6f0bca3fb1c9a0af08ae5
2018-10-01 15:22:35 -07:00
Héctor Ramos 53b487d215 Use ShellCheck (#19681)
Summary:
As recommended in https://circleci.com/docs/2.0/using-shell-scripts/#use-shellcheck

It will only run on PRs for now.
Pull Request resolved: https://github.com/facebook/react-native/pull/19681

Differential Revision: D10111711

Pulled By: hramos

fbshipit-source-id: e980a526561dced79e5197a11cfb41a3eba9be8b
2018-09-28 17:03:24 -07:00
Héctor Ramos b0946006e7 Deploy to npm on tagged commits only (#21250)
Summary:
This PR applies some fixes I made to the 0.57-stable branch to ensure we only run on commits tagged as "v0.57.1", as an example. This also ensures we only deploy after all tests pass.
Pull Request resolved: https://github.com/facebook/react-native/pull/21250

Differential Revision: D10003666

Pulled By: hramos

fbshipit-source-id: 22d5e674ca925dce53d0ddf0e12c64dc82ec7aa1
2018-09-22 09:16:58 -07:00
Héctor Ramos 5068dfcad3 Use Android SDK 27 in React Native
Summary:
Upgrade React Native to Android SDK 27 again, following the reversal in D9886607 (68c7999c25).

The SDK 27 is actually available internally in an alternate location that is suitable for use cases like React Native's. For future reference, SDK 28 is also available for use in this location.

Reviewed By: axe-fb

Differential Revision: D9929066

fbshipit-source-id: 9413f891d5587293a30544351340e9407a2dce55
2018-09-20 07:56:23 -07:00
Dulmandakh bc8d052c0b decouple compileSdk version from build tools version (#21205)
Summary:
Android CI was failing due to that it was trying to extract major version from build tools and use it to compile ReactAndroid. Now, it'll extract compileSdkVersion from ReactAndroid/build.gradle and use it.

Issue was that 68c7999c25 dowgraded compileSdk version to 26 while retaining build tools version as 27.0.3, so CI was trying to use SDK 27.
Pull Request resolved: https://github.com/facebook/react-native/pull/21205

Differential Revision: D9943909

Pulled By: hramos

fbshipit-source-id: ec9bc0c40956a16f8088532340722fd43cadde37
2018-09-19 11:48:52 -07:00
Héctor Ramos 68c7999c25 Downgrade to compileSdkVersion 26
Summary:
Go back to using compileSdkVersion 26 and targetSdkVersion 26, temporarily. We can re-add this once Android SDK 27 becomes available in Facebook's internal repository.

The Android SDK Build Tools 27.0.3 **are** available, so we can continue using those.

Reviewed By: axe-fb

Differential Revision: D9886607

fbshipit-source-id: 6c1c9c1e1309c3a0483cc4c0bd8dcb4a5f29fc7e
2018-09-18 08:02:50 -07:00
Héctor Ramos 1151c096da Update copyright headers to yearless format
Summary: This change drops the year from the copyright headers and the LICENSE file.

Reviewed By: yungsters

Differential Revision: D9727774

fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
2018-09-11 15:33:07 -07:00
Héctor Ramos fe4f03517c Add missing copyright headers (#21000)
Summary:
One of our automated project tools noted that these were all missing their copyright headers.
Pull Request resolved: https://github.com/facebook/react-native/pull/21000

Differential Revision: D9721495

Pulled By: hramos

fbshipit-source-id: 6ccf0f37165a0fe16cf06bd996d615f2286101dc
2018-09-07 13:17:38 -07:00
Héctor Ramos 888474f765 Remove Node 10 check (#21001)
Summary:
This script is not yet used. Regardless, Node 10 has been working fine for a while now.
Pull Request resolved: https://github.com/facebook/react-native/pull/21001

Differential Revision: D9721549

Pulled By: hramos

fbshipit-source-id: 44b5e2f9ec9b622a364491840f8bd8092f0399ff
2018-09-07 12:17:22 -07:00
Héctor Ramos e84bf99d40 Use PR reviews (#20927)
Summary:
Use GitHub PR Reviews instead of individual comments. The result is similar to the existing implementation, but there will be a top level comment indicating possible next steps for the PR author.

Verified on Circle.
Pull Request resolved: https://github.com/facebook/react-native/pull/20927

Differential Revision: D9596595

Pulled By: hramos

fbshipit-source-id: 3628b0097aa9a21a40089f2cbe1859bd64ccd8b7
2018-08-30 16:38:07 -07:00
Héctor Ramos 1fe7b40a33 Fix eslint code analysis bot (#20822)
Summary:
The eslint bot has not been working since the migration to Circle 2.0.
Pull Request resolved: https://github.com/facebook/react-native/pull/20822

Differential Revision: D9492680

Pulled By: hramos

fbshipit-source-id: 7f2f9ac125b6cab1750902c485a6d27d6c3cf302
2018-08-23 20:34:51 -07:00
Héctor Ramos d0f0e8e248 Gate failing steps behind a username check (#20818)
Summary:
There are some steps known to be failing on master. This pollutes checks for unrelated PRs.

This PR will make it so that PRs submitted by anyone other than myself will no-op on these steps.

Future work: Have an array of whitelisted contributors, and make it much easier to turn individual tests on and off.
Pull Request resolved: https://github.com/facebook/react-native/pull/20818

Differential Revision: D9484946

Pulled By: hramos

fbshipit-source-id: d6c187b341f13552b33d0f1d569b65f6c66ae48f
2018-08-23 15:18:04 -07:00
Vladimir Zdravkovic 3b688ae6b2 Updated the glog library version from 0.3.4 to 0.3.5 (#20811)
Summary:
While the original reason for this change was because of an issue #20780, with further investigation I concluded that the issue is till present for this combo of versions:
glog - 0.3.5
google-cast-sdk - 4.3.1

Downgrading google-cast-sdk to 4.3.0 fixed the build issue.

Release Notes:
--------------
Updated glog version from 0.3.4 to 0.3.5 for iOS

[IOS] [ENHANCEMENT] [GLOG]
Pull Request resolved: https://github.com/facebook/react-native/pull/20811

Differential Revision: D9485221

Pulled By: hramos

fbshipit-source-id: 65caf0839588384a5229a6165506dc6ef62e5fc5
2018-08-23 14:17:18 -07:00
Héctor Ramos aae3a7816e Use one time password when publishing to npm (#20701)
Summary:
This pull request addresses the failing publish-npm.js script from earlier this week. For background, last month we reset all npm access tokens for any package related to Facebook, and we now require all accounts with publish permissions to have two factor enabled.

The publish-npm.js script relied on one such token that is configured in Circle CI as a envvar. The token has been updated in Circle CI, but we now need a way of passing the one time password to npm.

With this PR, we can now grab the otp from Circle CI's envvars. Considering otps are ephemeral, this requires the NPM_CONFIG_OTP envvar to be set by someone with publishing permissions anytime a new release will be pushed to npm. The token is short lived, but it would still be good to clear the envvar after the package is published. Circle CI envvars are not passed on to PR/forked builds.

This PR is effectively a breaking change for the release process, as the publish step will not succeed if the OTP is not valid.

OTPs are short-lived, and the publish_npm_package job will definitely outlive the token. Unfortunately this will require some timing to get right, but the alternative is to ssh into the Circle CI machine and re-run the `npm publish --otp` command, which again would still require someone with publish access to provide the otp.
Pull Request resolved: https://github.com/facebook/react-native/pull/20701

Differential Revision: D9478488

Pulled By: hramos

fbshipit-source-id: 6af631a9cb425271b98c03d158aec390ebc95304
2018-08-22 23:32:27 -07:00
Dulmandakh 044b399e65 Bump compileSdkVersion to 27 and buildToolsVersion to 27.0.3 (#20777)
Summary:
I found that android support library 27.x (874cca1ac2) requires compileSdkVersion to be 27. Also found that many FB projects use SDK 27.
Pull Request resolved: https://github.com/facebook/react-native/pull/20777

Differential Revision: D9478431

Pulled By: hramos

fbshipit-source-id: ca100f6b5b39e7d112926124423f9510a0efc291
2018-08-22 23:19:42 -07:00
Héctor Ramos 6af3b161c0 Run failing tests in CI, without turning CI red (#20775)
Summary:
We have several disabled tests in Circle, and they are not running at all.
This prevents us from seeing when a disabled test might actually be fixed, as enabling the test requires uncommenting the correct line in Circle CI's config.

In this PR, we use the existing swallow_error script to run known-failing steps, without failing the job. This will let us see the step's output in CI, without polluting PRs that have not introduced new failures to CI.
Pull Request resolved: https://github.com/facebook/react-native/pull/20775

Differential Revision: D9442412

Pulled By: hramos

fbshipit-source-id: 83c930811a559fdcf6d7b926b4073343e862d2b3
2018-08-22 12:31:19 -07:00
Keaton Greve 9c1ea45d38 Generate ip.txt before SKIP_BUNDLING check (#20554)
Summary:
Fixes #20553.

Re-applies the change as described in https://github.com/facebook/react-native/pull/16533, which was closed for being stale. Thanks to emusgrave for the original PR/change.
Pull Request resolved: https://github.com/facebook/react-native/pull/20554

Differential Revision: D9414933

Pulled By: hramos

fbshipit-source-id: 8ebca57e32b905c4ecfd661524ca415f51162545
2018-08-20 18:32:04 -07:00
gengjiawen a286c0e753 Fix RNTester on Windows (#19974)
Summary:
Currrent, RNTester can not work on windows.
* Fixes https://github.com/facebook/react-native/issues/19654.
Pull Request resolved: https://github.com/facebook/react-native/pull/19974

Differential Revision: D9150453

Pulled By: rafeca

fbshipit-source-id: 1bd2046fbe0e8eaadf249604357c2e6acd80455e
2018-08-03 13:32:49 -07:00
Harry Tormey 1fb7a25f7b Add iOS Validate Environment Script (#19750)
Summary:
Fixes #19694 this diff adds an iOS environment validation script as requested by hramos.

 A similar script for Android exists: scripts/validate-android-test-env.sh.

This script:

- Validates that the minimum required Xcode version is installed (people using Xcode 8 with a recent release may encounter cryptic build errors).

- Validates the correct Node version is installed (Node 10 is not fully supported at the time, Node 6 is no longer supported).

<!--
  Required: Write your motivation here.
  If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->

Run ./scripts/validate-ios-test-env.sh on a properly setup OSX machine and verify it works, change the version comparison and make sure it fails.

<!--
  Required: Write your test plan here. If you changed any code, please provide us with
  clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
-->

<!--
  Does this PR require a documentation change?
  Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->

<!--
  Required.
  Help reviewers and the release process by writing your own release notes. See below for an example.
-->

[INTERNAL] [ENHANCEMENT] [scripts] - Add iOS validate environment script

<!--
  **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

    CATEGORY
  [----------]      TYPE
  [ CLI      ] [-------------]    LOCATION
  [ DOCS     ] [ BREAKING    ] [-------------]
  [ GENERAL  ] [ BUGFIX      ] [ {Component} ]
  [ INTERNAL ] [ ENHANCEMENT ] [ {Filename}  ]
  [ IOS      ] [ FEATURE     ] [ {Directory} ]   |-----------|
  [ ANDROID  ] [ MINOR       ] [ {Framework} ] - | {Message} |
  [----------] [-------------] [-------------]   |-----------|

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/19750

Differential Revision: D9005151

Pulled By: hramos

fbshipit-source-id: a69ef2a6e513e580089c791fd44a0e70c2a3f240
2018-08-01 20:46:58 -07:00
Dulmandakh 6117a6c720 Bump Android NDK to r17b (#20357)
Summary:
This PR bumps Android NDK version to r17b (latest). Cleaned up redundant **LOCAL_EXPORT_CPPFLAGS** rules in .mk files
Pull Request resolved: https://github.com/facebook/react-native/pull/20357

Differential Revision: D9068424

Pulled By: hramos

fbshipit-source-id: 8578637e38e807288b819a36cb75ea9feefcc09f
2018-07-30 14:02:11 -07:00
Héctor Ramos dfcf9c50b6 Fix test_android test failure, add libpulse0 dep
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/20377

Differential Revision: D8983760

Pulled By: hramos

fbshipit-source-id: d36cdb577b0eadc78e3274db755d05d440ae423f
2018-07-24 16:33:49 -07:00
Héctor Ramos 6da5779eb7 Remove pull request check on npm deploys (#19856)
Summary:
The publish script will fail on forked PRs anyway as the $CIRCLE_NPM_TOKEN envvar will be missing or incorrect.

We also move buck fetches to their own own shell script. These are shared by the Android and Deploy jobs, and using -ex will allow us to see which specific command failed without the need to list all steps in the config file.

Finally, cache keys are updated as architecture is only relevant in caches that may be reused across macOS and linux, which is not the case for Android.
Pull Request resolved: https://github.com/facebook/react-native/pull/19856

Differential Revision: D8956879

Pulled By: hramos

fbshipit-source-id: cfc360b9c603497fee53433471537bdc15a0a1c8
2018-07-23 13:33:28 -07:00
Maël Nison e183844df5 Uniformizes how THIS_DIR is computed in xplat/js
Summary: This form of THIS_DIR resolves symlinks, which is better.

Reviewed By: davidaurelio

Differential Revision: D8661886

fbshipit-source-id: 90bf329e765d9623d103b03c5dd3b71fae9d9854
2018-07-19 05:16:22 -07:00
Zdravko Nikolovski 079bf3f206 Packager linking when using custom debug configuration on iOS device (#16451)
Summary:
In many projects we have different environments that we connect to. For these environments (for example: Test, Staging, Production) we have custom configurations (Debug and Release). While this is not a problem on Android, it is a problem on iOS. With the current implementation of the react-native-xcode.sh script, when using a custom Debug configuration, the app started on iOS device, can't contact the Packager. This pull request solves this issue.

Connect a real device, start the app with a custom debug configuration in Xcode. Shake and Reload.

[IOS][BUGFIX][./scripts/react-native-xcode.sh] Add support for connecting to the Packager when running the iOS app on device when using custom Debug configuration.
Closes https://github.com/facebook/react-native/pull/16451

Differential Revision: D8730537

Pulled By: hramos

fbshipit-source-id: a36007776e8fe9e401c38015040abd2c2bbd7c58
2018-07-03 18:18:30 -07:00
Michał Mokijewski e131fffb37 fix undefined_arch error in Xcode 10 beta (#19841)
Summary:
Fixes #19774

I spotted that in  Xcode 10 beta `CURRENT_ARCH` is set to string `undefined_arch`.  This PR will add fallback based on platform name (simulators are `x86_64` and everything since iPhone 5s is `arm64`).
Closes https://github.com/facebook/react-native/pull/19841

Differential Revision: D8619897

Pulled By: hramos

fbshipit-source-id: ed2ebaca105c6dcb40099f1a4aebe34d0660130c
2018-06-28 15:32:39 -07:00
Ian Henshaw 3cd0737fe2 Fix for 17497 (#17498)
Summary:
Changed runAndroid.js to generate .packager.bat and launchPackager.ba…t to call it to setup the environment variable

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Trying to use react-native on a Windows box with a virus killer that runs on port 8081...

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
1) Start an android emulator
2) on a react-native project (with the changes), run `react-native run-android --port 9988`.
3) When the packager starts, verify that it states the correct port in the terminal window.
4) verify that the application correctly starts in the Emulator.

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
[INTERNAL] [BUGFIX] [./scripts] - Fixed runAndroid to enable the use of a package on port <> 8081 for Windows.
Closes https://github.com/facebook/react-native/pull/17498

Differential Revision: D8682067

Pulled By: hramos

fbshipit-source-id: 6604b827077b3a6a2da9914c1fd36dad6ef30e43
2018-06-28 14:17:38 -07:00
Gregory Menezes 0d78415d7f Update buck website
Summary: Closes https://github.com/facebook/react-native/pull/19930

Differential Revision: D8663544

Pulled By: hramos

fbshipit-source-id: 09202851f2be7ea103057a7286aa960add536775
2018-06-27 12:03:21 -07:00
Dulmandakh b569154ae6 bump build tools to 26.0.3 (#19831)
Summary:
This will bump android build tools to 26.0.3, and will remove warning about newer version of build tools in Android Studio, thus improve developer experience.
Closes https://github.com/facebook/react-native/pull/19831

Differential Revision: D8620094

Pulled By: hramos

fbshipit-source-id: fa1c6739bb7556736c1b323acea88fe87e82f4d7
2018-06-25 17:17:25 -07:00
Dulmandakh 065c5b6590 use android build-tools 26.0.2 and set compileSdk to 26 (#19662)
Summary:
Android Target API Level 26 will be required starting from August 2018, it's so soon 😄.Read https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

This PR uses android build tools 26.0.2, support library 26.1.0 (with android lifecycle) and setting compileSdkVersion to 26, but leaving minSdkVersion and targetSdkVersion intact, which will make targeting 26 easy.

Circle CI: https://circleci.com/gh/dulmandakh/react-native/209

Everything will build and work just fine.

[ANDROID] [ENHANCEMENT] [TOOLS] - Use android build-tools 26.0.2 and set compileSdk to 26, and use support library version 26.1.0.
Closes https://github.com/facebook/react-native/pull/19662

Differential Revision: D8398855

Pulled By: hramos

fbshipit-source-id: a4066eb04cb5f947efe1f3202b638c1092b79aae
2018-06-13 10:39:55 -07:00
Héctor Ramos e315ec9891 Fix iOS e2e tests: bump react-native-babel-preset to ^5 (#19625)
Summary:
We opt in to version ^5 of the React Native Babel Preset, as required after the bump to Babel 7. This fixes the Objective-C end-to-end test failure in master. (Fixes #19538)

See 34bd776af2 (commitcomment-29024085) for prior discussion.

There have already been several changes made to the repo during the transition to Babel 7. This PR brings all tests back to green and allows us to move forward with the 0.56 branch cut.

We also bump our tests to use Xcode 9.4.0 and iOS 11.4, the latest stable versions of both.

Once the 0.56 branch makes it to stable, we can change `react-native-babel-preset@latest` on npm to point to `react-native-babel-preset@5.0.1` (or newer), and undo the change made to `init.js` we made as part of this diff.

Wait for Circle CI to run: https://circleci.com/workflow-run/e39a66d7-bf8a-4b31-a22f-eef30a2c53bc

[GENERAL] [BREAKING] [Babel] - Bump React Native Babel Preset version used by RN CLI to Babel v7 compliant release
Closes https://github.com/facebook/react-native/pull/19625

Reviewed By: TheSavior

Differential Revision: D8343861

Pulled By: hramos

fbshipit-source-id: 42644d5b0bfb40a8bc592ae3461c5008deef8232
2018-06-10 17:08:56 -07:00
Sho Ikeda 0964135a17 react-native-xcode.sh: Support Homebrew-installed nodenv
Summary:
As well as nvm.

9d315f4a1e/scripts/react-native-xcode.sh (L56-L60)

Build React Native iOS app with Release configuration and run the script using `node` command which is installed through Homebrew-installed `nodenv` and `node-build`.

None.

[IOS] [ENHANCEMENT] [scripts/react-native-xcode.sh] - Support Homebrew-installed nodenv
Closes https://github.com/facebook/react-native/pull/19509

Differential Revision: D8243181

Pulled By: hramos

fbshipit-source-id: fbd75f377f4aebf89ce35b96a47c59238e62e9ce
2018-06-01 16:03:51 -07:00
Héctor Ramos 3e0ebc7663 Revert bump to API 26 and fix Android tests failures
Summary:
This reverts a3931e9531

The open source `test_android` job is not configured to use Android 26 quite yet. I've spent a couple of days trying to get our Android tests back in working order, with no luck.

I'm reverting the change that bumped React Native to use build tools 26 + Android SDK 26. I encourage contributors interested in making this change happen to work on getting our Android tests working with API 26.

This will allow us to focus on getting `test_android` back to green, and _then_ we can work on bumping to API 26 while keeping tests green.

Reviewed By: fkgozali

Differential Revision: D8066226

fbshipit-source-id: 9bfd58a7f081c0971b78b331073e70545c21ca6d
2018-05-23 13:06:12 -07:00
Héctor Ramos 8c74864d7b Update Android packages cache key
Summary:
Packages are now defined in `scripts/.tests.env`, so the checksum is updated accordingly.

We also throw away the cache if the checksum fails as not doing so may prevent us from picking up new packages due to the filesystem check in `scripts/android-setup.sh`#getAndroidPackages(), as the presence of the `installed-dependencies` file restored from cache will incorrectly flag all deps as being installed.
Closes https://github.com/facebook/react-native/pull/19298

Differential Revision: D8025918

Pulled By: hramos

fbshipit-source-id: 189492baac2fea39280884ea20e376a368e23c2e
2018-05-16 08:57:01 -07:00
Héctor Ramos 274c1757e6 Make Android build tools 26.0.3 available to CI
Summary:
a3931e9531 bumped buildToolsVersions to 26.0.3, and `test_android` started failing because that particular build tools version was not getting installed in CircleCI.
Closes https://github.com/facebook/react-native/pull/19276

Differential Revision: D8020664

Pulled By: hramos

fbshipit-source-id: 561aa8186ed165b3652923a9bcaf56134acfd90b
2018-05-15 23:12:53 -07:00
Héctor Ramos 2472d915ab Consolidate CI/local test scripts
Summary:
Update `scripts/run-android-emulator.sh` to use same settings as Circle CI when creating and launching an AVD. This helps provide a known good configuration, useful for running Android tests locally.

Run `scripts/run-android-emulator.sh` and confirm AVD is created && launched
Run `scripts/run-android-emulator.sh` again and see message about AVD already running
Run `test_android` on CI and observe AVD is launched.

Run `runXcodeTests.sh` and confirm unit tests run.
Run CI and confirm iOS unit tests run.

[GENERAL][MINOR][`scripts`] - Consolidate CI/local test scripts
Closes https://github.com/facebook/react-native/pull/19228

Differential Revision: D8019888

Pulled By: hramos

fbshipit-source-id: 28b12c2e781ee80bcc90c22e691a5acb16232369
2018-05-15 17:27:52 -07:00
Héctor Ramos 1ad8351d9b Clear apt cache
Summary:
This will unblock test_android on CI.
Closes https://github.com/facebook/react-native/pull/19275

Differential Revision: D8020049

Pulled By: hramos

fbshipit-source-id: 9d738a636f63138aae918759e879f9e397c11aca
2018-05-15 17:27:52 -07:00
Eli White 0e5c2633ee Prettier files with shebang
Reviewed By: yungsters

Differential Revision: D7974564

fbshipit-source-id: 00db563ce24868c0fde117e981936b83cec30e48
2018-05-11 13:52:30 -07:00
Eli White 36fcbaa56d Prettier the rest of ReactNative
Reviewed By: yungsters

Differential Revision: D7974340

fbshipit-source-id: 5fe457a8a9be4bd360fc3af9acb5c1136b2be0d7
2018-05-11 13:52:30 -07:00
David Aurelio 5b0a5b9856 Remove shelljs(?) leftover
Summary:
`try-n-times` is used in some integration tests of React Native, but was using a non-existent `echo` function.
Here, we replace that with `console.warn`

Reviewed By: mjesun

Differential Revision: D7788436

fbshipit-source-id: 0f42a00b7be780ee31cbf397fdd12ad4ccd500b1
2018-04-27 07:31:21 -07:00
Rubén Norte eeab57aa26 Removed last traces of @providesModule from React Native
Reviewed By: jeanlauliac

Differential Revision: D7774204

fbshipit-source-id: d80e4b4d1dc5fe7686aff7340368d0f2670e449f
2018-04-26 08:30:54 -07:00
Kevin Gozali f569b45f4c OSS: upgrade Folly 2016.09.26 => 2016.10.31
Summary:
There was a fix around folly::dynamic constructor that will be needed for Fabric work. This was done in 94e964976c (diff-7d1cb97d222ba0c863ea8a8e43b2ee2b) and luckily the release 1 month after the Folly version we used in RN already had the fix, so that we don't need to upgrade to the latest folly yet (minimizing breakages).

Tested by:
* running RNTester xcode project (ios)
* running RNTesterPods workspace via cocoapods
* building android via gradle

Reviewed By: shergin

Differential Revision: D7626037

fbshipit-source-id: cb36ba5b91ba131d4e450300bd620db657cfa1e8
2018-04-13 17:33:23 -07:00
Héctor Ramos b531612b2c Collect unit test results in test_android job
Summary:
Explicitly generate a XML file with unit test results, and convert this file to JUnit format for display in Circle.

Run in Circle: https://circleci.com/gh/hramos/react-native/1869

![screen shot 2018-03-28 at 12 07 15 pm](https://user-images.githubusercontent.com/165856/38050644-9712b6c6-3280-11e8-953c-a2eb722edf39.png)

[INTERNAL] [MINOR] [.circleci] - Collect, process, and display Android unit test results on Circle
Closes https://github.com/facebook/react-native/pull/18608

Differential Revision: D7433151

Pulled By: hramos

fbshipit-source-id: 7c18b552d7790b238b4c2a720fb316dff8fd7ec3
2018-03-28 13:22:58 -07:00
Héctor Ramos 15b25d854a Cache C++ downloads
Summary: Closes https://github.com/facebook/react-native/pull/18595

Differential Revision: D7419532

Pulled By: hramos

fbshipit-source-id: 0b64763f91efea8300c4cde4703e8496dbda8c49
2018-03-27 14:33:24 -07:00
Héctor Ramos de1040fcff Cache apt dependencies in test_android
Summary: Closes https://github.com/facebook/react-native/pull/18576

Differential Revision: D7415216

Pulled By: hramos

fbshipit-source-id: 9b7199fe5fb91a26ba0881e426a85395b2923f26
2018-03-27 09:28:32 -07:00
Héctor Ramos 6f6084db69 Explicitly set path to yarn
Summary:
Due to issues with Circle's Docker images ([link](https://twitter.com/circleci/status/974694807091073024)), jobs are failing with an error "yarn not found".

Test Plan
Run on Circle

Release Notes
[GENERAL][MINOR][.circleci] - Fix Circle issue
Closes https://github.com/facebook/react-native/pull/18419

Differential Revision: D7312052

Pulled By: hramos

fbshipit-source-id: 2768b9c69046a2f80518430024d3e7afbbd7de65
2018-03-16 17:22:05 -07:00
Héctor Ramos e0573225d5 Fix Android Sanity Buck version check
Summary:
[GENERAL] [MINOR] [./scripts/validate-android-test-env.sh] - Fix buck version check
Closes https://github.com/facebook/react-native/pull/18311

Differential Revision: D7227452

Pulled By: hramos

fbshipit-source-id: c7b32afc36821fbb2462317581ae32d3b257de03
2018-03-10 16:42:45 -08:00
Héctor Ramos 1ff1e573f1 Add existing Android checks to Circle.
Summary:
Moving towards reusing existing scripts to ensure local and CI tests are kept in sync.
Closes https://github.com/facebook/react-native/pull/18307

Differential Revision: D7222664

Pulled By: hramos

fbshipit-source-id: ecce91e32159c55b19c29eab69a6754642f02236
2018-03-09 17:24:19 -08:00
Héctor Ramos c9d756285a Clear cache to resolve iOS, tvOS workflow
Summary:
tvOS and iOS workflows were flaky, apparently due to a stale cache that contained a problematic version of the Metro dependency. Thanks to motiz88 for identifying the potential cause of flakiness in https://github.com/react-native-community/react-native-releases/issues/2#issuecomment-371905315.

https://circleci.com/workflow-run/440180a2-e888-4f27-bec9-b8e5d9be6708

[GENERAL] [MINOR] [CI] - Resolve iOS, tvOS failures in Circle
Closes https://github.com/facebook/react-native/pull/18304

Differential Revision: D7220150

Pulled By: hramos

fbshipit-source-id: 0f5e68c779dfce44e6deb8b813a3ac9e25a2ab97
2018-03-09 15:11:46 -08:00
Héctor Ramos 498cf7e2d7 Reënable iOS and tvOS tests
Summary:
Although the test suites have a handful of failing tests, the jobs themselves do not fail.

Let's get these tests back into the fold so that we may track our progress getting these back to a good state.

cc dlowder-salesforce

Run tests on Circle, and confirm everything is green: https://circleci.com/workflow-run/4dd1a84b-502d-4ad6-aa41-64c768392a6b

If you go into the test iOS and test tvOS jobs, you will see that we are collecting test results at the top. These results show the failing individual tests.
Closes https://github.com/facebook/react-native/pull/18171

Differential Revision: D7151558

Pulled By: hramos

fbshipit-source-id: f105ec8bc97e80ed1b8358cde3f13a1ad3b271c2
2018-03-04 18:15:57 -08:00
Leo Natan 30469ed001 Expose React Native version as a symbol rather than macro
Summary:
Add RCTGetReactNativeVersion() to expose version in native code. Right now, version is exposed internally to RN using a MACRO constant. This exposes a symbol (function) that can be called to retrieve the React Native version in iOS.

Also exposed RCTVersion.h as a public header in the React project so it is available to developers.

The motivation behind this is for https://github.com/wix/detox —we need to know what RN version the user has, if any, so we can properly handle support and abstract differences.

Ran bump-oss-version.js to ensure the template is applied properly. Also compiled the project to make sure nothing is broken.

 [IOS] [ENHANCEMENT] [RCTVersion.h] - Expose version as a compile-time symbol for native queries

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/18136

Differential Revision: D7141076

Pulled By: hramos

fbshipit-source-id: 18a92b8c60d7b43fa0ed22597ea46a35cff73c56
2018-03-02 14:51:39 -08:00
Héctor Ramos b181b7797f Check PATENTS does not creep into files
Summary:
Some files have crept into the repo with the old license header. These are usually from PRs that were opened prior to the re-licensing of the project.

Let the script run, prior to fixing the errant files. The script outputs the following:

```
PATENTS crept into some new files?
 --- /dev/fd/63	2018-03-01 01:42:48.250153746 +0000
+++ /dev/fd/62	2018-03-01 01:42:48.250153746 +0000
@@ -1 +1,9 @@
+Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.h
+Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.m
+ReactAndroid/src/main/java/com/facebook/react/animated/TrackingAnimatedNode.java
+ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLetterSpacingSpan.java
+ReactCommon/yoga/yoga/YGLayout.cpp
+ReactCommon/yoga/yoga/YGLayout.h
+ReactCommon/yoga/yoga/YGStyle.cpp
+ReactCommon/yoga/yoga/YGStyle.h
 scripts/circleci/check_license.sh
Exited with code 1
```

Fix the headers in these files and run the script again. No output, exit code 0.
Closes https://github.com/facebook/react-native/pull/18143

Reviewed By: sophiebits

Differential Revision: D7119356

Pulled By: hramos

fbshipit-source-id: d238e4d4a3ae320a2c8e625c2fa29690057a4814
2018-03-01 08:22:05 -08:00
Pritesh Nandgaonkar b9991d33e3 Move YGStyle to seperate file and add constructors
Reviewed By: emilsjolander

Differential Revision: D7016575

fbshipit-source-id: eb28df0ffb4cc813b23edaff80d7d4ebc56ce6af
2018-02-20 05:55:36 -08:00
Sophie Alpert 26684cf3ad Update to MIT license
Summary: Manual changes.

Reviewed By: TheSavior, yungsters

Differential Revision: D7012152

fbshipit-source-id: de7459be3db13c687868b45059856f125c4f2eb1
2018-02-16 18:31:53 -08:00
Sophie Alpert 1490ab12ef Update license headers for MIT license
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.

find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.

Reviewed By: TheSavior, yungsters

Differential Revision: D7007050

fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
2018-02-16 18:31:53 -08:00
Héctor Ramos 4f078d3fe2 Consolidate checkout and yarn steps
Summary:
Add checkout steps to reduce number of checkout/yarn calls

Tested on Circle CI.
Closes https://github.com/facebook/react-native/pull/17915

Differential Revision: D6942564

Pulled By: hramos

fbshipit-source-id: 72aff33eb099e24d63a80ec7d0630afedc21b630
2018-02-08 15:20:09 -08:00
Jonathan Kim af0c863570 Remove fbobjc's RN copy
Reviewed By: mzlee

Differential Revision: D6748752

fbshipit-source-id: 95a646948e4daa43d2e812782e0c8c3a88efe986
2018-02-07 19:20:55 -08:00
Héctor Ramos fa11faecb6 Switch e2e to yarn
Summary:
Addresses CI build failures due to use of scoped packages by metro.
Closes https://github.com/facebook/react-native/pull/17878

Differential Revision: D6914937

Pulled By: hramos

fbshipit-source-id: e6ce97561035f4deb128cd1e30d81ab4edea3e4c
2018-02-06 13:04:50 -08:00
Héctor Ramos a2f3ba864e Generate JUnit test reports for iOS builds
Summary: Closes https://github.com/facebook/react-native/pull/17794

Differential Revision: D6850015

Pulled By: hramos

fbshipit-source-id: bd230a5aa6fe14fb760f7b0c5f0989bf6ee1e8ea
2018-01-31 15:02:58 -08:00
hovox 2fef1bafc8 GLog fix on case sensitive APFS macOS
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

This will fix compile error on case sensitive APFS(Apple File System) macs.

Integrate  RN on case sensitive formatted macOS via cocoa pods you will get compile errors on the include lines something like :
```
         ^~~~~~~~~~~~~~~~
1 error generated.
** BUILD FAILED **
```

If you change `#include <glog/logging.h>` into `#include <GLog/logging.h>` (replace `glog` with `GLog`) it will fix the build error. After fixing this you will get same kind of errors on a few other places.

[IOS] [BUGFIX] [Framework] - `GLog` fix on case sensitive APFS macOS
Closes https://github.com/facebook/react-native/pull/17697

Differential Revision: D6832740

Pulled By: shergin

fbshipit-source-id: 0c7a01f33fde35dbc8004c5bb6e5b22f8f0ea369
2018-01-28 22:29:51 -08:00
Jani Eväkallio 8aa568e867 Fix Xcode Archive task failing if project path contains whitespace
Summary:
Currently, Xcodebuild Archive task "Bundle React Native code and images" step fails if the project path contains whitespace characters. This is due to `react-native-xcode.sh` not escaping the local CLI path.

Ideally, of course, folks would use sane directory names, but this affects people in the community. I have seen this at a beginner hackathon, as well as Stack Overflow, e.g. https://stackoverflow.com/questions/48209829/cannot-create-offline-bundle-for-react-native-ios

```
mkdir Bad\ Name
cd Bad\ Name
react-native init TestProject
cd TestProject
open ios/TestProject.xcodeproj
```
* Run `Build > Archive`
* `cli.js bundle` command fails with "Cannot find module '.../Bad'"

* Patch `/node_modules/react-native/scripts/react-native-xcode.sh` with changed file
* Run `Build > Archive`
* Build succeeds

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scrip] - Added thing to script that nobody will see
-->

 [IOS] [MINOR] [scripts/react-native-xcode.sh] - Escape directory paths with spaces
Closes https://github.com/facebook/react-native/pull/17628

Differential Revision: D6806418

Pulled By: hramos

fbshipit-source-id: 7ef3943d91807d0086f0717e436e1988f9faf03d
2018-01-26 13:47:37 -08:00
Job Vranish 40a8434bde Removed use of xip.io, as it's not needed.
Summary:
By default, when a react-native app launches in development mode on a physical iOS device, it attempts to load the JS bundle from a packager at `http://_your-local-ip-address_.xip.io:8081/`.

This change removes the use of `xip.io`, which changes that url to: `http://_your-local-ip-address_:8081/`

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Background:
The automatic IP detection feature (introduced [here](https://github.com/facebook/react-native/pull/8091)) is super handy. However, it’s use of `xip.io` has caused myself and others much grief.  Some routers do not allow or have intermittent errors when trying to resolve DNS names to local IP addresses. This prompted the introduction of a [DISABLE_XIP feature](https://github.com/facebook/react-native/pull/13326), which helps.

However, I don’t believe the use of `xip.io` is needed at all.

Based on [this comment](8c29a52c54 (commitcomment-18224788)), it appears the original reason for using `xip.io` was to “circumvent the numeric IP address limitation in ATS”.

But, the reason you can’t create ATS exceptions for raw IP addresses is that ATS is not enforced for raw IP addresses _at all_. You can read the Apple documentation [here](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html), the relevant portion is:

> App Transport Security (ATS) applies only to connections made to public host names. The system does not provide ATS protection to connections made to:
> * Internet protocol (IP) addresses
> * Unqualified host names
> * Local hosts employing the .local top-level domain (TLD)

For example, in iOS, if you attempt to make an http request (note: _not_ https) to `http://www.google.com` you will get an error due to ATS.
However, you can make the same request to `http://172.217.6.14/`  (which for me is the same server) and the request will succeed.

And in fact, if an ATS exception _was_ needed, the DISABLE_XIP feature shouldn’t work at all, but it does.

In short, using `xip.io` with ATS exceptions is unnecessary, causes some very annoying problems for some people, and I think it should just be removed.

Run the app on a physical iOS device and verify that it can load the JS bundle from the host computer's IP.

[Implemented automatic IP detection for iOS #8091](https://github.com/facebook/react-native/pull/8091)
[Added option to disable xip #13326](https://github.com/facebook/react-native/pull/13326)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
 [INTERNAL] [BUGFIX] [./scripts] - Removed use of xip.io
Closes https://github.com/facebook/react-native/pull/17642

Differential Revision: D6814609

Pulled By: hramos

fbshipit-source-id: f2faebd6a29b0b211d78cdfe8e195906307ab552
2018-01-25 16:46:46 -08:00
Hogyun Yu  (aka Philographer) b9d058a05c Remove references to Travis
Summary:
react-native project is migrated travis to circleCI.
but the document has some leavings.

Only Docs Edited

https://github.com/facebook/react-native/pull/16354
https://github.com/facebook/react-native/pull/16364

[ DOCS] Remove references to Travis
changed Releases.md
changed RNTester/RNTesterIntegrationTests/RNTesterSnapshotTests.m
changed scripts/android-e2e-test.js
Closes https://github.com/facebook/react-native/pull/17733

Differential Revision: D6806336

Pulled By: shergin

fbshipit-source-id: 22d21995d718a89bb831f75ed2ff6074dd22c6fe
2018-01-24 22:18:34 -08:00
Michael Lee 42c410ac84 Fix permissions on test script
Reviewed By: yungsters

Differential Revision: D6791810

fbshipit-source-id: 849cffd3810eb53a6050e5e1a37d84a5e4ccb62a
2018-01-23 17:01:40 -08:00
Tim Yung b8c86b8dec RN: Revive `react-native-xcode.sh`
Reviewed By: mmmulani

Differential Revision: D6775989

fbshipit-source-id: da17748c373dd152a743aa1ed8a5f075074415d3
2018-01-22 12:33:14 -08:00
Bruno Lemos 0d4ff1b7ea Add extensibility point on react-native-xcode.sh script
Summary:
Original pull request: #12863

Useful for generating source maps, for example.

Feature parity with Android, that already have this extensibility point on `build.gradle`:
```
project.ext.react = [
    extraPackagerArgs: [...]
]
```

Xcode > Build Phases > Bundle React Native code and Images
```
export NODE_BINARY=node
export EXTRA_PACKAGER_ARGS="--sourcemap-output ${SRCROOT}/build/main.jsbundle.map"
../node_modules/react-native/scripts/react-native-xcode.sh
```

[IOS] [FEATURE] [./react-native-xcode.sh] - Added $EXTRA_PACKAGER_ARGS extensibility point
Closes https://github.com/facebook/react-native/pull/16933

Differential Revision: D6771709

Pulled By: yungsters

fbshipit-source-id: a33614b45b1e3537daeb31504fdd3a402dc70ff0
2018-01-22 08:07:10 -08:00
Edward Coleridge Smith 654d7595fe Update terminal title to 'Metro Bundler'
Summary:
I noticed in v0.50.0 all mentions of 'packager' were updated to 'Metro Bundler':

12eb04b236

It seems like command which launches the bundler still sets the terminal title to 'React Packager'. This PR simply updates the title from 'React Packager' to 'Metro Bundler'.

Run `scripts/launchPackager.command`/`scripts/launchPackager.bat` and check title:

<img width="907" alt="screen shot 2018-01-05 at 14 02 53" src="https://user-images.githubusercontent.com/754498/34612337-3e93e8ca-f221-11e7-98f9-c5190674868e.png">

[GENERAL] [ENHANCEMENT] [./scripts]
Closes https://github.com/facebook/react-native/pull/17457

Differential Revision: D6673843

Pulled By: shergin

fbshipit-source-id: 65a072c3b79593391f257191b1372e7e9c8799f1
2018-01-07 22:22:45 -08:00
Michael S. Kazmier 33d710e8c5 adds --port option to `react-native run-ios` as well as patches port …
Summary:
The pull request adds the `--port` option to `run-ios` allowing a developer to build and launch a react-native app using a single command line like this:
```
react-native run-ios --port 8088
```

It defaults to the current port 8081.

This pull request fixes issue #9145 and issue #14113.

This patch also extends `run-android` to properly test and launch the packager with the specified port, extending the work done in PR:  ##15316

1. Create a new react-native app, or simply clone this branch and then update your version of react-native using `yarn add file:./path/to/this/fork/of/react-native`
2. run `react-native run-ios --port 8088`
3. watch the packager start on the desired port (8088 in this case) and watch your app in your simulator connect to the packager and launch the app.
Closes https://github.com/facebook/react-native/pull/16172

Differential Revision: D6612534

Pulled By: shergin

fbshipit-source-id: 50af449f5e4c32fb76ba95f4cb7bf179e35526d5
2018-01-04 20:11:10 -08:00
Cory Reed d2f0abdf4e Fix Android comment and docblock typos
Summary:
👋 Hello! Thanks for react-native, it’s a great project.

I was digging into the Android implementation in _ReactAndroid_ and noticed a couple typos in the documentation. I went through and tried to fix all the typos I could find using [aspell](http://aspell.net).

Not applicable: these changes are only to comments, and CI should be skipped.

[ANDROID][ENHANCEMENT][*] - Correct comment and docblock typos
Closes https://github.com/facebook/react-native/pull/17049

Differential Revision: D6472182

Pulled By: shergin

fbshipit-source-id: 7e62cab118609596b483d1cf16c3abf651d6753b
2017-12-03 20:16:36 -08:00
James Ide 7733d40237 Move JS-native version check to its own module + unit tests + prefix Obj-C macro w/RCT
Summary:
- The version check that ensures the JS and native versions match is now in its own module for two reasons: it is easier to test and it allows react-native-windows to override just this module to implement its own version check (ex: more advanced checks for RNW-specific code).
- Added unit tests for the version checking to specify its behavior more clearly, including parity between dev and prod to avoid prod-only behavior and mitigate SEVs.
- Prefixed the Obj-C `#define` with `RCT_` to conform with other RN globals.
Closes https://github.com/facebook/react-native/pull/16403

Differential Revision: D6068491

Pulled By: hramos

fbshipit-source-id: 2b255b93982fb9d1b655fc62cb17b126bd5a939a
2017-10-16 14:30:34 -07:00
Daniel Mueller e268883fdc Improve support for unbundle feature
Summary:
unbundle is a useful feature, and it should be exposed. In order to get the most use out of
we expose it as an option at build time in the Build Phase on XCode and the project.ext.react
config in the build.gradle.

Because it is best used with inline requires we add a section under performance that describes
how inline requires can be implemented and how to use with the unbundling feature.

Testing:

- Added a section of the doc which explains how the feature can be enabled
- Use the instructions, build a build on iOS + android (using release so that the bundle is created) and confirm that the bundle has the binary header information.
Closes https://github.com/facebook/react-native/pull/15317

Differential Revision: D6054642

Pulled By: hramos

fbshipit-source-id: 067f4d2f78d91215709bd3e3636f460bc2b17e99
2017-10-13 17:28:28 -07:00
Mike Grabowski c0e6d415ce Migrate Travis over to Circle
Summary:
This pull request migrates Travis to Circle and pre-starts iOS simulators / tvOS ones as advised in documentation to speed up builds. It also uses Xcode 9.0 to build and test apps.

Note that podspec test is failing and it's been failing for a while on Travis as well (since podspec has been changed to use Cxx bridge by default). I've notified few folks here of that and we are looking to fix this test, but it's not related to the scope of this PR.

Also, previously, podspec tests were only runninng on master (disabled for PR builds) where I think it makes more sense to run them on PR builds as well (all in all, we want to prevent breakage before merging). That said, I've removed `if` check to make it run on all builds.

Other small changes:
- cache `node_modules` properly (previously defined as restore_cache and save_cache but not referenced in following jobs)
Closes https://github.com/facebook/react-native/pull/16354

Differential Revision: D6054858

Pulled By: hramos

fbshipit-source-id: 5165bef0985f4257febced14873be5bcb80b9f51
2017-10-13 16:19:36 -07:00
Alex Hernandez ff908aa9fc Add helpful examples to Android test env validation failure messages.
Summary:
Hi there!

I set up the repo because I want to do a little contribution to the Android side but ran into trouble [running tests](https://facebook.github.io/react-native/docs/contributing.html). The Android environment validation kept failing. While the messages were a little helpful, it would have saved me a bit of time and research if I had some helpful examples to copy-and-paste. In my case, I'm using Android SDK Tools on the command line. Hopefully, this will help others when setting up!

Run `./scripts/run-android-local-unit-tests.sh` with each of the following to see the expanded help messages:

* Make sure `$ANDROID_HOME/platforms/android-$MAJOR` is _not_ present.
* Make sure `$ANDROID_HOME/build-tools/$BUILD_TOOLS_VERSION` is _not_ present.
* Make sure `JAVA_HOME` is _not_ set and/or is _not_ in `PATH`.
Closes https://github.com/facebook/react-native/pull/16222

Differential Revision: D6044875

Pulled By: ericnakagawa

fbshipit-source-id: febacbd08fb632b349c352035f24eed891fbd154
2017-10-12 15:33:04 -07:00
Mike Grabowski b2eb7fd77b Fix broken releases script
Summary:
Fails on my machine due to fact that `replace` returns an instance of a String, rather than an instance of ShellString (that includes `to` on its prototype).

Solution is to use an explicit `writeFileSync`. You can see that change in the wild on 0.50-stable branch.

CC janicduplessis (edit by hramos)
Closes https://github.com/facebook/react-native/pull/16303

Differential Revision: D6031331

Pulled By: hramos

fbshipit-source-id: 41c583d53df75bea1a55fa19174d912e414209c0
2017-10-11 19:47:03 -07:00
Janic Duplessis 0cd69e8a02 Run eslint --fix
Summary:
CI is currently failing because of a lint issue, this fixes it and a bunch of other warnings that are auto-fixable.

**Test plan**
Quick manual test, cosmetic changes only.
Closes https://github.com/facebook/react-native/pull/16229

Differential Revision: D6009748

Pulled By: TheSavior

fbshipit-source-id: cabd44fed99dd90bd0b35626492719c139c89f34
2017-10-09 17:46:44 -07:00
Marc Horowitz 05cb7ce1c5 Make ios-install-third-party.sh more robust
Summary:
See https://github.com/facebook/react-native/issues/14423

This adds checks after download that each file is present, and has the
correct sha1 hash.  If not, it will retry several times, and fail if
it can't successfully download the file.  If a file is downloaded, the
unpack and command will run, even if the third-party dir already
exists.  The diagnostics printed in the event of failure are improved.

This should be self-healing for anybody who has a bad ~/.rncache
directory.  The checksum will fail, and the files will be
redownloaded.

Reviewed By: hramos

Differential Revision: D5930707

fbshipit-source-id: cb15af949294243448ccc3995ec3f0396b1922b6
2017-09-28 13:03:26 -07:00
Janic Duplessis 1af645b2fd Validate that JS and Native code versions match for RN releases
Summary:
Basic implementation of the proposal in #15271

Note that this should not affect facebook internally since they are not using OSS releases.

Points to consider:
- How strict should the version match be, right now I just match exact versions.
- Wasn't able to use haste for ReactNativeVersion because I was getting duplicate module provider caused by the template file in scripts/versiontemplates. I tried adding the scripts folder to modulePathIgnorePatterns in package.json but that didn't help.
- Redscreen vs. warning, I think warning is useless because if the app crashes you won't have time to see the warning.
- Should the check and native modules be __DEV__ only?

**Test plan**
Tested that it works when version match and that it redscreens when versions don't before getting other errors on Android and iOS.
Closes https://github.com/facebook/react-native/pull/15518

Differential Revision: D5813551

Pulled By: hramos

fbshipit-source-id: 901757e25724b0f22bf39de172b56309d0dd5a95
2017-09-27 18:31:15 -07:00
Hector Ramos 8fa9984b11 Migrate to Circle 2.0
Summary:
Following the migration guide. Let's see what happens here.
Closes https://github.com/facebook/react-native/pull/14955

Differential Revision: D5877682

Pulled By: hramos

fbshipit-source-id: 2a40560120b5d8d28bc6c52cc5e5916fd1bba336
2017-09-21 14:01:30 -07:00
Gabriel Bull 743dc20aac Fixed issue with path containing spaces
Summary:
If the project is in a folder with a path containing a space, the project won't build. This fixes this issue.
Closes https://github.com/facebook/react-native/pull/15608

Differential Revision: D5686861

Pulled By: shergin

fbshipit-source-id: 74ce5b4f0261c18070c1a48966aae24f1ca75492
2017-08-22 23:30:06 -07:00
Gabriel Bull 95d5d112ac Fixed issue with install third party script in directory with spaces
Summary:
Fixes an issue with installing third party on iOS when the project's path contains a space, no matter where the space is in the path.

__Error__
```
/Users/AwesomeUser/Library/Developer/Xcode/DerivedData/AwesomeProject-xxx/Build/Intermediates.noindex/React.build/Debug-iphoneos/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh: line 3: /Users/AwesomeUser/path contain space/scripts/ios-install-third-party.sh: No such file or directory
/Users/AwesomeUser/Library/Developer/Xcode/DerivedData/AwesomeProject-xxx/Build/Intermediates.noindex/React.build/Debug-iphoneos/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh: line 3: exec: /Users/AwesomeUser/path contain space/scripts/ios-install-third-party.sh: cannot execute: No such file or directory
```
Closes https://github.com/facebook/react-native/pull/15377

Differential Revision: D5572671

Pulled By: shergin

fbshipit-source-id: 102727fc1b820e399e170c9c0cb73fd5d1e018d5
2017-08-06 20:22:21 -07:00
Ville Immonen 6e99e314b2 Move HelloWorld template to a single index.js entry point
Summary:
This change (initially discussed in https://github.com/react-community/create-react-native-app/issues/26) moves the HelloWorld project template from two nearly identical entry points (`index.android.js` and `index.ios.js`) to a single, minimal `index.js` entry point. The root component is created in `App.js`. This unifies the project structure between `react-native init` and Create React Native App and allows CRNA's eject to use the entry point from the HelloWorld template without any hacks to customize it. Also examples in the docs can be just copy-pasted to `App.js` the same way in both HelloWorld and CRNA apps without having to first learn about  `AppRegistry.registerComponent`.

* Created a new project from the template using `./scripts/test-manual-e2e.sh` and verified that:
  * The app builds, starts and runs both on Android and iOS.
  * Editing and reloading changes works.
  * The new files (`index.js`, `App.js`, `__tests__/App.js`) get created in the project folder.

<img width="559" alt="screen shot 2017-08-01 at 19 10 51" src="https://user-images.githubusercontent.com/497214/28835171-300a12b6-76ed-11e7-81b2-623639c3b8f6.png">
<img width="467" alt="screen shot 2017-08-01 at 19 09 12" src="https://user-images.githubusercontent.com/497214/28835180-33d285e0-76ed-11e7-8d68-2b3bc44bf585.png">

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15312

Differential Revision: D5556276

Pulled By: hramos

fbshipit-source-id: 068fdf7e51381c2bc50321522f2be0db47296c5e
2017-08-03 14:02:43 -07:00
Ville Immonen e248980980 Fix broken Buck installation link
Summary:
Running `./scripts/run-android-local-unit-tests.sh` without having
installed Buck displays this link. Make it point to a URL that exists.
Closes https://github.com/facebook/react-native/pull/15292

Differential Revision: D5529392

Pulled By: hramos

fbshipit-source-id: e100823d04fef79a8ecce0e9626fa05864e0aaf8
2017-07-31 13:03:20 -07:00
Kevin Cooper 0681887347 Add FORCE/SKIP_BUNDLING flags for iOS builds
Summary:
*See discussion below for updated motivation.*

Anything running in Debug should use the packager anyway; no need to bundle. This saves a **huge amount of time** during development when testing things like push notifications that require a real device.

The code being modified was originally moved here in 9ae3714f4b to make sure bundles are always created in `Release`, but the change can be applied to real devices, too. Ideally there should be very little difference in how a simulator is treated compared to a physical device.

Run a Debug build in Xcode targeting a physical device before and after this commit.

You can use the `FORCE_BUNDLING` and `SKIP_BUNDLING` flags to manually change the default behavior. For example, under **Build Phases** > **Bundle React Native code and images**:

```bash
export SKIP_BUNDLING=true
../node_modules/react-native/packager/react-native-xcode.sh
```
Closes https://github.com/facebook/react-native/pull/14731

Differential Revision: D5444352

Pulled By: javache

fbshipit-source-id: 68324fc0be7976e106fe0f9b31d763afd2b460a9
2017-07-18 11:45:47 -07:00
Eli White 1d30ace94a Install watchman on Travis
Reviewed By: hramos

Differential Revision: D5431531

fbshipit-source-id: 071f3aec4851e25387793867c18a2bdbccaa8c00
2017-07-15 17:15:43 -07:00
Eli White c885357cc9 Wait for packager to start
Reviewed By: shergin

Differential Revision: D5408443

fbshipit-source-id: 4a9b37822c1f5c0db3d8be71862d5049bca1ecdd
2017-07-13 15:36:12 -07:00
Eli White e3cfcdfb9c Remove silly exit
Reviewed By: Yu-w

Differential Revision: D5413747

fbshipit-source-id: c3423c4bf2b60204099bd68825797d71b0c217bc
2017-07-12 23:37:27 -07:00
Eli White 320aea8bca shelljs/global -> shelljs
Reviewed By: zertosh

Differential Revision: D5407207

fbshipit-source-id: df5d1a38a35d27c9c429ea972acab58322441813
2017-07-12 16:08:22 -07:00
Eli White fc86f25f9a Run eslint on all js files
Reviewed By: zertosh

Differential Revision: D5405047

fbshipit-source-id: 5ade9d8beb3688d8bb08a208709c0dbf1ec671b2
2017-07-12 14:09:53 -07:00
Pieter De Baets 6c2beaffdc Fix Travis podspec CI for Cxx bridge
Summary:
Fixed the test script to properly setup our third-party deps and tweaked the third-party specs a bit so they work correctly.

This currently works for projects using static libraries, but fails when using dynamic libraries (`--use-libraries`)

cc mhorowitz alloy
Closes https://github.com/facebook/react-native/pull/14100

Differential Revision: D5380728

Pulled By: javache

fbshipit-source-id: e78b6bd4466ebf2bf30b7e361eff10ec14b36a55
2017-07-07 02:32:07 -07:00
ArturKlajnerok 7d1981ef82 Removing test-driver symlink in ios third party install script
Summary:
After execution of `scripts/ios-install-third-party.sh` a symlink is created :
`<YOUR-APP-PATH>/node_modules/react-native/third-party/glog-0.3.4/test-driver`
that is pointing to `test-driver -> /usr/share/automake-1.14/test-driver`
This can be executed indirectly by `react-native run-ios`.

This breaks the bundle process if the system don't contain a given file under the link and having this strict dependency on the system setup is not a good practice.

Once the `test-driver` symlink is created android app release is failing, for :
`./gradlew assembleRelease`
the `:app:bundleReleaseJsAndAssets` returns :
```
FAILURE: Build failed with an exception.

* What went wrong:
Could not list contents of '<YOUR-APP-PATH>/node_modules/react-native/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link.
```
Related issues:
https://github.com/facebook/react-native/issues/14417
https://github.com/facebook/react-native/issues/14464
https://github.com/facebook/react-native/issues/14548

1. Create new project with `react-native init <YOUR-APP>`
2. cd `<YOUR-APP>/`
3. Run app on iOS `react-native run-ios` so `scripts/ios-install-third-party.sh` is executed.
4. cd `android/`
5. Run android app release `./gradlew assembleRelease` (it will work properly after this fix and fail if the `test-driver` symlink exists)

IMHO we should resolve the issue with this quick fix and apply the proper fix later after the new version of `google/glog` will be released.
The proper cleanup of files generated by autotools was already applied : https://github.com/google/glog/pull/188

Please let me know if I should provide more details : javache, mhorowitz, hramos
Closes https://github.com/facebook/react-native/pull/14638

Differential Revision: D5292362

Pulled By: javache

fbshipit-source-id: 81ff2273420ea078d624a76e781a5b67b96e6a4e
2017-06-21 07:45:37 -07:00
Janic Duplessis 5c53f89dd8 Fix configure glog script when building from xcodebuild
Summary:
I encountered an issue when building with fastlane gym / xcodebuild where glog would not build because of missing config.h header file. I tracked it down to the ios-configure-glog.sh script that ended up error-ing because of missing valid c compiler. I guess it didn't enter the if to set c compiler env in xcodebuild and that env doesn't have proper values set like it does in xcode so just removing this check fixed it. Also tested that it still works properly in xcode.
Closes https://github.com/facebook/react-native/pull/14267

Differential Revision: D5285691

Pulled By: javache

fbshipit-source-id: df5315926c2d2d78806618df3d9c9bbbb974d1ea
2017-06-21 06:45:28 -07:00
Marc Horowitz a555551aaf Add some debug logging if tar fails
Summary: This is to help debug the root cause of https://github.com/facebook/react-native/issues/14423

Reviewed By: javache

Differential Revision: D5254713

fbshipit-source-id: 1ca90205144b3a069d927ba6636f0ef0138b51a0
2017-06-15 13:05:05 -07:00
Christoph Pojer 29d9c35e12 Add --maxWorkers flag and allow transformers to run in-band.
Summary:
This diff cleans up some cruft and adds some features:

* It removes the usage of an env variable to control workers.
* It removes the lazy and handwavy calculation on how many workers to use for jest-haste-map. Jest itself uses the maximum amount of workers available and it has never been reported as an issue – especially since it is a one-time startup cost of about 3 seconds on a cold cache only.
* It adds a `--max-workers` flag to replace the env variable. This one is able to control both the number of workers for `jest-haste-map` as well as the transformers.
* It makes the transformers run in the parent process if 1 or fewer workers are are specified. This should help with debugging.

Once you approve this diff, I will publish a new version of metro to npm and update the version used in RN and remove the use of the env variable altogether: https://our.intern.facebook.com/intern/biggrep/?corpus=xplat&filename=&case=false&view=default&extre=&s=REACT_NATIVE_MAX_WORKERS&engine=apr_strmatch&context=false&filter[uninteresting]=false&filter[intern]=false&filter[test]=false&grep_regex=

Note: the process of adding a CLI option is really broken. Commander also has a weird API. We should consider building a better public API for Metro and then consider how to build a new CLI on top of it and simplify our internal integration. I really don't like how Metro is integrated across pieces of the RN cli in ways that is hard to manage. But that is a larger task for another time :)

Reviewed By: jeanlauliac

Differential Revision: D5217726

fbshipit-source-id: 74efddbb87755a9e744c816fbc62efa21f6a79bf
2017-06-13 09:16:03 -07:00
Pieter De Baets 33e22486e9 Fix some issues with the React podspec for the Cxx bridge
Summary:
Trying to fix the RN Travis CI tests

Splitting off from https://github.com/facebook/react-native/pull/14100
Closes https://github.com/facebook/react-native/pull/14132

Reviewed By: ericvicenti

Differential Revision: D5112077

Pulled By: javache

fbshipit-source-id: cf030b927b0f28f2b494471498f1ddb2c0a5c1df
2017-05-30 11:15:19 -07:00
Hank Brekke 3840618a01 Fix Incorrect Build Script Bash False-Matching
Summary:
When attempting to inverse a Bash boolean, the `!` character converts the meaning to become `[[ ! -n false ]]` (checking that the string "false" is empty) which never matches, and therefore this condition can never occur.

See https://stackoverflow.com/a/2953673
Closes https://github.com/facebook/react-native/pull/14190

Differential Revision: D5137013

Pulled By: javache

fbshipit-source-id: 7df52cc90a4ab79c7b5da54dbfb6c99fba3e8b80
2017-05-26 02:45:20 -07:00
David Aurelio 6ca492a4d2 Fix `scripts/packager.sh` for RNTester
Summary: fixes RNTester for open source

Reviewed By: bestander

Differential Revision: D5129516

fbshipit-source-id: d7bb7ee23bd57b8c35ca7f3876eed17d88982cef
2017-05-25 09:46:23 -07:00
David Aurelio a710f9a81e Move packager launcher scripts outside of `packager/`
Summary: in order to prepare open sourcing React Native Packager, we have to move scripts specific to React Native to a directory that will continue to exist.

Reviewed By: javache

Differential Revision: D5112193

fbshipit-source-id: eac77d0d981aecef7ee52365a6856340420a5638
2017-05-23 16:17:09 -07:00
Tomas Roos 1e32de0304 Make sure to run all subspecs, to find failing cases
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

Currently no subspecs are running on CI which causes us to find bugs in the podspec from time to time we upgrade master.

In order to highlight errors for podspecs users when changes happen we should make sure to run all subspecs even though it might take a bit longer when running the CI
Closes https://github.com/facebook/react-native/pull/14019

Differential Revision: D5079230

Pulled By: javache

fbshipit-source-id: 7b3b5dba5ba147b1fc24e79299ed260f9fc6231b
2017-05-17 11:16:49 -07:00
Pieter De Baets 885856c6a1 More attempts to fix Travis CI runs
Summary:
* Add RCTBridge+Private to exported headers for unit tests
* Fix tvOS build
Closes https://github.com/facebook/react-native/pull/13840

Reviewed By: ericvicenti

Differential Revision: D5027887

Pulled By: javache

fbshipit-source-id: 7a17ee2f84eb1cb87e71373444ef25559959c24a
2017-05-10 04:32:54 -07:00
Eric Vicenti 4a80dceac7 Re-license and rename UIExplorer integration test app as RNTester
Reviewed By: yungsters

Differential Revision: D4950085

fbshipit-source-id: 44574b5d0ef0d2ad5dfc714309b18dc69cbad9ff
2017-05-08 11:31:19 -07:00
Martin Konicek 03d57f2180 Fix iOS internal test
Summary:
It got broken by https://github.com/facebook/react-native/pull/13173.
When the test scripts are run without the "test" argument, we only
want to compile the code, not run the packager and integration tests.

On Travis we pass the "test" argument so we'll still run the packager and integration tests:
https://github.com/facebook/react-native/blob/master/.travis.yml

Reviewed By: gfosco

Differential Revision: D4905912

fbshipit-source-id: e118e6e4f4a818fa06e89d417574e839c4192c1b
2017-04-27 09:16:09 -07:00
dlowder-salesforce 92190727d1 Clean up and remove duplicate code in Travis iOS/tvOS test scripts
Summary:
**Motivation**

Remove duplicated lines in objc-test-ios.sh and objc-test-tvos.sh

**Test plan**

Travis CI should continue to work as before.
Closes https://github.com/facebook/react-native/pull/13173

Differential Revision: D4812177

Pulled By: hramos

fbshipit-source-id: 40afe0beab896d741f607f4841df7e9b42f4c17d
2017-03-31 12:46:45 -07:00
Martin Konicek e82c2fbbe5 Add OSS website test, clean up test names, remove website dependency on sass
Reviewed By: ericvicenti

Differential Revision: D4726864

fbshipit-source-id: 38c13a08d42d11533a02c14a9acd5a05bbce307f
2017-03-30 15:30:41 -07:00
Spencer Ahrens a7633afa08 Add UIExplorer to manual testing script.
Summary:
Encourage a little more testing coverage and make it a little easier to do.
Closes https://github.com/facebook/react-native/pull/13040

Reviewed By: shergin

Differential Revision: D4742701

Pulled By: sahrens

fbshipit-source-id: 4398c3b737b09c4113e965725585efc038936515
2017-03-29 16:19:30 -07:00
Eloy Durán 09b8ef41e1 Fix issue with whitespace in path to source and stabilise CI.
Summary:
* Fixes issue where headers could not be found due to whitespace in an unquoted header search path. https://github.com/facebook/react-native/issues/11781#issuecomment-287176373
* Stabilises CI but not needing to download the source for Yoga, but use the existing cloned repo instead.

/cc mkonicek
Closes https://github.com/facebook/react-native/pull/13007

Differential Revision: D4735347

fbshipit-source-id: 933aefcb0e65537d2e759d25f4e3b81cdf4b8cb5
2017-03-18 12:31:37 -07:00
Martin Konicek e1f493ebd2 Add a flag to support a simplified iOS test - just compile, don't run packager and tests
Reviewed By: gfosco

Differential Revision: D4690887

fbshipit-source-id: e6299c9146e1ac97a0606f538e9d10539f147a67
2017-03-16 15:19:02 -07:00
Martin Konicek 6a9c2445ed Don't merge before Circle CI tests pass: Re-enable Android e2e test
Summary:
Disabled earlier today, a fix for HMR landed so let's test it works.
Closes https://github.com/facebook/react-native/pull/12943

Differential Revision: D4712940

Pulled By: jeanlauliac

fbshipit-source-id: 38cbfb04a0a16a0a59e8eb4c9c26adb60ab5d635
2017-03-15 07:45:23 -07:00
Martin Konicek 103fa3d818 Skip flaky ScrollView tests
Summary: Closes https://github.com/facebook/react-native/pull/12868

Differential Revision: D4699900

Pulled By: hramos

fbshipit-source-id: b531f2359734177df1868b453dd1d882e693caa3
2017-03-13 13:30:31 -07:00
David Aurelio 21c229119d UIExplorer e2e: fix duplicated exit trap
Summary: I accidentally introduced an exit trap, allthough a cleanup handler already existed. This moves killing of background processes into the existing trap.

Reviewed By: bestander

Differential Revision: D4681289

fbshipit-source-id: f8bcdcac7b246854e3ee024c9335b6c4eb3aacbd
2017-03-09 03:18:11 -08:00
David Aurelio c5e2cf7678 UIExplorer test: wait for packager by polling its status
Reviewed By: ericvicenti

Differential Revision: D4674436

fbshipit-source-id: c9673f85a764207f108c6e2282503e8c3201c97e
2017-03-08 11:46:21 -08:00