Skip to content

Commit 2d479e4

Browse files
author
Daksh Bhardwaj
authored
Merge branch 'facebook:main' into daksh/add-aria-labelledBy-prop
2 parents 3214b85 + fa22a6e commit 2d479e4

File tree

727 files changed

+18714
-10624
lines changed

Some content is hidden

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

727 files changed

+18714
-10624
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ node cli.js bundle --platform android --dev true --entry-file ReactAndroid/src/a
3333

3434
# build test APK
3535
# shellcheck disable=SC1091
36-
source ./scripts/android-setup.sh && NO_BUCKD=1 retry3 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=1
36+
source ./scripts/android-setup.sh && NO_BUCKD=1 scripts/retry3 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=1
3737

3838
# run installed apk with tests
3939
node ./.circleci/Dockerfiles/scripts/run-android-ci-instrumentation-tests.js "$*"

.circleci/config.yml

Lines changed: 72 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ references:
2626

2727
hermes_workspace_root: &hermes_workspace_root
2828
/tmp/hermes
29+
hermes_tarball_artifacts_dir: &hermes_tarball_artifacts_dir
30+
/tmp/hermes/hermes-runtime-darwin
2931
attach_hermes_workspace: &attach_hermes_workspace
3032
attach_workspace:
3133
at: *hermes_workspace_root
@@ -66,7 +68,7 @@ references:
6668
- ~/react-native/sdks/hermes/build_macosx
6769
- ~/react-native/sdks/hermes/destroot
6870
hermes_tarball_cache_paths: &hermes_tarball_cache_paths
69-
- /tmp/hermes/hermes-runtime-darwin/
71+
- *hermes_tarball_artifacts_dir
7072

7173
# -------------------------
7274
# Filters
@@ -133,12 +135,12 @@ commands:
133135
steps:
134136
- restore_cache:
135137
keys:
136-
- << parameters.checkout_base_cache_key >>-{{ .Branch }}-{{ .Revision }}
137-
- << parameters.checkout_base_cache_key >>-{{ .Branch }}-
138-
- << parameters.checkout_base_cache_key >>
138+
- << parameters.checkout_base_cache_key >>-{{ arch }}-{{ .Branch }}-{{ .Revision }}
139+
- << parameters.checkout_base_cache_key >>-{{ arch }}-{{ .Branch }}-
140+
- << parameters.checkout_base_cache_key >>-{{ arch }}-
139141
- checkout
140142
- save_cache:
141-
key: << parameters.checkout_base_cache_key >>-{{ .Branch }}-{{ .Revision }}
143+
key: << parameters.checkout_base_cache_key >>-{{ arch }}-{{ .Branch }}-{{ .Revision }}
142144
paths:
143145
- ".git"
144146

@@ -269,6 +271,9 @@ commands:
269271
flavor:
270272
type: string
271273
default: "Debug"
274+
hermes_tarball_artifacts_dir:
275+
type: string
276+
default: *hermes_tarball_artifacts_dir
272277
steps:
273278
- when:
274279
condition:
@@ -288,26 +293,27 @@ commands:
288293
condition: << parameters.set_tarball_path >>
289294
steps:
290295
- run:
291-
name: Set HERMES_ENGINE_TARBALL_PATH if present
296+
name: Set HERMES_ENGINE_TARBALL_PATH envvar if Hermes tarball is present
292297
command: |
293-
BASE_PATH=/tmp/hermes/hermes-runtime-darwin/
294-
if [ ! -d $BASE_PATH ]; then
295-
echo "Hermes tarball base path not present ($BASE_PATH). Build it from source."
298+
HERMES_TARBALL_ARTIFACTS_DIR=<< parameters.hermes_tarball_artifacts_dir >>
299+
if [ ! -d $HERMES_TARBALL_ARTIFACTS_DIR ]; then
300+
echo "Hermes tarball artifacts dir not present ($HERMES_TARBALL_ARTIFACTS_DIR). Build Hermes from source."
296301
exit 0
297302
fi
298-
if [[ << parameters.flavor >> == "Debug" ]]; then
299-
TARBALL_FILENAME=hermes-runtime-darwin-debug-*.tar.gz
300-
elif [[ << parameters.flavor >> == "Release" ]]; then
301-
TARBALL_FILENAME=hermes-runtime-darwin-release-*.tar.gz
302-
else
303-
echo "Unsupported build type << parameters.flavor >>."
303+
304+
if [ ! -d ~/react-native ]; then
305+
echo "No React Native checkout found. Run `checkout` first."
304306
exit 0
305307
fi
306-
# /tmp/hermes/hermes-runtime-darwin/hermes-runtime-darwin-release-v0.70.0.tar.gz
307-
# /tmp/hermes/hermes-runtime-darwin/hermes-runtime-darwin-debug-v0.70.0.tar.gz
308-
TARBALL_PATH=$(ls $BASE_PATH$TARBALL_FILENAME)
308+
309+
TARBALL_FILENAME=$(node ~/react-native/scripts/hermes/get-tarball-name.js --buildType "<< parameters.flavor >>" --releaseVersion "*")
310+
TARBALL_PATH=$(ls $HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME)
311+
312+
echo "Looking for $TARBALL_FILENAME in $HERMES_TARBALL_ARTIFACTS_DIR"
313+
echo "$TARBALL_PATH"
314+
309315
if [ ! -f $TARBALL_PATH ]; then
310-
echo "Hermes tarball not present ($TARBALL_PATH). Build it from source."
316+
echo "Hermes tarball not present ($TARBALL_PATH). Build Hermes from source."
311317
exit 0
312318
fi
313319
@@ -617,7 +623,7 @@ jobs:
617623
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
618624
echo "JavaScript bundle missing, cannot run instrumentation tests. Verify Build JavaScript Bundle step completed successfully."; exit 1;
619625
fi
620-
source scripts/android-setup.sh && NO_BUCKD=1 retry3 timeout 300 buck build ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
626+
source scripts/android-setup.sh && NO_BUCKD=1 scripts/retry3 timeout 300 buck build ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
621627
622628
- run:
623629
name: Collect Test Results
@@ -826,6 +832,10 @@ jobs:
826832
# -------------------------
827833
test_ios_rntester:
828834
executor: reactnativeios
835+
parameters:
836+
architecture:
837+
type: string
838+
default: "OldArch"
829839
steps:
830840
- checkout_code_with_cache
831841
- run_yarn
@@ -854,9 +864,14 @@ jobs:
854864
set_tarball_path: True
855865
steps:
856866
- run:
857-
name: Install CocoaPods dependencies
867+
name: Install CocoaPods dependencies - Architecture << parameters.architecture >>
858868
command: |
859869
rm -rf packages/rn-tester/Pods
870+
871+
if [[ << parameters.architecture >> == "NewArch" ]]; then
872+
export RCT_NEW_ARCH_ENABLED=1
873+
fi
874+
860875
cd packages/rn-tester && bundle exec pod install
861876
862877
- run:
@@ -1084,8 +1099,10 @@ jobs:
10841099
executor: reactnativeios
10851100
environment:
10861101
- HERMES_WS_DIR: *hermes_workspace_root
1102+
- HERMES_TARBALL_ARTIFACTS_DIR: *hermes_tarball_artifacts_dir
10871103
steps:
10881104
- checkout_code_with_cache
1105+
- run_yarn
10891106
- *attach_hermes_workspace
10901107
- when:
10911108
condition:
@@ -1126,35 +1143,42 @@ jobs:
11261143
- run:
11271144
name: Package the Hermes Apple frameworks
11281145
command: |
1129-
echo "Packaging Hermes Apple frameworks for << parameters.flavor >> build type"
1146+
BUILD_TYPE="<< parameters.flavor >>"
1147+
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
1148+
1149+
TARBALL_OUTPUT_DIR=$(mktemp -d /tmp/hermes-tarball-output-XXXXXXXX)
11301150
1151+
# get_release_version() is defined in build-apple-framework.sh
11311152
cd ~/react-native/sdks/hermes
1132-
BUILD_TYPE="<< parameters.flavor >>" source ./utils/build-apple-framework.sh
1133-
1134-
mkdir -p /tmp/cocoapods-package-root/destroot
1135-
mkdir -p /tmp/hermes/output
1136-
cp -R ./destroot /tmp/cocoapods-package-root
1137-
cp LICENSE /tmp/cocoapods-package-root
1138-
1139-
if [[ << parameters.flavor >> == "Debug" ]]; then
1140-
TARBALL_FILENAME=hermes-runtime-darwin-debug-v$(get_release_version).tar.gz
1141-
elif [[ << parameters.flavor >> == "Release" ]]; then
1142-
TARBALL_FILENAME=hermes-runtime-darwin-release-v$(get_release_version).tar.gz
1143-
else
1144-
echo "Unsupported build type << parameters.flavor >>."
1145-
exit 0
1146-
fi
1153+
BUILD_TYPE=$BUILD_TYPE source ./utils/build-apple-framework.sh
1154+
RELEASE_VERSION=$(get_release_version)
1155+
1156+
cd ~/react-native
1157+
1158+
TARBALL_FILENAME=$(node ./scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE" --releaseVersion "$RELEASE_VERSION")
11471159
1148-
tar -C /tmp/cocoapods-package-root/ -czvf /tmp/hermes/output/$TARBALL_FILENAME .
1160+
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
11491161
1150-
mkdir -p /tmp/hermes/hermes-runtime-darwin
1151-
cp /tmp/hermes/output/$TARBALL_FILENAME /tmp/hermes/hermes-runtime-darwin/.
1162+
TARBALL_OUTPUT_PATH=$(node ./scripts/hermes/create-tarball.js \
1163+
--inputDir ~/react-native/sdks/hermes \
1164+
--buildType "$BUILD_TYPE" \
1165+
--releaseVersion "$RELEASE_VERSION" \
1166+
--outputDir "$TARBALL_OUTPUT_DIR")
11521167
1153-
# TODO: Remove this once the client side is aware of -release and -debug tarballs
1154-
if [[ << parameters.flavor >> == "Debug" ]]; then
1155-
cp /tmp/hermes/hermes-runtime-darwin/hermes-runtime-darwin-debug-v$(get_release_version).tar.gz /tmp/hermes/hermes-runtime-darwin/hermes-runtime-darwin-v$(get_release_version).tar.gz
1168+
echo "Hermes tarball saved to $TARBALL_OUTPUT_PATH"
1169+
1170+
mkdir -p "$HERMES_TARBALL_ARTIFACTS_DIR"
1171+
cp "$TARBALL_OUTPUT_PATH" "$HERMES_TARBALL_ARTIFACTS_DIR/."
1172+
1173+
# Make a copy of the debug tarball and use the old filename.
1174+
# This is necessary to support patch releases in versions of
1175+
# React Native that expect a single tarball.
1176+
# TODO: Remove once 0.70.x and 0.69.x are no longer being patched.
1177+
if [[ $BUILD_TYPE == "Debug" ]]; then
1178+
OLD_TARBALL_FILENAME="hermes-runtime-darwin-v$RELEASE_VERSION.tar.gz"
1179+
cp "$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME" "$HERMES_TARBALL_ARTIFACTS_DIR/$OLD_TARBALL_FILENAME"
1180+
echo "$OLD_TARBALL_FILENAME is a copy of $TARBALL_FILENAME, provided for backward compatibility." >> "$HERMES_TARBALL_ARTIFACTS_DIR/README.txt"
11561181
fi
1157-
ls /tmp/hermes/hermes-runtime-darwin/
11581182
- when:
11591183
condition:
11601184
equal: [ << parameters.flavor >>, "Debug"]
@@ -1170,7 +1194,7 @@ jobs:
11701194
key: *hermes_workspace_release_cache_key
11711195
paths: *hermes_workspace_macos_cache_paths
11721196
- store_artifacts:
1173-
path: /tmp/hermes/hermes-runtime-darwin/
1197+
path: *hermes_tarball_artifacts_dir
11741198
- store_artifacts:
11751199
path: /tmp/hermes/osx-bin/
11761200
- persist_to_workspace:
@@ -1466,6 +1490,9 @@ workflows:
14661490
- test_ios_rntester:
14671491
requires:
14681492
- build_hermes_macos
1493+
matrix:
1494+
parameters:
1495+
architecture: ["NewArch", "OldArch"]
14691496
- test_ios:
14701497
run_unit_tests: true
14711498
requires:

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
**/staticBundle.js
33
docs/generatedComponentApiDocs.js
44
flow/
5-
flow-typed/
65
Libraries/Renderer/*
76
Libraries/vendor/**/*
87
node_modules/
98
packages/*/node_modules
109
packages/react-native-codegen/lib
10+
tools/eslint/rules/sort-imports.js

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,14 @@ module.exports = {
4343
'lint/no-haste-imports': 2,
4444
'lint/no-react-native-imports': 2,
4545
'lint/require-extends-error': 2,
46+
'lint/sort-imports': 1,
4647
},
4748
},
4849
{
4950
files: ['flow-typed/**/*.js'],
5051
rules: {
52+
'lint/valid-flow-typed-signature': 2,
53+
'no-unused-vars': 0,
5154
quotes: 0,
5255
},
5356
},

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ untyped-import
7474
untyped-type-import
7575

7676
[version]
77-
^0.187.1
77+
^0.188.1

.flowconfig.android

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ untyped-import
7474
untyped-type-import
7575

7676
[version]
77-
^0.187.1
77+
^0.188.1

.github/workflows/autorebase.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
contents: write # for cirrus-actions/rebase to push code to rebase
1111
pull-requests: read # for cirrus-actions/rebase to get info about PR
1212
name: Rebase
13-
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
13+
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout the latest code

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## v0.70.2
4+
5+
### Added
6+
7+
#### iOS specific
8+
9+
- Add support for "Prefer Cross-Fade Transitions" into AccessibilityInfo ([be7c50fefd](https://github.com/facebook/react-native/commit/be7c50fefd7f13201fb538ded93d91b374341173) by [@gabrieldonadel](https://github.com/gabrieldonadel))
10+
11+
### Changed
12+
13+
- Bump CLI to 9.1.3 and Metro to 0.72.3 ([f164556037](https://github.com/facebook/react-native/commit/f1645560376b734a87f0eba1fef69f6cba312cc1) by [@kelset](https://github.com/kelset))
14+
15+
### Fixed
16+
17+
- Inform ScrollView of Keyboard Events Before Mount ([26d148029c](https://github.com/facebook/react-native/commit/26d148029c7fde117f33b0d6c8b34286c45a0ef2) by [@NickGerleman](https://github.com/NickGerleman))
18+
19+
#### Android specific
20+
21+
- Fix port as -1 if dev server without specifying port on Android ([3d7e1380b4](https://github.com/facebook/react-native/commit/3d7e1380b4e609f5340ee80c19d566b17e620427) by [@Kudo](https://github.com/Kudo))
22+
323
## v0.70.1
424

525
### Added

Gemfile.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ GEM
33
specs:
44
CFPropertyList (3.0.5)
55
rexml
6-
activesupport (6.1.5)
6+
activesupport (6.1.7)
77
concurrent-ruby (~> 1.0, >= 1.0.2)
88
i18n (>= 1.6, < 2)
99
minitest (>= 5.1)
1010
tzinfo (~> 2.0)
1111
zeitwerk (~> 2.3)
12-
addressable (2.8.0)
13-
public_suffix (>= 2.0.2, < 5.0)
12+
addressable (2.8.1)
13+
public_suffix (>= 2.0.2, < 6.0)
1414
algoliasearch (1.27.5)
1515
httpclient (~> 2.8, >= 2.8.3)
1616
json (>= 1.5.1)
@@ -45,7 +45,7 @@ GEM
4545
public_suffix (~> 4.0)
4646
typhoeus (~> 1.0)
4747
cocoapods-deintegrate (1.0.5)
48-
cocoapods-downloader (1.6.1)
48+
cocoapods-downloader (1.6.3)
4949
cocoapods-plugins (1.0.0)
5050
nap
5151
cocoapods-search (1.0.1)
@@ -63,29 +63,29 @@ GEM
6363
fuzzy_match (2.0.4)
6464
gh_inspector (1.1.3)
6565
httpclient (2.8.3)
66-
i18n (1.10.0)
66+
i18n (1.12.0)
6767
concurrent-ruby (~> 1.0)
68-
json (2.6.1)
69-
minitest (5.15.0)
68+
json (2.6.2)
69+
minitest (5.16.3)
7070
molinillo (0.8.0)
7171
nanaimo (0.3.0)
7272
nap (1.1.0)
7373
netrc (0.11.0)
74-
public_suffix (4.0.6)
74+
public_suffix (4.0.7)
7575
rexml (3.2.5)
7676
ruby-macho (2.5.1)
7777
typhoeus (1.4.0)
7878
ethon (>= 0.9.0)
79-
tzinfo (2.0.4)
79+
tzinfo (2.0.5)
8080
concurrent-ruby (~> 1.0)
81-
xcodeproj (1.21.0)
81+
xcodeproj (1.22.0)
8282
CFPropertyList (>= 2.3.3, < 4.0)
8383
atomos (~> 0.1.3)
8484
claide (>= 1.0.2, < 2.0)
8585
colored2 (~> 3.1)
8686
nanaimo (~> 0.3.0)
8787
rexml (~> 3.2.4)
88-
zeitwerk (2.5.4)
88+
zeitwerk (2.6.0)
8989

9090
PLATFORMS
9191
ruby
@@ -97,4 +97,4 @@ RUBY VERSION
9797
ruby 2.7.5p203
9898

9999
BUNDLED WITH
100-
2.3.10
100+
2.3.22

Libraries/ActionSheetIOS/ActionSheetIOS.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
* @format
99
*/
1010

11+
import type {ProcessedColorValue} from '../StyleSheet/processColor';
12+
import type {ColorValue} from '../StyleSheet/StyleSheet';
13+
1114
import RCTActionSheetManager from './NativeActionSheetManager';
1215

13-
const invariant = require('invariant');
1416
const processColor = require('../StyleSheet/processColor');
15-
import type {ColorValue} from '../StyleSheet/StyleSheet';
16-
import type {ProcessedColorValue} from '../StyleSheet/processColor';
17+
const invariant = require('invariant');
1718

1819
/**
1920
* Display action sheets and share sheets on iOS.

0 commit comments

Comments
 (0)