Commit Graph

218 Commits

Author SHA1 Message Date
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