Skip to content

Commit 85d0afd

Browse files
committed
Merge branch 'main' of https://github.com/facebook/react-native into realize-last-focused
2 parents 8fd72a4 + 72d949e commit 85d0afd

File tree

3,795 files changed

+32184
-9799
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,795 files changed

+32184
-9799
lines changed

.buckconfig

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

22
[android]
3-
target = android-30
3+
target = android-31
44

55
[download]
66
max_number_of_retries = 3

.circleci/Dockerfiles/Dockerfile.android

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# and build a Android application that can be used to run the
1515
# tests specified in the scripts/ directory.
1616
#
17-
FROM reactnativecommunity/react-native-android:5.1
17+
FROM reactnativecommunity/react-native-android:5.2
1818

1919
LABEL Description="React Native Android Test Image"
2020
LABEL maintainer="Héctor Ramos <[email protected]>"

.circleci/Dockerfiles/scripts/run-android-ci-instrumentation-tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) Facebook, Inc. and its affiliates.
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.

.circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) Facebook, Inc. and its affiliates.
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
33
#
44
# This source code is licensed under the MIT license found in the
55
# LICENSE file in the root directory of this source tree.

.circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) Facebook, Inc. and its affiliates.
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
33
#
44
# This source code is licensed under the MIT license found in the
55
# LICENSE file in the root directory of this source tree.

.circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) Facebook, Inc. and its affiliates.
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
33
#
44
# This source code is licensed under the MIT license found in the
55
# LICENSE file in the root directory of this source tree.

.circleci/Dockerfiles/scripts/run-instrumentation-tests-via-adb-shell.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) Facebook, Inc. and its affiliates.
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
33
#
44
# This source code is licensed under the MIT license found in the
55
# LICENSE file in the root directory of this source tree.

.circleci/config.yml

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ executors:
3636
reactnativeandroid:
3737
<<: *defaults
3838
docker:
39-
- image: reactnativecommunity/react-native-android:5.1
39+
- image: reactnativecommunity/react-native-android:5.2
4040
resource_class: "large"
4141
environment:
4242
- TERM: "dumb"
@@ -78,7 +78,9 @@ commands:
7878
steps:
7979
- restore_cache:
8080
keys:
81-
- v4-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
81+
- v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "yarn.lock" }}
82+
- v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}-{{ arch }}
83+
- v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}
8284
- run:
8385
name: "Yarn: Install Dependencies"
8486
command: |
@@ -90,13 +92,7 @@ commands:
9092
- save_cache:
9193
paths:
9294
- ~/.cache/yarn
93-
key: v4-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
94-
95-
build_codegen:
96-
steps:
97-
- run:
98-
name: "Codegen: Build react-native-codegen package"
99-
command: cd packages/react-native-codegen && yarn build
95+
key: v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "yarn.lock" }}
10096

10197
install_buck_tooling:
10298
steps:
@@ -242,7 +238,7 @@ jobs:
242238
command: |
243239
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
244240
apt update && apt install -y shellcheck jq
245-
apt-get install openssl ca-certificates
241+
apt-get -y install openssl ca-certificates
246242
update-ca-certificates
247243
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
248244
apt update && apt install -y shellcheck jq
@@ -373,7 +369,6 @@ jobs:
373369
- setup_artifacts
374370
- setup_ruby
375371
- run_yarn
376-
- build_codegen
377372

378373
- run: |
379374
cd packages/rn-tester
@@ -590,7 +585,8 @@ jobs:
590585
name: Setup the Android Template
591586
command: |
592587
cd template
593-
sed -i 's/1000\.0\.0/file\:\.\./g' package.json
588+
# We replace the "react-native" dependency version with file:.. so we use it from source.
589+
sed -i 's/\"react-native\"\:.*/\"react-native\"\: \"file\:\.\.\"/g' package.json
594590
npm install
595591
# react-native-community/cli is needed as the Android template is referencing a .gradle file inside it.
596592
npm i @react-native-community/cli
@@ -649,10 +645,9 @@ jobs:
649645
environment:
650646
- ANDROID_HOME: "C:\\Android\\android-sdk"
651647
- ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\20.1.5948944"
652-
- ANDROID_BUILD_VERSION: 30
653-
- ANDROID_TOOLS_VERSION: 30.0.2
648+
- ANDROID_BUILD_VERSION: 31
649+
- ANDROID_TOOLS_VERSION: 31.0.0
654650
- GRADLE_OPTS: -Dorg.gradle.daemon=false
655-
- NDK_VERSION: 21.4.7075529
656651
steps:
657652
- checkout
658653

@@ -698,7 +693,6 @@ jobs:
698693
sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
699694
sdkmanager "add-ons;addon-google_apis-google-23"
700695
sdkmanager "extras;android;m2repository"
701-
sdkmanager "ndk;%NDK_VERSION%"
702696
703697
# -------------------------
704698
# Run Tests
@@ -749,6 +743,19 @@ jobs:
749743
# -------------------------
750744
# JOBS: Releases
751745
# -------------------------
746+
prepare_package_for_release:
747+
executor: reactnativeios
748+
steps:
749+
- checkout
750+
- run_yarn
751+
- add_ssh_keys:
752+
fingerprints:
753+
- "1c:98:e0:3a:52:79:95:29:12:cd:b4:87:5b:41:e2:bb"
754+
- run:
755+
name: "Set new react-native version and commit changes"
756+
command: |
757+
node ./scripts/prepare-package-for-release.js
758+
752759
build_npm_package:
753760
parameters:
754761
publish_npm_args:
@@ -847,7 +854,6 @@ workflows:
847854
only:
848855
- main
849856
- /^pull\/.*$/
850-
- /^(\d+)\.(\d+)-stable$/
851857
- test_js:
852858
run_disabled_tests: false
853859
filters:
@@ -915,10 +921,25 @@ workflows:
915921

916922
releases:
917923
jobs:
924+
# This job will trigger on relevant release branch pushes.
925+
# It prepares the package and triggers `build_npm_package` for release
926+
- prepare_package_for_release:
927+
name: prepare_package_for_release
928+
# Since CircleCI does not support branch AND tag filters, we manually check in job
929+
# and no-op if there is no `publish-v{version}` tag set.
930+
filters:
931+
branches:
932+
only:
933+
- /^(\d+)\.(\d+)-stable$/
934+
935+
# This job will trigger when a version tag is pushed (by prepare_package_for_release)
918936
- build_npm_package:
919937
name: build_and_publish_npm_package
920938
context: react-native-bot
921939
publish_npm_args: --release
940+
# CircleCI filters are OR-ed, with all branches triggering by default and tags excluded by default
941+
# CircleCI env-vars are only set with the branch OR tag that triggered the job, not both.
942+
# In this case, CIRCLE_BRANCH is unset, but CIRCLE_TAG is set
922943
filters:
923944
# Both of the following conditions must be included!
924945
# Ignore any commit on any branch by default.

.eslintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
],
77

88
"plugins": [
9-
"@react-native/eslint-plugin-codegen"
9+
"@react-native/eslint-plugin-specs"
1010
],
1111

1212
"overrides": [
@@ -18,7 +18,7 @@
1818
"@react-native-community/no-haste-imports": 2,
1919
"@react-native-community/error-subclass-name": 2,
2020
"@react-native-community/platform-colors": 2,
21-
"@react-native/codegen/react-native-modules": 2
21+
"@react-native/specs/react-native-modules": 2
2222
}
2323
},
2424
{

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ untyped-import
7070
untyped-type-import
7171

7272
[version]
73-
^0.165.0
73+
^0.168.0

0 commit comments

Comments
 (0)