Skip to content

Commit 6e9d4bf

Browse files
authored
Merge pull request #30 from Expensify/Rory-UpdateForkFromUpstream
Update Expensify/react-native fork from upstream
2 parents 73a8f0f + 89fc763 commit 6e9d4bf

File tree

177 files changed

+4691
-1263
lines changed

Some content is hidden

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

177 files changed

+4691
-1263
lines changed

.circleci/config.yml

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ references:
3434
# Dependency Anchors
3535
# -------------------------
3636
dependency_versions:
37-
# The Xcode version used on CircleCI OSS tests must be kept in sync with
38-
# the Xcode version used on Sandcastle OSS tests. See _XCODE_VERSION in
39-
# tools/utd/migrated_nbtd_jobs/react_native_oss.td
4037
xcode_version: &xcode_version "13.3.1"
4138
nodelts_image: &nodelts_image "cimg/node:16.14"
4239
nodeprevlts_image: &nodeprevlts_image "cimg/node:14.19"
@@ -50,10 +47,10 @@ references:
5047
checkout_cache_key: &checkout_cache_key v1-checkout
5148
gems_cache_key: &gems_cache_key v1-gems-{{ checksum "Gemfile.lock" }}
5249
gradle_cache_key: &gradle_cache_key v1-gradle-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "ReactAndroid/gradle.properties" }}
53-
hermes_cache_key: &hermes_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
54-
hermes_windows_cache_key: &hermes_windows_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
55-
hermes_tarball_cache_key: &hermes_tarball_cache_key v2-hermes-tarball-{{ checksum "/tmp/hermes/hermesversion" }}
56-
pods_cache_key: &pods_cache_key v7-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
50+
hermes_cache_key: &hermes_cache_key v3-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
51+
hermes_windows_cache_key: &hermes_windows_cache_key v3-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
52+
hermes_tarball_cache_key: &hermes_tarball_cache_key v3-hermes-tarball-{{ checksum "/tmp/hermes/hermesversion" }}
53+
pods_cache_key: &pods_cache_key v8-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
5754
windows_yarn_cache_key: &windows_yarn_cache_key v1-win-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
5855
yarn_cache_key: &yarn_cache_key v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}
5956

@@ -682,6 +679,16 @@ jobs:
682679
# -------------------------
683680
test_ios_template:
684681
executor: reactnativeios
682+
parameters:
683+
flavor:
684+
type: string
685+
default: "Debug"
686+
architecture:
687+
type: string
688+
default: "OldArch"
689+
jsengine:
690+
type: string
691+
default: "Hermes"
685692
environment:
686693
- PROJECT_NAME: "iOSTemplateProject"
687694
- HERMES_WS_DIR: *hermes_workspace_root
@@ -692,25 +699,49 @@ jobs:
692699
- attach_workspace:
693700
at: .
694701
- *attach_hermes_workspace
695-
- run:
696-
name: Set USE_HERMES=1
697-
command: echo "export USE_HERMES=1" >> $BASH_ENV
698-
- run:
699-
name: Set HERMES_ENGINE_TARBALL_PATH
700-
command: |
701-
echo "export HERMES_ENGINE_TARBALL_PATH=$(ls -AU $HERMES_WS_DIR/hermes-runtime-darwin/hermes-runtime-darwin-*.tar.gz | head -1)" >> $BASH_ENV
702+
- when:
703+
condition:
704+
equal: ["Hermes", << parameters.jsengine >>]
705+
steps:
706+
- run:
707+
name: Set HERMES_ENGINE_TARBALL_PATH
708+
command: |
709+
echo "export HERMES_ENGINE_TARBALL_PATH=$(ls -AU $HERMES_WS_DIR/hermes-runtime-darwin/hermes-runtime-darwin-*.tar.gz | head -1)" >> $BASH_ENV
702710
- run:
703711
name: Create iOS template project
704712
command: |
705713
REPO_ROOT=$(pwd)
706714
PACKAGE=$(cat build/react-native-package-version)
707715
PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE"
708716
node ./scripts/set-rn-template-version.js "file:$PATH_TO_PACKAGE"
709-
node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose
717+
node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose --skip-install
718+
- run:
719+
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>>
720+
command: |
721+
cd /tmp/$PROJECT_NAME
722+
yarn install
723+
cd ios
724+
725+
bundle install
726+
727+
if [[ << parameters.flavor >> == "Release" ]]; then
728+
export PRODUCTION=1
729+
fi
730+
731+
if [[ << parameters.architecture >> == "NewArch" ]]; then
732+
export RCT_NEW_ARCH_ENABLED=1
733+
fi
734+
735+
if [[ << parameters.jsengine >> == "JSC" ]]; then
736+
export USE_HERMES=0
737+
fi
738+
739+
bundle exec pod install
710740
- run:
711741
name: Build template project
712742
command: |
713743
xcodebuild build \
744+
-configuration << parameters.flavor >> \
714745
-workspace /tmp/$PROJECT_NAME/ios/$PROJECT_NAME.xcworkspace \
715746
-scheme $PROJECT_NAME \
716747
-sdk iphonesimulator
@@ -874,7 +905,7 @@ jobs:
874905
# -------------------------
875906
prepare_hermes_workspace:
876907
docker:
877-
- image: debian:bullseye
908+
- image: debian:11.4
878909
environment:
879910
- HERMES_WS_DIR: *hermes_workspace_root
880911
- HERMES_VERSION_FILE: "sdks/.hermesversion"
@@ -1311,6 +1342,11 @@ workflows:
13111342
- test_ios_template:
13121343
requires:
13131344
- build_npm_package
1345+
matrix:
1346+
parameters:
1347+
architecture: ["NewArch", "OldArch"]
1348+
flavor: ["Debug", "Release"]
1349+
jsengine: ["Hermes", "JSC"]
13141350
- test_ios_rntester:
13151351
requires:
13161352
- build_hermes_macos

.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.184.0
77+
^0.186.0

.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.184.0
77+
^0.186.0

BUCK

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ REACT_PUBLIC_HEADERS = {
255255
"React/RCTBridgeMethod.h": RCTBASE_PATH + "RCTBridgeMethod.h",
256256
"React/RCTBridgeModule.h": RCTBASE_PATH + "RCTBridgeModule.h",
257257
"React/RCTBridgeModuleDecorator.h": RCTBASE_PATH + "RCTBridgeModuleDecorator.h",
258+
"React/RCTBundleManager.h": RCTBASE_PATH + "RCTBundleManager.h",
258259
"React/RCTBundleURLProvider.h": RCTBASE_PATH + "RCTBundleURLProvider.h",
259260
"React/RCTComponent.h": RCTVIEWS_PATH + "RCTComponent.h",
260261
"React/RCTComponentData.h": RCTVIEWS_PATH + "RCTComponentData.h",

0 commit comments

Comments
 (0)