Skip to content

Merge from upstream through 2020-11-03 #849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 159 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
62518ba
Bump react-native-codegen: 0.0.4
hramos Oct 15, 2020
20e7a40
Remove TVNavigationEventEmitter
RSNara Oct 15, 2020
56c363e
Split NativeLinking into NativeIntentManager and NativeLinkingManager
RSNara Oct 15, 2020
5a57a53
Split NativeAsyncStorage into NativeAsyncLocalStorage and NativeAsync…
RSNara Oct 15, 2020
668cc2f
Remove setNativeProps from core
sammy-SC Oct 15, 2020
fe8cd5c
Fabric: Lazy initialization of RCTSurfaceTouchHandler on the main thread
shergin Oct 15, 2020
0cec013
Fabric: `operator==` for `LayoutContext`
shergin Oct 15, 2020
b70152c
Fix NativeLinking split
RSNara Oct 15, 2020
81a97de
Prevent type conversion in Differentiator
sammy-SC Oct 15, 2020
3a75b37
Create NativeModuleSchema and ComponentSchema
RSNara Oct 16, 2020
8b1ae7a
Annotate Component parser's output with 'Component' type
RSNara Oct 16, 2020
3d0a626
Update NativeModule parser to generate new schema
RSNara Oct 16, 2020
4ee65f6
Update Module generator fixtures to follow new NativeModuleSchema
RSNara Oct 16, 2020
abeae87
Update Component generator fixtures to follow new ComponentSchema
RSNara Oct 16, 2020
a5a12cf
Update SchemaValidator test to follow new CodegenSchema
RSNara Oct 16, 2020
100c052
Update component generators to follow new ComponentSchema
RSNara Oct 16, 2020
ee177f6
Update ViewConfig generator test to follow new ComponentSchema
RSNara Oct 16, 2020
c4f2335
Update Module Generators to follow new NativeModuleSchema
RSNara Oct 16, 2020
518c9a2
Update JavaPoet Module generator to follow new NativeModule schema
RSNara Oct 16, 2020
1bbe40a
Adding pointData support to UserFlow
dmitry-voronkevich Oct 16, 2020
213b02b
Adding support for boolean annotations for UserFlow@RN
dmitry-voronkevich Oct 16, 2020
34c4054
Add HERMES_BYTECODE_VERSION to JS bundle requestUrl
Oct 16, 2020
28e9528
Fabric: QE for Preemptive views allocation feature
shergin Oct 17, 2020
3ed38df
TurboModule Android: Remove RNTester module lookup override
fkgozali Oct 17, 2020
ec094e7
Codegen: denote Android/iOS exclusive platform modules in the schema
fkgozali Oct 17, 2020
7609883
Codegen: exclude NativeModules that are not for the specific platform
fkgozali Oct 17, 2020
6c88afc
Refactor: Rename `moduleName` to `hasteModuleName`
RSNara Oct 19, 2020
500bdf7
Deploy Flow v0.136.0
pieterv Oct 19, 2020
1ca5ccc
Remove ThreadStorage class in favour of thread_local
sammy-SC Oct 19, 2020
4e8326a
docs: fix url for chainreactconf (#30199)
Naturalclar Oct 19, 2020
4dfa3be
Codegen Android: handle nullable getConstants() properties generation.
fkgozali Oct 19, 2020
2a3c26e
Android: add libglog prebuilt .so definition
fkgozali Oct 19, 2020
3c154c8
Add HeapProfiler.collectGarbage implementation
Oct 19, 2020
0a28b34
Conditionalize Promise Polyfill for Hermes
Huxpro Oct 19, 2020
b05294d
Codegen fbsource: filter JS files for all cases, then enable codegen_…
fkgozali Oct 19, 2020
c642afd
Fabric: Making `_propKeysManagedByAnimated` to preserve previous prop…
shergin Oct 20, 2020
fc94054
Refactor: Rename `codegenModuleName` to `hasteModuleName`
RSNara Oct 20, 2020
35ee7c8
GenerateModuleJniH: Replace string replace with string templates
RSNara Oct 20, 2020
5a73af6
GenerateModuleJniCpp: Replace string replace with string templates
RSNara Oct 20, 2020
ac46837
GenerateModuleJavaSpec: Replace string replace with string templates
RSNara Oct 20, 2020
de32fd2
GenerateModuleH: Replace string replace with string templates
RSNara Oct 20, 2020
33789ba
GenerateModuleCpp: Replace string replace with string templates
RSNara Oct 20, 2020
2f438b0
Make buildModuleSchema and buildComponentSchema operate on Program AS…
RSNara Oct 20, 2020
9c1f0c6
Make NativeModule spec parser collect all parsing errors
RSNara Oct 20, 2020
ca4bac5
EZ: Fix debug mode NPE in non-Fabric
JoshuaGross Oct 20, 2020
403d6f4
Migrate remaining call sites to `CKOverlayLayoutComponent` to Builder
cuva Oct 20, 2020
d03c0f9
Generate FBReactNativeSpec ObjC++ source files using CocoaPods
hramos Oct 20, 2020
13d9927
Codegen: separate Android/Cxx/iOS modules codegen outputs
fkgozali Oct 20, 2020
82c95fa
Codegen (FB): define internal BUCK targets for Android + JNI
fkgozali Oct 20, 2020
eca9d97
Codegen: Make BUCK & DEFS.bzl OSS friendly
fkgozali Oct 20, 2020
36b0f7d
Fix controller <TextInput> on iOS when inputting in Chinese/japanese
sammy-SC Oct 20, 2020
a17ff44
Upgrade minsdkversion of RN OSS template to API level 21
JoshuaGross Oct 20, 2020
49f10fd
Remove code for API level 20 and below
JoshuaGross Oct 20, 2020
b5de897
add testID, helps tests find items in the list (#30138)
kmelmon Oct 21, 2020
5b270e0
Version bump to 0.0.5
RSNara Oct 21, 2020
5333ad8
Add unit tests for RCTComponentViewRegistry
sammy-SC Oct 21, 2020
9218e0c
iOS: Generate FBReactNativeSpec ObjC++ files at build time
hramos Oct 22, 2020
a8c90e6
Make conversions between folly::dynamic and JSI non-recursive
mhorowitz Oct 22, 2020
ae418b8
Fix crash when blurring image
sammy-SC Oct 22, 2020
f8eaab4
Workaround for T76236115 and swallow crash while using TextEdit
JoshuaGross Oct 22, 2020
7cfc7d6
Codegen: Make react-native-codegen BUCK deps OSS-compatible
fkgozali Oct 23, 2020
16044b3
Codegen Buck: fork schema generator target for FB vs OSS via rn_codeg…
fkgozali Oct 23, 2020
bfbd841
Remove redundant property from ImageRequest
sammy-SC Oct 23, 2020
3a41f69
Make sure js bundle still exists at bundle-output path (#30149)
janicduplessis Oct 23, 2020
a28dd38
Use default for hermes es6 proxy enabled (#30142)
janicduplessis Oct 23, 2020
afb926a
Sort index.js by alphabetical order and add category comments. (#30217)
StuffByLiang Oct 23, 2020
a911efa
Text: Refine Exported Flow Type
yungsters Oct 23, 2020
3a5eedf
Remove noexcept from TelemetryController
sammy-SC Oct 23, 2020
6eed1e4
Remove iOS gating to fix sticky header
sammy-SC Oct 23, 2020
d238da7
Do not crash when ScrollView snapToOffsets is empty
makovkastar Oct 23, 2020
5c498e3
Migrate createPerformanceLogger to ESM and export getCurrentTimestamp
rubennorte Oct 23, 2020
74fc285
Allow specifying custom timestamps in performance logger spans
rubennorte Oct 23, 2020
ca00173
Fix test_docker: Confirm envinfo package install during Docker contai…
hramos Oct 23, 2020
0d1f93c
Bump Node LTS to 14, and Node PrevLTS to 12. (#30237)
hramos Oct 24, 2020
edb6fa7
Synchronize RCTImageLoader loaders initialization
p-sun Oct 24, 2020
d527e03
Add some diagnostics to aid in debugging ReactViewGroup.dispatchDraw …
JoshuaGross Oct 24, 2020
81c184d
Followup to D24379607, update minsdk
JoshuaGross Oct 24, 2020
2ff1d4c
Fix NativeAnimated queueing
JoshuaGross Oct 24, 2020
ad5802c
Make RN Modules ESLint rule call into NativeModule spec parser
RSNara Oct 24, 2020
008596d
Disallow more than one TurboModuleRegistry calls in NativeModule specs
RSNara Oct 24, 2020
a68754f
Disallow non-string literals in TurboModuleRegistry calls
RSNara Oct 24, 2020
46eb3ec
Disable `childrenDrawingOrder` of ReactViewGroup in Fabric
JoshuaGross Oct 24, 2020
1d1cbc9
Prevent ScrollTo view command from scrolling outside of content view
sammy-SC Oct 24, 2020
e75a0dc
Force scroll event inside scrollViewDidEndScrollingAnimation and scro…
sammy-SC Oct 24, 2020
2a634f4
Codegen BUCK: moved generate-test.sh to be general-purpose generate-a…
fkgozali Oct 24, 2020
6b16f2e
Add throttling mechanism to background executor
sammy-SC Oct 26, 2020
6f78e16
iOS: Build react-native-codegen as part of RNTester pod install
hramos Oct 26, 2020
4b58038
Log stack trace when unmountReactApplication is called in Fabric
JoshuaGross Oct 26, 2020
41c788a
Make sure opacity and transform are applied in native animation
sammy-SC Oct 26, 2020
53f5500
Fix App Bundle/Release build missing index.android.bundle with gradle…
tomoima525 Oct 26, 2020
09d4cb7
Remove @react-native/codegen lint ignores
RSNara Oct 26, 2020
f1f9cef
Disallow object spreads in ObjectTypeAnnotations
RSNara Oct 26, 2020
6c21f15
Lint: fix few "no-unused-var" warnings for imports (#30157)
Simek Oct 27, 2020
dd4298a
Remove left over code from deprecating Android < 21 (#30243)
safaiyeh Oct 27, 2020
24bca49
Update React Native to React 17.0.0
rickhanlonii Oct 27, 2020
dd2a9af
Text: Setup Rewrite Experiment
yungsters Oct 27, 2020
f760f90
Codegen BUCK: define codegen entrypoint under react-native-github/Lib…
fkgozali Oct 27, 2020
a1d374e
Codegen Android: optional NativeModule method should not be marked ab…
fkgozali Oct 27, 2020
6c17110
Codegen Android: used generated output instead of the checked-in spec…
fkgozali Oct 27, 2020
e911651
Codegen iOS: use the codegen target from Libraries just like for Android
fkgozali Oct 27, 2020
3ddba56
Animated module: don't use random IDs as waiting identifier for queueing
JoshuaGross Oct 27, 2020
f2ba978
Codegen Android: build react-native-codegen via yarn when building fr…
fkgozali Oct 27, 2020
f023519
TurboModule Android: Enable TurboModule by default on RNTester
fkgozali Oct 27, 2020
758b633
Use custom require hook to strip Flow types from NativeModule spec pa…
RSNara Oct 27, 2020
4630e57
Codegen Android: fixed CI due to bad SRC->OUT dir copy
fkgozali Oct 27, 2020
1e9d7b7
More reliable way to get ReactAndroid build dir in Android-prebuilt.m…
janicduplessis Oct 27, 2020
3ea899f
Pass segment hash from JS to Java
makovkastar Oct 27, 2020
d50a425
Use $projectDir instead of $rootDir for ReactAndroid codegen (#30220)
janicduplessis Oct 27, 2020
1e78e06
bump okio to 1.17.5 (#30204)
dulmandakh Oct 27, 2020
bb8d0f5
Set color filter so that the arrow matches the text color
Oct 27, 2020
1903f66
Daily `arc lint --take GOOGLEJAVAFORMAT`
Oct 27, 2020
3a41125
Android CI: Fix up //packages/react-native-codegen:setup_cli src copy…
fkgozali Oct 28, 2020
dfa9db4
bump Android Gradle Plugin to 4.1.0 (#30201)
dulmandakh Oct 28, 2020
e9fd93f
Bump Gradle Wrapper to 6.7 (#30200)
dulmandakh Oct 28, 2020
a6825e5
Clean up `symbolicateStackTrace`
cpojer Oct 28, 2020
07d090d
Implement ScrollView.scrollToOverflowEnabled
sammy-SC Oct 28, 2020
c2b7590
Change the order of handling exception and clearing react instance ma…
Oct 29, 2020
697d761
Annotate usedReactFabric in TTRC
rubennorte Oct 29, 2020
aead26d
Fabric: Assert if `props` in `updateProps:oldProps:` is nullptr
shergin Oct 29, 2020
306a8ad
Fabric: Using shared pointer for event counter in ViewEventEmitter
shergin Oct 29, 2020
17a8737
Codegen Android: update Docker configuration to support codegen (#30268)
fkgozali Oct 29, 2020
4b92e2e
Update Node version to >= 12 (#30252)
safaiyeh Oct 29, 2020
2707c17
Fix clone issue in YogaNodeJNIBase
pasqualeanatriello Oct 29, 2020
1b71ec4
update eslint-plugin-react to 7.21.5 version
Oct 29, 2020
e37708d
Allow image loaders to enable/disable image telemetry
p-sun Oct 30, 2020
ab21d73
Fix crash in RCTEventEmitter
Oct 30, 2020
be8fe21
Deploy Flow v0.137.0
Oct 30, 2020
96ecad4
Trigger garbage collection when the app receive memory warning
sammy-SC Oct 30, 2020
0217c14
Implement ScrollView.keyboardDismissMode
sammy-SC Oct 30, 2020
4308f9f
Add new ReactMarkers for bridgeless mode [1/n]
Oct 30, 2020
192e821
Hook up logTaggedMarkerWithInstanceKey to performance logger [2/n]
Oct 30, 2020
d7b3daa
Fabric: Removing `RCTExperimentSetSyncPerformanceFlag`
shergin Oct 30, 2020
2cd89d0
Experiment: use int buffer to represent MountItems instead of concret…
JoshuaGross Oct 31, 2020
dd9fd2a
Fix dispatchDraw crash
JoshuaGross Oct 31, 2020
538446e
Bump Xcode to 12.1.0, bump CocoaPods 1.10.0 (#30250)
hramos Oct 31, 2020
864cdf3
Stop using S3 CocoaPods Specs mirror (#30265)
hramos Oct 31, 2020
49d41c9
Docker android: addressing AVD launch issue (#30279)
fkgozali Oct 31, 2020
7dcecb2
Android Test: target SDK 21 instead of 16 (#30280)
fkgozali Oct 31, 2020
97d6f2e
Fabric: `touchesShouldCancelInContentView` now always returns `YES`
shergin Oct 31, 2020
0045621
Daily `arc lint --take CLANGFORMAT`
Nov 2, 2020
c95ee5a
feat: Enable Hermes to work on iOS (#29914)
grabbou Nov 3, 2020
21349d6
docs: fix broken links in README (#30286)
helenaford Nov 3, 2020
61c1d60
LayoutAnimations: generate final mutation instruction for interrupted…
JoshuaGross Nov 3, 2020
9500eb8
bump docker-android to 2.1 (#30296)
dulmandakh Nov 4, 2020
9e98d6c
Merge commit '518c9a2e1ac36132ba79c0f73700802cc2876176' into amgleitm…
amgleitman Sep 30, 2021
0715e4a
Merge commit '403d6f4401178fb9c22fb7c8dfac735633de6c0e' into amgleitm…
amgleitman Oct 1, 2021
f78507b
Merge commit 'd03c0f965ed26c7c8a5557ab183396b64d25a9a1' into amgleitm…
amgleitman Oct 5, 2021
b4d0a57
Fix TurboModule specs to work with codegen
amgleitman Oct 5, 2021
9912e5b
Merge commit 'a8c90e6af4a4e5ac115016a3e8977ecff90e99a0' into amgleitm…
amgleitman Oct 6, 2021
4bfa80f
Merge commit 'f023519e491d8352fb384bd1520606c12cbad1ca' into amgleitm…
amgleitman Oct 6, 2021
aa8cfcd
Merge commit '9500eb8867d25896b1611903a64fac8d81984bf6' into amgleitm…
amgleitman Oct 6, 2021
c0c2aff
Merge branch 'master' into amgleitman/0.64-merge-head
amgleitman Oct 6, 2021
9dc4b46
Fix Android patches
amgleitman Oct 6, 2021
7431158
Merge branch 'master' into amgleitman/0.64-merge-2020-11-03
amgleitman Oct 16, 2021
964a3c1
Cherry pick 811ccec74e5
amgleitman Oct 19, 2021
c31df0f
Fix name of script in react native codegen phase
amgleitman Oct 19, 2021
735bd91
Integrate Native Module codegen into Xcode build pipeline (#30449)
hramos Dec 2, 2020
542c506
Fix path to react-native-codegen
hramos Dec 3, 2020
12a83ca
Fix Circle CI iOS Tests: Make FBReactNativeSpec dir as needed
hramos Dec 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions .circleci/Dockerfiles/Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# and build a Android application that can be used to run the
# tests specified in the scripts/ directory.
#
FROM reactnativecommunity/react-native-android:2019-10-18
FROM reactnativecommunity/react-native-android:2.1

LABEL Description="React Native Android Test Image"
LABEL maintainer="HΓ©ctor Ramos <[email protected]>"
Expand All @@ -26,11 +26,13 @@ ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"

ADD .buckconfig /app/.buckconfig
ADD .buckjavaargs /app/.buckjavaargs
ADD tools /app/tools
ADD Libraries /app/Libraries
ADD ReactAndroid /app/ReactAndroid
ADD ReactCommon /app/ReactCommon
ADD React /app/React
ADD keystores /app/keystores
ADD packages/react-native-codegen /app/packages/react-native-codegen
ADD tools /app/tools

# add third party dependencies
ADD Folly /app/Folly
Expand Down Expand Up @@ -71,4 +73,3 @@ RUN yarn
RUN ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog

RUN ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=1

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mount -o remount,exec /dev/shm
AVD_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)

# create virtual device
echo no | android create avd -n "$AVD_UUID" -f -t android-19 --abi default/armeabi-v7a
echo no | android create avd -n "$AVD_UUID" -f -t android-21 --abi default/armeabi-v7a

# emulator setup
emulator64-arm -avd $AVD_UUID -no-skin -no-audio -no-window -no-boot-anim &
Expand Down
2 changes: 1 addition & 1 deletion .circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function e2e_suite() {

# create virtual device
if ! android list avd | grep "$AVD_UUID" > /dev/null; then
echo no | android create avd -n "$AVD_UUID" -f -t android-19 --abi default/armeabi-v7a
echo no | android create avd -n "$AVD_UUID" -f -t android-21 --abi default/armeabi-v7a
fi

# newline at end of adb devices call and first line is headers
Expand Down
79 changes: 46 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,22 @@ defaults: &defaults
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: &github_token_a "78a72af35445ca3f8180"
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: &github_token_b "b1a98e0bbd56ff1ccba1"


# -------------------------
# EXECUTORS
# -------------------------
executors:
nodelts:
<<: *defaults
docker:
- image: circleci/node:12
- image: circleci/node:14
nodeprevlts:
<<: *defaults
docker:
- image: circleci/node:10
- image: circleci/node:12
reactnativeandroid:
<<: *defaults
docker:
- image: reactnativecommunity/react-native-android:2019-10-18
- image: reactnativecommunity/react-native-android:2.1
resource_class: "large"
environment:
- TERM: "dumb"
Expand All @@ -50,7 +49,7 @@ executors:
reactnativeios:
<<: *defaults
macos:
xcode: &_XCODE_VERSION "11.6.0"
xcode: &_XCODE_VERSION "12.1.0"

# -------------------------
# COMMANDS
Expand Down Expand Up @@ -152,13 +151,13 @@ commands:
command: cp packages/rn-tester/Podfile.lock packages/rn-tester/Podfile.lock.bak
- restore_cache:
keys:
- v1-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}
- v1-pods-{{ .Environment.CIRCLE_JOB }}-
- v3-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}
- v3-pods-{{ .Environment.CIRCLE_JOB }}-
- steps: << parameters.steps >>
- save_cache:
paths:
- packages/rn-tester/Pods
key: v1-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}
key: v3-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}

download_gradle_dependencies:
steps:
Expand Down Expand Up @@ -216,12 +215,12 @@ commands:
jobs:
setup:
parameters:
executor:
type: executor
default: nodelts
checkout_type:
type: string
default: node
executor:
type: executor
default: nodelts
checkout_type:
type: string
default: node
executor: << parameters.executor >>
steps:
- checkout
Expand Down Expand Up @@ -350,6 +349,9 @@ jobs:
use_frameworks:
type: boolean
default: false
use_hermes:
type: boolean
default: false
run_unit_tests:
description: Specifies whether unit tests should run.
type: boolean
Expand Down Expand Up @@ -380,15 +382,15 @@ jobs:
- run:
name: Configure Environment Variables
command: |
echo 'export PATH=/usr/local/opt/node@10/bin:$PATH' >> $BASH_ENV
echo 'export PATH=/usr/local/opt/node@12/bin:$PATH' >> $BASH_ENV
source $BASH_ENV

- with_brew_cache_span:
steps:
- brew_install:
package: watchman
- brew_install:
package: node@10
package: node@12
- run:
name: "Brew: Tap wix/brew"
command: HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
Expand All @@ -406,10 +408,13 @@ jobs:
name: Set USE_FRAMEWORKS=1
command: echo "export USE_FRAMEWORKS=1" >> $BASH_ENV

- run:
name: Fetch CocoaPods Specs
command: |
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
- when:
condition: << parameters.use_hermes >>
steps:
- run:
name: Set USE_HERMES=1
command: echo "export USE_HERMES=1" >> $BASH_ENV

- run:
name: Setup the CocoaPods environment
command: pod setup
Expand All @@ -418,11 +423,7 @@ jobs:
steps:
- run:
name: Generate RNTesterPods Workspace
command: cd packages/rn-tester && pod install --verbose

- run:
name: Generate RNTesterPods Xcode Workspace
command: pushd packages/rn-tester && pod install --verbose && popd
command: cd packages/rn-tester && bundle exec pod install --verbose

# -------------------------
# Runs iOS unit tests
Expand Down Expand Up @@ -542,12 +543,13 @@ jobs:
name: "Run Tests: Android Unit Tests"
command: buck test ReactAndroid/src/test/... --config build.threads=$BUILD_THREADS --xml ./reports/buck/all-results-raw.xml
- run:
name: "Run Tests: Android Instrumentation Tests"
name: "Build Tests: Android Instrumentation Tests"
# Here, just build the instrumentation tests. There is a known issue with installing the APK to android-21+ emulator.
command: |
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
echo "JavaScript bundle missing, cannot run instrumentation tests. Verify Build JavaScript Bundle step completed successfully."; exit 1;
fi
source scripts/android-setup.sh && NO_BUCKD=1 retry3 timeout 300 buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
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

# Optionally, run disabled tests
- when:
Expand Down Expand Up @@ -588,7 +590,7 @@ jobs:
source ~/.bashrc
nvm i node
npm i -g yarn
npx envinfo@latest
echo y | npx envinfo@latest
yarn run docker-setup-android
yarn run docker-build-android

Expand Down Expand Up @@ -641,7 +643,7 @@ jobs:
name: Setup Android SDKs
command: |
sdkmanager --licenses
sdkmanager "system-images;android-19;google_apis;armeabi-v7a"
sdkmanager "system-images;android-21;google_apis;armeabi-v7a"
sdkmanager "platforms;android-%ANDROID_BUILD_VERSION%"
sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
sdkmanager "add-ons;addon-google_apis-google-23"
Expand Down Expand Up @@ -772,20 +774,31 @@ workflows:
requires:
- setup_android
- test_ios:
name: test_ios_unit
run_disabled_tests: false
name: test_ios_unit_jsc
run_unit_tests: true
requires:
- setup_ios
- test_ios:
name: test_ios_unit_frameworks_jsc
use_frameworks: true
run_unit_tests: true
requires:
- setup_ios
- test_ios:
name: test_ios_unit_hermes
use_hermes: true
run_unit_tests: true
requires:
- setup_ios
- test_ios:
name: test_ios_unit_frameworks
name: test_ios_unit_frameworks_hermes
use_hermes: true
use_frameworks: true
run_unit_tests: true
requires:
- setup_ios
# - test_ios:
# name: test_ios_detox
# run_disabled_tests: false
# run_detox_tests: true
# requires:
# - setup_ios
Expand Down
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ node_modules/
packages/*/node_modules
packages/*/lib
packages/*/lib-commonjs
pr-inactivity-bookmarklet.js
question-bookmarklet.js
bots/node_modules
android-patches/
packages/react-native-codegen/lib
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ untyped-import
untyped-type-import

[version]
^0.135.0
^0.137.0
2 changes: 1 addition & 1 deletion .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ untyped-import
untyped-type-import

[version]
^0.135.0
^0.137.0
2 changes: 1 addition & 1 deletion .flowconfig.macos
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ untyped-import
untyped-type-import

[version]
^0.135.0
^0.137.0
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ package-lock.json
!/packages/rn-tester/Pods/__offline_mirrors__

# react-native-codegen
/Libraries/FBReactNativeSpec/FBReactNativeSpec
/packages/react-native-codegen/lib
/ReactCommon/fabric/components/rncore/
/schema-native-modules.json
/schema-rncore.json

# Visual studio
Expand Down
2 changes: 1 addition & 1 deletion ECOSYSTEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ React Native's current set of partners include Callstack, Expo, Facebook, Infini
* **[Callstack](https://callstack.com/):** Manages releases, maintains the [React Native CLI](https://github.com/react-native-community/react-native-cli) and organizes [React Native EU](https://react-native.eu/)
* **[Expo](https://expo.io/):** Builds [expo](https://github.com/expo/expo) on top of React Native to simplify app development
* **[Facebook](https://opensource.facebook.com):** Oversees the React Native product and maintains the [React Native core repo](https://reactnative.dev/)
* **[Infinite Red](https://infinite.red/):** Maintains the [ignite cli/boilerplate](https://github.com/infinitered/ignite), organizes [Chain React Conf](https://infinite.red/ChainReactConf)
* **[Infinite Red](https://infinite.red/):** Maintains the [ignite cli/boilerplate](https://github.com/infinitered/ignite), organizes [Chain React Conf](https://cr.infinite.red/)
* **[Microsoft](http://aka.ms/reactnative):** Develops [React Native Windows](https://github.com/Microsoft/react-native-windows) and [React Native macOS](https://github.com/microsoft/react-native-macos) for building apps that target Windows and macOS
* **[Software Mansion](https://swmansion.com/):** Maintain core infrastructure including JSC, Animated, and other popular third-party plugins.

Expand Down
11 changes: 9 additions & 2 deletions IntegrationTests/GlobalEvalWithSourceUrlTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

'use strict';

import type {ExtendedError} from 'react-native/Libraries/Core/Devtools/parseErrorStack';

const React = require('react');
const ReactNative = require('react-native');
const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');
Expand All @@ -31,7 +33,7 @@ class GlobalEvalWithSourceUrlTest extends React.Component<{...}> {
'Expected globalEvalWithSourceUrl(expression) to return a value',
);
}
let syntaxError;
let syntaxError: ?ExtendedError;
try {
global.globalEvalWithSourceUrl('{');
} catch (e) {
Expand All @@ -42,7 +44,12 @@ class GlobalEvalWithSourceUrlTest extends React.Component<{...}> {
'Expected globalEvalWithSourceUrl to throw on a syntax error',
);
}
if (!(syntaxError instanceof SyntaxError)) {
// Hermes throws an Error instead of a SyntaxError
// https://github.com/facebook/hermes/issues/400
if (
syntaxError.jsEngine !== 'hermes' &&
!(syntaxError instanceof SyntaxError)
) {
throw new Error(
'Expected globalEvalWithSourceUrl to throw SyntaxError on a syntax error',
);
Expand Down
11 changes: 2 additions & 9 deletions Libraries/ActionSheetIOS/NativeActionSheetManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,18 @@

import type {TurboModule} from '../TurboModule/RCTExport';
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
import type {ProcessedColorValue} from '../StyleSheet/processColor'; // TODO(macOS GH#774)

export interface Spec extends TurboModule {
+getConstants: () => {||};
+showActionSheetWithOptions: (
// TODO(macOS GH#774) - For some reason, yarn lint complains here with this error:
// "Unsupported type 'object' for Spec interface. See https://fburl.com/rn-nativemodules for more details"
// The link in the error is restricted to Facebook employees, so we can't access this info.
// 3a6327a5d9ebfd0de56c37009ab7de1d0e6bdf85 apparently solves this in other places by disabling the error,
// so we might as well do the same thing here.
// eslint-disable-next-line @react-native/codegen/react-native-modules
options: {|
+title?: ?string,
+message?: ?string,
+options: ?Array<string>,
+destructiveButtonIndices?: ?Array<number>,
+cancelButtonIndex?: ?number,
+anchor?: ?number,
+tintColor?: ?ProcessedColorValue, // TODO(macOS GH#774)
+tintColor?: ?number,
+userInterfaceStyle?: ?string,
|},
callback: (buttonIndex: number) => void,
Expand All @@ -41,7 +34,7 @@ export interface Spec extends TurboModule {
+url?: ?string,
+subject?: ?string,
+anchor?: ?number,
+tintColor?: ?ProcessedColorValue, // TODO(macOS GH#774)
+tintColor?: ?number,
+excludedActivityTypes?: ?Array<string>,
+userInterfaceStyle?: ?string,
|},
Expand Down
20 changes: 18 additions & 2 deletions Libraries/Alert/NativeAlertManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,26 @@ export type Args = {|
// ]TODO(macOS GH#774)
|};

// TODO(macOS GH#774): stand-in for Args to make codegen happy
type NativeArgs = {|
title?: string,
message?: string,
buttons?: Array<Object>, // TODO(T67565166): have a better type
type?: string,
defaultValue?: string,
cancelButtonKey?: string,
destructiveButtonKey?: string,
keyboardType?: string,
// [TODO(macOS GH#774)
defaultInputs?: Array<Object>,
modal?: ?boolean,
critical?: ?boolean,
// ]TODO(macOS GH#774)
|};

export interface Spec extends TurboModule {
+alertWithArgs: (
// eslint-disable-next-line @react-native/codegen/react-native-modules
args: Args,
args: NativeArgs, // TODO(macOS GH#774): Args -> NativeArgs
callback: (id: number, value: string) => void,
) => void;
}
Expand Down
Loading