Skip to content

Commit 2bf18ea

Browse files
committed
Squashed commit of the following:
commit 4c43e301d97042e9eec4401dd81b8ebce053f691 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:49:02 2019 -0700 Squashed commit of the following: commit 862f3fb5d9e3161feab6e5e0e61c7b28e8ac1ef9 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:37 2019 -0700 Revert "Merge 1b12e2c into 9f1e909" This reverts commit d036bc4, reversing changes made to 9f1e909. commit 41477c33c1bcc78f40da00ac7e86ab4dd3f7d062 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:23 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.1" This reverts commit 852df1a. commit 4993963205e737849e4880309ef86aeac9f2a765 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:16 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.2" This reverts commit 774513f. commit 41f8beadb2030593208ffc6ff29339991dde3798 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:07 2019 -0700 Revert "Merge 4f3c378 into 774513f" This reverts commit a840490, reversing changes made to 774513f. commit 143e70ec6228e110cd94a5ae9c56309040c1f1eb Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:57 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.3" This reverts commit 54dfee8. commit 138191b0d6bf9e4370fb5126dc2095a3fb122a57 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:16 2019 -0700 Revert "Merge d8be239 into 54dfee8" This reverts commit faae1e5, reversing changes made to 54dfee8. commit 40a77c8365c5273df0bba4fc2b0439db17d247d0 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:44 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.4" This reverts commit 043f633. commit adf5c26c8f7132a6643ecfea116226632173447b Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:42 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.5" This reverts commit 4004f88. commit e68d497a58e32d26f0d04130895954d7b654c2bf Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:39 2019 -0700 Revert "Fix the builds... (#20)" This reverts commit 745eeda. commit 4cdef1eef22edbcdc9ca86e31846a175b944999e Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:31 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.6" This reverts commit 34a3077.
1 parent cdfff9d commit 2bf18ea

File tree

3,126 files changed

+36664
-57849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,126 files changed

+36664
-57849
lines changed

.buckconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
[maven_repositories]
99
central = https://repo1.maven.org/maven2
10-
google = https://dl.google.com/dl/android/maven2/
10+
google = https://maven.google.com
1111

1212
[alias]
1313
rntester = //RNTester/android/app:app

.circleci/config.yml

Lines changed: 68 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ aliases:
33
- &restore-yarn-cache
44
keys:
55
- v1-yarn-cache-{{ arch }}-{{ checksum "package.json" }}
6-
- v1-yarn-cache-{{ arch }}-fixed
6+
- v1-yarn-cache-{{ arch }}
77
- &save-yarn-cache
88
paths:
99
- ~/.cache/yarn
@@ -36,14 +36,16 @@ aliases:
3636

3737
- &restore-cache-gradle
3838
keys:
39-
- v2-gradle-{{ .Branch }}-{{ checksum "build.gradle" }}-{{ checksum "ReactAndroid/build.gradle" }}
39+
- v1-gradle-{{ .Branch }}-{{ checksum "build.gradle" }}-{{ checksum "ReactAndroid/build.gradle" }}
4040
# Fallback in case checksum fails
41-
- v2-gradle-{{ .Branch }}-{{ checksum "build.gradle" }}-
42-
- v2-gradle-{{ .Branch }}-fixed
41+
- v1-gradle-{{ .Branch }}-{{ checksum "build.gradle" }}-
42+
- v1-gradle-{{ .Branch }}-
43+
# Fallback in case this is a first-time run on a fork
44+
- v1-gradle-master-
4345
- &save-cache-gradle
4446
paths:
4547
- ~/.gradle
46-
key: v2-gradle-{{ .Branch }}-{{ checksum "build.gradle" }}-{{ checksum "ReactAndroid/build.gradle" }}
48+
key: v1-gradle-{{ .Branch }}-{{ checksum "build.gradle" }}-{{ checksum "ReactAndroid/build.gradle" }}
4749

4850
- &restore-cache-ndk
4951
keys:
@@ -55,13 +57,13 @@ aliases:
5557

5658
- &restore-cache-downloads-buck
5759
keys:
58-
- v3-buck-v2018.10.29.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}}
59-
- v3-buck-v2018.10.29.01-fixed
60+
- v3-buck-v2018.07.23.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}}
61+
- v3-buck-v2018.07.23.01-
6062
- &save-cache-downloads-buck
6163
paths:
6264
- ~/buck
6365
- ~/okbuck
64-
key: v3-buck-v2018.10.29.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}
66+
key: v3-buck-v2018.07.23.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}
6567

6668
- &restore-cache-watchman
6769
keys:
@@ -73,22 +75,14 @@ aliases:
7375

7476
- &restore-cache-downloads-gradle
7577
keys:
76-
- v2-gradle-{{ checksum "ReactAndroid/build.gradle" }}-{{ checksum "scripts/circleci/gradle_download_deps.sh" }}
77-
- v2-gradle-fixed
78+
- v1-gradle-{{ checksum "ReactAndroid/build.gradle" }}-{{ checksum "scripts/circleci/gradle_download_deps.sh" }}
79+
- v1-gradle-
7880
- &save-cache-downloads-gradle
7981
paths:
8082
- ~/.gradle
8183
- ReactAndroid/build/downloads
8284
- ReactAndroid/build/third-party-ndk
83-
key: v2-gradle-{{ checksum "ReactAndroid/build.gradle" }}-{{ checksum "scripts/circleci/gradle_download_deps.sh" }}
84-
85-
- &restore-cache-homebrew
86-
keys:
87-
- v1-homebrew-fixed
88-
- &save-cache-homebrew
89-
paths:
90-
- /usr/local/Homebrew
91-
key: v1-homebrew
85+
key: v1-gradle-{{ checksum "ReactAndroid/build.gradle" }}-{{ checksum "scripts/circleci/gradle_download_deps.sh" }}
9286

9387
# Branch Filtering
9488
- &filter-only-master-stable
@@ -138,7 +132,7 @@ aliases:
138132
name: Install BUCK
139133
command: |
140134
if [[ ! -e ~/buck ]]; then
141-
git clone https://github.com/facebook/buck.git ~/buck --branch v2018.10.29.01 --depth=1
135+
git clone https://github.com/facebook/buck.git ~/buck --branch v2018.07.23.01 --depth=1
142136
fi
143137
cd ~/buck && ant
144138
buck --version
@@ -191,19 +185,15 @@ aliases:
191185
name: Lint code
192186
command: scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ~/react-native/reports/junit/eslint/results.xml
193187

194-
- &run-flow-checks-ios
195-
name: Check for errors in code using Flow (iOS)
196-
command: yarn flow-check-ios
197-
198-
- &run-flow-checks-android
199-
name: Check for errors in code using Flow (Android)
200-
command: yarn flow-check-android
188+
- &run-flow-checks
189+
name: Check for errors in code using Flow
190+
command: yarn flow check
201191

202192
- &run-sanity-checks
203193
name: Sanity checks
204194
command: |
205195
./scripts/circleci/check_license.sh
206-
./scripts/circleci/validate_yarn_lockfile.sh
196+
./scripts/circleci/check_cache.sh
207197
when: always
208198

209199
- &download-dependencies-gradle
@@ -239,7 +229,7 @@ aliases:
239229

240230
- &compile-native-libs
241231
name: Compile Native Libs for Unit and Integration Tests
242-
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS
232+
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS -Pcom.android.build.threadPoolSize=1
243233
no_output_timeout: 6m
244234

245235
- &run-android-unit-tests
@@ -283,12 +273,20 @@ aliases:
283273
284274
- &boot-simulator-iphone
285275
name: Boot iPhone Simulator
286-
command: source scripts/.tests.env && xcrun simctl boot "$IOS_DEVICE" || true
276+
command: xcrun simctl boot "iPhone 5s" || true
277+
278+
- &boot-simulator-appletv
279+
name: Boot Apple TV Simulator
280+
command: xcrun simctl boot "Apple TV" || true
287281

288282
- &run-objc-ios-tests
289283
name: iOS Test Suite
290284
command: ./scripts/objc-test-ios.sh test
291285

286+
- &run-objc-tvos-tests
287+
name: tvOS Test Suite
288+
command: ./scripts/objc-test-tvos.sh test
289+
292290
- &display-broken-tests-warning
293291
name: Running broken tests (Ignore any failures past this point)
294292
command: |
@@ -302,12 +300,16 @@ aliases:
302300

303301
- &run-e2e-tests
304302
name: End-to-End Test Suite (Disabled)
305-
command: ./scripts/circleci/exec_author_check.sh node ./scripts/run-ci-e2e-tests.js --android --ios --js --retries 3;
303+
command: ./scripts/circleci/exec_author_check.sh node ./scripts/run-ci-e2e-tests.js --android --ios --tvos --js --retries 3;
306304

307305
- &run-objc-ios-e2e-tests
308306
name: iOS End-to-End Test Suite (Disabled)
309307
command: ./scripts/circleci/exec_author_check.sh node ./scripts/run-ci-e2e-tests.js --ios --retries 3;
310308

309+
- &run-objc-tvos-e2e-tests
310+
name: tvOS End-to-End Test Suite (Disabled)
311+
command: ./scripts/circleci/exec_author_check.sh node ./scripts/run-ci-e2e-tests.js --tvos --js --retries 3;
312+
311313
- &run-android-e2e-tests
312314
name: Android End-to-End Test Suite (Disabled)
313315
command: ./scripts/circleci/exec_author_check.sh node ./scripts/run-ci-e2e-tests.js --android --retries 3;
@@ -344,7 +346,7 @@ android_defaults: &android_defaults
344346
macos_defaults: &macos_defaults
345347
<<: *defaults
346348
macos:
347-
xcode: "10.1.0"
349+
xcode: "9.4.0"
348350

349351
version: 2
350352
jobs:
@@ -375,8 +377,7 @@ jobs:
375377
at: ~/react-native
376378

377379
- run: *run-lint-checks
378-
- run: *run-flow-checks-ios
379-
- run: *run-flow-checks-android
380+
- run: *run-flow-checks
380381

381382
- store_test_results:
382383
path: ~/react-native/reports/junit
@@ -410,19 +411,25 @@ jobs:
410411
- store_test_results:
411412
path: ~/react-native/reports/junit
412413

413-
# Runs unit tests on iOS devices
414-
test_ios:
414+
# Runs unit tests on iOS and Apple TV devices
415+
test_objc:
415416
<<: *macos_defaults
416417
steps:
417418
- attach_workspace:
418419
at: ~/react-native
419420

420421
- run: *boot-simulator-iphone
421-
422-
- restore-cache: *restore-cache-homebrew
422+
- run: *boot-simulator-appletv
423423
- run: *brew-install-watchman
424-
- save-cache: *save-cache-homebrew
424+
425425
- run: *run-objc-ios-tests
426+
- run: *run-objc-tvos-tests
427+
428+
# TODO: Fix these failing tests.
429+
- run: *display-broken-tests-warning
430+
- run: *run-podspec-tests
431+
- run: *run-objc-ios-e2e-tests
432+
- run: *run-objc-tvos-e2e-tests
426433

427434
- store_test_results:
428435
path: ~/react-native/reports/junit
@@ -531,61 +538,43 @@ jobs:
531538
# Analyze pull request and raise any lint/flow issues.
532539
# Issues will be posted to the PR itself via GitHub bots.
533540
# This workflow should only fail if the bots fail to run.
534-
# The public github tokens are publicly visible by design
535541
analyze_pr:
536542
<<: *defaults
537543
docker:
538544
- image: circleci/node:10
539545
environment:
540546
- PATH: "/opt/yarn/yarn-v1.5.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
541-
- PUBLIC_PULLBOT_GITHUB_TOKEN_A: "a6edf8e8d40ce4e8b11a"
542-
- PUBLIC_PULLBOT_GITHUB_TOKEN_B: "150e1341f4dd9c944d2a"
543-
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: "78a72af35445ca3f8180"
544-
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: "b1a98e0bbd56ff1ccba1"
545-
546547
steps:
547548
- checkout
548549
- run: *setup-artifacts
549550

550551
- restore-cache: *restore-yarn-cache
551552
- run: *yarn
552553

553-
- run:
554-
name: Analyze Shell Scripts
555-
command: |
556-
echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"
557-
sudo apt-get install -y shellcheck
558-
yarn add @octokit/rest@15.10.0
559-
echo -e "\\x1B[36mAnalyzing shell scripts\\x1B[0m"; \
560-
GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" \
561-
GITHUB_OWNER="$CIRCLE_PROJECT_USERNAME" \
562-
GITHUB_REPO="$CIRCLE_PROJECT_REPONAME" \
563-
GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" \
564-
./scripts/circleci/analyze_scripts.sh
565-
when: always
566-
567-
- restore-cache: *restore-cache-analysis
568554
- run:
569555
name: Analyze Code
570556
command: |
571-
echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"; yarn add @octokit/rest@15.10.0
572-
echo -e "\\x1B[36mAnalyzing code\\x1B[0m"; \
573-
GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" \
574-
GITHUB_OWNER="$CIRCLE_PROJECT_USERNAME" \
575-
GITHUB_REPO="$CIRCLE_PROJECT_REPONAME" \
576-
GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" \
577-
./scripts/circleci/analyze_code.sh
557+
# GITHUB_TOKEN=eslint-bot public_repo access token
558+
if [ -n "$CIRCLE_PR_NUMBER" ]; then
559+
echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"; yarn add @octokit/rest@15.10.0
560+
echo -e "\\x1B[36mAnalyzing code\\x1B[0m"; GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" ./scripts/circleci/analyze_code.sh
561+
else
562+
echo "Skipping code analysis."
563+
fi
578564
when: always
579565

566+
- restore-cache: *restore-cache-analysis
580567
- run:
581568
name: Analyze Pull Request
582569
command: |
583-
echo -e "\\x1B[36mInstalling additional dependencies\\x1B[0m"
584-
cd bots
585-
yarn install --non-interactive --cache-folder ~/.cache/yarn
586-
echo -e "\\x1B[36mAnalyzing pull request\\x1B[0m"; \
587-
DANGER_GITHUB_API_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" \
588-
yarn danger
570+
# DANGER_GITHUB_API_TOKEN=React-Linter public_repo access token
571+
if [ -n "$CIRCLE_PR_NUMBER" ]; then
572+
cd bots
573+
yarn install --non-interactive --cache-folder ~/.cache/yarn
574+
DANGER_GITHUB_API_TOKEN="80aa64c50f38a267e9ba""575d41d528f9c234edb8" yarn danger
575+
else
576+
echo "Skipping pull request analysis."
577+
fi
589578
when: always
590579
- save-cache: *save-cache-analysis
591580

@@ -670,8 +659,8 @@ workflows:
670659
requires:
671660
- checkout_code
672661

673-
# Test iOS
674-
- test_ios:
662+
# Test iOS & tvOS
663+
- test_objc:
675664
filters: *filter-ignore-gh-pages
676665
requires:
677666
- checkout_code
@@ -681,22 +670,15 @@ workflows:
681670
requires:
682671
- checkout_code
683672

684-
# Tooling Compatibility Checks
685-
- test_node10:
686-
filters: *filter-ignore-gh-pages
687-
688673
# Only runs on vX.X.X tags if all tests are green
689674
- publish_npm_package:
690675
filters:
691-
# ignore any commit on any branch by default
692676
branches:
693-
ignore: /.*/
694-
# only act on version tags
677+
only:
678+
- /.*-stable/
695679
tags:
696680
only: /v[0-9]+(\.[0-9]+)*(\-rc(\.[0-9]+)?)?/
697681

698-
# Run code checks on PRs from forks
682+
# Run code checks
699683
- analyze_pr:
700-
filters:
701-
branches:
702-
only: /^pull\/.*$/
684+
filters: *filter-ignore-master-stable

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@ indent_size = 2
1212

1313
[*.gradle]
1414
indent_size = 4
15-
16-
[BUCK]
17-
indent_size = 4

.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"no-constant-condition": 0, // disallow use of constant expressions in conditions
6666
"no-control-regex": 1, // disallow control characters in regular expressions
6767
"no-debugger": 1, // disallow use of debugger
68-
"no-dupe-class-members": 2, // Disallow duplicate name in class members
6968
"no-dupe-keys": 2, // disallow duplicate keys when creating object literals
7069
"no-empty": 0, // disallow empty statements
7170
"no-ex-assign": 1, // disallow assigning to the exception in a catch block

.flowconfig

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ module.system.haste.paths.blacklist=.*/__mocks__/.*
6363
module.system.haste.paths.whitelist=<PROJECT_ROOT>/Libraries/.*
6464
module.system.haste.paths.whitelist=<PROJECT_ROOT>/RNTester/.*
6565
module.system.haste.paths.whitelist=<PROJECT_ROOT>/IntegrationTests/.*
66-
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/react-native/react-native-implementation.js
6766
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Animated/src/polyfills/.*
6867

6968
munge_underscores=true
@@ -76,8 +75,8 @@ suppress_type=$FlowFixMe
7675
suppress_type=$FlowFixMeProps
7776
suppress_type=$FlowFixMeState
7877

79-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
80-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
78+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_ios\\)?_oss|react_native\\(_ios\\)?_fb][a-z,_]*\\)?)\\)
79+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_ios\\)?_oss|react_native\\(_ios\\)?_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
8180
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
8281
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
8382

@@ -106,7 +105,4 @@ untyped-import
106105
untyped-type-import
107106

108107
[version]
109-
^0.86.0
110-
111-
[untyped]
112-
.*/node_modules/metro/.*
108+
^0.78.0

0 commit comments

Comments
 (0)