mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
289
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fba47de665 | ||
|
|
f57740c0fb | ||
|
|
d2773f0c19 | ||
|
|
4e14c5eeab | ||
|
|
3c7e307718 | ||
|
|
9aaadd9b2e | ||
|
|
6547b157b5 | ||
|
|
c7fab53e50 | ||
|
|
2eb7bcb8d9 | ||
|
|
65a3259f03 | ||
|
|
0b20ea9b25 | ||
|
|
0ca3ed87f3 | ||
|
|
9d8e52b835 | ||
|
|
9df4239ff9 | ||
|
|
3603a22652 | ||
|
|
18d6028ff9 | ||
|
|
44f8b08b8d | ||
|
|
cff0d97017 | ||
|
|
b82d7e100c | ||
|
|
80a3ed7d0c | ||
|
|
bac5f1ff3a | ||
|
|
ab485c6a94 | ||
|
|
193cdc36f7 | ||
|
|
7d7d403ecf | ||
|
|
47261bfb79 | ||
|
|
1568a29144 | ||
|
|
c5b87aba7c | ||
|
|
c16761da83 | ||
|
|
b1c5432b13 | ||
|
|
d68a1771f0 | ||
|
|
3f8340975b | ||
|
|
221755c495 | ||
|
|
b24d47a9a7 | ||
|
|
5e31b45fc7 | ||
|
|
384983025a | ||
|
|
b1405b5a81 | ||
|
|
fcb6cdc710 | ||
|
|
c4a6bbc8fd | ||
|
|
2ea9c360dc | ||
|
|
33262c1717 | ||
|
|
6e2ba742ff | ||
|
|
2455a84db8 | ||
|
|
7b424f090a | ||
|
|
3782511350 | ||
|
|
52dc7a8326 | ||
|
|
ea6928fcb9 | ||
|
|
2932c0f71f | ||
|
|
83716298f8 | ||
|
|
0fd4a9447e | ||
|
|
778fcecf35 | ||
|
|
8f98c58d38 | ||
|
|
082706ccd4 | ||
|
|
b4b6614034 | ||
|
|
9a1ae97c22 | ||
|
|
57e3451557 | ||
|
|
2bed2ab1a6 | ||
|
|
58c726a6ba | ||
|
|
0e621295fb | ||
|
|
539788eb6e | ||
|
|
fa9fd59a1f | ||
|
|
0f87250d29 | ||
|
|
5daa899f4a | ||
|
|
ef2e9410d0 | ||
|
|
0733e36278 | ||
|
|
5a62606ab3 | ||
|
|
5b03453b5f | ||
|
|
8e8e0ba13b | ||
|
|
12b64b7824 | ||
|
|
3441641682 | ||
|
|
a4a2fa6a11 | ||
|
|
9fbc904592 | ||
|
|
c9fbc05bbc | ||
|
|
c0d56225a8 | ||
|
|
d6c90cf7ed | ||
|
|
6b7076e923 | ||
|
|
ef9b2baa9a | ||
|
|
1265958d52 | ||
|
|
ca17d87ed1 | ||
|
|
40582d5b24 | ||
|
|
ead50d6b11 | ||
|
|
83392a9cd9 | ||
|
|
258f41a30f | ||
|
|
8c8c77b974 | ||
|
|
820a88418c | ||
|
|
85dc2e393f | ||
|
|
504240caad | ||
|
|
0847384a45 | ||
|
|
b8ab0fe703 | ||
|
|
fd4531fe23 | ||
|
|
06fc6f2beb | ||
|
|
42f1adf49f | ||
|
|
aeaa939793 | ||
|
|
d2edc71619 | ||
|
|
62cca7accc | ||
|
|
8f548be91c | ||
|
|
6565706232 | ||
|
|
ea958c69f6 | ||
|
|
d1bf828398 | ||
|
|
b34b694f8e | ||
|
|
a7f5963377 | ||
|
|
b2898540c9 | ||
|
|
f1b6218608 | ||
|
|
bf11d1efcd | ||
|
|
261f82e897 | ||
|
|
fd94033dc1 | ||
|
|
ec95533609 | ||
|
|
70bacfe098 | ||
|
|
af506372ba | ||
|
|
95d9cdf228 | ||
|
|
2939dfc208 | ||
|
|
47bff1f49b | ||
|
|
09bfb68a39 | ||
|
|
9da07d70dc | ||
|
|
297ccf325f | ||
|
|
3af01a8a44 | ||
|
|
d028a68026 | ||
|
|
30a3e6e8df | ||
|
|
b1ec698dc4 | ||
|
|
c0977c39b9 | ||
|
|
8db2995934 | ||
|
|
3c6762a5f8 | ||
|
|
c247e8c8c9 | ||
|
|
0ba2e9adf2 | ||
|
|
d99960744c | ||
|
|
a3cf1624d0 | ||
|
|
24d7cc15db | ||
|
|
3fc7ebb311 | ||
|
|
27ba369f23 | ||
|
|
e35a2f4a7c | ||
|
|
818e70f7eb | ||
|
|
c25246044f | ||
|
|
258ea84f46 | ||
|
|
ffd0b39755 | ||
|
|
7edc7169c7 | ||
|
|
54dadd7bda | ||
|
|
ad3df84668 | ||
|
|
9d3052378a | ||
|
|
f473a2f8f4 | ||
|
|
8b121c5071 | ||
|
|
c68f35d444 | ||
|
|
c911c89728 | ||
|
|
de7976c69d | ||
|
|
20521cc908 | ||
|
|
cef17ba14f | ||
|
|
c7988c9c82 | ||
|
|
ed5f558a6c | ||
|
|
d6e8c061cd | ||
|
|
84a9f5e6c8 | ||
|
|
dba25fa966 | ||
|
|
9269429bb9 | ||
|
|
ffc16fc18b | ||
|
|
9833338b5d | ||
|
|
5532e511af | ||
|
|
c5653a03fb | ||
|
|
c9d589dab5 | ||
|
|
7698cd0953 | ||
|
|
e320ab47cf | ||
|
|
a557a81f96 | ||
|
|
1a990d1904 | ||
|
|
1341169a4b | ||
|
|
bfc51f97da | ||
|
|
eb9c388492 | ||
|
|
e8d3ad7216 | ||
|
|
2adb389fac | ||
|
|
815c415fb9 | ||
|
|
fb58494283 | ||
|
|
3965b7d78b | ||
|
|
c0b5e2e031 | ||
|
|
119ab33036 | ||
|
|
cf8d3f8007 | ||
|
|
b80812a9af | ||
|
|
c2e080419b | ||
|
|
c128a517b8 | ||
|
|
18302831c4 | ||
|
|
39b33f158f | ||
|
|
2cb04b4e2a | ||
|
|
873ebc8055 | ||
|
|
2c210939d3 | ||
|
|
5f60ad65ca | ||
|
|
8989c9b71d | ||
|
|
ebf1a7b79b | ||
|
|
4a6b889e93 | ||
|
|
616d7f2095 | ||
|
|
0fb611009e | ||
|
|
e6dd44d6e5 | ||
|
|
aead3db639 | ||
|
|
c6cbaf278c | ||
|
|
981141c9a1 | ||
|
|
2dfb09c51a | ||
|
|
88a9b6e89f | ||
|
|
d3e0430dea | ||
|
|
b9ec0e5a1a | ||
|
|
71f8d7608f | ||
|
|
8bd9952eaf | ||
|
|
993f9fd8db | ||
|
|
218ea5d44c | ||
|
|
295626bc35 | ||
|
|
d538879e08 | ||
|
|
13f1b9e10f | ||
|
|
80cfacef78 | ||
|
|
b5683a7516 | ||
|
|
08b05f30c2 | ||
|
|
2e03d262d4 | ||
|
|
a44dd57f10 | ||
|
|
70b43bb013 | ||
|
|
7522336412 | ||
|
|
80e1dd70b0 | ||
|
|
88ba9a6042 | ||
|
|
c7970379a1 | ||
|
|
1fda630d87 | ||
|
|
9b9c780cc8 | ||
|
|
cf015f93ef | ||
|
|
f903f34837 | ||
|
|
4a8f0ee58a | ||
|
|
a7adfef0bb | ||
|
|
6daccf75da | ||
|
|
af04eb773c | ||
|
|
0062435d2e | ||
|
|
2d737bbf9a | ||
|
|
986cf18dd2 | ||
|
|
a3db352e25 | ||
|
|
d11a7b0d18 | ||
|
|
b56ce9d35b | ||
|
|
9ba600c066 | ||
|
|
61b3c95b45 | ||
|
|
42735717b5 | ||
|
|
72ce6ff03a | ||
|
|
6bb75c7b13 | ||
|
|
f7fe68861a | ||
|
|
8a6508c623 | ||
|
|
34cd195d9f | ||
|
|
a8a76f9bfa | ||
|
|
fdf0183831 | ||
|
|
1bec961c95 | ||
|
|
a7b2555644 | ||
|
|
e7d1708701 | ||
|
|
15909fab95 | ||
|
|
3429dc1ccf | ||
|
|
3dcf86b802 | ||
|
|
2eaf0b0848 | ||
|
|
8a6b88eeaf | ||
|
|
8a3ffb6d23 | ||
|
|
75451d5b89 | ||
|
|
9c6c637816 | ||
|
|
2e6f105ef3 | ||
|
|
a2cb34371e | ||
|
|
a297b30377 | ||
|
|
ea31a79fe9 | ||
|
|
710b0e64ab | ||
|
|
90d4d55122 | ||
|
|
b04d0d0c8c | ||
|
|
bb886d751f | ||
|
|
e5c7eb57e2 | ||
|
|
2a6a895b17 | ||
|
|
53951d7fec | ||
|
|
30087a6e00 | ||
|
|
82325b4260 | ||
|
|
51e464f50f | ||
|
|
9b67547bec | ||
|
|
927815b9f6 | ||
|
|
0c2fea5c23 | ||
|
|
58ff2fc636 | ||
|
|
2f0c06de10 | ||
|
|
d8739e1d37 | ||
|
|
3fc6963da3 | ||
|
|
e0fcf2983a | ||
|
|
e55ea2daf1 | ||
|
|
9cca4c1ec1 | ||
|
|
6695b6e3b8 | ||
|
|
4ecc165029 | ||
|
|
a272e8ee66 | ||
|
|
cdab5370af | ||
|
|
db2c44a7eb | ||
|
|
64d5de7371 | ||
|
|
01f7ab814f | ||
|
|
37d7ec6522 | ||
|
|
404f323359 | ||
|
|
43d69ee26c | ||
|
|
5df5ed1a88 | ||
|
|
07abfceae1 | ||
|
|
bc1735f014 | ||
|
|
36a04055d8 | ||
|
|
8c7c6f35e3 | ||
|
|
4792671e4d | ||
|
|
fe7e7a015f | ||
|
|
4c6bff01b3 | ||
|
|
9491deda7a | ||
|
|
16380aa167 | ||
|
|
a6b862d427 |
@@ -63,7 +63,6 @@ These workflows are:
|
||||
* `testAll.yml` => runs all the possible tests. This workflow is executed on main and on PRs which change set touches both iOS and Android
|
||||
* `testAndroid.yml` => runs all the build steps and Android tests. This is used on changes that happens on the Android codebase and infra (`ReactAndroid` folder)
|
||||
* `testIOS.yml` => runs all the build steps and iOS tests. This is used on changes that happens on the iOS codebase and infra (`React` folder)
|
||||
* `testE2E.yml` => runs the E2E tests. As of today, E2E tests can be triggered if the commit message contains the `#run-e2e-tests` tag.
|
||||
* `testJS.yml` => For all the changes that do not touch native/platform code, we only run JS tests.
|
||||
|
||||
Notice that if there are changes on files that do not represents code (for example `.md` files like this one or the `Changelog`) we don't run any CI.
|
||||
|
||||
@@ -157,22 +157,6 @@ commands:
|
||||
- packages/react-native/ReactAndroid/build/third-party-ndk
|
||||
key: *gradle_cache_key
|
||||
|
||||
run_e2e:
|
||||
parameters:
|
||||
platform:
|
||||
description: Target platform
|
||||
type: enum
|
||||
enum: ["android", "ios", "js"]
|
||||
default: "js"
|
||||
retries:
|
||||
description: How many times the job should try to run these tests
|
||||
type: integer
|
||||
default: 3
|
||||
steps:
|
||||
- run:
|
||||
name: "Run Tests: << parameters.platform >> End-to-End Tests"
|
||||
command: node ./scripts/e2e/run-ci-e2e-tests.js --<< parameters.platform >> --retries << parameters.retries >>
|
||||
|
||||
report_bundle_size:
|
||||
parameters:
|
||||
platform:
|
||||
|
||||
@@ -58,10 +58,8 @@ jobs:
|
||||
when: always
|
||||
|
||||
- run:
|
||||
name: Sanity checks
|
||||
command: |
|
||||
./scripts/circleci/check_license.sh
|
||||
./scripts/circleci/validate_yarn_lockfile.sh
|
||||
name: Check license
|
||||
command: ./scripts/circleci/check_license.sh
|
||||
when: always
|
||||
|
||||
- run:
|
||||
@@ -96,8 +94,6 @@ jobs:
|
||||
- run:
|
||||
name: "Run Tests: JavaScript Tests"
|
||||
command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
|
||||
- run_e2e:
|
||||
platform: js
|
||||
|
||||
# Optionally, run disabled tests
|
||||
- when:
|
||||
@@ -109,140 +105,6 @@ jobs:
|
||||
- store_test_results:
|
||||
path: ./reports/junit
|
||||
|
||||
# -------------------------
|
||||
# JOBS: iOS E2E Tests
|
||||
# -------------------------
|
||||
test_e2e_ios:
|
||||
executor: reactnativeios
|
||||
parameters:
|
||||
ruby_version:
|
||||
default: "2.7.8"
|
||||
description: The version of ruby that must be used
|
||||
type: string
|
||||
steps:
|
||||
- checkout_code_with_cache
|
||||
- run_yarn
|
||||
- setup_hermes_version
|
||||
- run:
|
||||
name: Install appium
|
||||
command: npm install appium@2.0.0 -g
|
||||
- run:
|
||||
name: Install appium drivers
|
||||
command: |
|
||||
appium driver install uiautomator2
|
||||
appium driver install xcuitest
|
||||
- run:
|
||||
name: Start Appium server
|
||||
command: appium --base-path /wd/hub
|
||||
background: true
|
||||
- run:
|
||||
name: Start Metro
|
||||
command: |
|
||||
cd packages/rn-tester
|
||||
yarn start
|
||||
background: true
|
||||
- brew_install:
|
||||
package: cmake
|
||||
- setup_ruby:
|
||||
ruby_version: << parameters.ruby_version >>
|
||||
- run:
|
||||
name: Boot iOS Simulator
|
||||
command: source scripts/.tests.env && xcrun simctl boot "$IOS_DEVICE" || true
|
||||
- with_xcodebuild_cache:
|
||||
steps:
|
||||
- run:
|
||||
name: Install Bundler
|
||||
command: |
|
||||
cd packages/rn-tester
|
||||
bundle check || bundle install
|
||||
bundle exec pod setup
|
||||
RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --verbose
|
||||
- run:
|
||||
name: Build app
|
||||
command: |
|
||||
xcodebuild build \
|
||||
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
|
||||
-configuration Debug \
|
||||
-scheme RNTester \
|
||||
-sdk iphonesimulator \
|
||||
-derivedDataPath /tmp/e2e/
|
||||
- run:
|
||||
name: Move app to correct directory
|
||||
command: mv /tmp/e2e/Build/Products/Debug-iphonesimulator/RNTester.app packages/rn-tester-e2e/apps/rn-tester.app
|
||||
- run:
|
||||
name: Check Appium server status
|
||||
command: scripts/circleci/check_appium_server_status.sh
|
||||
- run:
|
||||
name: Run E2E tests
|
||||
no_output_timeout: 30m
|
||||
command: |
|
||||
cd packages/rn-tester-e2e
|
||||
(yarn test-e2e ios 2>&1 | tee /tmp/test_log) || true
|
||||
- store_artifacts:
|
||||
path: /tmp/test_log
|
||||
|
||||
# -------------------------
|
||||
# JOBS: Android E2E Tests
|
||||
# -------------------------
|
||||
test_e2e_android:
|
||||
executor:
|
||||
name: android/android-machine
|
||||
tag: 2023.07.1
|
||||
steps:
|
||||
- checkout_code_with_cache
|
||||
- run_yarn
|
||||
- android/create-avd:
|
||||
avd-name: e2e_emulator
|
||||
system-image: system-images;android-34;google_apis;x86_64
|
||||
install: true
|
||||
- android/start-emulator:
|
||||
avd-name: e2e_emulator
|
||||
no-window: true
|
||||
restore-gradle-cache-prefix: v1a
|
||||
post-emulator-launch-assemble-command: ""
|
||||
- run:
|
||||
name: Install appium
|
||||
command: npm install appium@2.0.0 -g
|
||||
- run:
|
||||
name: Install appium drivers
|
||||
command: |
|
||||
appium driver install uiautomator2@2.29.1
|
||||
appium driver install xcuitest@4.32.10
|
||||
- run:
|
||||
name: Start Appium server
|
||||
command: appium --base-path /wd/hub
|
||||
background: true
|
||||
- run:
|
||||
name: Start Metro
|
||||
command: |
|
||||
cd packages/rn-tester
|
||||
yarn start
|
||||
background: true
|
||||
- with_gradle_cache:
|
||||
steps:
|
||||
- run:
|
||||
name: Build app
|
||||
command: |
|
||||
./gradlew :packages:rn-tester:android:app:assembleHermesDebug -PreactNativeArchitectures=x86_64
|
||||
- run:
|
||||
name: Move app to correct directory
|
||||
command: mv packages/rn-tester/android/app/build/outputs/apk/hermes/debug/app-hermes-x86_64-debug.apk packages/rn-tester-e2e/apps/rn-tester.apk
|
||||
- run:
|
||||
name: Check Appium server status
|
||||
command: |
|
||||
if ! nc -z 127.0.0.1 4723; then
|
||||
echo Could not find Appium server
|
||||
exit 1
|
||||
fi
|
||||
- run:
|
||||
name: Run E2E tests
|
||||
no_output_timeout: 30m
|
||||
command: |
|
||||
cd packages/rn-tester-e2e
|
||||
(yarn test-e2e android 2>&1 | tee /tmp/test_log) || true
|
||||
- store_artifacts:
|
||||
path: /tmp/test_log
|
||||
|
||||
# -------------------------
|
||||
# JOBS: Build Android
|
||||
# -------------------------
|
||||
@@ -259,7 +121,7 @@ jobs:
|
||||
- run_yarn
|
||||
- run:
|
||||
name: Set React Native Version
|
||||
command: node ./scripts/releases/set-rn-version.js --build-type << parameters.release_type >>
|
||||
command: node ./scripts/releases/set-rn-artifacts-version.js --build-type << parameters.release_type >>
|
||||
|
||||
- with_gradle_cache:
|
||||
steps:
|
||||
@@ -287,8 +149,10 @@ jobs:
|
||||
- packages/react-native/ReactAndroid/hermes-engine/.cxx/
|
||||
- packages/react-native/ReactAndroid/hermes-engine/build/
|
||||
- packages/react-native/ReactAndroid/src/main/jni/prebuilt/
|
||||
- packages/react-native-gradle-plugin/.gradle/
|
||||
- packages/react-native-gradle-plugin/build/
|
||||
- packages/gradle-plugin/.gradle/
|
||||
- packages/gradle-plugin/react-native-gradle-plugin/build/
|
||||
- packages/gradle-plugin/settings-plugin/build/
|
||||
- packages/gradle-plugin/shared/build/
|
||||
- packages/react-native-codegen/lib/
|
||||
|
||||
# -------------------------
|
||||
@@ -303,7 +167,7 @@ jobs:
|
||||
name: Set React Native Version to "dry-run"
|
||||
# test_android executes only for dry-run builds. We need to bump the version for caching
|
||||
# reasons otherwise we won't reuse the artifacts from the build_android job.
|
||||
command: node ./scripts/releases/set-rn-version.js --build-type "dry-run"
|
||||
command: node ./scripts/releases/set-rn-artifacts-version.js --build-type "dry-run"
|
||||
- attach_workspace:
|
||||
at: .
|
||||
|
||||
@@ -317,8 +181,9 @@ jobs:
|
||||
platform: android
|
||||
|
||||
- store_test_results:
|
||||
path: ~/react-native/packages/react-native-gradle-plugin/build/test-results
|
||||
|
||||
path: ~/react-native/packages/gradle-plugin/react-native-gradle-plugin/build/test-results
|
||||
- store_test_results:
|
||||
path: ~/react-native/packages/gradle-plugin/settings-plugin/build/test-results
|
||||
- store_test_results:
|
||||
path: ~/react-native/packages/react-native/ReactAndroid/build/test-results
|
||||
|
||||
@@ -327,9 +192,9 @@ jobs:
|
||||
destination: rntester-apk
|
||||
|
||||
# -------------------------
|
||||
# JOBS: Test Android Template
|
||||
# JOBS: Test Android HelloWorld
|
||||
# -------------------------
|
||||
test_android_template:
|
||||
test_android_helloworld:
|
||||
executor: reactnativeandroid-large
|
||||
parameters:
|
||||
flavor:
|
||||
@@ -348,37 +213,37 @@ jobs:
|
||||
type: enum
|
||||
enum: ["Hermes", "JSC"]
|
||||
environment:
|
||||
- LC_ALL: C.UTF8
|
||||
- PROJECT_NAME: "AndroidTemplateProject"
|
||||
- YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
- TARGET_ARCHITECTURE: "arm64-v8a"
|
||||
steps:
|
||||
- checkout_code_with_cache
|
||||
- run_yarn
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Create Android template project
|
||||
name: Build codegen js scripts from flow -> JS
|
||||
command: |
|
||||
REPO_ROOT=$(pwd)
|
||||
node ./scripts/releases/update-template-package.js "{\"react-native\":\"file:$REPO_ROOT/build/$(cat build/react-native-package-version)\"}"
|
||||
node ./scripts/e2e/init-template-e2e.js --projectName $PROJECT_NAME --templatePath "$REPO_ROOT/packages/react-native" --directory "/tmp/$PROJECT_NAME" --verbose
|
||||
cd packages/react-native-codegen
|
||||
yarn run build
|
||||
- with_gradle_cache:
|
||||
steps:
|
||||
- run:
|
||||
name: Build the template application for << parameters.flavor >> with Architecture set to << parameters.architecture >>, and using the << parameters.jsengine>> JS engine.
|
||||
name: Build the Helloworld application for << parameters.flavor >> with Architecture set to << parameters.architecture >>, and using the << parameters.jsengine>> JS engine.
|
||||
command: |
|
||||
cd /tmp/$PROJECT_NAME/android/
|
||||
if [[ << parameters.architecture >> == "NewArch" ]]; then
|
||||
export ORG_GRADLE_PROJECT_newArchEnabled=true
|
||||
else
|
||||
export ORG_GRADLE_PROJECT_newArchEnabled=false
|
||||
cd packages/helloworld/android
|
||||
args=()
|
||||
if [[ << parameters.architecture >> == "OldArch" ]]; then
|
||||
args+=(--arch old)
|
||||
fi
|
||||
if [[ << parameters.jsengine >> == "Hermes" ]]; then
|
||||
export ORG_GRADLE_PROJECT_hermesEnabled=true
|
||||
else
|
||||
export ORG_GRADLE_PROJECT_hermesEnabled=false
|
||||
if [[ << parameters.jsengine >> == "JSC" ]]; then
|
||||
args+=(--jsvm jsc)
|
||||
fi
|
||||
./gradlew assemble<< parameters.flavor >> -Preact.internal.mavenLocalRepo=/root/react-native/maven-local
|
||||
|
||||
if [[ << parameters.flavor >> == "Release" ]]; then
|
||||
args+=(--prod)
|
||||
fi
|
||||
yarn build android "${args[@]}" -P reactNativeArchitectures="$TARGET_ARCHITECTURE"
|
||||
- store_artifacts:
|
||||
path: /tmp/AndroidTemplateProject/android/app/build/outputs/apk/
|
||||
destination: template-apk
|
||||
@@ -1102,13 +967,9 @@ jobs:
|
||||
fingerprints:
|
||||
- "1f:c7:61:c4:e2:ff:77:e3:cc:ca:a7:34:c2:79:e3:3c"
|
||||
- run:
|
||||
name: Versioning workspace packages
|
||||
name: Versioning project
|
||||
command: |
|
||||
node scripts/releases/set-version "<< parameters.monorepo_packages_version >>" --skip-react-native-version
|
||||
- run:
|
||||
name: Versioning react-native package
|
||||
command: |
|
||||
node scripts/releases/set-rn-version.js -v "<< parameters.version >>" --build-type "release"
|
||||
node scripts/releases/set-version.js "<< parameters.monorepo_packages_version >>"
|
||||
- run:
|
||||
name: Creating release commit
|
||||
command: |
|
||||
|
||||
@@ -46,14 +46,16 @@
|
||||
- test_android:
|
||||
requires:
|
||||
- build_android
|
||||
- test_android_template:
|
||||
requires:
|
||||
- build_npm_package
|
||||
matrix:
|
||||
parameters:
|
||||
architecture: ["NewArch", "OldArch"]
|
||||
jsengine: ["Hermes", "JSC"]
|
||||
flavor: ["Debug", "Release"]
|
||||
## Disabled to land removing react-native/template. Re-enable once switched over
|
||||
## to Helloworld.
|
||||
# - test_android_template:
|
||||
# requires:
|
||||
# - build_npm_package
|
||||
# matrix:
|
||||
# parameters:
|
||||
# architecture: ["NewArch", "OldArch"]
|
||||
# jsengine: ["Hermes", "JSC"]
|
||||
# flavor: ["Debug", "Release"]
|
||||
- test_ios_helloworld:
|
||||
requires:
|
||||
- build_hermes_macos
|
||||
@@ -86,7 +88,7 @@
|
||||
parameters:
|
||||
jsengine: ["Hermes", "JSC"]
|
||||
- test_ios_rntester:
|
||||
run_unit_tests: true
|
||||
run_unit_tests: false
|
||||
use_frameworks: "StaticLibraries"
|
||||
ruby_version: "2.6.10"
|
||||
requires:
|
||||
|
||||
@@ -43,15 +43,16 @@
|
||||
- build_hermesc_linux
|
||||
- build_hermes_macos
|
||||
- build_hermesc_windows
|
||||
- test_android:
|
||||
requires:
|
||||
- build_android
|
||||
# - test_e2e_android
|
||||
- test_android_template:
|
||||
requires:
|
||||
- build_npm_package
|
||||
matrix:
|
||||
parameters:
|
||||
architecture: ["NewArch", "OldArch"]
|
||||
jsengine: ["Hermes", "JSC"]
|
||||
flavor: ["Debug", "Release"]
|
||||
## Disabled to land removing react-native/template. Re-enable once switched over
|
||||
## to Helloworld.
|
||||
# - test_android:
|
||||
# requires:
|
||||
# - build_android
|
||||
# - test_android_template:
|
||||
# requires:
|
||||
# - build_npm_package
|
||||
# matrix:
|
||||
# parameters:
|
||||
# architecture: ["NewArch", "OldArch"]
|
||||
# jsengine: ["Hermes", "JSC"]
|
||||
# flavor: ["Debug", "Release"]
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
tests_e2e:
|
||||
when:
|
||||
and:
|
||||
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
|
||||
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
|
||||
jobs:
|
||||
- test_e2e_ios:
|
||||
ruby_version: "2.7.8"
|
||||
- test_e2e_android
|
||||
@@ -75,7 +75,7 @@
|
||||
parameters:
|
||||
jsengine: ["Hermes", "JSC"]
|
||||
- test_ios_rntester:
|
||||
run_unit_tests: true
|
||||
run_unit_tests: false
|
||||
use_frameworks: "StaticLibraries"
|
||||
ruby_version: "2.6.10"
|
||||
requires:
|
||||
|
||||
@@ -25,7 +25,7 @@ references:
|
||||
android-defaults: &android-defaults
|
||||
working_directory: ~/react-native
|
||||
docker:
|
||||
- image: reactnativecommunity/react-native-android:v13.0
|
||||
- image: reactnativecommunity/react-native-android:v13.1
|
||||
environment:
|
||||
- TERM: "dumb"
|
||||
- GRADLE_OPTS: '-Dorg.gradle.daemon=false'
|
||||
@@ -90,12 +90,12 @@ references:
|
||||
hermes_dsym_debug_cache_key: &hermes_dsym_debug_cache_key v3-hermes-debug-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
|
||||
hermes_dsym_release_cache_key: &hermes_dsym_release_cache_key v3-hermes-release-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
|
||||
# Cocoapods - RNTester
|
||||
pods_cache_key: &pods_cache_key v12-pods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
|
||||
cocoapods_cache_key: &cocoapods_cache_key v12-cocoapods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock" }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
||||
rntester_podfile_lock_cache_key: &rntester_podfile_lock_cache_key v11-podfilelock-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
||||
pods_cache_key: &pods_cache_key v13-pods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
|
||||
cocoapods_cache_key: &cocoapods_cache_key v13-cocoapods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock" }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
||||
rntester_podfile_lock_cache_key: &rntester_podfile_lock_cache_key v12-podfilelock-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
||||
# Cocoapods - HelloWorld
|
||||
helloworld_cocoapods_cache_key: &helloworld_cocoapods_cache_key v2-cocoapods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/helloworld/ios/Podfile.lock" }}-{{ checksum "packages/helloworld/ios/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
||||
helloworld_podfile_lock_cache_key: &helloworld_podfile_lock_cache_key v2-podfilelock-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/helloworld/ios/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
||||
helloworld_cocoapods_cache_key: &helloworld_cocoapods_cache_key v3-cocoapods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/helloworld/ios/Podfile.lock" }}-{{ checksum "packages/helloworld/ios/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
||||
helloworld_podfile_lock_cache_key: &helloworld_podfile_lock_cache_key v3-podfilelock-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/helloworld/ios/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
||||
|
||||
cache_paths:
|
||||
hermes_workspace_macos_cache_paths: &hermes_workspace_macos_cache_paths
|
||||
|
||||
@@ -15,67 +15,6 @@
|
||||
workflows:
|
||||
version: 2
|
||||
|
||||
# Release workflow, triggered by `yarn trigger-react-native-release`
|
||||
create_release:
|
||||
when: << pipeline.parameters.run_release_workflow >>
|
||||
jobs:
|
||||
- prepare_release:
|
||||
name: prepare_release
|
||||
version: << pipeline.parameters.release_version >>
|
||||
monorepo_packages_version: << pipeline.parameters.release_monorepo_packages_version >>
|
||||
tag: << pipeline.parameters.release_tag >>
|
||||
dry_run: << pipeline.parameters.release_dry_run >>
|
||||
|
||||
# This job will run only when a tag is published due to all the jobs being filtered.
|
||||
publish_release:
|
||||
jobs:
|
||||
- prepare_hermes_workspace:
|
||||
filters: *only_release_tags
|
||||
- build_android:
|
||||
filters: *only_release_tags
|
||||
name: build_android_for_release
|
||||
release_type: "release"
|
||||
- build_hermesc_linux:
|
||||
filters: *only_release_tags
|
||||
requires:
|
||||
- prepare_hermes_workspace
|
||||
- build_hermesc_apple:
|
||||
filters: *only_release_tags
|
||||
requires:
|
||||
- prepare_hermes_workspace
|
||||
- build_apple_slices_hermes:
|
||||
filters: *only_release_tags
|
||||
requires:
|
||||
- build_hermesc_apple
|
||||
matrix:
|
||||
parameters:
|
||||
flavor: ["Debug", "Release"]
|
||||
slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst"]
|
||||
- build_hermesc_windows:
|
||||
filters: *only_release_tags
|
||||
requires:
|
||||
- prepare_hermes_workspace
|
||||
- build_hermes_macos:
|
||||
filters: *only_release_tags
|
||||
requires:
|
||||
- build_apple_slices_hermes
|
||||
matrix:
|
||||
parameters:
|
||||
flavor: ["Debug", "Release"]
|
||||
# This job will trigger when a version tag is pushed (by package_release)
|
||||
- build_npm_package:
|
||||
name: build_and_publish_npm_package
|
||||
release_type: "release"
|
||||
filters: *only_release_tags
|
||||
requires:
|
||||
- build_android_for_release
|
||||
- build_hermesc_linux
|
||||
- build_hermes_macos
|
||||
- build_hermesc_windows
|
||||
- poll_maven:
|
||||
requires:
|
||||
- build_and_publish_npm_package
|
||||
|
||||
analysis:
|
||||
when:
|
||||
and:
|
||||
|
||||
+1
-1
@@ -91,4 +91,4 @@ untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.238.0
|
||||
^0.239.1
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
name: build-apple-slices-hermes
|
||||
description: This action builds hermesc for Apple platforms
|
||||
inputs:
|
||||
HERMES_VERSION:
|
||||
required: true
|
||||
description: The version of Hermes
|
||||
REACT_NATIVE_VERSION:
|
||||
required: true
|
||||
description: The version of Hermes
|
||||
SLICE:
|
||||
required: true
|
||||
description: The slice of hermes you want to build. It could be iphone, iphonesimulator, macos, catalyst, xros, or xrossimulator
|
||||
FLAVOR:
|
||||
required: true
|
||||
description: The flavor we want to build. It can be Debug or Release
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Restore Hermes workspace
|
||||
uses: ./.github/actions/restore-hermes-workspace
|
||||
- name: Restore HermesC Artifact
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
name: hermesc-apple
|
||||
path: ./packages/react-native/sdks/hermes/build_host_hermesc
|
||||
- name: Restore Slice From Cache
|
||||
id: restore-slice-cache
|
||||
uses: actions/cache/restore@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_${{ inputs.SLICE }}_${{ inputs.FLAVOR }}
|
||||
key: v4-hermes-apple-${{ inputs.HERMES_VERSION }}-${{ inputs.REACT_NATIVE_VERSION }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ inputs.SLICE }}-${{ inputs.FLAVOR }}
|
||||
- name: Build the Hermes ${{ inputs.SLICE }} frameworks
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
SLICE=${{ inputs.SLICE }}
|
||||
FLAVOR=${{ inputs.FLAVOR }}
|
||||
FINAL_PATH=build_"$SLICE"_"$FLAVOR"
|
||||
echo "Final path for this slice is: $FINAL_PATH"
|
||||
|
||||
if [[ -d "$FINAL_PATH" ]]; then
|
||||
echo "[HERMES] Skipping! Found the requested slice at $FINAL_PATH".
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$ARTIFACTS_EXIST" ]]; then
|
||||
echo "[HERMES] Skipping! Artifacts exists already."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export RELEASE_VERSION=${{ inputs.REACT_NATIVE_VERSION }}
|
||||
|
||||
# HermesC is used to build hermes, so it has to be executable
|
||||
chmod +x ./build_host_hermesc/bin/hermesc
|
||||
|
||||
if [[ "$SLICE" == "macosx" ]]; then
|
||||
echo "[HERMES] Building Hermes for MacOS"
|
||||
|
||||
chmod +x ./utils/build-mac-framework.sh
|
||||
BUILD_TYPE="${{ inputs.FLAVOR }}" ./utils/build-mac-framework.sh
|
||||
else
|
||||
echo "[HERMES] Building Hermes for iOS: $SLICE"
|
||||
|
||||
chmod +x ./utils/build-ios-framework.sh
|
||||
BUILD_TYPE="${{ inputs.FLAVOR }}" ./utils/build-ios-framework.sh "$SLICE"
|
||||
fi
|
||||
|
||||
echo "Moving from build_$SLICE to $FINAL_PATH"
|
||||
mv build_"$SLICE" "$FINAL_PATH"
|
||||
|
||||
# check whether everything is there
|
||||
if [[ -d "$FINAL_PATH/API/hermes/hermes.framework" ]]; then
|
||||
echo "Successfully built hermes.framework for $SLICE in $FLAVOR"
|
||||
else
|
||||
echo "Failed to built hermes.framework for $SLICE in $FLAVOR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -d "$FINAL_PATH/API/hermes/hermes.framework.dSYM" ]]; then
|
||||
echo "Successfully built hermes.framework.dSYM for $SLICE in $FLAVOR"
|
||||
else
|
||||
echo "Failed to built hermes.framework.dSYM for $SLICE in $FLAVOR"
|
||||
echo "Please try again"
|
||||
exit 1
|
||||
fi
|
||||
- name: Upload Artifact for Slice (${{ inputs.SLICE }}, ${{ inputs.FLAVOR }}}
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: slice-${{ inputs.SLICE }}-${{ inputs.FLAVOR }}
|
||||
path: ./packages/react-native/sdks/hermes/build_${{ inputs.SLICE }}_${{ inputs.FLAVOR }}
|
||||
- name: Save slice cache
|
||||
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
|
||||
uses: actions/cache/save@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_${{ inputs.SLICE }}_${{ inputs.FLAVOR }}
|
||||
key: v4-hermes-apple-${{ inputs.HERMES_VERSION }}-${{ inputs.REACT_NATIVE_VERSION }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ inputs.SLICE }}-${{ inputs.FLAVOR }}
|
||||
@@ -0,0 +1,196 @@
|
||||
name: build-hermes-macos
|
||||
description: This action builds hermesc for Apple platforms
|
||||
inputs:
|
||||
HERMES_VERSION:
|
||||
required: true
|
||||
description: The version of Hermes
|
||||
REACT_NATIVE_VERSION:
|
||||
required: true
|
||||
description: The version of React Native
|
||||
FLAVOR:
|
||||
required: true
|
||||
description: The flavor we want to build. It can be Debug or Release
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Restore Hermes workspace
|
||||
uses: ./.github/actions/restore-hermes-workspace
|
||||
- name: Restore Cached Artifacts
|
||||
uses: actions/cache/restore@v4.0.0
|
||||
with:
|
||||
key: v3-hermes-artifacts-${{ inputs.FLAVOR }}-${{ inputs.HERMES_VERSION }}-${{ inputs.REACT_NATIVE_VERSION }}
|
||||
path: |
|
||||
/tmp/hermes/osx-bin/${{ inputs.FLAVOR }}
|
||||
/tmp/hermes/dSYM/${{ inputs.FLAVOR }}
|
||||
/tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ inputs.FLAVOR }}.tar.gz
|
||||
- name: Check if the required artifacts already exist
|
||||
id: check_if_apple_artifacts_are_there
|
||||
shell: bash
|
||||
run: |
|
||||
FLAVOR="${{ inputs.FLAVOR }}"
|
||||
echo "Flavor is $FLAVOR"
|
||||
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
|
||||
DSYM="/tmp/hermes/dSYM/$FLAVOR"
|
||||
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
|
||||
|
||||
if [[ -d "$OSX_BIN" ]] && \
|
||||
[[ -d "$DSYM" ]] && \
|
||||
[[ -f "$HERMES" ]]; then
|
||||
|
||||
echo "Artifacts are there!"
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Yarn- Install Dependencies
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
shell: bash
|
||||
run: yarn install --non-interactive
|
||||
- name: Slice cache macosx
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_macosx_${{ inputs.FLAVOR }}
|
||||
name: slice-macosx-${{ inputs.FLAVOR }}
|
||||
- name: Slice cache iphoneos
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ inputs.FLAVOR }}
|
||||
name: slice-iphoneos-${{ inputs.FLAVOR }}
|
||||
- name: Slice cache iphonesimulator
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ inputs.FLAVOR }}
|
||||
name: slice-iphonesimulator-${{ inputs.FLAVOR }}
|
||||
- name: Slice cache catalyst
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_catalyst_${{ inputs.FLAVOR }}
|
||||
name: slice-catalyst-${{ inputs.FLAVOR }}
|
||||
- name: Slice cache xros
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_xros_${{ inputs.FLAVOR }}
|
||||
name: slice-xros-${{ inputs.FLAVOR }}
|
||||
- name: Slice cache xrsimulator
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ inputs.FLAVOR }}
|
||||
name: slice-xrsimulator-${{ inputs.FLAVOR }}
|
||||
- name: Move back build folders
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
ls -l ./packages/react-native/sdks/hermes
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
mv build_macosx_${{ inputs.FLAVOR }} build_macosx
|
||||
mv build_iphoneos_${{ inputs.FLAVOR }} build_iphoneos
|
||||
mv build_iphonesimulator_${{ inputs.FLAVOR }} build_iphonesimulator
|
||||
mv build_catalyst_${{ inputs.FLAVOR }} build_catalyst
|
||||
mv build_xros_${{ inputs.FLAVOR }} build_xros
|
||||
mv build_xrsimulator_${{ inputs.FLAVOR }} build_xrsimulator
|
||||
- name: Prepare destroot folder
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
chmod +x ./utils/build-apple-framework.sh
|
||||
. ./utils/build-apple-framework.sh
|
||||
prepare_dest_root_for_ci
|
||||
- name: Create fat framework for iOS
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
echo "[HERMES] Creating the universal framework"
|
||||
chmod +x ./utils/build-ios-framework.sh
|
||||
./utils/build-ios-framework.sh build_framework
|
||||
|
||||
chmod +x ./destroot/bin/hermesc
|
||||
- name: Package the Hermes Apple frameworks
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
BUILD_TYPE="${{ inputs.FLAVOR }}"
|
||||
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
|
||||
|
||||
TARBALL_OUTPUT_DIR=$(mktemp -d /tmp/hermes-tarball-output-XXXXXXXX)
|
||||
|
||||
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
|
||||
|
||||
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
|
||||
|
||||
TARBALL_OUTPUT_PATH=$(node ./packages/react-native/scripts/hermes/create-tarball.js \
|
||||
--inputDir ./packages/react-native/sdks/hermes \
|
||||
--buildType "$BUILD_TYPE" \
|
||||
--outputDir $TARBALL_OUTPUT_DIR)
|
||||
|
||||
echo "Hermes tarball saved to $TARBALL_OUTPUT_PATH"
|
||||
|
||||
mkdir -p $HERMES_TARBALL_ARTIFACTS_DIR
|
||||
cp $TARBALL_OUTPUT_PATH $HERMES_TARBALL_ARTIFACTS_DIR/.
|
||||
|
||||
mkdir -p /tmp/hermes/osx-bin/${{ inputs.FLAVOR }}
|
||||
cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ inputs.FLAVOR }}
|
||||
ls -lR /tmp/hermes/osx-bin/
|
||||
- name: Create dSYM archive
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
FLAVOR=${{ inputs.FLAVOR }}
|
||||
WORKING_DIR="/tmp/hermes_tmp/dSYM/$FLAVOR"
|
||||
|
||||
mkdir -p "$WORKING_DIR/macosx"
|
||||
mkdir -p "$WORKING_DIR/catalyst"
|
||||
mkdir -p "$WORKING_DIR/iphoneos"
|
||||
mkdir -p "$WORKING_DIR/iphonesimulator"
|
||||
mkdir -p "$WORKING_DIR/xros"
|
||||
mkdir -p "$WORKING_DIR/xrsimulator"
|
||||
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
|
||||
DSYM_FILE_PATH=API/hermes/hermes.framework.dSYM
|
||||
cp -r build_macosx/$DSYM_FILE_PATH "$WORKING_DIR/macosx/"
|
||||
cp -r build_catalyst/$DSYM_FILE_PATH "$WORKING_DIR/catalyst/"
|
||||
cp -r build_iphoneos/$DSYM_FILE_PATH "$WORKING_DIR/iphoneos/"
|
||||
cp -r build_iphonesimulator/$DSYM_FILE_PATH "$WORKING_DIR/iphonesimulator/"
|
||||
cp -r build_xros/$DSYM_FILE_PATH "$WORKING_DIR/xros/"
|
||||
cp -r build_xrsimulator/$DSYM_FILE_PATH "$WORKING_DIR/xrsimulator/"
|
||||
|
||||
DEST_DIR="/tmp/hermes/dSYM/$FLAVOR"
|
||||
tar -C "$WORKING_DIR" -czvf "hermes.framework.dSYM" .
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
mv "hermes.framework.dSYM" "$DEST_DIR"
|
||||
- name: Upload hermes dSYM artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-dSYM-${{ inputs.FLAVOR }}
|
||||
path: /tmp/hermes/dSYM/${{ inputs.FLAVOR }}
|
||||
- name: Upload hermes Runtime artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-darwin-bin-${{ inputs.FLAVOR }}
|
||||
path: /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ inputs.FLAVOR }}.tar.gz
|
||||
- name: Upload hermes osx artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-osx-bin-${{ inputs.FLAVOR }}
|
||||
path: /tmp/hermes/osx-bin/${{ inputs.FLAVOR }}
|
||||
- name: Upload Hermes Artifacts
|
||||
uses: actions/cache/save@v4.0.0
|
||||
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
|
||||
with:
|
||||
key: v3-hermes-artifacts-${{ inputs.FLAVOR }}-${{ inputs.HERMES_VERSION }}-${{ inputs.REACT_NATIVE_VERSION }}
|
||||
path: |
|
||||
/tmp/hermes/osx-bin/${{ inputs.FLAVOR }}
|
||||
/tmp/hermes/dSYM/${{ inputs.FLAVOR }}
|
||||
/tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ inputs.FLAVOR }}.tar.gz
|
||||
@@ -0,0 +1,40 @@
|
||||
name: build-hermesc-apple
|
||||
description: This action builds hermesc for Apple platforms
|
||||
inputs:
|
||||
HERMES_WS_DIR:
|
||||
required: true
|
||||
description: The hermes dir we need to use to setup the workspace
|
||||
HERMES_VERSION:
|
||||
required: True
|
||||
description: The version of Hermes
|
||||
REACT_NATIVE_VERSION:
|
||||
required: True
|
||||
description: The version of React Native
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Restore Hermes workspace
|
||||
uses: ./.github/actions/restore-hermes-workspace
|
||||
- name: Hermes apple cache
|
||||
uses: actions/cache/restore@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_host_hermesc
|
||||
key: v2-hermesc-apple-${{ inputs.HERMES_VERSION }}-${{ inputs.REACT_NATIVE_VERSION }}
|
||||
- name: Build HermesC Apple
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
. ./utils/build-apple-framework.sh
|
||||
build_host_hermesc_if_needed
|
||||
- name: Upload HermesC Artifact
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermesc-apple
|
||||
path: ./packages/react-native/sdks/hermes/build_host_hermesc
|
||||
- name: Cache hermesc apple
|
||||
uses: actions/cache/save@v4.0.0
|
||||
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_host_hermesc
|
||||
key: v2-hermesc-apple-${{ inputs.HERMES_VERSION }}-${{ inputs.REACT_NATIVE_VERSION }}
|
||||
enableCrossOsArchive: true
|
||||
@@ -0,0 +1,49 @@
|
||||
name: build-hermesc-linux
|
||||
description: This action builds hermesc for linux platforms
|
||||
inputs:
|
||||
HERMES_VERSION:
|
||||
required: True
|
||||
description: The version of Hermes
|
||||
REACT_NATIVE_VERSION:
|
||||
required: True
|
||||
description: The version of React Native
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y git openssh-client cmake build-essential \
|
||||
libreadline-dev libicu-dev jq zip python3
|
||||
- name: Restore Hermes workspace
|
||||
uses: ./.github/actions/restore-hermes-workspace
|
||||
- name: Linux cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
key: v1-hermes-${{ github.job }}-linux-${{ inputs.HERMES_VERSION }}-${{ inputs.REACT_NATIVE_VERSION }}
|
||||
path: |
|
||||
/tmp/hermes/linux64-bin/
|
||||
/tmp/hermes/hermes/destroot/
|
||||
- name: Set up workspace
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p /tmp/hermes/linux64-bin
|
||||
- name: Build HermesC for Linux
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -f /tmp/hermes/linux64-bin/hermesc ]; then
|
||||
echo 'Skipping; Clean "/tmp/hermes/linux64-bin" to rebuild.'
|
||||
else
|
||||
cd /tmp/hermes
|
||||
cmake -S hermes -B build -DHERMES_STATIC_LINK=ON -DCMAKE_BUILD_TYPE=Release -DHERMES_ENABLE_TEST_SUITE=OFF \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DCMAKE_CXX_FLAGS=-s -DCMAKE_C_FLAGS=-s \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
|
||||
cmake --build build --target hermesc -j 4
|
||||
cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/.
|
||||
fi
|
||||
- name: Upload linux artifacts
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: hermes-linux-bin
|
||||
path: /tmp/hermes/linux64-bin
|
||||
@@ -0,0 +1,86 @@
|
||||
name: build-hermesc-windows
|
||||
description: This action builds hermesc for Windows platforms
|
||||
inputs:
|
||||
HERMES_VERSION:
|
||||
required: True
|
||||
description: The version of Hermes
|
||||
REACT_NATIVE_VERSION:
|
||||
required: True
|
||||
description: The version of React Native
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Download Previous Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: hermes-workspace
|
||||
path: 'D:\tmp\hermes'
|
||||
- name: Set up workspace
|
||||
shell: powershell
|
||||
run: |
|
||||
mkdir -p D:\tmp\hermes\osx-bin
|
||||
mkdir -p .\packages\react-native\sdks\hermes
|
||||
cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
|
||||
cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\.
|
||||
- name: Windows cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
key: v2-hermes-${{ github.job }}-windows-${{ inputs.HERMES_VERSION }}-${{ inputs.REACT_NATIVE_VERSION }}
|
||||
path: |
|
||||
D:\tmp\hermes\win64-bin\
|
||||
D:\tmp\hermes\hermes\icu\
|
||||
D:\tmp\hermes\hermes\deps\
|
||||
D:\tmp\hermes\hermes\build_release\
|
||||
- name: setup-msbuild
|
||||
uses: microsoft/setup-msbuild@v1.3.2
|
||||
- name: Set up workspace
|
||||
shell: powershell
|
||||
run: |
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\icu
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\deps
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\win64-bin
|
||||
- name: Build HermesC for Windows
|
||||
shell: powershell
|
||||
run: |
|
||||
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
|
||||
choco install --no-progress cmake --version 3.14.7
|
||||
if (-not $?) { throw "Failed to install CMake" }
|
||||
|
||||
cd $Env:HERMES_WS_DIR\icu
|
||||
# If Invoke-WebRequest shows a progress bar, it will fail with
|
||||
# Win32 internal error "Access is denied" 0x5 occurred [...]
|
||||
$progressPreference = 'silentlyContinue'
|
||||
Invoke-WebRequest -Uri "$Env:ICU_URL" -OutFile "icu.zip"
|
||||
Expand-Archive -Path "icu.zip" -DestinationPath "."
|
||||
|
||||
cd $Env:HERMES_WS_DIR
|
||||
Copy-Item -Path "icu\bin64\icu*.dll" -Destination "deps"
|
||||
# Include MSVC++ 2015 redistributables
|
||||
Copy-Item -Path "c:\windows\system32\msvcp140.dll" -Destination "deps"
|
||||
Copy-Item -Path "c:\windows\system32\vcruntime140.dll" -Destination "deps"
|
||||
Copy-Item -Path "c:\windows\system32\vcruntime140_1.dll" -Destination "deps"
|
||||
|
||||
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
|
||||
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
|
||||
|
||||
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
|
||||
if (-not $?) { throw "Failed to configure Hermes" }
|
||||
echo "Running windows build..."
|
||||
cd build_release
|
||||
cmake --build . --target hermesc --config Release
|
||||
if (-not $?) { throw "Failed to build Hermes" }
|
||||
|
||||
echo "Copying hermesc.exe to win64-bin"
|
||||
cd $Env:HERMES_WS_DIR
|
||||
Copy-Item -Path "build_release\bin\Release\hermesc.exe" -Destination "win64-bin"
|
||||
# Include Windows runtime dependencies
|
||||
Copy-Item -Path "deps\*" -Destination "win64-bin"
|
||||
}
|
||||
else {
|
||||
Write-Host "Skipping; Clean c:\tmp\hermes\win64-bin to rebuild."
|
||||
}
|
||||
- name: Upload windows artifacts
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: hermes-win64-bin
|
||||
path: D:\tmp\hermes\win64-bin\
|
||||
@@ -1,4 +1,4 @@
|
||||
name: cache_setup
|
||||
name: cache-setup
|
||||
description: "Cache setup"
|
||||
inputs:
|
||||
hermes-version:
|
||||
@@ -84,5 +84,5 @@ runs:
|
||||
path: |
|
||||
/tmp/hermes/download/
|
||||
/tmp/hermes/hermes/
|
||||
key: v1-hermes-${{ inputs.hermes-version }}-${{ github.run_number }}
|
||||
key: v1-hermes-${{ inputs.hermes-version }}
|
||||
enableCrossOsArchive: true
|
||||
@@ -1,18 +1,34 @@
|
||||
name: create_release
|
||||
description: Creates a new React Native release
|
||||
inputs:
|
||||
version:
|
||||
description: "The version of React Native we want to release. For example 0.75.0-rc.0"
|
||||
required: true
|
||||
is-latest-on-npm:
|
||||
description: "Whether we want to tag this release as latest on NPM"
|
||||
required: true
|
||||
default: "false"
|
||||
dry-run:
|
||||
description: "Whether the job should be executed in dry-run mode or not"
|
||||
default: "true"
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Yarn install
|
||||
shell: bash
|
||||
run: yarn install --non-interactive
|
||||
- name: Configure Git
|
||||
shell: bash
|
||||
run: |
|
||||
git config --local user.email "bot@reactnative.dev"
|
||||
git config --local user.name "React Native Bot"
|
||||
- name: Creating release commit
|
||||
shell: bash
|
||||
run: |
|
||||
node scripts/releases/create-release-commit.js \
|
||||
--reactNativeVersion "${{ inputs.version }}" \
|
||||
--tagAsLatestRelease "${{ inputs.is_latest_on_npm }}" \
|
||||
--dryRun "${{ inputs.dry_run }}"
|
||||
--tagAsLatestRelease "${{ inputs.is-latest-on-npm }}" \
|
||||
--dryRun "${{ inputs.dry-run }}"
|
||||
GIT_PAGER=cat git show HEAD
|
||||
- name: Update "latest" tag if needed
|
||||
shell: bash
|
||||
@@ -23,7 +39,7 @@ runs:
|
||||
git tag -a "latest" -m "latest"
|
||||
- name: Pushing release commit
|
||||
shell: bash
|
||||
if: ${{ inputs.dry_run == false }}
|
||||
if: ${{ inputs.dry-run == 'false' }}
|
||||
run: |
|
||||
CURR_BRANCH="$(git branch --show-current)"
|
||||
git push origin "$CURR_BRANCH" --follow-tags
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
name: lint
|
||||
description: Runs all the linters in the codebase
|
||||
inputs:
|
||||
node-version:
|
||||
description: "The node.js version to use"
|
||||
required: false
|
||||
default: "18"
|
||||
github-token:
|
||||
description: "The GitHub token used by pull-bot"
|
||||
required: true
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
- name: Yarn install
|
||||
shell: bash
|
||||
run: yarn install --non-interactive --frozen-lockfile
|
||||
- name: Run linters against modified files (analysis-bot)
|
||||
shell: bash
|
||||
run: yarn lint-ci
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.github-token}}
|
||||
- name: Lint code
|
||||
shell: bash
|
||||
run: ./scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
|
||||
- name: Lint java
|
||||
shell: bash
|
||||
run: ./scripts/circleci/exec_swallow_error.sh yarn lint-java --check
|
||||
- name: Run flowcheck
|
||||
shell: bash
|
||||
run: yarn flow-check
|
||||
- name: Run typescript check
|
||||
shell: bash
|
||||
run: yarn test-typescript
|
||||
- name: Check license
|
||||
shell: bash
|
||||
run: ./scripts/circleci/check_license.sh
|
||||
- name: Check formatting
|
||||
shell: bash
|
||||
run: yarn run format-check
|
||||
@@ -0,0 +1,104 @@
|
||||
name: prepare-hermes-workspace
|
||||
description: This action prepares the hermes workspace with the right hermes and react-native versions.
|
||||
inputs:
|
||||
HERMES_WS_DIR:
|
||||
required: true
|
||||
description: The hermes dir we need to use to setup the workspace
|
||||
HERMES_VERSION_FILE:
|
||||
required: true
|
||||
description: the path to the file that will contain the hermes version
|
||||
BUILD_FROM_SOURCE:
|
||||
description: Whether we need to build from source or not
|
||||
default: true
|
||||
outputs:
|
||||
hermes-version:
|
||||
description: the version of Hermes tied to this run
|
||||
value: ${{ steps.hermes-version.outputs.VERSION }}
|
||||
react-native-version:
|
||||
description: the version of React Native tied to this run
|
||||
value: ${{ steps.react-native-version.outputs.VERSION }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
|
||||
- name: Setup hermes version
|
||||
shell: bash
|
||||
id: hermes-version
|
||||
run: |
|
||||
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
|
||||
|
||||
if [ -f "$HERMES_VERSION_FILE" ]; then
|
||||
echo "Hermes Version file found! Using this version for the build:"
|
||||
echo "VERSION=$(cat $HERMES_VERSION_FILE)" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "Hermes Version file not found!!!"
|
||||
echo "Using the last commit from main for the build:"
|
||||
HERMES_TAG_SHA=$(git ls-remote https://github.com/facebook/hermes main | cut -f 1 | tr -d '[:space:]')
|
||||
echo "VERSION=$HERMES_TAG_SHA" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "Hermes commit is $HERMES_TAG_SHA"
|
||||
|
||||
- name: Get react-native version
|
||||
shell: bash
|
||||
id: react-native-version
|
||||
run: |
|
||||
VERSION=$(cat packages/react-native/package.json | jq -r '.version')
|
||||
# Save the react native version we are building in an output variable so we can use that file as part of the cache key.
|
||||
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
echo "React Native Version is $VERSION"
|
||||
|
||||
- name: Cache hermes workspace
|
||||
id: restore-hermes
|
||||
uses: actions/cache/restore@v4.0.0
|
||||
with:
|
||||
path: |
|
||||
/tmp/hermes/download/
|
||||
/tmp/hermes/hermes/
|
||||
key: v1-hermes-${{ steps.hermes-version.outputs.version }}
|
||||
enableCrossOsArchive: true
|
||||
|
||||
# It happened while testing that a cache was created from the right folders
|
||||
# but those folders where empty. Thus, the next check ensures that we can work with those caches.
|
||||
- name: Check if cache was meaningful
|
||||
id: meaningful-cache
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ -d /tmp/hermes/hermes ]] && [[ -n "$(ls -A /tmp/hermes/hermes)" ]]; then
|
||||
echo "Found a good hermes cache"
|
||||
echo "HERMES_CACHED=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Yarn- Install Dependencies
|
||||
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}
|
||||
shell: bash
|
||||
run: yarn install --non-interactive
|
||||
|
||||
- name: Download Hermes tarball
|
||||
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
node packages/react-native/scripts/hermes/prepare-hermes-for-build ${{ github.event.pull_request.html_url }}
|
||||
cp packages/react-native/sdks/download/* $HERMES_WS_DIR/download/.
|
||||
cp -r packages/react-native/sdks/hermes/* $HERMES_WS_DIR/hermes/.
|
||||
|
||||
echo ${{ steps.hermes-version.outputs.version }}
|
||||
|
||||
- name: Upload Hermes artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hermes-workspace
|
||||
path: |
|
||||
/tmp/hermes/download/
|
||||
/tmp/hermes/hermes/
|
||||
|
||||
- name: Cache hermes workspace
|
||||
uses: actions/cache/save@v4.0.0
|
||||
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode.
|
||||
with:
|
||||
path: |
|
||||
/tmp/hermes/download/
|
||||
/tmp/hermes/hermes/
|
||||
key: v1-hermes-${{ steps.hermes-version.outputs.version }}
|
||||
enableCrossOsArchive: true
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
name: prepare_ios_tests
|
||||
name: prepare-ios-tests
|
||||
description: Prepare iOS Tests
|
||||
runs:
|
||||
using: composite
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
name: report_bundle_size
|
||||
name: report-bundle-size
|
||||
description: Report bundle size
|
||||
inputs:
|
||||
platform:
|
||||
+7
-2
@@ -1,8 +1,13 @@
|
||||
name: setup_hermes_workspace
|
||||
description: "Setup hermes workspace"
|
||||
name: restore-hermes-workspace
|
||||
description: "Restore hermes workspace that has been created in Prepare Hermes Workspace"
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Download Previous Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: hermes-workspace
|
||||
path: /tmp/hermes
|
||||
- name: Set up workspace
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -1,17 +0,0 @@
|
||||
name: run_e2e
|
||||
description: "Run End-to-End Tests"
|
||||
inputs:
|
||||
platform:
|
||||
description: "Platform to run tests on"
|
||||
required: true
|
||||
default: "js"
|
||||
retries:
|
||||
description: "Number of times to retry failed tests"
|
||||
required: true
|
||||
default: "3"
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: "Run Tests: ${{ inputs.platform }} End-to-End Tests"
|
||||
run: node ./scripts/e2e/run-ci-e2e-tests.js --${{ inputs.platform }} --retries ${{ inputs.retries }}
|
||||
shell: bash
|
||||
@@ -1,5 +1,9 @@
|
||||
name: Setup gradle
|
||||
description: "Set up your GitHub Actions workflow with a specific version of gradle"
|
||||
inputs:
|
||||
cache-read-only:
|
||||
description: "Whether the Gradle Cache should be in read-only mode so this job won't be allowed to write to it"
|
||||
default: "true"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -7,3 +11,8 @@ runs:
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
gradle-version: wrapper
|
||||
# We want the Gradle cache to be written only on main/-stable branches run, and only for jobs with `cache-read-only` == false (i.e. `build_android`).
|
||||
cache-read-only: ${{ (github.ref != 'refs/heads/main' && !contains(github.ref, '-stable')) || inputs.cache-read-only == 'true' }}
|
||||
# Similarly, for those jobs we want to start with a clean cache so it doesn't grow without limits (this is the negation of the previous condition).
|
||||
cache-write-only: ${{ (github.ref == 'refs/heads/main' || contains(github.ref, '-stable')) && inputs.cache-read-only != 'true' }}
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
name: setup_xcode_build_cache
|
||||
name: setup-xcode-build-cache
|
||||
description: Add caching to iOS jobs to speed up builds
|
||||
inputs:
|
||||
hermes-version:
|
||||
@@ -20,9 +20,9 @@ runs:
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: packages/rn-tester/Podfile.lock
|
||||
key: v9-podfilelock-${{ github.job }}-${{ hashfiles('packages/rn-tester/Podfile') }}-{{ hashfiles('/tmp/week_year') }}-${{ inputs.hermes-version}}
|
||||
key: v10-podfilelock-${{ github.job }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ hashfiles('/tmp/week_year') }}-${{ inputs.hermes-version}}
|
||||
- name: Cache cocoapods
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: packages/rn-tester/Pods
|
||||
key: v11-cocoapods-${{ github.job }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-{{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}}
|
||||
key: v12-cocoapods-${{ github.job }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}}
|
||||
+26
-27
@@ -1,37 +1,21 @@
|
||||
name: test_ios_helloworld
|
||||
name: test-ios-helloworld
|
||||
description: Test iOS Hello World
|
||||
inputs:
|
||||
jsengine:
|
||||
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC".
|
||||
type: choice
|
||||
default: Hermes
|
||||
options:
|
||||
- JSC
|
||||
- Hermes
|
||||
use-frameworks:
|
||||
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
|
||||
type: choice
|
||||
default: StaticLibraries
|
||||
options:
|
||||
- StaticLibraries
|
||||
- DynamicFrameworks
|
||||
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
|
||||
default: StaticLibraries
|
||||
architecture:
|
||||
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup
|
||||
type: choice
|
||||
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup. Must be one of "OldArch" or "NewArch"
|
||||
default: OldArch
|
||||
options:
|
||||
- OldArch
|
||||
- NewArch
|
||||
ruby-version:
|
||||
description: The version of ruby that must be used
|
||||
default: 2.6.10
|
||||
flavor:
|
||||
description: The flavor of the build. Must be one of "Debug", "Release".
|
||||
type: choice
|
||||
default: Debug
|
||||
options:
|
||||
- Debug
|
||||
- Release
|
||||
hermes-version:
|
||||
description: The version of hermes
|
||||
required: true
|
||||
@@ -45,17 +29,20 @@ runs:
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Create Hermes folder
|
||||
shell: bash
|
||||
run: mkdir -p "$HERMES_WS_DIR"
|
||||
- name: Download Hermes
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
hermes-version: ${{ inputs.hermes-version }}
|
||||
react-native-version: ${{ inputs.react-native-version }}
|
||||
name: hermes-darwin-bin-${{ inputs.flavor }}
|
||||
path: /tmp/hermes/hermes-runtime-darwin/
|
||||
- name: Print Downloaded hermes
|
||||
shell: bash
|
||||
run: ls -lR "$HERMES_WS_DIR"
|
||||
- name: Run yarn
|
||||
shell: bash
|
||||
run: yarn install --non-interactive
|
||||
- name: Setup Hermes workspace
|
||||
uses: ./.github/actions/setup_hermes_workspace
|
||||
- name: Setup ruby
|
||||
uses: ruby/setup-ruby@v1.170.0
|
||||
with:
|
||||
@@ -78,6 +65,17 @@ runs:
|
||||
args+=(--jsvm jsc)
|
||||
yarn bootstrap ios "${args[@]}" | cat
|
||||
else
|
||||
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased.
|
||||
# Let's ensure that the tarballs have the right names
|
||||
|
||||
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then
|
||||
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz"
|
||||
fi
|
||||
|
||||
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then
|
||||
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz"
|
||||
fi
|
||||
|
||||
BUILD_TYPE="${{ inputs.flavor }}"
|
||||
TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
|
||||
HERMES_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
|
||||
@@ -87,6 +85,7 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd packages/helloworld
|
||||
|
||||
args=()
|
||||
if [[ ${{ inputs.flavor }} == "Release" ]]; then
|
||||
args+=(--prod)
|
||||
+19
-19
@@ -1,12 +1,12 @@
|
||||
name: test_ios_rntester
|
||||
name: test-ios-rntester
|
||||
description: Test iOS RNTester
|
||||
inputs:
|
||||
jsengine:
|
||||
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC".
|
||||
default: Hermes
|
||||
use-frameworks:
|
||||
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
|
||||
default: StaticLibraries
|
||||
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
|
||||
default: StaticLibraries
|
||||
architecture:
|
||||
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup
|
||||
default: NewArch
|
||||
@@ -15,7 +15,7 @@ inputs:
|
||||
default: 2.6.10
|
||||
run-unit-tests:
|
||||
description: whether unit tests should run or not.
|
||||
default: false
|
||||
default: "false"
|
||||
hermes-tarball-artifacts-dir:
|
||||
description: The directory where the hermes tarball artifacts are stored
|
||||
default: /tmp/hermes/hermes-runtime-darwin
|
||||
@@ -38,19 +38,18 @@ runs:
|
||||
- name: Run yarn
|
||||
shell: bash
|
||||
run: yarn install --non-interactive
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Download Hermes
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
hermes-version: ${{ inputs.hermes-version }}
|
||||
react-native-version: ${{ inputs.react-native-version }}
|
||||
name: hermes-darwin-bin-${{ inputs.flavor }}
|
||||
path: ${{ inputs.hermes-tarball-artifacts-dir }}
|
||||
- name: Setup ruby
|
||||
uses: ruby/setup-ruby@v1.170.0
|
||||
with:
|
||||
ruby-version: ${{ inputs.ruby-version }}
|
||||
- name: Prepare IOS Tests
|
||||
if: ${{ inputs.run-unit-tests == true }}
|
||||
uses: ./.github/actions/prepare_ios_tests
|
||||
if: ${{ inputs.run-unit-tests == 'true' }}
|
||||
uses: ./.github/actions/prepare-ios-tests
|
||||
- name: Set HERMES_ENGINE_TARBALL_PATH envvar if Hermes tarball is present
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -82,6 +81,7 @@ runs:
|
||||
if [[ -e $TARBALL_PATH ]]; then
|
||||
tar -xf $TARBALL_PATH
|
||||
echo 'print(HermesInternal?.getRuntimeProperties?.()["OSS Release Version"])' > test.js
|
||||
chmod +x ./destroot/bin/hermes
|
||||
./destroot/bin/hermes test.js
|
||||
rm test.js
|
||||
rm -rf destroot
|
||||
@@ -89,7 +89,7 @@ runs:
|
||||
echo 'No Hermes tarball found.'
|
||||
fi
|
||||
- name: Setup xcode build cache
|
||||
uses: ./.github/actions/setup_xcode_build_cache
|
||||
uses: ./.github/actions/setup-xcode-build-cache
|
||||
with:
|
||||
hermes-version: ${{ inputs.hermes-version }}
|
||||
- name: Install CocoaPods dependencies
|
||||
@@ -114,7 +114,7 @@ runs:
|
||||
bundle install
|
||||
bundle exec pod install
|
||||
- name: Build RNTester
|
||||
if: ${{ inputs.run-unit-tests != true }}
|
||||
if: ${{ inputs.run-unit-tests != 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
xcodebuild build \
|
||||
@@ -122,11 +122,11 @@ runs:
|
||||
-scheme RNTester \
|
||||
-sdk iphonesimulator
|
||||
- name: "Run Tests: iOS Unit and Integration Tests"
|
||||
if: ${{ inputs.run-unit-tests == true }}
|
||||
if: ${{ inputs.run-unit-tests == 'true' }}
|
||||
shell: bash
|
||||
run: yarn test-ios
|
||||
- name: Zip Derived data folder
|
||||
if: ${{ inputs.run-unit-tests == true }}
|
||||
if: ${{ inputs.run-unit-tests == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "zipping tests results"
|
||||
@@ -135,17 +135,17 @@ runs:
|
||||
tar -zcvf xcresults.tar.gz $XCRESULT_PATH
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
if: ${{ inputs.run-unit-tests == true }}
|
||||
if: ${{ inputs.run-unit-tests == 'true' }}
|
||||
with:
|
||||
name: xcresults
|
||||
path: /Users/distiller/Library/Developer/Xcode/xcresults.tar.gz
|
||||
- name: Report bundle size
|
||||
if: ${{ inputs.run-unit-tests == true }}
|
||||
uses: ./.github/actions/report_bundle_size
|
||||
if: ${{ inputs.run-unit-tests == 'true' }}
|
||||
uses: ./.github/actions/report-bundle-size
|
||||
with:
|
||||
platform: ios
|
||||
- name: Store test results
|
||||
if: ${{ inputs.run-unit-tests == true }}
|
||||
if: ${{ inputs.run-unit-tests == 'true' }}
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: test-results
|
||||
@@ -0,0 +1,27 @@
|
||||
name: test-js
|
||||
description: Runs all the JS tests in the codebase
|
||||
inputs:
|
||||
node-version:
|
||||
description: 'The node.js version to use'
|
||||
required: false
|
||||
default: '18'
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
- name: Yarn install
|
||||
shell: bash
|
||||
run: yarn install --non-interactive
|
||||
- name: Run Tests - JavaScript Tests
|
||||
shell: bash
|
||||
run: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
|
||||
- name: Upload test results
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: test-js-results
|
||||
compression-level: 1
|
||||
path: ./reports/junit
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
issue_number: closedPrNumber,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `This pull request was successfully merged by ${authorName} in **${sha}**.\n\n<sup>[When will my fix make it into a release?](https://github.com/reactwg/react-native-releases/blob/main/docs/faq.md#when-will-my-fix-make-it-into-a-release) | [How to file a pick request?](https://github.com/reactwg/react-native-releases/blob/main/docs/faq.md#how-to-open-a-pick-request)</sup>`
|
||||
body: `This pull request was successfully merged by ${authorName} in **${sha}**\n\n<sup>[When will my fix make it into a release?](https://github.com/reactwg/react-native-releases/blob/main/docs/faq.md#when-will-my-fix-make-it-into-a-release) | [How to file a pick request?](https://github.com/reactwg/react-native-releases/blob/main/docs/faq.md#how-to-open-a-pick-request)</sup>`
|
||||
});
|
||||
|
||||
// If the PR has already been processed (labeled as Merged), skip it
|
||||
|
||||
@@ -4,25 +4,27 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'The version of React Native we want to release. For example 0.75.0-rc.0'
|
||||
description: "The version of React Native we want to release. For example 0.75.0-rc.0"
|
||||
required: true
|
||||
type: string
|
||||
is_latest_on_npm:
|
||||
description: 'Whether we want to tag this release as latest on NPM'
|
||||
is-latest-on-npm:
|
||||
description: "Whether we want to tag this release as latest on NPM"
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
dry_run:
|
||||
description: 'Whether the job should be executed in dry-run mode or not'
|
||||
dry-run:
|
||||
description: "Whether the job should be executed in dry-run mode or not"
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
prepare_release:
|
||||
create_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
|
||||
- name: Check if on stable branch
|
||||
id: check_stable_branch
|
||||
run: |
|
||||
@@ -46,3 +48,7 @@ jobs:
|
||||
- name: Execute Prepare Release
|
||||
if: ${{ steps.check_stable_branch.outputs.ON_STABLE_BRANCH && !steps.check_if_tag_exists.outputs.TAG_EXISTS }}
|
||||
uses: ./.github/actions/create-release
|
||||
with:
|
||||
version: ${{ inputs.version }}
|
||||
is-latest-on-npm: ${{ inputs.is-latest-on-npm }}
|
||||
dry-run: ${{ inputs.dry-run }}
|
||||
|
||||
+61
-413
@@ -28,84 +28,34 @@ jobs:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
|
||||
BUILD_FROM_SOURCE: true
|
||||
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
|
||||
outputs:
|
||||
react-native-version: ${{ steps.react-native-version.outputs.version }}
|
||||
hermes-version: ${{ steps.hermes-version.outputs.version }}
|
||||
react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }}
|
||||
hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Setup hermes version
|
||||
id: hermes-version
|
||||
run: |
|
||||
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
|
||||
|
||||
if [ -f "$HERMES_VERSION_FILE" ]; then
|
||||
echo "Hermes Version file found! Using this version for the build:"
|
||||
echo "VERSION=$(cat $HERMES_VERSION_FILE)" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "Hermes Version file not found!!!"
|
||||
echo "Using the last commit from main for the build:"
|
||||
HERMES_TAG_SHA=$(git ls-remote https://github.com/$GITHUB_REPOSITORY main | cut -f 1 | tr -d '[:space:]')
|
||||
echo "VERSION=$HERMES_TAG_SHA" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "Hermes commit is $HERMES_TAG_SHA"
|
||||
- name: Get react-native version
|
||||
id: react-native-version
|
||||
run: |
|
||||
VERSION=$(cat packages/react-native/package.json | jq -r '.version')
|
||||
# Save the react native version we are building in an output variable so we can use that file as part of the cache key.
|
||||
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
echo "React Native Version is $VERSION"
|
||||
- name: Cache hermes workspace
|
||||
uses: actions/cache@v4.0.0
|
||||
- name: Prepare Hermes Workspace
|
||||
id: prepare-hermes-workspace
|
||||
uses: ./.github/actions/prepare-hermes-workspace
|
||||
with:
|
||||
path: |
|
||||
/tmp/hermes/download/
|
||||
/tmp/hermes/hermes/
|
||||
key: v1-hermes-${{ steps.hermes-version.outputs.version }}-${{ github.run_number }}
|
||||
enableCrossOsArchive: true
|
||||
- name: Yarn- Install Dependencies
|
||||
run: yarn install --non-interactive
|
||||
- name: Download Hermes tarball
|
||||
run: |
|
||||
node packages/react-native/scripts/hermes/prepare-hermes-for-build ${{ github.event.pull_request.html_url }}
|
||||
cp packages/react-native/sdks/download/* $HERMES_WS_DIR/download/.
|
||||
cp -r packages/react-native/sdks/hermes/* $HERMES_WS_DIR/hermes/.
|
||||
|
||||
echo ${{ steps.hermes-version.outputs.version }}
|
||||
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
|
||||
HERMES_VERSION_FILE: ${{ env.HERMES_VERSION_FILE }}
|
||||
BUILD_FROM_SOURCE: ${{ env.BUILD_FROM_SOURCE }}
|
||||
|
||||
build_hermesc_apple:
|
||||
runs-on: macos-13
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Cache hermes workspace
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: |
|
||||
/tmp/hermes/download/
|
||||
/tmp/hermes/hermes/
|
||||
key: v1-hermes-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ github.run_number }}
|
||||
enableCrossOsArchive: true
|
||||
- name: Setup Hermes workspace
|
||||
uses: ./.github/actions/setup_hermes_workspace
|
||||
- name: Hermes apple cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_host_hermesc
|
||||
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Build HermesC Apple
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
. ./utils/build-apple-framework.sh
|
||||
build_host_hermesc_if_needed
|
||||
uses: ./.github/actions/build-hermesc-apple
|
||||
with:
|
||||
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.output.HERMES_VERSION }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.output.REACT_NATIVE_VERSION }}
|
||||
|
||||
build_apple_slices_hermes:
|
||||
runs-on: macos-14
|
||||
@@ -114,7 +64,9 @@ jobs:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin
|
||||
continue-on-error: true
|
||||
IOS_DEPLOYMENT_TARGET: "13.4"
|
||||
XROS_DEPLOYMENT_TARGET: "1.0"
|
||||
MAC_DEPLOYMENT_TARGET: "10.15"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -123,84 +75,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build Slice
|
||||
uses: ./.github/actions/build-apple-slices-hermes
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Setup Hermes workspace
|
||||
uses: ./.github/actions/setup_hermes_workspace
|
||||
- name: Check if the required artifacts already exist
|
||||
id: check_if_apple_artifacts_are_there
|
||||
run: |
|
||||
FLAVOR="${{ matrix.flavor }}"
|
||||
echo "Flavor is $FLAVOR"
|
||||
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
|
||||
DSYM="/tmp/hermes/dSYM/$FLAVOR"
|
||||
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
|
||||
|
||||
if [[ -d "$OSX_BIN" ]] && \
|
||||
[[ -d "$DSYM" ]] && \
|
||||
[[ -f "$HERMES" ]]; then
|
||||
|
||||
echo "Artifacts are there!"
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Build the Hermes ${{ matrix.slice }} frameworks
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
SLICE=${{ matrix.slice }}
|
||||
FLAVOR=${{ matrix.flavor }}
|
||||
FINAL_PATH=build_"$SLICE"_"$FLAVOR"
|
||||
echo "Final path for this slice is: $FINAL_PATH"
|
||||
|
||||
if [[ -d "$FINAL_PATH" ]]; then
|
||||
echo "[HERMES] Skipping! Found the requested slice at $FINAL_PATH".
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$ARTIFACTS_EXIST" ]]; then
|
||||
echo "[HERMES] Skipping! Artifacts exists already."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$SLICE" == "macosx" ]]; then
|
||||
echo "[HERMES] Building Hermes for MacOS"
|
||||
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-mac-framework.sh
|
||||
else
|
||||
echo "[HERMES] Building Hermes for iOS: $SLICE"
|
||||
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-ios-framework.sh "$SLICE"
|
||||
fi
|
||||
|
||||
echo "Moving from build_$SLICE to $FINAL_PATH"
|
||||
mv build_"$SLICE" "$FINAL_PATH"
|
||||
|
||||
# check whether everything is there
|
||||
if [[ -d "$FINAL_PATH/API/hermes/hermes.framework" ]]; then
|
||||
echo "Successfully built hermes.framework for $SLICE in $FLAVOR"
|
||||
else
|
||||
echo "Failed to built hermes.framework for $SLICE in $FLAVOR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -d "$FINAL_PATH/API/hermes/hermes.framework.dSYM" ]]; then
|
||||
echo "Successfully built hermes.framework.dSYM for $SLICE in $FLAVOR"
|
||||
else
|
||||
echo "Failed to built hermes.framework.dSYM for $SLICE in $FLAVOR"
|
||||
echo "Please try again"
|
||||
exit 1
|
||||
fi
|
||||
- name: Save slice cache
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
SLICE: ${{ matrix.slice}}
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_hermes_macos:
|
||||
runs-on: macos-13
|
||||
@@ -216,291 +97,46 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build Hermes MacOS
|
||||
uses: ./.github/actions/build-hermes-macos
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Setup Hermes workspace
|
||||
uses: ./.github/actions/setup_hermes_workspace
|
||||
- name: Check if the required artifacts already exist
|
||||
id: check_if_apple_artifacts_are_there
|
||||
run: |
|
||||
FLAVOR="${{ matrix.flavor }}"
|
||||
echo "Flavor is $FLAVOR"
|
||||
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
|
||||
DSYM="/tmp/hermes/dSYM/$FLAVOR"
|
||||
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
|
||||
|
||||
if [[ -d "$OSX_BIN" ]] && \
|
||||
[[ -d "$DSYM" ]] && \
|
||||
[[ -f "$HERMES" ]]; then
|
||||
|
||||
echo "Artifacts are there!"
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Yarn- Install Dependencies
|
||||
if: ${{ ! contains(github.event.head_commit.message, 'Bump metro@') && steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: yarn install --non-interactive
|
||||
- name: Slice cache macosx
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-macosx-${{ matrix.flavor }}
|
||||
- name: Slice cache iphoneos
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphoneos-${{ matrix.flavor }}
|
||||
- name: Slice cache iphonesimulator
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphonesimulator-${{ matrix.flavor }}
|
||||
- name: Slice cache catalyst
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-catalyst-${{ matrix.flavor }}
|
||||
- name: Slice cache xros
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xros-${{ matrix.flavor }}
|
||||
- name: Slice cache xrsimulator
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xrsimulator-${{ matrix.flavor }}
|
||||
- name: Move back build folders
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
ls -l ./packages/react-native/sdks/hermes
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
mv build_macosx_${{ matrix.flavor }} build_macosx
|
||||
mv build_iphoneos_${{ matrix.flavor }} build_iphoneos
|
||||
mv build_iphonesimulator_${{ matrix.flavor }} build_iphonesimulator
|
||||
mv build_catalyst_${{ matrix.flavor }} build_catalyst
|
||||
mv build_xros_${{ matrix.flavor }} build_xros
|
||||
mv build_xrsimulator_${{ matrix.flavor }} build_xrsimulator
|
||||
- name: Prepare destroot folder
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
. ./utils/build-apple-framework.sh
|
||||
prepare_dest_root_for_ci
|
||||
- name: Create fat framework for iOS
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
echo "[HERMES] Creating the universal framework"
|
||||
./utils/build-ios-framework.sh build_framework
|
||||
- name: Package the Hermes Apple frameworks
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
BUILD_TYPE="${{ matrix.flavor }}"
|
||||
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
|
||||
|
||||
TARBALL_OUTPUT_DIR=$(mktemp -d /tmp/hermes-tarball-output-XXXXXXXX)
|
||||
|
||||
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
|
||||
|
||||
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
|
||||
|
||||
TARBALL_OUTPUT_PATH=$(node ./packages/react-native/scripts/hermes/create-tarball.js \
|
||||
--inputDir ./packages/react-native/sdks/hermes \
|
||||
--buildType "$BUILD_TYPE" \
|
||||
--outputDir $TARBALL_OUTPUT_DIR)
|
||||
|
||||
echo "Hermes tarball saved to $TARBALL_OUTPUT_PATH"
|
||||
|
||||
mkdir -p $HERMES_TARBALL_ARTIFACTS_DIR
|
||||
cp $TARBALL_OUTPUT_PATH $HERMES_TARBALL_ARTIFACTS_DIR/.
|
||||
|
||||
mkdir -p /tmp/hermes/osx-bin/${{ matrix.flavor }}
|
||||
cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ matrix.flavor }}
|
||||
ls -lR /tmp/hermes/osx-bin/
|
||||
- name: Upload darwin artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-darwin-bin-${{ matrix.flavor }}
|
||||
path: /tmp/hermes/hermes-runtime-darwin
|
||||
- name: Upload osx-bin
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-osx-bin-${{ matrix.flavor }}
|
||||
path: /tmp/hermes/osx-bin
|
||||
- name: Create dSYM archive
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
FLAVOR=${{ matrix.flavor }}
|
||||
WORKING_DIR="/tmp/hermes_tmp/dSYM/$FLAVOR"
|
||||
|
||||
mkdir -p "$WORKING_DIR/macosx"
|
||||
mkdir -p "$WORKING_DIR/catalyst"
|
||||
mkdir -p "$WORKING_DIR/iphoneos"
|
||||
mkdir -p "$WORKING_DIR/iphonesimulator"
|
||||
mkdir -p "$WORKING_DIR/xros"
|
||||
mkdir -p "$WORKING_DIR/xrsimulator"
|
||||
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
|
||||
DSYM_FILE_PATH=API/hermes/hermes.framework.dSYM
|
||||
cp -r build_macosx/$DSYM_FILE_PATH "$WORKING_DIR/macosx/"
|
||||
cp -r build_catalyst/$DSYM_FILE_PATH "$WORKING_DIR/catalyst/"
|
||||
cp -r build_iphoneos/$DSYM_FILE_PATH "$WORKING_DIR/iphoneos/"
|
||||
cp -r build_iphonesimulator/$DSYM_FILE_PATH "$WORKING_DIR/iphonesimulator/"
|
||||
cp -r build_xros/$DSYM_FILE_PATH "$WORKING_DIR/xros/"
|
||||
cp -r build_xrsimulator/$DSYM_FILE_PATH "$WORKING_DIR/xrsimulator/"
|
||||
|
||||
DEST_DIR="/tmp/hermes/dSYM/$FLAVOR"
|
||||
tar -C "$WORKING_DIR" -czvf "hermes.framework.dSYM" .
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
mv "hermes.framework.dSYM" "$DEST_DIR"
|
||||
- name: Upload hermes dSYM artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-dSYM-${{ matrix.flavor }}
|
||||
path: /tmp/hermes/dSYM/${{ matrix.flavor }}
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
|
||||
build_hermesc_linux:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y git openssh-client cmake build-essential \
|
||||
libreadline-dev libicu-dev jq zip python3
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build HermesC Linux
|
||||
uses: ./.github/actions/build-hermesc-linux
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Linux cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
key: v1-hermes-${{ github.job }}-linux-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
path: |
|
||||
/tmp/hermes/linux64-bin/
|
||||
/tmp/hermes/hermes/destroot/
|
||||
- name: Set up workspace
|
||||
run: |
|
||||
mkdir -p /tmp/hermes/linux64-bin
|
||||
- name: Build HermesC for Linux
|
||||
run: |
|
||||
if [ -f /tmp/hermes/linux64-bin/hermesc ]; then
|
||||
echo 'Skipping; Clean "/tmp/hermes/linux64-bin" to rebuild.'
|
||||
else
|
||||
cd /tmp/hermes
|
||||
cmake -S hermes -B build -DHERMES_STATIC_LINK=ON -DCMAKE_BUILD_TYPE=Release -DHERMES_ENABLE_TEST_SUITE=OFF \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DCMAKE_CXX_FLAGS=-s -DCMAKE_C_FLAGS=-s \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
|
||||
cmake --build build --target hermesc -j 4
|
||||
cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/.
|
||||
fi
|
||||
- name: Upload linux artifacts
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: hermes-linux-bin
|
||||
path: /tmp/hermes/linux64-bin
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_hermesc_windows:
|
||||
runs-on: windows-2019
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: 'D:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
|
||||
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
|
||||
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
|
||||
CMAKE_DIR: 'C:\Program Files\CMake\bin'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build HermesC Windows
|
||||
uses: ./.github/actions/build-hermesc-windows
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Windows cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
key: v2-hermes-${{ github.job }}-windows-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
path: |
|
||||
D:\tmp\hermes\win64-bin\
|
||||
D:\tmp\hermes\hermes\icu\
|
||||
D:\tmp\hermes\hermes\deps\
|
||||
D:\tmp\hermes\hermes\build_release\
|
||||
- name: setup-msbuild
|
||||
uses: microsoft/setup-msbuild@v1.3.2
|
||||
- name: Set up workspace
|
||||
run: |
|
||||
#New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\icu
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\deps
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\win64-bin
|
||||
#New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\hermes
|
||||
#New-Item -ItemType SymbolicLink -ErrorAction SilentlyContinue -Target tmp\hermes\hermes -Path $Env:HERMES_WS_DIR -Name hermes
|
||||
- name: Build HermesC for Windows
|
||||
run: |
|
||||
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
|
||||
choco install --no-progress cmake --version 3.14.7
|
||||
if (-not $?) { throw "Failed to install CMake" }
|
||||
|
||||
cd $Env:HERMES_WS_DIR\icu
|
||||
# If Invoke-WebRequest shows a progress bar, it will fail with
|
||||
# Win32 internal error "Access is denied" 0x5 occurred [...]
|
||||
$progressPreference = 'silentlyContinue'
|
||||
Invoke-WebRequest -Uri "$Env:ICU_URL" -OutFile "icu.zip"
|
||||
Expand-Archive -Path "icu.zip" -DestinationPath "."
|
||||
|
||||
cd $Env:HERMES_WS_DIR
|
||||
Copy-Item -Path "icu\bin64\icu*.dll" -Destination "deps"
|
||||
# Include MSVC++ 2015 redistributables
|
||||
Copy-Item -Path "c:\windows\system32\msvcp140.dll" -Destination "deps"
|
||||
Copy-Item -Path "c:\windows\system32\vcruntime140.dll" -Destination "deps"
|
||||
Copy-Item -Path "c:\windows\system32\vcruntime140_1.dll" -Destination "deps"
|
||||
|
||||
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
|
||||
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
|
||||
|
||||
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
|
||||
if (-not $?) { throw "Failed to configure Hermes" }
|
||||
echo "Running windows build..."
|
||||
cd build_release
|
||||
cmake --build . --target hermesc --config Release
|
||||
if (-not $?) { throw "Failed to build Hermes" }
|
||||
|
||||
echo "Copying hermesc.exe to win64-bin"
|
||||
cd $Env:HERMES_WS_DIR
|
||||
Copy-Item -Path "build_release\bin\Release\hermesc.exe" -Destination "win64-bin"
|
||||
# Include Windows runtime dependencies
|
||||
Copy-Item -Path "deps\*" -Destination "win64-bin"
|
||||
}
|
||||
else {
|
||||
Write-Host "Skipping; Clean c:\tmp\hermes\win64-bin to rebuild."
|
||||
}
|
||||
- name: Upload windows artifacts
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: hermes-win64-bin
|
||||
path: D:\tmp\hermes\win64-bin\
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_android:
|
||||
runs-on: 8-core-ubuntu
|
||||
@@ -510,17 +146,23 @@ jobs:
|
||||
env:
|
||||
TERM: "dumb"
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
|
||||
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup git safe folders
|
||||
run: git config --global --add safe.directory '*'
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Install dependencies
|
||||
run: yarn install --non-interactive
|
||||
- name: Set React Native Version
|
||||
run: node ./scripts/releases/set-rn-version.js --build-type ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
|
||||
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
|
||||
- name: Setup gradle
|
||||
uses: ./.github/actions/setup-gradle
|
||||
with:
|
||||
cache-read-only: "false"
|
||||
- name: Build and publish all the Android Artifacts to /tmp/maven-local
|
||||
run: |
|
||||
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs.
|
||||
@@ -531,6 +173,11 @@ jobs:
|
||||
fi
|
||||
./gradlew publishAllToMavenTempLocal build -PenableWarningsAsErrors=true
|
||||
shell: bash
|
||||
- name: Upload Maven Artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: maven-local-build-android
|
||||
path: /tmp/maven-local
|
||||
- name: Upload test results
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
@@ -548,6 +195,7 @@ jobs:
|
||||
name: rntester-apk
|
||||
path: packages/rn-tester/android/app/build/outputs/apk/
|
||||
compression-level: 0
|
||||
|
||||
build_npm_package:
|
||||
runs-on: 8-core-ubuntu
|
||||
needs: [set_release_type, prepare_hermes_workspace, build_hermes_macos, build_hermesc_linux, build_hermesc_windows,build_android]
|
||||
@@ -558,9 +206,6 @@ jobs:
|
||||
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
|
||||
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs.
|
||||
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
|
||||
# Repeated here, as the environment key in this executor will overwrite the one in defaults
|
||||
PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: ${{ secrets.GITHUB_ANALYSISBOT_TOKEN_A }}
|
||||
PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: ${{ secrets.GITHUB_ANALYSISBOT_TOKEN_B }}
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
env:
|
||||
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
|
||||
@@ -572,18 +217,20 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup git safe folders
|
||||
run: git config --global --add safe.directory '*'
|
||||
- name: Create /tmp/hermes/osx-bin directory
|
||||
run: mkdir -p /tmp/hermes/osx-bin
|
||||
- name: Download osx-bin release artifacts
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
name: hermes-osx-bin-Release
|
||||
path: /tmp/hermes/osx-bin
|
||||
path: /tmp/hermes/osx-bin/Release
|
||||
- name: Download osx-bin debug artifacts
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
name: hermes-osx-bin-Debug
|
||||
path: /tmp/hermes/osx-bin
|
||||
path: /tmp/hermes/osx-bin/Debug
|
||||
- name: Download darwin-bin release artifacts
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
@@ -615,8 +262,8 @@ jobs:
|
||||
name: hermes-linux-bin
|
||||
path: /tmp/hermes/linux64-bin
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
id: cache-setup
|
||||
uses: ./.github/actions/cache-setup
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
@@ -659,6 +306,8 @@ jobs:
|
||||
cp $HERMES_WS_DIR/dSYM/Release/hermes.framework.dSYM ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-framework-dSYM-release.tar.gz
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Setup gradle
|
||||
uses: ./.github/actions/setup-gradle
|
||||
- name: Install dependencies
|
||||
run: yarn install --non-interactive
|
||||
- name: Build packages
|
||||
@@ -668,7 +317,6 @@ jobs:
|
||||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.GHA_NPM_TOKEN }}" > ~/.npmrc
|
||||
- name: Publish NPM
|
||||
run: |
|
||||
git config --global --add safe.directory /__w/react-native/react-native
|
||||
echo "GRADLE_OPTS = $GRADLE_OPTS"
|
||||
export ORG_GRADLE_PROJECT_reactNativeArchitectures="armeabi-v7a,arm64-v8a,x86,x86_64"
|
||||
node ./scripts/releases-ci/publish-npm.js -t nightly
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
name: Publish release
|
||||
|
||||
name: Publish Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v0.[0-9]+.[0-9]+(-*)?" # This should match v0.X.Y and v0.X.Y-RC.0
|
||||
- "v0.*.*" # This should match v0.X.Y
|
||||
- "v0.*.*-rc.*" # This should match v0.X.Y-RC.0
|
||||
jobs:
|
||||
set_release_type:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -25,84 +25,35 @@ jobs:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
|
||||
BUILD_FROM_SOURCE: true
|
||||
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
|
||||
outputs:
|
||||
react-native-version: ${{ steps.react-native-version.outputs.version }}
|
||||
hermes-version: ${{ steps.hermes-version.outputs.version }}
|
||||
react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }}
|
||||
hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Setup hermes version
|
||||
id: hermes-version
|
||||
run: |
|
||||
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
|
||||
|
||||
if [ -f "$HERMES_VERSION_FILE" ]; then
|
||||
echo "Hermes Version file found! Using this version for the build:"
|
||||
echo "VERSION=$(cat $HERMES_VERSION_FILE)" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "Hermes Version file not found!!!"
|
||||
echo "Using the last commit from main for the build:"
|
||||
HERMES_TAG_SHA=$(git ls-remote https://github.com/$GITHUB_REPOSITORY main | cut -f 1 | tr -d '[:space:]')
|
||||
echo "VERSION=$HERMES_TAG_SHA" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "Hermes commit is $HERMES_TAG_SHA"
|
||||
- name: Get react-native version
|
||||
id: react-native-version
|
||||
run: |
|
||||
VERSION=$(cat packages/react-native/package.json | jq -r '.version')
|
||||
# Save the react native version we are building in an output variable so we can use that file as part of the cache key.
|
||||
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
echo "React Native Version is $VERSION"
|
||||
- name: Cache hermes workspace
|
||||
uses: actions/cache@v4.0.0
|
||||
- name: Prepare Hermes Workspace
|
||||
id: prepare-hermes-workspace
|
||||
uses: ./.github/actions/prepare-hermes-workspace
|
||||
with:
|
||||
path: |
|
||||
/tmp/hermes/download/
|
||||
/tmp/hermes/hermes/
|
||||
key: v1-hermes-${{ steps.hermes-version.outputs.version }}-${{ github.run_number }}
|
||||
enableCrossOsArchive: true
|
||||
- name: Yarn- Install Dependencies
|
||||
run: yarn install --non-interactive
|
||||
- name: Download Hermes tarball
|
||||
run: |
|
||||
node packages/react-native/scripts/hermes/prepare-hermes-for-build ${{ github.event.pull_request.html_url }}
|
||||
cp packages/react-native/sdks/download/* $HERMES_WS_DIR/download/.
|
||||
cp -r packages/react-native/sdks/hermes/* $HERMES_WS_DIR/hermes/.
|
||||
|
||||
echo ${{ steps.hermes-version.outputs.version }}
|
||||
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
|
||||
HERMES_VERSION_FILE: ${{ env.HERMES_VERSION_FILE }}
|
||||
BUILD_FROM_SOURCE: ${{ env.BUILD_FROM_SOURCE }}
|
||||
|
||||
build_hermesc_apple:
|
||||
runs-on: macos-13
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Cache hermes workspace
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: |
|
||||
/tmp/hermes/download/
|
||||
/tmp/hermes/hermes/
|
||||
key: v1-hermes-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ github.run_number }}
|
||||
enableCrossOsArchive: true
|
||||
- name: Setup Hermes workspace
|
||||
uses: ./.github/actions/setup_hermes_workspace
|
||||
- name: Hermes apple cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_host_hermesc
|
||||
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Build HermesC Apple
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
. ./utils/build-apple-framework.sh
|
||||
build_host_hermesc_if_needed
|
||||
uses: ./.github/actions/build-hermesc-apple
|
||||
with:
|
||||
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.output.HERMES_VERSION }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.output.REACT_NATIVE_VERSION }}
|
||||
|
||||
|
||||
build_apple_slices_hermes:
|
||||
runs-on: macos-14
|
||||
@@ -111,7 +62,9 @@ jobs:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin
|
||||
continue-on-error: true
|
||||
IOS_DEPLOYMENT_TARGET: "13.4"
|
||||
XROS_DEPLOYMENT_TARGET: "1.0"
|
||||
MAC_DEPLOYMENT_TARGET: "10.15"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -120,84 +73,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build Slice
|
||||
uses: ./.github/actions/build-apple-slices-hermes
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Setup Hermes workspace
|
||||
uses: ./.github/actions/setup_hermes_workspace
|
||||
- name: Check if the required artifacts already exist
|
||||
id: check_if_apple_artifacts_are_there
|
||||
run: |
|
||||
FLAVOR="${{ matrix.flavor }}"
|
||||
echo "Flavor is $FLAVOR"
|
||||
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
|
||||
DSYM="/tmp/hermes/dSYM/$FLAVOR"
|
||||
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
|
||||
|
||||
if [[ -d "$OSX_BIN" ]] && \
|
||||
[[ -d "$DSYM" ]] && \
|
||||
[[ -f "$HERMES" ]]; then
|
||||
|
||||
echo "Artifacts are there!"
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Build the Hermes ${{ matrix.slice }} frameworks
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
SLICE=${{ matrix.slice }}
|
||||
FLAVOR=${{ matrix.flavor }}
|
||||
FINAL_PATH=build_"$SLICE"_"$FLAVOR"
|
||||
echo "Final path for this slice is: $FINAL_PATH"
|
||||
|
||||
if [[ -d "$FINAL_PATH" ]]; then
|
||||
echo "[HERMES] Skipping! Found the requested slice at $FINAL_PATH".
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$ARTIFACTS_EXIST" ]]; then
|
||||
echo "[HERMES] Skipping! Artifacts exists already."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$SLICE" == "macosx" ]]; then
|
||||
echo "[HERMES] Building Hermes for MacOS"
|
||||
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-mac-framework.sh
|
||||
else
|
||||
echo "[HERMES] Building Hermes for iOS: $SLICE"
|
||||
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-ios-framework.sh "$SLICE"
|
||||
fi
|
||||
|
||||
echo "Moving from build_$SLICE to $FINAL_PATH"
|
||||
mv build_"$SLICE" "$FINAL_PATH"
|
||||
|
||||
# check whether everything is there
|
||||
if [[ -d "$FINAL_PATH/API/hermes/hermes.framework" ]]; then
|
||||
echo "Successfully built hermes.framework for $SLICE in $FLAVOR"
|
||||
else
|
||||
echo "Failed to built hermes.framework for $SLICE in $FLAVOR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -d "$FINAL_PATH/API/hermes/hermes.framework.dSYM" ]]; then
|
||||
echo "Successfully built hermes.framework.dSYM for $SLICE in $FLAVOR"
|
||||
else
|
||||
echo "Failed to built hermes.framework.dSYM for $SLICE in $FLAVOR"
|
||||
echo "Please try again"
|
||||
exit 1
|
||||
fi
|
||||
- name: Save slice cache
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
SLICE: ${{ matrix.slice}}
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_hermes_macos:
|
||||
runs-on: macos-13
|
||||
@@ -213,291 +95,46 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build Hermes MacOS
|
||||
uses: ./.github/actions/build-hermes-macos
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Setup Hermes workspace
|
||||
uses: ./.github/actions/setup_hermes_workspace
|
||||
- name: Check if the required artifacts already exist
|
||||
id: check_if_apple_artifacts_are_there
|
||||
run: |
|
||||
FLAVOR="${{ matrix.flavor }}"
|
||||
echo "Flavor is $FLAVOR"
|
||||
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
|
||||
DSYM="/tmp/hermes/dSYM/$FLAVOR"
|
||||
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
|
||||
|
||||
if [[ -d "$OSX_BIN" ]] && \
|
||||
[[ -d "$DSYM" ]] && \
|
||||
[[ -f "$HERMES" ]]; then
|
||||
|
||||
echo "Artifacts are there!"
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Yarn- Install Dependencies
|
||||
if: ${{ ! contains(github.event.head_commit.message, 'Bump metro@') && steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: yarn install --non-interactive
|
||||
- name: Slice cache macosx
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-macosx-${{ matrix.flavor }}
|
||||
- name: Slice cache iphoneos
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphoneos-${{ matrix.flavor }}
|
||||
- name: Slice cache iphonesimulator
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphonesimulator-${{ matrix.flavor }}
|
||||
- name: Slice cache catalyst
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-catalyst-${{ matrix.flavor }}
|
||||
- name: Slice cache xros
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xros-${{ matrix.flavor }}
|
||||
- name: Slice cache xrsimulator
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xrsimulator-${{ matrix.flavor }}
|
||||
- name: Move back build folders
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
ls -l ./packages/react-native/sdks/hermes
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
mv build_macosx_${{ matrix.flavor }} build_macosx
|
||||
mv build_iphoneos_${{ matrix.flavor }} build_iphoneos
|
||||
mv build_iphonesimulator_${{ matrix.flavor }} build_iphonesimulator
|
||||
mv build_catalyst_${{ matrix.flavor }} build_catalyst
|
||||
mv build_xros_${{ matrix.flavor }} build_xros
|
||||
mv build_xrsimulator_${{ matrix.flavor }} build_xrsimulator
|
||||
- name: Prepare destroot folder
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
. ./utils/build-apple-framework.sh
|
||||
prepare_dest_root_for_ci
|
||||
- name: Create fat framework for iOS
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
echo "[HERMES] Creating the universal framework"
|
||||
./utils/build-ios-framework.sh build_framework
|
||||
- name: Package the Hermes Apple frameworks
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
BUILD_TYPE="${{ matrix.flavor }}"
|
||||
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
|
||||
|
||||
TARBALL_OUTPUT_DIR=$(mktemp -d /tmp/hermes-tarball-output-XXXXXXXX)
|
||||
|
||||
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
|
||||
|
||||
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
|
||||
|
||||
TARBALL_OUTPUT_PATH=$(node ./packages/react-native/scripts/hermes/create-tarball.js \
|
||||
--inputDir ./packages/react-native/sdks/hermes \
|
||||
--buildType "$BUILD_TYPE" \
|
||||
--outputDir $TARBALL_OUTPUT_DIR)
|
||||
|
||||
echo "Hermes tarball saved to $TARBALL_OUTPUT_PATH"
|
||||
|
||||
mkdir -p $HERMES_TARBALL_ARTIFACTS_DIR
|
||||
cp $TARBALL_OUTPUT_PATH $HERMES_TARBALL_ARTIFACTS_DIR/.
|
||||
|
||||
mkdir -p /tmp/hermes/osx-bin/${{ matrix.flavor }}
|
||||
cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ matrix.flavor }}
|
||||
ls -lR /tmp/hermes/osx-bin/
|
||||
- name: Upload darwin artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-darwin-bin-${{ matrix.flavor }}
|
||||
path: /tmp/hermes/hermes-runtime-darwin
|
||||
- name: Upload osx-bin
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-osx-bin-${{ matrix.flavor }}
|
||||
path: /tmp/hermes/osx-bin
|
||||
- name: Create dSYM archive
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
FLAVOR=${{ matrix.flavor }}
|
||||
WORKING_DIR="/tmp/hermes_tmp/dSYM/$FLAVOR"
|
||||
|
||||
mkdir -p "$WORKING_DIR/macosx"
|
||||
mkdir -p "$WORKING_DIR/catalyst"
|
||||
mkdir -p "$WORKING_DIR/iphoneos"
|
||||
mkdir -p "$WORKING_DIR/iphonesimulator"
|
||||
mkdir -p "$WORKING_DIR/xros"
|
||||
mkdir -p "$WORKING_DIR/xrsimulator"
|
||||
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
|
||||
DSYM_FILE_PATH=API/hermes/hermes.framework.dSYM
|
||||
cp -r build_macosx/$DSYM_FILE_PATH "$WORKING_DIR/macosx/"
|
||||
cp -r build_catalyst/$DSYM_FILE_PATH "$WORKING_DIR/catalyst/"
|
||||
cp -r build_iphoneos/$DSYM_FILE_PATH "$WORKING_DIR/iphoneos/"
|
||||
cp -r build_iphonesimulator/$DSYM_FILE_PATH "$WORKING_DIR/iphonesimulator/"
|
||||
cp -r build_xros/$DSYM_FILE_PATH "$WORKING_DIR/xros/"
|
||||
cp -r build_xrsimulator/$DSYM_FILE_PATH "$WORKING_DIR/xrsimulator/"
|
||||
|
||||
DEST_DIR="/tmp/hermes/dSYM/$FLAVOR"
|
||||
tar -C "$WORKING_DIR" -czvf "hermes.framework.dSYM" .
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
mv "hermes.framework.dSYM" "$DEST_DIR"
|
||||
- name: Upload hermes dSYM artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-dSYM-${{ matrix.flavor }}
|
||||
path: /tmp/hermes/dSYM/${{ matrix.flavor }}
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
|
||||
build_hermesc_linux:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y git openssh-client cmake build-essential \
|
||||
libreadline-dev libicu-dev jq zip python3
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build HermesC Linux
|
||||
uses: ./.github/actions/build-hermesc-linux
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Linux cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
key: v1-hermes-${{ github.job }}-linux-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
path: |
|
||||
/tmp/hermes/linux64-bin/
|
||||
/tmp/hermes/hermes/destroot/
|
||||
- name: Set up workspace
|
||||
run: |
|
||||
mkdir -p /tmp/hermes/linux64-bin
|
||||
- name: Build HermesC for Linux
|
||||
run: |
|
||||
if [ -f /tmp/hermes/linux64-bin/hermesc ]; then
|
||||
echo 'Skipping; Clean "/tmp/hermes/linux64-bin" to rebuild.'
|
||||
else
|
||||
cd /tmp/hermes
|
||||
cmake -S hermes -B build -DHERMES_STATIC_LINK=ON -DCMAKE_BUILD_TYPE=Release -DHERMES_ENABLE_TEST_SUITE=OFF \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DCMAKE_CXX_FLAGS=-s -DCMAKE_C_FLAGS=-s \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
|
||||
cmake --build build --target hermesc -j 4
|
||||
cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/.
|
||||
fi
|
||||
- name: Upload linux artifacts
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: hermes-linux-bin
|
||||
path: /tmp/hermes/linux64-bin
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_hermesc_windows:
|
||||
runs-on: windows-2019
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: 'D:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
|
||||
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
|
||||
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
|
||||
CMAKE_DIR: 'C:\Program Files\CMake\bin'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build HermesC Windows
|
||||
uses: ./.github/actions/build-hermesc-windows
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Windows cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
key: v2-hermes-${{ github.job }}-windows-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
path: |
|
||||
D:\tmp\hermes\win64-bin\
|
||||
D:\tmp\hermes\hermes\icu\
|
||||
D:\tmp\hermes\hermes\deps\
|
||||
D:\tmp\hermes\hermes\build_release\
|
||||
- name: setup-msbuild
|
||||
uses: microsoft/setup-msbuild@v1.3.2
|
||||
- name: Set up workspace
|
||||
run: |
|
||||
#New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\icu
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\deps
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\win64-bin
|
||||
#New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\hermes
|
||||
#New-Item -ItemType SymbolicLink -ErrorAction SilentlyContinue -Target tmp\hermes\hermes -Path $Env:HERMES_WS_DIR -Name hermes
|
||||
- name: Build HermesC for Windows
|
||||
run: |
|
||||
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
|
||||
choco install --no-progress cmake --version 3.14.7
|
||||
if (-not $?) { throw "Failed to install CMake" }
|
||||
|
||||
cd $Env:HERMES_WS_DIR\icu
|
||||
# If Invoke-WebRequest shows a progress bar, it will fail with
|
||||
# Win32 internal error "Access is denied" 0x5 occurred [...]
|
||||
$progressPreference = 'silentlyContinue'
|
||||
Invoke-WebRequest -Uri "$Env:ICU_URL" -OutFile "icu.zip"
|
||||
Expand-Archive -Path "icu.zip" -DestinationPath "."
|
||||
|
||||
cd $Env:HERMES_WS_DIR
|
||||
Copy-Item -Path "icu\bin64\icu*.dll" -Destination "deps"
|
||||
# Include MSVC++ 2015 redistributables
|
||||
Copy-Item -Path "c:\windows\system32\msvcp140.dll" -Destination "deps"
|
||||
Copy-Item -Path "c:\windows\system32\vcruntime140.dll" -Destination "deps"
|
||||
Copy-Item -Path "c:\windows\system32\vcruntime140_1.dll" -Destination "deps"
|
||||
|
||||
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
|
||||
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
|
||||
|
||||
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
|
||||
if (-not $?) { throw "Failed to configure Hermes" }
|
||||
echo "Running windows build..."
|
||||
cd build_release
|
||||
cmake --build . --target hermesc --config Release
|
||||
if (-not $?) { throw "Failed to build Hermes" }
|
||||
|
||||
echo "Copying hermesc.exe to win64-bin"
|
||||
cd $Env:HERMES_WS_DIR
|
||||
Copy-Item -Path "build_release\bin\Release\hermesc.exe" -Destination "win64-bin"
|
||||
# Include Windows runtime dependencies
|
||||
Copy-Item -Path "deps\*" -Destination "win64-bin"
|
||||
}
|
||||
else {
|
||||
Write-Host "Skipping; Clean c:\tmp\hermes\win64-bin to rebuild."
|
||||
}
|
||||
- name: Upload windows artifacts
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: hermes-win64-bin
|
||||
path: D:\tmp\hermes\win64-bin\
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_android:
|
||||
runs-on: 8-core-ubuntu
|
||||
@@ -507,17 +144,23 @@ jobs:
|
||||
env:
|
||||
TERM: "dumb"
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
|
||||
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup git safe folders
|
||||
run: git config --global --add safe.directory '*'
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Install dependencies
|
||||
run: yarn install --non-interactive
|
||||
- name: Set React Native Version
|
||||
run: node ./scripts/releases/set-rn-version.js --build-type ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
|
||||
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
|
||||
- name: Setup gradle
|
||||
uses: ./.github/actions/setup-gradle
|
||||
with:
|
||||
cache-read-only: "false"
|
||||
- name: Build and publish all the Android Artifacts to /tmp/maven-local
|
||||
run: |
|
||||
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs.
|
||||
@@ -528,6 +171,11 @@ jobs:
|
||||
fi
|
||||
./gradlew publishAllToMavenTempLocal build -PenableWarningsAsErrors=true
|
||||
shell: bash
|
||||
- name: Upload Maven Artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: maven-local-build-android
|
||||
path: /tmp/maven-local
|
||||
- name: Upload test results
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
@@ -548,17 +196,22 @@ jobs:
|
||||
|
||||
build_npm_package:
|
||||
runs-on: 8-core-ubuntu
|
||||
needs: [set_release_type, prepare_hermes_workspace, build_hermes_macos, build_hermesc_linux, build_hermesc_windows,build_android]
|
||||
needs:
|
||||
[
|
||||
set_release_type,
|
||||
prepare_hermes_workspace,
|
||||
build_hermes_macos,
|
||||
build_hermesc_linux,
|
||||
build_hermesc_windows,
|
||||
build_android,
|
||||
]
|
||||
container:
|
||||
image: reactnativecommunity/react-native-android:latest
|
||||
env:
|
||||
TERM: "dumb"
|
||||
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs.
|
||||
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
|
||||
# Repeated here, as the environment key in this executor will overwrite the one in defaults
|
||||
PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: ${{ secrets.GITHUB_ANALYSISBOT_TOKEN_A }}
|
||||
PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: ${{ secrets.GITHUB_ANALYSISBOT_TOKEN_B }}
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
env:
|
||||
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
|
||||
@@ -570,18 +223,20 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup git safe folders
|
||||
run: git config --global --add safe.directory '*'
|
||||
- name: Create /tmp/hermes/osx-bin directory
|
||||
run: mkdir -p /tmp/hermes/osx-bin
|
||||
- name: Download osx-bin release artifacts
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
name: hermes-osx-bin-Release
|
||||
path: /tmp/hermes/osx-bin
|
||||
path: /tmp/hermes/osx-bin/Release
|
||||
- name: Download osx-bin debug artifacts
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
name: hermes-osx-bin-Debug
|
||||
path: /tmp/hermes/osx-bin
|
||||
path: /tmp/hermes/osx-bin/Debug
|
||||
- name: Download darwin-bin release artifacts
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
@@ -613,8 +268,8 @@ jobs:
|
||||
name: hermes-linux-bin
|
||||
path: /tmp/hermes/linux64-bin
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
id: cache-setup
|
||||
uses: ./.github/actions/cache-setup
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
@@ -657,6 +312,8 @@ jobs:
|
||||
cp $HERMES_WS_DIR/dSYM/Release/hermes.framework.dSYM ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-framework-dSYM-release.tar.gz
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Setup gradle
|
||||
uses: ./.github/actions/setup-gradle
|
||||
- name: Install dependencies
|
||||
run: yarn install --non-interactive
|
||||
- name: Build packages
|
||||
@@ -666,7 +323,6 @@ jobs:
|
||||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.GHA_NPM_TOKEN }}" > ~/.npmrc
|
||||
- name: Publish NPM
|
||||
run: |
|
||||
git config --global --add safe.directory /__w/react-native/react-native
|
||||
echo "GRADLE_OPTS = $GRADLE_OPTS"
|
||||
export ORG_GRADLE_PROJECT_reactNativeArchitectures="armeabi-v7a,arm64-v8a,x86,x86_64"
|
||||
node ./scripts/releases-ci/publish-npm.js -t release
|
||||
@@ -698,6 +354,48 @@ jobs:
|
||||
with:
|
||||
name: react-native-package
|
||||
path: build
|
||||
- name: Publish @react-native-community/template
|
||||
if: needs.set_release_type.outputs.RELEASE_TYPE == 'release'
|
||||
id: publish-to-npm
|
||||
run: |
|
||||
COMMIT_MSG=$(git log -n1 --pretty=%B);
|
||||
if grep -q '#publish-packages-to-npm&latest' <<< "$COMMIT_MSG"; then
|
||||
echo "TAG=latest" >> $GITHUB_OUTPUT
|
||||
IS_LATEST=true
|
||||
else
|
||||
IS_LATEST=false
|
||||
fi
|
||||
# Go from v0.75.0-rc.4 -> 0.75-stable, which is the template's branching scheme
|
||||
VERSION=$(grep -oE '\d+\.\d+' <<< "${{ github.ref_name }}" | { read version; echo "$version-stable" })
|
||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
curl -L -X POST https://api.github.com/repos/react-native-community/template/release.yaml/dispatches \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: Bearer $REACT_NATIVE_BOT_GITHUB_TOKEN" \
|
||||
-d "{\"ref\":\"$VERSION\",\"inputs\":{\"version\":\"${{ github.ref_name }}\",\"is_latest_on_npm\":\"$IS_LATEST\"}}\n"
|
||||
- name: Wait for template to be published
|
||||
if: needs.set_release_type.outputs.RELEASE_TYPE == 'release'
|
||||
timeout-minutes: 3
|
||||
env:
|
||||
VERSION: ${{ steps.publish-to-npm.outputs.VERSION }}
|
||||
TAG: ${{ steps.publish-to-npm.outputs.TAG }}
|
||||
run: |
|
||||
echo "Waiting until @react-native-community/template is published to npm"
|
||||
while true; do
|
||||
if curl -o /dev/null -s -f "https://registry.npmjs.org/@react-native-community/template/$VERSION"; then
|
||||
echo "Confirm that @react-native-community/template@$VERSION is published on npm"
|
||||
break
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
while [ "$TAG" == "latest" ]; do
|
||||
CURRENT=$(curl -s "https://registry.npmjs.org/react-native/latest" | jq -r '.version');
|
||||
if [ "$CURRENT" == "$VERSION" ]; then
|
||||
echo "Confirm that @react-native-community/template@latest == $VERSION on npm"
|
||||
break
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
- name: Update rn-diff-purge to generate upgrade-support diff
|
||||
if: needs.set_release_type.outputs.RELEASE_TYPE == 'release'
|
||||
run: |
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
name: Run E2E Tests
|
||||
# This workflow is used to trigger E2E tests on a PR when a comment is made
|
||||
# containing the text "#run-e2e-tests".
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
rebase:
|
||||
name: Trigger E2E Tests
|
||||
permissions:
|
||||
contents: write # for cirrus-actions/rebase to push code to rebase
|
||||
pull-requests: read # for cirrus-actions/rebase to get info about PR
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '#run-e2e-tests')
|
||||
steps:
|
||||
- name: Checkout the latest code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
|
||||
- name: Push empty commit
|
||||
run: |
|
||||
git commit -m "#run-e2e-tests" --allow-empty
|
||||
git push origin $(git branch --show-current)
|
||||
+99
-426
@@ -2,6 +2,7 @@ name: Test All
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
@@ -36,82 +37,33 @@ jobs:
|
||||
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
|
||||
BUILD_FROM_SOURCE: true
|
||||
outputs:
|
||||
react-native-version: ${{ steps.react-native-version.outputs.version }}
|
||||
hermes-version: ${{ steps.hermes-version.outputs.version }}
|
||||
react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }}
|
||||
hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Setup hermes version
|
||||
id: hermes-version
|
||||
run: |
|
||||
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
|
||||
|
||||
if [ -f "$HERMES_VERSION_FILE" ]; then
|
||||
echo "Hermes Version file found! Using this version for the build:"
|
||||
echo "VERSION=$(cat $HERMES_VERSION_FILE)" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "Hermes Version file not found!!!"
|
||||
echo "Using the last commit from main for the build:"
|
||||
HERMES_TAG_SHA=$(git ls-remote https://github.com/$GITHUB_REPOSITORY main | cut -f 1 | tr -d '[:space:]')
|
||||
echo "VERSION=$HERMES_TAG_SHA" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "Hermes commit is $HERMES_TAG_SHA"
|
||||
- name: Get react-native version
|
||||
id: react-native-version
|
||||
run: |
|
||||
VERSION=$(cat packages/react-native/package.json | jq -r '.version')
|
||||
# Save the react native version we are building in an output variable so we can use that file as part of the cache key.
|
||||
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
echo "React Native Version is $VERSION"
|
||||
- name: Cache hermes workspace
|
||||
uses: actions/cache@v4.0.0
|
||||
- name: Prepare Hermes Workspace
|
||||
id: prepare-hermes-workspace
|
||||
uses: ./.github/actions/prepare-hermes-workspace
|
||||
with:
|
||||
path: |
|
||||
/tmp/hermes/download/
|
||||
/tmp/hermes/hermes/
|
||||
key: v1-hermes-${{ steps.hermes-version.outputs.version }}-${{ github.run_number }}
|
||||
enableCrossOsArchive: true
|
||||
- name: Yarn- Install Dependencies
|
||||
run: yarn install --non-interactive
|
||||
- name: Download Hermes tarball
|
||||
run: |
|
||||
node packages/react-native/scripts/hermes/prepare-hermes-for-build ${{ github.event.pull_request.html_url }}
|
||||
cp packages/react-native/sdks/download/* $HERMES_WS_DIR/download/.
|
||||
cp -r packages/react-native/sdks/hermes/* $HERMES_WS_DIR/hermes/.
|
||||
|
||||
echo ${{ steps.hermes-version.outputs.version }}
|
||||
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
|
||||
HERMES_VERSION_FILE: ${{ env.HERMES_VERSION_FILE }}
|
||||
BUILD_FROM_SOURCE: ${{ env.BUILD_FROM_SOURCE }}
|
||||
|
||||
build_hermesc_apple:
|
||||
runs-on: macos-13
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Cache hermes workspace
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: |
|
||||
/tmp/hermes/download/
|
||||
/tmp/hermes/hermes/
|
||||
key: v1-hermes-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ github.run_number }}
|
||||
enableCrossOsArchive: true
|
||||
- name: Setup Hermes workspace
|
||||
uses: ./.github/actions/setup_hermes_workspace
|
||||
- name: Hermes apple cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_host_hermesc
|
||||
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Build HermesC Apple
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
. ./utils/build-apple-framework.sh
|
||||
build_host_hermesc_if_needed
|
||||
uses: ./.github/actions/build-hermesc-apple
|
||||
with:
|
||||
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_apple_slices_hermes:
|
||||
runs-on: macos-14
|
||||
@@ -120,7 +72,9 @@ jobs:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin
|
||||
continue-on-error: true
|
||||
IOS_DEPLOYMENT_TARGET: "13.4"
|
||||
XROS_DEPLOYMENT_TARGET: "1.0"
|
||||
MAC_DEPLOYMENT_TARGET: "10.15"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -129,81 +83,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build Slice
|
||||
uses: ./.github/actions/build-apple-slices-hermes
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Setup Hermes workspace
|
||||
uses: ./.github/actions/setup_hermes_workspace
|
||||
- name: Check if the required artifacts already exist
|
||||
id: check_if_apple_artifacts_are_there
|
||||
run: |
|
||||
FLAVOR="${{ matrix.flavor }}"
|
||||
echo "Flavor is $FLAVOR"
|
||||
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
|
||||
DSYM="/tmp/hermes/dSYM/$FLAVOR"
|
||||
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
|
||||
|
||||
if [[ -d "$OSX_BIN" ]] && \
|
||||
[[ -d "$DSYM" ]] && \
|
||||
[[ -f "$HERMES" ]]; then
|
||||
|
||||
echo "Artifacts are there!"
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Build the Hermes ${{ matrix.slice }} frameworks
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
SLICE=${{ matrix.slice }}
|
||||
FLAVOR=${{ matrix.flavor }}
|
||||
FINAL_PATH=build_"$SLICE"_"$FLAVOR"
|
||||
echo "Final path for this slice is: $FINAL_PATH"
|
||||
|
||||
if [[ -d "$FINAL_PATH" ]]; then
|
||||
echo "[HERMES] Skipping! Found the requested slice at $FINAL_PATH".
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$ARTIFACTS_EXIST" ]]; then
|
||||
echo "[HERMES] Skipping! Artifacts exists already."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$SLICE" == "macosx" ]]; then
|
||||
echo "[HERMES] Building Hermes for MacOS"
|
||||
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-mac-framework.sh
|
||||
else
|
||||
echo "[HERMES] Building Hermes for iOS: $SLICE"
|
||||
BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-ios-framework.sh "$SLICE"
|
||||
fi
|
||||
|
||||
echo "Moving from build_$SLICE to $FINAL_PATH"
|
||||
mv build_"$SLICE" "$FINAL_PATH"
|
||||
|
||||
# check whether everything is there
|
||||
if [[ -d "$FINAL_PATH/API/hermes/hermes.framework" ]]; then
|
||||
echo "Successfully built hermes.framework for $SLICE in $FLAVOR"
|
||||
else
|
||||
echo "Failed to built hermes.framework for $SLICE in $FLAVOR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -d "$FINAL_PATH/API/hermes/hermes.framework.dSYM" ]]; then
|
||||
echo "Successfully built hermes.framework.dSYM for $SLICE in $FLAVOR"
|
||||
else
|
||||
echo "Failed to built hermes.framework.dSYM for $SLICE in $FLAVOR"
|
||||
echo "Please try again"
|
||||
exit 1
|
||||
fi
|
||||
- name: Save slice cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
SLICE: ${{ matrix.slice}}
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_hermes_macos:
|
||||
runs-on: macos-13
|
||||
@@ -219,164 +105,12 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build Hermes MacOS
|
||||
uses: ./.github/actions/build-hermes-macos
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Setup Hermes workspace
|
||||
uses: ./.github/actions/setup_hermes_workspace
|
||||
- name: Check if the required artifacts already exist
|
||||
id: check_if_apple_artifacts_are_there
|
||||
run: |
|
||||
FLAVOR="${{ matrix.flavor }}"
|
||||
echo "Flavor is $FLAVOR"
|
||||
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
|
||||
DSYM="/tmp/hermes/dSYM/$FLAVOR"
|
||||
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
|
||||
|
||||
if [[ -d "$OSX_BIN" ]] && \
|
||||
[[ -d "$DSYM" ]] && \
|
||||
[[ -f "$HERMES" ]]; then
|
||||
|
||||
echo "Artifacts are there!"
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Yarn- Install Dependencies
|
||||
run: yarn install --non-interactive
|
||||
- name: Slice cache macosx
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-macosx-${{ matrix.flavor }}
|
||||
- name: Slice cache iphoneos
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphoneos-${{ matrix.flavor }}
|
||||
- name: Slice cache iphonesimulator
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphonesimulator-${{ matrix.flavor }}
|
||||
- name: Slice cache catalyst
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-catalyst-${{ matrix.flavor }}
|
||||
- name: Slice cache xros
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xros-${{ matrix.flavor }}
|
||||
- name: Slice cache xrsimulator
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }}
|
||||
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xrsimulator-${{ matrix.flavor }}
|
||||
- name: Move back build folders
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
ls -l ./packages/react-native/sdks/hermes
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
mv build_macosx_${{ matrix.flavor }} build_macosx
|
||||
mv build_iphoneos_${{ matrix.flavor }} build_iphoneos
|
||||
mv build_iphonesimulator_${{ matrix.flavor }} build_iphonesimulator
|
||||
mv build_catalyst_${{ matrix.flavor }} build_catalyst
|
||||
mv build_xros_${{ matrix.flavor }} build_xros
|
||||
mv build_xrsimulator_${{ matrix.flavor }} build_xrsimulator
|
||||
- name: Prepare destroot folder
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
. ./utils/build-apple-framework.sh
|
||||
prepare_dest_root_for_ci
|
||||
- name: Create fat framework for iOS
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
echo "[HERMES] Creating the universal framework"
|
||||
./utils/build-ios-framework.sh build_framework
|
||||
- name: Package the Hermes Apple frameworks
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
BUILD_TYPE="${{ matrix.flavor }}"
|
||||
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
|
||||
|
||||
TARBALL_OUTPUT_DIR=$(mktemp -d /tmp/hermes-tarball-output-XXXXXXXX)
|
||||
|
||||
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
|
||||
|
||||
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
|
||||
|
||||
TARBALL_OUTPUT_PATH=$(node ./packages/react-native/scripts/hermes/create-tarball.js \
|
||||
--inputDir ./packages/react-native/sdks/hermes \
|
||||
--buildType "$BUILD_TYPE" \
|
||||
--outputDir $TARBALL_OUTPUT_DIR)
|
||||
|
||||
echo "Hermes tarball saved to $TARBALL_OUTPUT_PATH"
|
||||
|
||||
mkdir -p $HERMES_TARBALL_ARTIFACTS_DIR
|
||||
cp $TARBALL_OUTPUT_PATH $HERMES_TARBALL_ARTIFACTS_DIR/.
|
||||
|
||||
mkdir -p /tmp/hermes/osx-bin/${{ matrix.flavor }}
|
||||
cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ matrix.flavor }}
|
||||
ls -lR /tmp/hermes/osx-bin/
|
||||
- name: Upload darwin artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-darwin-bin-${{ matrix.flavor }}
|
||||
path: /tmp/hermes/hermes-runtime-darwin
|
||||
- name: Upload osx-bin
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-osx-bin-${{ matrix.flavor }}
|
||||
path: /tmp/hermes/osx-bin
|
||||
- name: Create dSYM archive
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != true }}
|
||||
run: |
|
||||
FLAVOR=${{ matrix.flavor }}
|
||||
WORKING_DIR="/tmp/hermes_tmp/dSYM/$FLAVOR"
|
||||
|
||||
mkdir -p "$WORKING_DIR/macosx"
|
||||
mkdir -p "$WORKING_DIR/catalyst"
|
||||
mkdir -p "$WORKING_DIR/iphoneos"
|
||||
mkdir -p "$WORKING_DIR/iphonesimulator"
|
||||
mkdir -p "$WORKING_DIR/xros"
|
||||
mkdir -p "$WORKING_DIR/xrsimulator"
|
||||
|
||||
cd ./packages/react-native/sdks/hermes || exit 1
|
||||
|
||||
DSYM_FILE_PATH=API/hermes/hermes.framework.dSYM
|
||||
cp -r build_macosx/$DSYM_FILE_PATH "$WORKING_DIR/macosx/"
|
||||
cp -r build_catalyst/$DSYM_FILE_PATH "$WORKING_DIR/catalyst/"
|
||||
cp -r build_iphoneos/$DSYM_FILE_PATH "$WORKING_DIR/iphoneos/"
|
||||
cp -r build_iphonesimulator/$DSYM_FILE_PATH "$WORKING_DIR/iphonesimulator/"
|
||||
cp -r build_xros/$DSYM_FILE_PATH "$WORKING_DIR/xros/"
|
||||
cp -r build_xrsimulator/$DSYM_FILE_PATH "$WORKING_DIR/xrsimulator/"
|
||||
|
||||
DEST_DIR="/tmp/hermes/dSYM/$FLAVOR"
|
||||
tar -C "$WORKING_DIR" -czvf "hermes.framework.dSYM" .
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
mv "hermes.framework.dSYM" "$DEST_DIR"
|
||||
- name: Upload hermes dSYM artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: hermes-dSYM-${{ matrix.flavor }}
|
||||
path: /tmp/hermes/dSYM/${{ matrix.flavor }}
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
|
||||
test_ios_rntester_ruby_3_2_0:
|
||||
runs-on: macos-13
|
||||
@@ -389,11 +123,12 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Run it
|
||||
uses: ./.github/actions/test_ios_rntester
|
||||
uses: ./.github/actions/test-ios-rntester
|
||||
with:
|
||||
ruby-version: "3.2.0"
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
test_ios_rntester_dynamic_frameworks:
|
||||
runs-on: macos-13
|
||||
needs:
|
||||
@@ -410,7 +145,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Run it
|
||||
uses: ./.github/actions/test_ios_rntester
|
||||
uses: ./.github/actions/test-ios-rntester
|
||||
with:
|
||||
jsengine: ${{ matrix.jsengine }}
|
||||
use-frameworks: DynamicFrameworks
|
||||
@@ -434,11 +169,11 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Run it
|
||||
uses: ./.github/actions/test_ios_rntester
|
||||
uses: ./.github/actions/test-ios-rntester
|
||||
with:
|
||||
jsengine: ${{ matrix.jsengine }}
|
||||
architecture: ${{ matrix.architecture }}
|
||||
run-unit-tests: true
|
||||
run-unit-tests: "false"
|
||||
use-frameworks: StaticLibraries
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
@@ -446,128 +181,37 @@ jobs:
|
||||
build_hermesc_linux:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y git openssh-client cmake build-essential \
|
||||
libreadline-dev libicu-dev jq zip python3
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build HermesC Linux
|
||||
uses: ./.github/actions/build-hermesc-linux
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Linux cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
key: v1-hermes-${{ github.job }}-linux-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
path: |
|
||||
/tmp/hermes/linux64-bin/
|
||||
/tmp/hermes/hermes/destroot/
|
||||
- name: Set up workspace
|
||||
run: |
|
||||
mkdir -p /tmp/hermes/linux64-bin
|
||||
- name: Build HermesC for Linux
|
||||
run: |
|
||||
if [ -f /tmp/hermes/linux64-bin/hermesc ]; then
|
||||
echo 'Skipping; Clean "/tmp/hermes/linux64-bin" to rebuild.'
|
||||
else
|
||||
cd /tmp/hermes
|
||||
cmake -S hermes -B build -DHERMES_STATIC_LINK=ON -DCMAKE_BUILD_TYPE=Release -DHERMES_ENABLE_TEST_SUITE=OFF \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DCMAKE_CXX_FLAGS=-s -DCMAKE_C_FLAGS=-s \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
|
||||
cmake --build build --target hermesc -j 4
|
||||
cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/.
|
||||
fi
|
||||
- name: Upload linux artifacts
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: hermes-linux-bin
|
||||
path: /tmp/hermes/linux64-bin
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_hermesc_windows:
|
||||
runs-on: windows-2019
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: 'D:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
|
||||
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
|
||||
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
|
||||
CMAKE_DIR: 'C:\Program Files\CMake\bin'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Build HermesC Windows
|
||||
uses: ./.github/actions/build-hermesc-windows
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Windows cache
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
key: v2-hermes-${{ github.job }}-windows-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
path: |
|
||||
D:\tmp\hermes\win64-bin\
|
||||
D:\tmp\hermes\hermes\icu\
|
||||
D:\tmp\hermes\hermes\deps\
|
||||
D:\tmp\hermes\hermes\build_release\
|
||||
- name: setup-msbuild
|
||||
uses: microsoft/setup-msbuild@v1.3.2
|
||||
- name: Set up workspace
|
||||
run: |
|
||||
#New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\icu
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\deps
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\win64-bin
|
||||
#New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\hermes
|
||||
#New-Item -ItemType SymbolicLink -ErrorAction SilentlyContinue -Target tmp\hermes\hermes -Path $Env:HERMES_WS_DIR -Name hermes
|
||||
- name: Build HermesC for Windows
|
||||
run: |
|
||||
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
|
||||
choco install --no-progress cmake --version 3.14.7
|
||||
if (-not $?) { throw "Failed to install CMake" }
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
cd $Env:HERMES_WS_DIR\icu
|
||||
# If Invoke-WebRequest shows a progress bar, it will fail with
|
||||
# Win32 internal error "Access is denied" 0x5 occurred [...]
|
||||
$progressPreference = 'silentlyContinue'
|
||||
Invoke-WebRequest -Uri "$Env:ICU_URL" -OutFile "icu.zip"
|
||||
Expand-Archive -Path "icu.zip" -DestinationPath "."
|
||||
|
||||
cd $Env:HERMES_WS_DIR
|
||||
Copy-Item -Path "icu\bin64\icu*.dll" -Destination "deps"
|
||||
# Include MSVC++ 2015 redistributables
|
||||
Copy-Item -Path "c:\windows\system32\msvcp140.dll" -Destination "deps"
|
||||
Copy-Item -Path "c:\windows\system32\vcruntime140.dll" -Destination "deps"
|
||||
Copy-Item -Path "c:\windows\system32\vcruntime140_1.dll" -Destination "deps"
|
||||
|
||||
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
|
||||
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
|
||||
|
||||
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
|
||||
if (-not $?) { throw "Failed to configure Hermes" }
|
||||
echo "Running windows build..."
|
||||
cd build_release
|
||||
cmake --build . --target hermesc --config Release
|
||||
if (-not $?) { throw "Failed to build Hermes" }
|
||||
|
||||
echo "Copying hermesc.exe to win64-bin"
|
||||
cd $Env:HERMES_WS_DIR
|
||||
Copy-Item -Path "build_release\bin\Release\hermesc.exe" -Destination "win64-bin"
|
||||
# Include Windows runtime dependencies
|
||||
Copy-Item -Path "deps\*" -Destination "win64-bin"
|
||||
}
|
||||
else {
|
||||
Write-Host "Skipping; Clean c:\tmp\hermes\win64-bin to rebuild."
|
||||
}
|
||||
- name: Upload windows artifacts
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: hermes-win64-bin
|
||||
path: D:\tmp\hermes\win64-bin\
|
||||
|
||||
build_android:
|
||||
runs-on: 8-core-ubuntu
|
||||
@@ -577,17 +221,23 @@ jobs:
|
||||
env:
|
||||
TERM: "dumb"
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
|
||||
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup git safe folders
|
||||
run: git config --global --add safe.directory '*'
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Install dependencies
|
||||
run: yarn install --non-interactive
|
||||
- name: Set React Native Version
|
||||
run: node ./scripts/releases/set-rn-version.js --build-type ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
|
||||
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
|
||||
- name: Setup gradle
|
||||
uses: ./.github/actions/setup-gradle
|
||||
with:
|
||||
cache-read-only: "false"
|
||||
- name: Build and publish all the Android Artifacts to /tmp/maven-local
|
||||
run: |
|
||||
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs.
|
||||
@@ -598,6 +248,11 @@ jobs:
|
||||
fi
|
||||
./gradlew publishAllToMavenTempLocal build -PenableWarningsAsErrors=true
|
||||
shell: bash
|
||||
- name: Upload Maven Artifacts
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: maven-local-build-android
|
||||
path: /tmp/maven-local
|
||||
- name: Upload test results
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
@@ -634,9 +289,6 @@ jobs:
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs.
|
||||
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
|
||||
# Repeated here, as the environment key in this executor will overwrite the one in defaults
|
||||
PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: ${{ secrets.GITHUB_ANALYSISBOT_TOKEN_A }}
|
||||
PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: ${{ secrets.GITHUB_ANALYSISBOT_TOKEN_B }}
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
steps:
|
||||
- name: Add github.com to SSH known hosts
|
||||
@@ -645,18 +297,20 @@ jobs:
|
||||
echo '|1|If6MU203eXTaaWL678YEfWkVMrw=|kqLeIAyTy8pzpj8x8Ae4Fr8Mtlc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup git safe folders
|
||||
run: git config --global --add safe.directory '*'
|
||||
- name: Create /tmp/hermes/osx-bin directory
|
||||
run: mkdir -p /tmp/hermes/osx-bin
|
||||
- name: Download osx-bin release artifacts
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
name: hermes-osx-bin-Release
|
||||
path: /tmp/hermes/osx-bin
|
||||
path: /tmp/hermes/osx-bin/Release
|
||||
- name: Download osx-bin debug artifacts
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
name: hermes-osx-bin-Debug
|
||||
path: /tmp/hermes/osx-bin
|
||||
path: /tmp/hermes/osx-bin/Debug
|
||||
- name: Download darwin-bin release artifacts
|
||||
uses: actions/download-artifact@v4.1.3
|
||||
with:
|
||||
@@ -689,12 +343,6 @@ jobs:
|
||||
path: /tmp/hermes/linux64-bin
|
||||
- name: Show /tmp/hermes directory
|
||||
run: ls -lR /tmp/hermes
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
- name: Copy Hermes binaries
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -735,6 +383,8 @@ jobs:
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
- name: Setup gradle
|
||||
uses: ./.github/actions/setup-gradle
|
||||
- name: Install dependencies
|
||||
run: yarn install --non-interactive
|
||||
- name: Build packages
|
||||
@@ -747,11 +397,6 @@ jobs:
|
||||
- name: Publish NPM
|
||||
shell: bash
|
||||
run: |
|
||||
# The checkout command puts react-native in a folder that is not "safe" for git
|
||||
# Every git command run in an unsafe folder fails. We need to pick the current commit to use it as part of the version
|
||||
# The following line marks the folder where react-native lives as "safe"
|
||||
git config --global --add safe.directory /__w/react-native/react-native
|
||||
|
||||
echo "GRADLE_OPTS = $GRADLE_OPTS"
|
||||
# We can't have a separate step because each command is executed in a separate shell
|
||||
# so variables exported in a command are not visible in another.
|
||||
@@ -798,7 +443,7 @@ jobs:
|
||||
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${{ github.ref_name }}\" }}"
|
||||
|
||||
test_android_helloworld:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: 4-core-ubuntu
|
||||
needs: prepare_hermes_workspace
|
||||
container:
|
||||
image: reactnativecommunity/react-native-android:latest
|
||||
@@ -820,9 +465,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup git safe folders
|
||||
run: git config --global --add safe.directory '*'
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
id: cache-setup
|
||||
uses: ./.github/actions/cache-setup
|
||||
with:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
@@ -874,8 +521,8 @@ jobs:
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4.3.1
|
||||
with:
|
||||
name: template-apk-${{ matrix.flavor }}-${{ matrix.architecture }}-${{ matrix.jsengine }}
|
||||
path: ./app/build/outputs/apk/
|
||||
name: helloworld-apk-${{ matrix.flavor }}-${{ matrix.architecture }}-${{ matrix.jsengine }}
|
||||
path: ./packages/helloworld/android/app/build/outputs/apk/
|
||||
compression-level: 0
|
||||
|
||||
test_ios_helloworld_with_ruby_3_2_0:
|
||||
@@ -888,7 +535,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- uses: ./.github/actions/test_ios_helloworld
|
||||
- uses: ./.github/actions/test-ios-helloworld
|
||||
with:
|
||||
ruby-version: 3.2.0
|
||||
architecture: NewArch
|
||||
@@ -916,10 +563,36 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- uses: ./.github/actions/test_ios_helloworld
|
||||
- uses: ./.github/actions/test-ios-helloworld
|
||||
with:
|
||||
flavor: ${{ matrix.flavor }}
|
||||
jsengine: ${{ matrix.jsengine }}
|
||||
use-frameworks: ${{ matrix.use_frameworks }}
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
test_js:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ["20", "18"]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Test JS
|
||||
uses: ./.github/actions/test-js
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Run all the Linters
|
||||
uses: ./.github/actions/lint
|
||||
with:
|
||||
github-token: ${{ env.GH_TOKEN }}
|
||||
|
||||
@@ -159,9 +159,5 @@ vendor/
|
||||
# Temporary files created by Metro to check the health of the file watcher
|
||||
.metro-health-check*
|
||||
|
||||
# E2E files
|
||||
/packages/rn-tester-e2e/apps/*.apk
|
||||
/packages/rn-tester-e2e/apps/*.app
|
||||
|
||||
# CircleCI
|
||||
.circleci/generated_config.yml
|
||||
|
||||
+493
@@ -1,5 +1,476 @@
|
||||
# Changelog
|
||||
|
||||
## v0.75.0-rc.4
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade[react-devtools-core]: ^5.3.1 ([2617ec5570](https://github.com/facebook/react-native/commit/2617ec55704d6aaa057fc20dc7e82235e1b3a799) by [@hoxyq](https://github.com/hoxyq))
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Android specific
|
||||
|
||||
- Fix dynamic_cast (RTTI) for ShadowNodeWrapper when accessed by third-party libraries again ([ea958c69f6](https://github.com/facebook/react-native/commit/ea958c69f624be67c770384c203f86255c1eebec) by [@tomekzaw](https://github.com/tomekzaw))
|
||||
- Fixed build from source failing due to a missing file ([b2898540c9](https://github.com/facebook/react-native/commit/b2898540c9ba3616f7bb8f9d3d621be1fbba0d85) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
- Use `JvmStatic` annotations for all methods from `AndroidUnicodeUtils.kt` ([54dadd7bda](https://github.com/facebook/react-native/commit/54dadd7bda0431548760aab0fade57f083d716a8) by [@WoLewicki](https://github.com/WoLewicki))
|
||||
|
||||
## v0.75.0-rc.3
|
||||
|
||||
### Breaking
|
||||
|
||||
- Removed the template from react-native into react-native-community/template ([07abfceae1](https://github.com/facebook/react-native/commit/07abfceae117edc8ed205fe1ebaef89ce3041386) by [@blakef](https://github.com/blakef))
|
||||
- Update `Share.share()`'s argument types to be more explicit. ([8b53d41a88](https://github.com/facebook/react-native/commit/8b53d41a88c3c7c83183baa46be307102aa90d54))
|
||||
- Make getContentOriginOffset to know info about if call-site want transform or not ([ce588db63f](https://github.com/facebook/react-native/commit/ce588db63fb6510b8c06b85a82008a72c778792d) by [@realsoelynn](https://github.com/realsoelynn))
|
||||
- Use hasteModuleName for C++ Turbo Module enums ([b7fc5867f2](https://github.com/facebook/react-native/commit/b7fc5867f2f8248db8230ce3602077547ca971a1) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- Use hasteModuleName for C++ Turbo Module structs ([07261d0408](https://github.com/facebook/react-native/commit/07261d0408e0250738504914ed931e71b838450e) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- Don't support 'float' enums in Turbo Modules ([536edf3726](https://github.com/facebook/react-native/commit/536edf3726c7de161bca5075110eaad0bd58c08e) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- Remove executeAsynchronously and executeSynchronously_CAN_DEADLOCK ([8b1a01610c](https://github.com/facebook/react-native/commit/8b1a01610c256beab43b093ced4f22eafbb943d9) by [@philIip](https://github.com/philIip))
|
||||
- Delete JSIModule ([73b4d67a78](https://github.com/facebook/react-native/commit/73b4d67a78e003d62c660cf3c710e01b29512c4a) by [@arushikesarwani94](https://github.com/arushikesarwani94))
|
||||
- [Typescript] Transform TouchableHighlight from JS class to ForwardRef component ([401f2fbb14](https://github.com/facebook/react-native/commit/401f2fbb14b1cfea93220810cce79b47720ecc72) by [@retyui](https://github.com/retyui))
|
||||
- [Typescript] Transform `TouchableOpacity` from JS `class` to `ForwardRef` component ([3d00549399](https://github.com/facebook/react-native/commit/3d0054939929608d317dc1e75a21dd20b9930eda) by [@retyui](https://github.com/retyui))
|
||||
- JsErrorHandler: Rename JsErrorHandlingFunc to OnJsError ([2e3f2268dc](https://github.com/facebook/react-native/commit/2e3f2268dccff379cbf0c2767465c8d20c38fdc5) by [@RSNara](https://github.com/RSNara))
|
||||
- JsErrorHandler: Rename handleJsError to handleFatalError ([c041b9f40f](https://github.com/facebook/react-native/commit/c041b9f40f092d981fdfa01cd5dc3cbe6e874b5e) by [@RSNara](https://github.com/RSNara))
|
||||
- RN ESLint config no longer runs Prettier during ESLint ([727f30bd0b](https://github.com/facebook/react-native/commit/727f30bd0b27ff168e6a6556a9ffbc7e42dbb8f0) by [@gaearon](https://github.com/gaearon))
|
||||
- Remove unused imports (folly/dynamic.h) from ReactPrimitives.h ([4fd95b6e02](https://github.com/facebook/react-native/commit/4fd95b6e02c82386ad85cea51f118f8055e4eb50) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- Make `LongLivedObjectCollection::get` accept a Runtime reference as parameter. ([86a52cc2dc](https://github.com/facebook/react-native/commit/86a52cc2dc294131e138b1f6ee14b3e56e8c8572) by [@fabriziocucci](https://github.com/fabriziocucci))
|
||||
- Make `LongLivedObject` constructor accept a `Runtime` reference. ([3706bf077e](https://github.com/facebook/react-native/commit/3706bf077e62b82a8c15874ac1ee6f0a7497468d) by [@fabriziocucci](https://github.com/fabriziocucci))
|
||||
- Native modules using the codegen now throw an error when called with `null` for optional but not nullable arguments. ([67b9628af5](https://github.com/facebook/react-native/commit/67b9628af588e8fc778d732fc387dbd48acf705e) by [@rubennorte](https://github.com/rubennorte))
|
||||
|
||||
#### Android specific
|
||||
|
||||
- Removing `ReactJsExceptionHandler` param from ReactHostImpl() constructor and providing a default private implementation ([fe7e7a015f](https://github.com/facebook/react-native/commit/fe7e7a015f30697c4ccffb2ba6474611efb4c08a) by [@alanleedev](https://github.com/alanleedev))
|
||||
- Set and require `android:supportsRtl="true"` for RTL layout ([82c6f8a580](https://github.com/facebook/react-native/commit/82c6f8a58056cfa163a61a4e6668a54625b15d06) by [@NickGerleman](https://github.com/NickGerleman))
|
||||
- Enable flex gap percentage value for RN. ([41a14962fc](https://github.com/facebook/react-native/commit/41a14962fc7adaf434f1634b17f3d66261e30a9f) by [@realsoelynn](https://github.com/realsoelynn))
|
||||
- `DevSupportManagerFactory.create()` changed to take an additional parameter of type `PausedInDebuggerOverlayManager` (nullable) ([1d26907ca4](https://github.com/facebook/react-native/commit/1d26907ca4d00cfa52f6395624b3121a7e96aca1) by [@motiz88](https://github.com/motiz88))
|
||||
- Deprecate `ReactViewBackgroundDrawable` in favor of `CSSBackgroundDrawable` ([d7766fa927](https://github.com/facebook/react-native/commit/d7766fa9273ac47dc28935973b0402345b707885) by [@NickGerleman](https://github.com/NickGerleman))
|
||||
- Make the app responsible for returning core turbomodule jsi hostobjects ([7facb32f30](https://github.com/facebook/react-native/commit/7facb32f30d17eb27f870dd531d3dc7ebe4532f6) by [@RSNara](https://github.com/RSNara))
|
||||
- Make ReactApplicationContext and ReactContext abstract. Please instantiate BridgeReactContext instead (bridge mode). Or BridgelessReactContext instead (bridgeless mode). ([e69f6755c8](https://github.com/facebook/react-native/commit/e69f6755c8d73e412acc444fbb1d36cad472e1bc) by [@RSNara](https://github.com/RSNara))
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- Remove `getSurfacePresenter` and `getModuleRegistry` from RCTHost ([f19371f28d](https://github.com/facebook/react-native/commit/f19371f28ddbb660ed08a3e38aef85f27f0876a7) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Remove unused RCTImageLoadingPerfInstrumentationEnabled ([f6b9a42985](https://github.com/facebook/react-native/commit/f6b9a429853aa5fcb7895a144c77b538e9017c1e) by [@realsoelynn](https://github.com/realsoelynn))
|
||||
- Remove `RCTRedBox` access through `RCTBridge` ([b5db214d2a](https://github.com/facebook/react-native/commit/b5db214d2a6cc6e2336edd423ceeaec06dd7b4fc) by [@realsoelynn](https://github.com/realsoelynn))
|
||||
- Remove EventPriority class and always use the default EventPriority::AsynchronousBatched. This is potentially a breaking change if something in OSS sets a different priority. If a build fails because of this, simply remove the use of EventPriority. ([55ed1c26ab](https://github.com/facebook/react-native/commit/55ed1c26ab7eda2a6ed1a7c41f3018b63fdd6a99) by [@sammy-SC](https://github.com/sammy-SC))
|
||||
- Rename BUILD_FROM_SOURCE to RCT_BUILD_HERMES_FROM_SOURCE ([6a1509f318](https://github.com/facebook/react-native/commit/6a1509f31858fad5aa1bdae4d6b0d10c5aebfaa4) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Rename React-Codegen to ReactCodegen ([6549216b76](https://github.com/facebook/react-native/commit/6549216b765b850a5751075ce270fcb78e76b778) by [@dmytrorykun](https://github.com/dmytrorykun))
|
||||
- Deleting deprecated didReceiveLocalNotification & didReceiveRemoteNotification callbacks on RCTPushNotificationManager ([7fffe692e7](https://github.com/facebook/react-native/commit/7fffe692e715004ac4fee6418dfe8a462e180b4b))
|
||||
- Deleting deprecated alertAction and repeatInterval in PushNotificationIOS ([410e3b5ebd](https://github.com/facebook/react-native/commit/410e3b5ebd70fee7243c9c1d9d217cd912c01018))
|
||||
- ([916dde4c60](https://github.com/facebook/react-native/commit/916dde4c604b4bba0e510ee1ab5c0cf5bd19ecbe) by [@philIip](https://github.com/philIip))
|
||||
|
||||
### Added
|
||||
|
||||
- - [GENERAL] [ADDED] - Implemented `requestIdleCallback` and `cancelIdleCallback` ([abfadc6083](https://github.com/facebook/react-native/commit/abfadc60832b791892f81ae3f25dd8ac10ff7a99) by [@robik](https://github.com/robik))
|
||||
- Core-cli-utils Android support ([89f16da89e](https://github.com/facebook/react-native/commit/89f16da89e5670f2c7fc21100c84607daa680336) by [@blakef](https://github.com/blakef))
|
||||
- Add `ReactNativeApplication.[enable,metadataUpdated]` CDP messages for reading host metadata ([aced4072cf](https://github.com/facebook/react-native/commit/aced4072cfebb1c41a06a2a25179c4c0bd173fe0) by [@huntie](https://github.com/huntie))
|
||||
- Turbo Module EventEmitters as functions ([42f136d00d](https://github.com/facebook/react-native/commit/42f136d00d0917bad8928839dea01e99bb0a1c98) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- Add C++ Turbo Module Event Emitter example ([6a3a305628](https://github.com/facebook/react-native/commit/6a3a3056283a4fad8c527ad3e0fd2d397e040f9e) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- Add EventEmitter code-gen support for C++ Turbo Modules ([fd618819c7](https://github.com/facebook/react-native/commit/fd618819c7fd61422019ee1899980cb5ec4b5440) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- Add EventEmitter C++ bridging type ([2a0a11256a](https://github.com/facebook/react-native/commit/2a0a11256a9919c70989aef00631da3a0f4afb25) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- Added missing `remove` methods for `Linking.addEventListener` and `AccessibilityInfo.addEventListener` Jest mocks ([2483c63017](https://github.com/facebook/react-native/commit/2483c63017b0d47c377bf67cb7c597e2d7e57897) by [@levibuzolic](https://github.com/levibuzolic))
|
||||
- Added AppRegistry.setRootViewStyleProvider ([dbdd4da14f](https://github.com/facebook/react-native/commit/dbdd4da14f9baf5f533e1e0ae9b98fa0c644ec14) by [@acoates-ms](https://github.com/acoates-ms))
|
||||
- Add changelog for 0.71.19 ([2168e3f515](https://github.com/facebook/react-native/commit/2168e3f5156f40267821440b520fe34d64deae08) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Support opening React DevTools from both Chrome DevTools frontend (React Native DevTools) and `react-devtools` standalone app ([430dd0be26](https://github.com/facebook/react-native/commit/430dd0be26c44821b2bdc2e818a81ac8a0b4b970) by [@hoxyq](https://github.com/hoxyq))
|
||||
- Add examples for the Pixel Ratio API, with all the available methods. ([b1576e5b1a](https://github.com/facebook/react-native/commit/b1576e5b1a407be91e8a8e48196d470e633cfd4b) by [@Biki-das](https://github.com/Biki-das))
|
||||
- Inspector proxy: Add ping/pong keepalive to debugger connections. ([704756352c](https://github.com/facebook/react-native/commit/704756352c3228037063991385bdac2544322225) by [@robhogan](https://github.com/robhogan))
|
||||
- Add examples for Combining Animated Values with the Animated API ([f7eaf63881](https://github.com/facebook/react-native/commit/f7eaf63881b23216c06ab3c81ea94d0312cd6a7b) by [@Biki-das](https://github.com/Biki-das))
|
||||
- Add ReactRootViewTagGenerator ([7dec625eca](https://github.com/facebook/react-native/commit/7dec625ecabdc23cbae37e0034d29bb7bff17755) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- RFC-0759 Move cli Android build into core ([62acc29896](https://github.com/facebook/react-native/commit/62acc29896b635c9e2d62d96c3d9533bb912b3a3) by [@blakef](https://github.com/blakef))
|
||||
- RFC-0759 Move cli iOS build into core ([98f0893f39](https://github.com/facebook/react-native/commit/98f0893f392f33af3a6b4d20d8fcb25a4aac4a92) by [@blakef](https://github.com/blakef))
|
||||
- [TypeScript] Allow to pass empty string as style ([1ea269f42c](https://github.com/facebook/react-native/commit/1ea269f42c2ef10e95fcf4751e71fba8bb5fe80d) by [@retyui](https://github.com/retyui))
|
||||
- [TypeScript] Add missing `Header` methods ([028615180b](https://github.com/facebook/react-native/commit/028615180b1fee8a4ab38a77163aa1fbfd68c6db) by [@retyui](https://github.com/retyui))
|
||||
- RFC-0759 Move cli clean into core ([6461dcd07b](https://github.com/facebook/react-native/commit/6461dcd07b681ab0069a81caccb0db136523bf7f) by [@blakef](https://github.com/blakef))
|
||||
- Skip generation of RNCore if the files have been already generated ([03ba46f7e6](https://github.com/facebook/react-native/commit/03ba46f7e69d802530d43b5516da5f77def23fbd) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Add function to only generate RNCore components ([9a27c08fb9](https://github.com/facebook/react-native/commit/9a27c08fb9c80eb4b65a8dc7bd96db09e301bf72) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Fixes SectionList Unmounting issue with separatorComponent on data addition and removal. ([6204ea36d3](https://github.com/facebook/react-native/commit/6204ea36d321c9e27757d5f36ff7e74fa68c54d5) by [@Biki-das](https://github.com/Biki-das))
|
||||
- `Image.getSize/getSizeWithHeaders` method returns a promise if you don't pass a `success` callback ([2c1bcbac81](https://github.com/facebook/react-native/commit/2c1bcbac81dc4506196c000d72d52b7e9c1c1ec1) by [@retyui](https://github.com/retyui))
|
||||
|
||||
#### Android specific
|
||||
|
||||
- Add the `ReactMarkerConstants.CONTENT_APPEARED` support on Android in bridgeless mode. ([5da9fdf8f1](https://github.com/facebook/react-native/commit/5da9fdf8f1780d8e491f46ce721861dd4e41992b) by [@Kudo](https://github.com/Kudo))
|
||||
- Adds a new `Image` prop `resizeMultiplier` to help increase quality of small images on low DPI devices ([b6c3433537](https://github.com/facebook/react-native/commit/b6c343353765d8b13344841613250214fe8783db))
|
||||
- Added getNativeModule(name) to ReactContext ([fdb2427a86](https://github.com/facebook/react-native/commit/fdb2427a863809b3637678f94105fed7eceef4f6) by [@javache](https://github.com/javache))
|
||||
- Added featureflag to avoid additional background threads during execution ([4324f08749](https://github.com/facebook/react-native/commit/4324f08749433cc175f85246791bf8946b6ef04a) by [@javache](https://github.com/javache))
|
||||
- Add BindingsInstaller for TurboModules ([d999e9bf1e](https://github.com/facebook/react-native/commit/d999e9bf1ee6cad513be38c4f2c795ab58f59aa4) by [@Kudo](https://github.com/Kudo))
|
||||
- Added suppression for deprecated getter/setter usage in StatusBarModule ([ac51deeaf4](https://github.com/facebook/react-native/commit/ac51deeaf43723927d5000bee30d7f0b7a16575e))
|
||||
- Percentage support in translate ([c13790ff1d](https://github.com/facebook/react-native/commit/c13790ff1d11ef95ad04f7d7dc87f09a9cbf7025) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
||||
- Update ColorPropConverter to support color function values ([4fb5573796](https://github.com/facebook/react-native/commit/4fb5573796e33868aefe4ebdcb8250e171af4989) by [@ryanlntn](https://github.com/ryanlntn))
|
||||
- Summary: Changelog: [Android][Added] add FBEndToEndDumpsysHelper stub to RNTester Android to be able to dump ViewHierarcies internally. ([99238d2bb9](https://github.com/facebook/react-native/commit/99238d2bb9c70736e7321a5b89d8638c56c0a4a4) by [@GijsWeterings](https://github.com/GijsWeterings))
|
||||
- Added null checks, marked null safety in StatusBarModule ([7349dabae2](https://github.com/facebook/react-native/commit/7349dabae2eae35c8c24d544d7abf0d710ca26f8))
|
||||
- Added support for using percentages when defining border radius related properties. ([181ed33ab0](https://github.com/facebook/react-native/commit/181ed33ab0ae3a67c5bcb73de315fb6d5e697388) by [@jorge-cab](https://github.com/jorge-cab))
|
||||
- ([69bb4fca44](https://github.com/facebook/react-native/commit/69bb4fca44c4a6c094b6c4c5c03a7e9aefa7ed1f) by [@philIip](https://github.com/philIip))
|
||||
- GetJavaScriptContextHolder() supported in BridgelessReactContext since it's supported in ReactContext[Bridge] ([dfa6519749](https://github.com/facebook/react-native/commit/dfa65197491cb3ddfaaeca68d6c47a5bfb93eb83) by [@arushikesarwani94](https://github.com/arushikesarwani94))
|
||||
- Allow bridgeless apps to register cxx modules via cxxreactpackages ([b9e52f0807](https://github.com/facebook/react-native/commit/b9e52f08073150f702b12dc5e38929e9651b806e) by [@RSNara](https://github.com/RSNara))
|
||||
- Extend Property Processor to support long props ([0a80270187](https://github.com/facebook/react-native/commit/0a80270187c05fe2da1f25fb8a8426fd4f03f8f2) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Add isWideColorGamutEnabled to ReactActivityDelegate ([0a9891a2f2](https://github.com/facebook/react-native/commit/0a9891a2f2bf8c18e00d7a9c0f299a4161417466) by [@ryanlntn](https://github.com/ryanlntn))
|
||||
- Update ColorPropConverter to support color function values ([fa7dbd578d](https://github.com/facebook/react-native/commit/fa7dbd578d6e0bd394591b30671aa0ff9bddf40c) by [@ryanlntn](https://github.com/ryanlntn))
|
||||
- Option to set a custom JSExceptionHandler instance ([098454d425](https://github.com/facebook/react-native/commit/098454d4250127a8b6dea8d8b36b2754953ed118))
|
||||
- Introduced ReactContext.hasReactInstance() to replace .hasCatalystInstance() ([3a3f3e6232](https://github.com/facebook/react-native/commit/3a3f3e6232d6eec7d8863a910e1f76a1c6003ccb) by [@RSNara](https://github.com/RSNara))
|
||||
- Add (optional) onPopupDismiss() callback for PopupMenuAndroid ([bc3e3360d1](https://github.com/facebook/react-native/commit/bc3e3360d1bd3fde9ab4d28c49757e3db0dad7f9) by [@alanleedev](https://github.com/alanleedev))
|
||||
- Introduce BridgeReactContext ([6386988de1](https://github.com/facebook/react-native/commit/6386988de1a55d082ffc8162571398ca8e3bafd5) by [@RSNara](https://github.com/RSNara))
|
||||
- Added `onUserLeaveHint` support into `ReactActivityDelegate` ([6450d08187](https://github.com/facebook/react-native/commit/6450d08187952c157b5998e7bdc08f4b17f73281) by [@behenate](https://github.com/behenate))
|
||||
- Added `onUserLeaveHint` support into `ReactActivityDelegate` ([3cf6c64a80](https://github.com/facebook/react-native/commit/3cf6c64a800f96e398ad928d32de21d9e0dfe915) by [@behenate](https://github.com/behenate))
|
||||
- Update bridge to handle long values ([0dc5c5f1f4](https://github.com/facebook/react-native/commit/0dc5c5f1f43701f396d2eb49bbabd2bfd2338cf4) by [@ryanlntn](https://github.com/ryanlntn))
|
||||
- Add 64 bit integer (long) value support to MapBuffer ([57ed0fb309](https://github.com/facebook/react-native/commit/57ed0fb30931979742634a1faa9a4d3b5261e50d) by [@ryanlntn](https://github.com/ryanlntn))
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- Prebuilt version of Hermes for visionOS ([924fb3de9b](https://github.com/facebook/react-native/commit/924fb3de9bc9328c3315316fbb796b933be5bcbe) by [@okwasniewski](https://github.com/okwasniewski))
|
||||
- : ReturnKeyTypes ([ed9978b8de](https://github.com/facebook/react-native/commit/ed9978b8de307d11def9190a461fc18b881800e0) by [@elencho](https://github.com/elencho))
|
||||
- Set SWIFT_ACTIVE_COMPILATION_CONDITIONS to DEBUG ([756f89aa59](https://github.com/facebook/react-native/commit/756f89aa59cba78cba39b22a338a3a48bcb38f1b) by [@okwasniewski](https://github.com/okwasniewski))
|
||||
- Add BindingsInstaller for TurboModules ([bed487e24b](https://github.com/facebook/react-native/commit/bed487e24b90a03b282b81cee5f7d2a203963d36) by [@Kudo](https://github.com/Kudo))
|
||||
- Bridgeless: Expose host delegate methods ([f500b47a95](https://github.com/facebook/react-native/commit/f500b47a957dea5e1ca2687965fb7a6a3fa64001) by [@zhongwuzw](https://github.com/zhongwuzw))
|
||||
- Add Instruments signposts API for SystraceSection ([840c31c3a4](https://github.com/facebook/react-native/commit/840c31c3a42c006527561cb003670845f7c921d7) by [@lyahdav](https://github.com/lyahdav))
|
||||
- Percentage support in translate in new arch. ([f997b81288](https://github.com/facebook/react-native/commit/f997b81288148b4eee30b65375059feac2a14cd8) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
||||
- Update font to handle system condensed variant ([86dffb3f15](https://github.com/facebook/react-native/commit/86dffb3f155dc9652f3abc32383643498b3a21b2) by [@shidoro](https://github.com/shidoro))
|
||||
- Introduce CallInvoker support in bridgeless native modules ([8f9ff89093](https://github.com/facebook/react-native/commit/8f9ff8909353b0e6782278c24bd0519c5506e51d) by [@philIip](https://github.com/philIip))
|
||||
- Added support for using percentages when defining border radius related properties. ([9c4ee6df08](https://github.com/facebook/react-native/commit/9c4ee6df087f9bc3024d893f1d87d54646661512) by [@jorge-cab](https://github.com/jorge-cab))
|
||||
- RCTConvert to support UIModalPresentationStyle ([2d547a3252](https://github.com/facebook/react-native/commit/2d547a3252b328251e49dabfeec85f8d46c85411) by [@vonovak](https://github.com/vonovak))
|
||||
- Optimize RCTKeyWindow() for iOS 15+ ([b2fba371df](https://github.com/facebook/react-native/commit/b2fba371df0edafbb3323188004fc1f6d9ab1e8a) by [@okwasniewski](https://github.com/okwasniewski))
|
||||
- Add basic DisplayP3 color support ([a40bd8e34a](https://github.com/facebook/react-native/commit/a40bd8e34a4de61e9f7690f808fe978fab1df11c) by [@ryanlntn](https://github.com/ryanlntn))
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade Renderers for React 19 ([97f9e101bf](https://github.com/facebook/react-native/commit/97f9e101bf2e4b9d3d1ed2f7f80ff4dfd663df42) by [@yungsters](https://github.com/yungsters))
|
||||
- Upgrade to React 19 ([0dd8224a71](https://github.com/facebook/react-native/commit/0dd8224a711dfa9016a200a6d489020e46304d07) by [@yungsters](https://github.com/yungsters))
|
||||
- Enables React global flag that causes Jest testing environment to require `act()` ([5a8327857b](https://github.com/facebook/react-native/commit/5a8327857bdd6c2c96e0455258cba12512ea5dc8) by [@yungsters](https://github.com/yungsters))
|
||||
- Improve performance of `Pressable` component. ([cfa784c5ce](https://github.com/facebook/react-native/commit/cfa784c5cec060506d3d76e7819b50934f2c69be) by [@Zahoq](https://github.com/Zahoq))
|
||||
- Obsolete comments referencing Navigator ([651c1d2cf5](https://github.com/facebook/react-native/commit/651c1d2cf54a4c730a320797a70f83d42667b3d0) by [@yungsters](https://github.com/yungsters))
|
||||
- Disable Babel plugin for arrow functions for Hermes ([cdc3b9cdfc](https://github.com/facebook/react-native/commit/cdc3b9cdfc02eae3e76275b87b715c7669cc493f) by [@yungsters](https://github.com/yungsters))
|
||||
- `mockComponent` now also mocks `name` ([5062c5256e](https://github.com/facebook/react-native/commit/5062c5256e64c4db53ea7c7bfeae127715fef972) by [@yungsters](https://github.com/yungsters))
|
||||
- Upgrade to `react@18.3.1` ([abb7070a51](https://github.com/facebook/react-native/commit/abb7070a512133e225646be3a1392667c3f1c966) by [@yungsters](https://github.com/yungsters))
|
||||
- `no-string-refs` is now a lint error ([387250112e](https://github.com/facebook/react-native/commit/387250112e9ff5d98e4d4172a2f3696042aba857) by [@yungsters](https://github.com/yungsters))
|
||||
- Update "Open Debugger" action to print extended Flipper guidance ([548fcd8b3b](https://github.com/facebook/react-native/commit/548fcd8b3bc95e0f364c49c8073b9a1688821454) by [@huntie](https://github.com/huntie))
|
||||
- Improved performance of `Animated` components ([452373b5bf](https://github.com/facebook/react-native/commit/452373b5bf4469d42af722851035e5e9bc3acdb9) by [@yungsters](https://github.com/yungsters))
|
||||
- Optimized performance of `StyleSheet.compose` ([34331af9ce](https://github.com/facebook/react-native/commit/34331af9cea59595c903f2f95896037ab1b22b16) by [@yungsters](https://github.com/yungsters))
|
||||
- Update Chrome launch flags for `--experimental-debugger` launch flow ([b1bb0bee41](https://github.com/facebook/react-native/commit/b1bb0bee411436587e02942d187c08938f68d114) by [@motiz88](https://github.com/motiz88))
|
||||
- Disable new event loop behavior when bridgeless (new architecture) is enabled. ([cf75d032d0](https://github.com/facebook/react-native/commit/cf75d032d0e92812128227b7203aaa9e3a96ced7) by [@sammy-SC](https://github.com/sammy-SC))
|
||||
- Inspector proxy: Rewrite 127.0.0.1 to localhost in source map URLs for better IPv4->IPv6 tunnelling support. ([a52bd7dd08](https://github.com/facebook/react-native/commit/a52bd7dd080e1f0ad03209eecb69bda903470205) by [@robhogan](https://github.com/robhogan))
|
||||
- Use semver to do version comparison in cli instead of custom fn `parseVersion` ([c3d45740cd](https://github.com/facebook/react-native/commit/c3d45740cd196e8eda378d61cd9bbb729e2cfcca) by [@zeyap](https://github.com/zeyap))
|
||||
- Upgrade `react-native-community/cli` to v14.0.0-alpha.2 ([32c2322668](https://github.com/facebook/react-native/commit/32c23226685ec540a13833614460af68c8f5b705) by [@szymonrybczak](https://github.com/szymonrybczak))
|
||||
- Enabled new event loop behavior when bridgeless (new architecture) is enabled. ([87b73a0bad](https://github.com/facebook/react-native/commit/87b73a0bad25ac13c83ef8dc096058b9ddeae3ec) by [@rubennorte](https://github.com/rubennorte))
|
||||
- Sync React renderers to 18.3.0-canary-9372c6311-20240315 ([a1c752cd87](https://github.com/facebook/react-native/commit/a1c752cd87627f5aa1bd400f75b0bf4b3fcd0116) by [@rubennorte](https://github.com/rubennorte))
|
||||
- Console polyfill now copies all properties from the existing `console` object ([949296571b](https://github.com/facebook/react-native/commit/949296571b36080d4ebe0bc8fac9ef3907367475) by [@motiz88](https://github.com/motiz88))
|
||||
- Update `react-native-community/cli` to 14.0.0-alpha.0 ([7a00623947](https://github.com/facebook/react-native/commit/7a00623947f559741a1448a7dde1deea43558fd2) by [@szymonrybczak](https://github.com/szymonrybczak))
|
||||
- Allow moving SyncCallback for advanced use-cases ([43c55e98d4](https://github.com/facebook/react-native/commit/43c55e98d493d60f9a05fb4f96efd54d1ea3bce8) by [@javache](https://github.com/javache))
|
||||
- Trim invalid blob response error message ([30463fb007](https://github.com/facebook/react-native/commit/30463fb007966fbd8803508cda025bc62c490265))
|
||||
- Moved the tasks of prepack in a separate node script ([5d72e1115e](https://github.com/facebook/react-native/commit/5d72e1115e7cdeeb0245385748c91a9b3142cfe9) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- MaintainVisibleContentPosition property on ScrollView now selects the first partially visible view as the anchor, rather than the first fully visible view. ([252ef19c8d](https://github.com/facebook/react-native/commit/252ef19c8d5bc5392d900af21136b351723f3b3c))
|
||||
- Add info to invalid blob response error ([489df722b3](https://github.com/facebook/react-native/commit/489df722b3b9b4106d53d853d9ff6d0a3f177254))
|
||||
- Make the new architecture the default ([b9f3186ee6](https://github.com/facebook/react-native/commit/b9f3186ee6314f56863c05272640d47643709a39) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Allow invoking the AsyncCallback synchronously to allow for tight performance optimization. ([765e542c8d](https://github.com/facebook/react-native/commit/765e542c8d25401e1b8818ff3caec2796efb51b1) by [@nlutsenko](https://github.com/nlutsenko))
|
||||
|
||||
#### Android specific
|
||||
|
||||
- AGP to 8.5.0 ([19f6aec4a1](https://github.com/facebook/react-native/commit/19f6aec4a104f9b0dcfe3033e3c5cb6799338982) by [@cortinico](https://github.com/cortinico))
|
||||
- Migrated `AlertFragment` dialog builder to use `androidx.appcompat` ([297ded90aa](https://github.com/facebook/react-native/commit/297ded90aa1e905a37dba316e7b19b6779c8c804))
|
||||
- Migrated `AlertFragment` dialog builder to use `androidx.appcompat` ([600d3f6ff1](https://github.com/facebook/react-native/commit/600d3f6ff180de87fbe950c0e7558f11915e5966))
|
||||
- Decouple `DevInternalSettings` from `DevSupportManagerBase` ([52cec1e798](https://github.com/facebook/react-native/commit/52cec1e798c98ee948c34fad24a7b61d29e6ce2d) by [@Kudo](https://github.com/Kudo))
|
||||
- Update constructor signature of `DevServerHelper` ([a1e8118541](https://github.com/facebook/react-native/commit/a1e81185416a53c7c7d0cfc67e40079fd0073e7c) by [@huntie](https://github.com/huntie))
|
||||
- Kotlin to 1.9.24 ([3f3abf5b40](https://github.com/facebook/react-native/commit/3f3abf5b40e60b7b9c02ec4942fec1be3684acc6) by [@cortinico](https://github.com/cortinico))
|
||||
- AGP to 8.4.1 ([f6a490b036](https://github.com/facebook/react-native/commit/f6a490b03651c9f4b572ec182caf9c17b20f3e8a) by [@cortinico](https://github.com/cortinico))
|
||||
- Bump Fresco to 3.2.0 to fix CVE-2018-14498 ([744024be7f](https://github.com/facebook/react-native/commit/744024be7f95970bdd786931bdf10dd50c515124) by [@cortinico](https://github.com/cortinico))
|
||||
- Expose `mapbufferjni` via prefab. ([c73e22142e](https://github.com/facebook/react-native/commit/c73e22142e9958fb406d5ca7d86228f938e5c8d5) by [@tomekzaw](https://github.com/tomekzaw))
|
||||
- Converted StatusBarModule to Kotlin ([1cc1673c32](https://github.com/facebook/react-native/commit/1cc1673c3223784634308bea7a2453b864489547))
|
||||
- Expose `openDebugger()` method on `DevSupportManager` ([b309af79e8](https://github.com/facebook/react-native/commit/b309af79e8bf2eb741db83b00359a73fe1b458a5) by [@motiz88](https://github.com/motiz88))
|
||||
- In bridgeless, `useDevSupport` now is configurable by ReactNativeHost. ([d195fd0c06](https://github.com/facebook/react-native/commit/d195fd0c0622e9d833dacf879c7da9f5b3c5fccd) by [@javache](https://github.com/javache))
|
||||
- Changed the `handleRemoveView` function in `ReactViewGroup.java` to ignore calls for `Views` that are not children of this `ViewGroup` ([0d7a92b551](https://github.com/facebook/react-native/commit/0d7a92b551bb8bd91aeba73316cbaf7315362094) by [@bartlomiejbloniarz](https://github.com/bartlomiejbloniarz))
|
||||
- Simplified ReactActivityDelegate to expose a single createRootView method. ([3283202248](https://github.com/facebook/react-native/commit/3283202248a36dbda553745afc46a3e3e2ab41a6) by [@javache](https://github.com/javache))
|
||||
- Throwing IllegalArgumentException from ReactPackage is no longer suppressed ([2584bcb6c8](https://github.com/facebook/react-native/commit/2584bcb6c842b6a4fb7148dedc66f77c0f8210bb) by [@javache](https://github.com/javache))
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- Fire `onprogress` event for `XMLHttpRequest` even when the `Content-Length` header is missing in the response headers ([457d14bd1b](https://github.com/facebook/react-native/commit/457d14bd1b85b0748b0824253753c6fee7ccc8bd))
|
||||
- Move `notifyObservers` straight to `RCTEventDispatcher.mm`. ([f5c888c2d7](https://github.com/facebook/react-native/commit/f5c888c2d7c6dfe009de5df2cc795aff26286c19) by [@WoLewicki](https://github.com/WoLewicki))
|
||||
- Support `customizeRootView` from `RCTRootViewFactory` ([8956869792](https://github.com/facebook/react-native/commit/89568697920230015f6146ac67a8fff87736d7dd) by [@Kudo](https://github.com/Kudo))
|
||||
- Update Gemfile in template ([06eea61c19](https://github.com/facebook/react-native/commit/06eea61c19cd730cf0c14a436f042d30791c3f4a) by [@matinzd](https://github.com/matinzd))
|
||||
- Add `DEFINES_MODULE` for React-jsinspector.podspec ([4e6186555e](https://github.com/facebook/react-native/commit/4e6186555eac8e98724e5027a882c92ee195652d) by [@Kudo](https://github.com/Kudo))
|
||||
- Fallback to the first `foregroundInactive` window when there are no `foregroundActive` windows in RCTKeyWindow ([42ceacd281](https://github.com/facebook/react-native/commit/42ceacd281011ba8a6833d13a083208574bd85f2) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Improve reusability for RCTRootViewFactory ([23709f7c61](https://github.com/facebook/react-native/commit/23709f7c61caebebafa9b01264176cb95204ec42) by [@Kudo](https://github.com/Kudo))
|
||||
- Move the snapshotting code before the dismissal. ([30d6251b78](https://github.com/facebook/react-native/commit/30d6251b7890118290c1f7f7a9df69423e15a406) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Init cli deprecation logging ([47a3f52007](https://github.com/facebook/react-native/commit/47a3f5200708fc0247d8b403dbe447af636b79cb) by [@blakef](https://github.com/blakef))
|
||||
|
||||
#### Android specific
|
||||
|
||||
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- Deprecate RCTRuntimeExecutorModule ([7ea84bd3eb](https://github.com/facebook/react-native/commit/7ea84bd3eb228529e341f9fab5abf6ddda961db8) by [@philIip](https://github.com/philIip))
|
||||
|
||||
### Removed
|
||||
|
||||
- `react-native/dev-middleware`: Remove nonstandard `faviconUrl` field from CDP `/json` response ([df19e597e3](https://github.com/facebook/react-native/commit/df19e597e3e8be9c76f6dba885fd978095710f49) by [@huntie](https://github.com/huntie))
|
||||
- Remove viewconfigs for onTextInput callbacks ([910cde6134](https://github.com/facebook/react-native/commit/910cde6134d5c1f6886764ab27c1102584532795) by [@javache](https://github.com/javache))
|
||||
- Remove deprecated onTextInput callback ([34a50ae8ef](https://github.com/facebook/react-native/commit/34a50ae8ef559f309117d5b6abe0b68b2b349fa4) by [@javache](https://github.com/javache))
|
||||
- Summary: Changelog: [General][Removed] `launchId` query param for `/debugger-frontend` is no longer generated automatically for each `/open-debugger` call. Caller of `/open-debugger` is now responsible for generating the `launchId`, which will be passed along to `/debugger-frontend`. ([b7de916664](https://github.com/facebook/react-native/commit/b7de91666453b832b889d9577226097aeeace1a8) by [@EdmondChuiHW](https://github.com/EdmondChuiHW))
|
||||
- [TS] Remove `tvParallaxProperties` prop from `TouchableOpacity` & add missing `focusable`, `rejectResponderTermination` props ([0a0cd6517f](https://github.com/facebook/react-native/commit/0a0cd6517fdd6fbcc751b4d9ae19106740b23703) by [@retyui](https://github.com/retyui))
|
||||
- Removed deprecated methods from Pressability. ([e4f3338069](https://github.com/facebook/react-native/commit/e4f3338069bfe70217a46239c468e4f12fa179fc) by [@javache](https://github.com/javache))
|
||||
- Remove non-existent methods from `<ImageBackground/>` component ([09c903c439](https://github.com/facebook/react-native/commit/09c903c43922d83ddae1602751804c34b5aeff86) by [@retyui](https://github.com/retyui))
|
||||
- RFC-0759 remove ram-bundle command. ([58b45e86a6](https://github.com/facebook/react-native/commit/58b45e86a6fd78409dc358e27ae736c95fee9f39) by [@blakef](https://github.com/blakef))
|
||||
|
||||
#### Android specific
|
||||
|
||||
- Delete ReactContext.initializeWithInstance(). ReactContext now no longer contains legacy react instance methods. Please use BridgeReactInstance instead. ([fb23470483](https://github.com/facebook/react-native/commit/fb234704832513d655a2890458eec66f873a5674) by [@RSNara](https://github.com/RSNara))
|
||||
- Removed `NativeAnimationsDebugModule` (already not Public API) ([95f7a5c597](https://github.com/facebook/react-native/commit/95f7a5c597eeb8db3a19777cac1ea14e58682cf0) by [@yungsters](https://github.com/yungsters))
|
||||
- Delete UIManagerModule.measureLayoutRelativeToParent() ([958f8e2bb5](https://github.com/facebook/react-native/commit/958f8e2bb55ba3a2ace9507a48a582f546dd3ec2) by [@arushikesarwani94](https://github.com/arushikesarwani94))
|
||||
- UIManager.showPopupMenu() and UIManager.dismissPopupMenu() have been removed ([c631e93341](https://github.com/facebook/react-native/commit/c631e93341a33031f44087bc20c7e35e053d7d93) by [@alanleedev](https://github.com/alanleedev))
|
||||
- Remove getJavaScriptContextHolder() from BridgelessReactContext since now it can be accessed through BridgelessCatalystInstance in Bridgeless mode ([4595351310](https://github.com/facebook/react-native/commit/4595351310f353aad5a5f7af0fe2989650675cdc) by [@arushikesarwani94](https://github.com/arushikesarwani94))
|
||||
- Remove getRuntimeExecutor() from ReactContext since now it can be accessed through BridgelessCatalystInstance in Bridgeless mode ([f7b9aafd10](https://github.com/facebook/react-native/commit/f7b9aafd10a2f76c9bbdfdd1d925b4edf7a9dac3) by [@arushikesarwani94](https://github.com/arushikesarwani94))
|
||||
- Delete ReactContext.initializeWithInstance(). ReactContext now no longer contains legacy react instance methods. Please use BridgeReactInstance instead. ([05ef779c0b](https://github.com/facebook/react-native/commit/05ef779c0b1722ad3827f382f7d3de5d0391afb0) by [@fabriziocucci](https://github.com/fabriziocucci))
|
||||
- Delete ReactContext.initializeWithInstance(). ReactContext now no longer contains legacy react instance methods. Please use BridgeReactInstance instead. ([14fb1cc335](https://github.com/facebook/react-native/commit/14fb1cc335b900666ef4fe6cec6a23a7a95bcf76) by [@RSNara](https://github.com/RSNara))
|
||||
- Delete ReactContext.initializeWithInstance(). ReactContext now no longer contains legacy react instance methods. Please use BridgeReactInstance instead. ([f99dc486cd](https://github.com/facebook/react-native/commit/f99dc486cdd742988320a8235c180ccecdcdd0d6) by [@RSNara](https://github.com/RSNara))
|
||||
- Move PopupMenu out of React Native core ([8bced4b29d](https://github.com/facebook/react-native/commit/8bced4b29db9b41a68ef726df81449a399eff604) by [@RSNara](https://github.com/RSNara))
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- Remove deprecated onTextInput callback ([24aece35b4](https://github.com/facebook/react-native/commit/24aece35b4a2bf196ad48900cdb8a3ca6ea53288) by [@Saadnajmi](https://github.com/Saadnajmi))
|
||||
- Removed `_textStorageForNSAttributesString` which was unused ([8ecbb36492](https://github.com/facebook/react-native/commit/8ecbb3649261022d342b3613bfe26243481b071d) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
- Message ([2b85a236a1](https://github.com/facebook/react-native/commit/2b85a236a1121d86b3a99f0d9c6da0ae35817a8c) by [@naxey](https://github.com/naxey))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Add missing `NativeState` methods to the `WithRuntimeDecorator` class. ([218ea5d44c](https://github.com/facebook/react-native/commit/218ea5d44cae5774b1445cbc9e07d1ea3ef773d1) by [@bartlomiejbloniarz](https://github.com/bartlomiejbloniarz))
|
||||
- Codegen computes output path relative to project root instead of current working directory. ([d3e0430dea](https://github.com/facebook/react-native/commit/d3e0430deac573fd44792e6005d5de20e9ad2797) by [@dmytrorykun](https://github.com/dmytrorykun))
|
||||
- Fix logbox reporting for React errors ([64e6721b23](https://github.com/facebook/react-native/commit/64e6721b23e9f3c35d42d5b1f1b68220e46a34ed) by [@yungsters](https://github.com/yungsters))
|
||||
- Add option for multiple `mountingOverrideDelegates` ([358fe46969](https://github.com/facebook/react-native/commit/358fe46969654932e73af94127c05e6ce5ed7049) by [@WoLewicki](https://github.com/WoLewicki))
|
||||
- Fix clicking items on the inverted FlatList on the new architecture ([3753b7a0e7](https://github.com/facebook/react-native/commit/3753b7a0e78f8820e5f5150dd9bdf1b53145a7bd) by [@kosmydel](https://github.com/kosmydel))
|
||||
- Debugger frontend socket-termination countdown now begins after the ping message is actually sent ([20462ca984](https://github.com/facebook/react-native/commit/20462ca984ae306d6ea829c381d91d4df1cb1cde) by [@EdmondChuiHW](https://github.com/EdmondChuiHW))
|
||||
- Remove accidental duplication in React warnings in Logbox ([32c3cd3e8a](https://github.com/facebook/react-native/commit/32c3cd3e8addb924f904de19c6e311a0ddb4e963) by [@gaearon](https://github.com/gaearon))
|
||||
- [codegen] Fixes enum codegen value cases ([1a1795a537](https://github.com/facebook/react-native/commit/1a1795a537f3fdb8417149565c7bd4221af2b72e) by [@zhongwuzw](https://github.com/zhongwuzw))
|
||||
- Fixed LogBox not showing correctly on the New Architecture ([db1043dfbf](https://github.com/facebook/react-native/commit/db1043dfbf15b8d2e39eeb50b315384aa39e4606) by [@rubennorte](https://github.com/rubennorte))
|
||||
- Use consistent version of glob in react-native ([06512aa565](https://github.com/facebook/react-native/commit/06512aa565c8a75efa018e8da1123b75df683d56) by [@regalstreak](https://github.com/regalstreak))
|
||||
- Fixed inconsistency in TouchableX component disabled / focusable behavior ([775713cef7](https://github.com/facebook/react-native/commit/775713cef7ff7b45a60c34e4f1629dc6cde1aa05) by [@rozele](https://github.com/rozele))
|
||||
- Fix sequence restart failure ([a93a15aca3](https://github.com/facebook/react-native/commit/a93a15aca3e380f2f8158465b1b315ac3fab8307) by [@asyler](https://github.com/asyler))
|
||||
- Align CodegenSchema.d.ts with CodegenSchema.js ([ea3a7143b9](https://github.com/facebook/react-native/commit/ea3a7143b9c8e886a6cf5ffd04386c3b19ef6b4a) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- RNTester examples for border percentages are now properly covered by E2E screenshot tests. ([143e31058c](https://github.com/facebook/react-native/commit/143e31058cd05bcb2edaaae14a10d3cf2a36af3f) by [@GijsWeterings](https://github.com/GijsWeterings))
|
||||
- Fix fetch memory leak ([c647950e5e](https://github.com/facebook/react-native/commit/c647950e5e78f1bcd110111067b21daa44e4d464) by [@huzhanbo1996](https://github.com/huzhanbo1996))
|
||||
- Fix duplicate rotation operations ([54f582f651](https://github.com/facebook/react-native/commit/54f582f651c68e9fa6bedb5d1546f4e5a4a64704) by [@NickGerleman](https://github.com/NickGerleman))
|
||||
- Replace deprecated babel-plugin libraries to fix deprecation warnings on installation ([6213b2a62a](https://github.com/facebook/react-native/commit/6213b2a62a2366b150e0ac60aa8693baac2bb1d1) by [@kaganece](https://github.com/kaganece))
|
||||
- LogBox and Chrome DevTools stack frame collapsing patterns are now compatible with Windows file paths. ([8d0046a5e1](https://github.com/facebook/react-native/commit/8d0046a5e10ca27a073e5509ca70ffab15d2d3e9) by [@motiz88](https://github.com/motiz88))
|
||||
- New architecture timer methods now return integers instead of an opaque object. ([a16f7dc547](https://github.com/facebook/react-native/commit/a16f7dc547e85daed7e3732142f36cce5699faa0) by [@javache](https://github.com/javache))
|
||||
- Small performance tweak to View wrapper to avoid unnecessary style flattening. ([d280772ea4](https://github.com/facebook/react-native/commit/d280772ea4b2b945340e88c6b95ffb4c0dd56dac) by [@javache](https://github.com/javache))
|
||||
- Fixed padding not being applied to inline views in text ([12aef32b82](https://github.com/facebook/react-native/commit/12aef32b82325ab143b6ed421f3cbf0f8be66f60) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
- Fixed `Props.h` created from codegen missing default initializers in C++ `struct` ([639d890dff](https://github.com/facebook/react-native/commit/639d890dff49af788fbe27c60b33f6025ec33cca) by [@alanleedev](https://github.com/alanleedev))
|
||||
- Fixed memoization for components wrapped with createAnimatedComponent ([be06fd4e22](https://github.com/facebook/react-native/commit/be06fd4e22a500128d202436600381b8bc17b3f5))
|
||||
- Add `collapsableChildren` prop ([7b44c8d1d0](https://github.com/facebook/react-native/commit/7b44c8d1d0a089a766c7eab1b5435b2dbf61454c) by [@NickGerleman](https://github.com/NickGerleman))
|
||||
- Handle `fontWeight` normalization for TextInput component ([15f27bc299](https://github.com/facebook/react-native/commit/15f27bc299a0d1e6a5dec81efb594f54039120a7) by [@NickGerleman](https://github.com/NickGerleman))
|
||||
- Fix space/tab indentation in template project.pbxproj ([968884ae86](https://github.com/facebook/react-native/commit/968884ae867ce72d99dbbad9c737ea9b879ac482) by [@friederbluemle](https://github.com/friederbluemle))
|
||||
- Don't break script phase and codegen when coreutils installed on macOS ([e0799536ef](https://github.com/facebook/react-native/commit/e0799536ef1b68b98fb772e256d1d72424349008) by [@blakef](https://github.com/blakef))
|
||||
- Make sure that we can't include Codegen symbols multiple times ([46b6453eb6](https://github.com/facebook/react-native/commit/46b6453eb6fe5435a792aa4a0f9183446f4fa41f) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Avoid ShadowTreeRegistry::mutex_ read lock reentrancy ([1a164fae6a](https://github.com/facebook/react-native/commit/1a164fae6a27051d0a3fd9f7aa094c384c58d4c4) by [@rozele](https://github.com/rozele))
|
||||
- Fix version checker not considering nightlies ([489d9f6c62](https://github.com/facebook/react-native/commit/489d9f6c624aa0b3e2607cd70e46adbb2ea7162d) by [@tido64](https://github.com/tido64))
|
||||
- Inspector proxy: prevent errors proxying a device message from blocking the handler queue or spamming logs. ([e05319cc87](https://github.com/facebook/react-native/commit/e05319cc872c7d99c5ba33641a7791a3db2b3415) by [@robhogan](https://github.com/robhogan))
|
||||
- Rename utils/jsi files ([d0cac87c6e](https://github.com/facebook/react-native/commit/d0cac87c6ea6caf528f0c164d4b43e3cfbb0b0b8) by [@TatianaKapos](https://github.com/TatianaKapos))
|
||||
- FIx "Buffer() is deprecated" warning from debugger proxy. ([fd1e5e7063](https://github.com/facebook/react-native/commit/fd1e5e7063378d99a87a5c7d3ec50ba6553406c5) by [@robhogan](https://github.com/robhogan))
|
||||
- Adds forwardRef call to new functional component implementation of Button control. ([8e7263a415](https://github.com/facebook/react-native/commit/8e7263a415676d1fb08da027c9dc6ca9fc2b6573) by [@chiaramooney](https://github.com/chiaramooney))
|
||||
- Fix breakpoints opening to incorrect location or disappearing from debugger frontend UI. ([ac714b1c33](https://github.com/facebook/react-native/commit/ac714b1c3300d3a169bdcfec05d556e18a7b83ff) by [@robhogan](https://github.com/robhogan))
|
||||
- Fix jest setup for Image methods (resolveAssetSource, getSize, prefetch, queryCache) ([d53cc2b46d](https://github.com/facebook/react-native/commit/d53cc2b46dee5ed4d93ee76dea4aea9da42d0158))
|
||||
- Fix broken native animation in Paper ([92540a618d](https://github.com/facebook/react-native/commit/92540a618d336c747c0ebdfffdd1a2a0a82e636d) by [@sammy-SC](https://github.com/sammy-SC))
|
||||
- Support component stacks without source info. ([e9e668f0ec](https://github.com/facebook/react-native/commit/e9e668f0eca625248a95c53a506d33a4ec389f70) by [@rickhanlonii](https://github.com/rickhanlonii))
|
||||
- Support hermes component stacks with missing source info. ([82db330360](https://github.com/facebook/react-native/commit/82db33036029c232cbaec7e58f2d84c873504732) by [@rickhanlonii](https://github.com/rickhanlonii))
|
||||
- Expose Modular Headers for `RCT-Folly` podspec ([8769245477](https://github.com/facebook/react-native/commit/87692454774d797cd3d7f26a0c31d53a4c90cfdd) by [@mrousavy](https://github.com/mrousavy))
|
||||
- Support component stacks without source info. ([1b53051b8c](https://github.com/facebook/react-native/commit/1b53051b8c0661095dbcb7546432eeda3a129fd4) by [@rickhanlonii](https://github.com/rickhanlonii))
|
||||
- Fixed crash when passing fewer arguments than expected in native modules using codegen ([179b684e76](https://github.com/facebook/react-native/commit/179b684e7636361f7acd782cdf028c7c30b7b9fd) by [@rubennorte](https://github.com/rubennorte))
|
||||
- Fixed crash when passing non-numeric values where RootTag is expected to methods in native modules using codegen ([abbc6eb022](https://github.com/facebook/react-native/commit/abbc6eb02251d8c510b3fb5415796a8f05388c98) by [@rubennorte](https://github.com/rubennorte))
|
||||
|
||||
#### Android specific
|
||||
|
||||
- Fix autolink plugin for libraries that are platform-specific ([20521cc908](https://github.com/facebook/react-native/commit/20521cc908a347e3a2b3ac0fd6710946f18b1510) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
||||
- Fix crash due to missing JvmStatic to `convertToCase` ([cef17ba14f](https://github.com/facebook/react-native/commit/cef17ba14f435b966d2ffd9b3660ccf28fe03b6c) by [@cortinico](https://github.com/cortinico))
|
||||
- Show RedBox after reloads fail (bridgeless) ([2f8d4f0c25](https://github.com/facebook/react-native/commit/2f8d4f0c253853ec4f56cf01b41a1f73a393f804) by [@RSNara](https://github.com/RSNara))
|
||||
- Unmount React root when activity is destroyed on bridgless ([33aa83a0e6](https://github.com/facebook/react-native/commit/33aa83a0e6f63d3d50d4803074ad9e2243439100) by [@fabriziocucci](https://github.com/fabriziocucci))
|
||||
- Better overflow support for ScrollView, Text, TextInput ([bfb3b7008d](https://github.com/facebook/react-native/commit/bfb3b7008d3e83400154b0348e7ab680ee06aa8c) by [@NickGerleman](https://github.com/NickGerleman))
|
||||
- Cover SingletonMap when parsing events exported by module ([8a15e0d97a](https://github.com/facebook/react-native/commit/8a15e0d97ad7556b9f1b4068662791a32e1ae3d2) by [@WoLewicki](https://github.com/WoLewicki))
|
||||
- Tentative fix for NPE `JavaTimerManager$IdleCallbackRunnable.cancel` ([e686b4330d](https://github.com/facebook/react-native/commit/e686b4330d0a69fe78008b7eac86c54c9f96ee79) by [@cortinico](https://github.com/cortinico))
|
||||
- Fixed StatusBar.currentHeight calculations to honor all cutout sizes ([0b8222a854](https://github.com/facebook/react-native/commit/0b8222a854a0f0e7808d596a57596f4dd98135f2))
|
||||
- Reduce maximum log spam from FrameBasedAnimationDriver ([42299499d8](https://github.com/facebook/react-native/commit/42299499d8cac0b3e6ae7814ca375005ecfa05f0))
|
||||
- Android exceptions without a message would lead to unexpected crashes ([48f48f8e67](https://github.com/facebook/react-native/commit/48f48f8e6726103d1537193d52144cbce2402168) by [@javache](https://github.com/javache))
|
||||
- Fixed StatusBar.currentHeight calculations to honor all cutout sizes ([cc485ccf7d](https://github.com/facebook/react-native/commit/cc485ccf7dddbcbdcfb03457fd2a48569fab5820))
|
||||
- Fixed error thrown during ReactInstance teardown ([e67d5560cf](https://github.com/facebook/react-native/commit/e67d5560cfd35f07ce74cfcc12555346a6f0e865) by [@javache](https://github.com/javache))
|
||||
- If the RNTester app is started with a deeplink intent, we now correctly navigate there for Android to facilitate e2e testing. This already worked on ios. ([3c5a6b3d43](https://github.com/facebook/react-native/commit/3c5a6b3d43e4a78bcf046594c9cb6734d171c2ab) by [@GijsWeterings](https://github.com/GijsWeterings))
|
||||
- Fix borderRadius incorrect overrides ([8d5bbca1eb](https://github.com/facebook/react-native/commit/8d5bbca1eb8b91d0f678b557996a78c091976a53) by [@jorge-cab](https://github.com/jorge-cab))
|
||||
- Propagate layout direction to Android Views and Drawables ([e16faca18c](https://github.com/facebook/react-native/commit/e16faca18c052a1c3b7ce6fb3b8236347b222e8a) by [@NickGerleman](https://github.com/NickGerleman))
|
||||
- Surfaces no longer leak activity once stopped ([af721084af](https://github.com/facebook/react-native/commit/af721084afd5ba530e47fb353e8e5b1c4d9f56b7))
|
||||
- Improved resiliency of reloads when bundle loading fails ([524e3eec3e](https://github.com/facebook/react-native/commit/524e3eec3e73f56746ace8bef569f36802a7a62e) by [@javache](https://github.com/javache))
|
||||
- Fix: android native rejections should be instanceof Error ([62cbdbbcc6](https://github.com/facebook/react-native/commit/62cbdbbcc60f9074e47416007aef81e0792d7c95) by [@huzhanbo1996](https://github.com/huzhanbo1996))
|
||||
- Local scheduler for thread-safe ([7dd91d3437](https://github.com/facebook/react-native/commit/7dd91d3437952cf19569efce30c823d14bdf6c9d) by [@Sunbreak](https://github.com/Sunbreak))
|
||||
- Border-Radius percentages are now correctly resolved. ([082e29ed4e](https://github.com/facebook/react-native/commit/082e29ed4ecc40ed9dfeae6b1b94d5a33efddef0) by [@jorge-cab](https://github.com/jorge-cab))
|
||||
- Fix incorrect paths in app build.gradle react config block ([2d8c6f591c](https://github.com/facebook/react-native/commit/2d8c6f591c3c17b75afced101a2f86e773e98a54) by [@monholm](https://github.com/monholm))
|
||||
- Fix cached spannable measurement path ([002396beae](https://github.com/facebook/react-native/commit/002396beae3c5d107b44968c1b1906040054e3da) by [@NickGerleman](https://github.com/NickGerleman))
|
||||
- ShouldShowDevMenuOrReload() in RELEASE mode ([63043b79be](https://github.com/facebook/react-native/commit/63043b79be50b2589de96c63922b7909ca1f381f) by [@arushikesarwani94](https://github.com/arushikesarwani94))
|
||||
- OnKeyLongPress() in RELEASE mode ([bdcc979bab](https://github.com/facebook/react-native/commit/bdcc979bab2cb300e540c031a7c54e05b2328410) by [@arushikesarwani94](https://github.com/arushikesarwani94))
|
||||
- Fixed app reloading for `ReactActivity.getReactDelegate().reload()`. ([539922339b](https://github.com/facebook/react-native/commit/539922339b5ca1937ce3207038199a27566914fe) by [@Kudo](https://github.com/Kudo))
|
||||
- ViewManagers can pass context to their base class. ([90663081de](https://github.com/facebook/react-native/commit/90663081de872243203da99116d2cab0fbec95ff) by [@javache](https://github.com/javache))
|
||||
- Fix a crash in Modal component ([d116837da2](https://github.com/facebook/react-native/commit/d116837da2734709f5f85dac1515d118b172bdcf) by [@sammy-SC](https://github.com/sammy-SC))
|
||||
- Fixed `textAlign` not being taken into account when positioning views inlined in text ([1f08799560](https://github.com/facebook/react-native/commit/1f087995608fd016a8a3dd84c0ca88a9239d96b9) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
- Fix a case when view preallocation or props forwarding on Android lead to dropped props update ([cf926a1329](https://github.com/facebook/react-native/commit/cf926a1329a8cd6921e9799877883ac1fbc26fbb) by [@sammy-SC](https://github.com/sammy-SC))
|
||||
- PointerEvents were not dispatching after a scroll event ([766ece7b9b](https://github.com/facebook/react-native/commit/766ece7b9b1a578d5b7acd99bc8b0055e862fa86) by [@javache](https://github.com/javache))
|
||||
- Cascading renders were not mounting correctly when `batchRenderingUpdatesInEventLoop` is enabled. ([849da2146c](https://github.com/facebook/react-native/commit/849da2146ca27b7512f2f3ea0f8af8aa001e807a) by [@javache](https://github.com/javache))
|
||||
- Fixed `adjustFontSizeToFit` when used without `numberOfLines` ([b236e154a1](https://github.com/facebook/react-native/commit/b236e154a1e29885258d325241fb94afb80a7f57) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
- Fixed `adjustsFontSizeToFit` not working on Android when using the new architecture ([747a96b7b3](https://github.com/facebook/react-native/commit/747a96b7b39fa53db353ef739560e27c6679d7fc) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
- Resolved error "No virtual method setLeftTopRightBottom" ([08ecdee71c](https://github.com/facebook/react-native/commit/08ecdee71c9d5a4e385a585941ca93ae1002b01f) by [@mmmoussa](https://github.com/mmmoussa))
|
||||
- Fix ClassCastException in `ReactModalHostView` ([15ff82f811](https://github.com/facebook/react-native/commit/15ff82f811287f9a686d993af9ee80f891a7774f) by [@cortinico](https://github.com/cortinico))
|
||||
- Prevent error when the "react" extension was already created by another gradle plugin ([b9dad7fc0c](https://github.com/facebook/react-native/commit/b9dad7fc0c040813ca173bc531a8cd2d9a8ace1c) by [@AlexanderEggers](https://github.com/AlexanderEggers))
|
||||
- Fix build from source for hermes-engine ([c835f91457](https://github.com/facebook/react-native/commit/c835f91457922421a9ad5e7d5f3dc8075cb9caa6) by [@cortinico](https://github.com/cortinico))
|
||||
- Fix maintainVisibleContentPosition during momentum scroll ([a9e6759bb5](https://github.com/facebook/react-native/commit/a9e6759bb5d8f08c444b7a324c4488b9e5f2ed1b) by [@janicduplessis](https://github.com/janicduplessis))
|
||||
- Views would still receive hover events when nested in a view with pointer-events: "none" ([38cbc082db](https://github.com/facebook/react-native/commit/38cbc082db92abdc00a73be0485999f406a05fe6) by [@javache](https://github.com/javache))
|
||||
- Fix crash in `getChildAtWithSubviewClippingEnabled` ([d6a44e632a](https://github.com/facebook/react-native/commit/d6a44e632a7ffbd60b90dac410294947cd82f2d8) by [@javache](https://github.com/javache))
|
||||
- Add support for scrollEventThrottle for ScrollView on the New Architecture. ([4d2262b8d2](https://github.com/facebook/react-native/commit/4d2262b8d2b38eddbdfb2264a33f87c28aa7712f) by [@dmytrorykun](https://github.com/dmytrorykun))
|
||||
|
||||
#### iOS specific
|
||||
|
||||
|
||||
- Auto linking script of script phase ([e320ab47cf](https://github.com/facebook/react-native/commit/e320ab47cf855f2e5de74ea448ec292cf0bbb29a))
|
||||
- Fix the accessibility label not being applied to text components on the new architecture ([9922628032](https://github.com/facebook/react-native/commit/9922628032ace4d87257c1b3d70c2dc6c38a60a6) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
- Fixes NSDataBigString length calculation ([9d637e4622](https://github.com/facebook/react-native/commit/9d637e4622781568b143b8585909b73211a0f8ba) by [@zhongwuzw](https://github.com/zhongwuzw))
|
||||
- Fix `InputAccessoryView` width on device orientation change ([8597727c28](https://github.com/facebook/react-native/commit/8597727c28d9cb77012f3f4ebb032c335246d589) by [@mauriciomeirelles](https://github.com/mauriciomeirelles))
|
||||
- Fixing scroll view breakage caused by #44789 ([f4b921c1d5](https://github.com/facebook/react-native/commit/f4b921c1d5a40c96ecce949db2fe0755c5b90f35))
|
||||
- Fix dark mode on initial load. ([b957513cc6](https://github.com/facebook/react-native/commit/b957513cc65b66ab0288db3fba5ccf9232f7c1fc))
|
||||
- Remove usage of deprecated scrollIndicatorInsets in RCTScrollView ([ce10ce4d98](https://github.com/facebook/react-native/commit/ce10ce4d98bc22351b9694ef0bb15ad696f3ba5f))
|
||||
- Fixed border being drawn over children when no color was set ([91c5a6d936](https://github.com/facebook/react-native/commit/91c5a6d9368b01172000763ba48e91eb1434e7d7) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
- Fixes animated frame timing ([690df7a556](https://github.com/facebook/react-native/commit/690df7a5561d93da27f69ff803bed453652ad51c) by [@zhongwuzw](https://github.com/zhongwuzw))
|
||||
- Add missing call to `[super viewDidLoad]` in `RCTRedBox.mm`. ([d93788301c](https://github.com/facebook/react-native/commit/d93788301c1fafceba4c3e2ceb40cd4e49c6ae8d) by [@hakonk](https://github.com/hakonk))
|
||||
- Fixes race condition of m_batchHadNativeModuleOrTurboModuleCalls ([3f74f69cf0](https://github.com/facebook/react-native/commit/3f74f69cf00858cd18774837bf5afc3fccdfca86) by [@zhongwuzw](https://github.com/zhongwuzw))
|
||||
- Enable Plugin support for (RCT)SampleTurboModule ([053e302a00](https://github.com/facebook/react-native/commit/053e302a00953509cee4c3fdb0b3a1b078eff877) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- Fixes customizeRootView migration comment ([fbf9c4343a](https://github.com/facebook/react-native/commit/fbf9c4343ae922013b008a7d855c5927b7113e60) by [@zhongwuzw](https://github.com/zhongwuzw))
|
||||
- Fix RCTPerfMonitor not showing up in scene based app ([16775215d5](https://github.com/facebook/react-native/commit/16775215d5a734288da7147db348824395198407) by [@ouabing](https://github.com/ouabing))
|
||||
- Fixed Method name in hint from customiseView to customizeRootView ([46d4b837a5](https://github.com/facebook/react-native/commit/46d4b837a581168507b569744cae459bd1f4a70c) by [@svengiebel](https://github.com/svengiebel))
|
||||
- Exposes react_native_pods methods through autolinking.rb ([6b56fb0d0b](https://github.com/facebook/react-native/commit/6b56fb0d0b40728d0baef8566d754d7081363584) by [@blakef](https://github.com/blakef))
|
||||
- Privacy Manifest aggregation failing due to missing nil check ([47b42dc845](https://github.com/facebook/react-native/commit/47b42dc84560aa66af4b7dcfa5886af66d175c3c) by [@swrobel](https://github.com/swrobel))
|
||||
- Removed references to deprecated UIActivityIndicatorViewStyles ([a23ae9c7f2](https://github.com/facebook/react-native/commit/a23ae9c7f2031b25c431b1b9791beab6b5527def))
|
||||
- Fixed `HermesExecutorFactory.h` build error when importing its private header ([2d46dbe6ce](https://github.com/facebook/react-native/commit/2d46dbe6ce962bbdcae5d91afe557b46b6b7cfe4) by [@Kudo](https://github.com/Kudo))
|
||||
- Fix privacy aggregation ([00b366159d](https://github.com/facebook/react-native/commit/00b366159d760b705e86ea5f7fe5dbe53a1c5e72) by [@aleqsio](https://github.com/aleqsio))
|
||||
- Extract the constants from ViewManagers in the UI Thread if needed. ([94537c7beb](https://github.com/facebook/react-native/commit/94537c7bebe23f1c9a79c7a94383ed960ebf30f7) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Avoid calling abstract methods in RCTComposedViewRegistry ([9bdd777fd7](https://github.com/facebook/react-native/commit/9bdd777fd766ff9a0c59e7a2136279cd91a3916b) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Removed Legacy iOS 10 code messing with border radius ([9204e44ef5](https://github.com/facebook/react-native/commit/9204e44ef5038ed9190a7e5362a7ea3c0793b361) by [@jorge-cab](https://github.com/jorge-cab))
|
||||
- Preserve content offset in ScrollView when the component is suspended ([510d2906b2](https://github.com/facebook/react-native/commit/510d2906b21b8c4c063369d2c2cb391aad268fea) by [@sammy-SC](https://github.com/sammy-SC))
|
||||
- Missing `progress` in `onProgress` native event arguments ([78ab5f4b83](https://github.com/facebook/react-native/commit/78ab5f4b836d64b71760754c7cce1315630640c7) by [@netmaxt3r](https://github.com/netmaxt3r))
|
||||
- Fixed stale state on TouchableOpacity and TouchableBounce ([00055f89a0](https://github.com/facebook/react-native/commit/00055f89a0ad636c2f15b4dc94047ce6cb4a7e0f) by [@sammy-SC](https://github.com/sammy-SC))
|
||||
- Fixed font size enlarging when `adjustFontSizeToFit` is set ([ed7766cee9](https://github.com/facebook/react-native/commit/ed7766cee941e36af05b19a315b442edf738ef80) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
- Make sure to remove ccache scripts when ccache is not installed ([6dd83cbb35](https://github.com/facebook/react-native/commit/6dd83cbb3510b204974d4f9876a789b127e1bfef) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Allow usage of `RCTRootViewFactory` from Swift ([5aea518d88](https://github.com/facebook/react-native/commit/5aea518d880ff73c91b8e462b9aa40ac0d218538) by [@okwasniewski](https://github.com/okwasniewski))
|
||||
- Properly recycle the RCTPullToRefreshViewComponentView ([18f0a90358](https://github.com/facebook/react-native/commit/18f0a90358b4e7eb59871cc11a88ef9bef575246) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Fixed race condition in native module invalidation. ([b7812a8b6c](https://github.com/facebook/react-native/commit/b7812a8b6c3afbeacaad94779cd010bcc5440785) by [@dmytrorykun](https://github.com/dmytrorykun))
|
||||
- Let RCTHost be initialized with a function to provide the `bundleURL` so that it can connect to metro on Reload when the url changes. ([8b8b85bb1f](https://github.com/facebook/react-native/commit/8b8b85bb1f55a8090360fec84ec4f56f372ede6b) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Hide AutoFill from context menu when using `contextMenuHidden` ([493dbb2190](https://github.com/facebook/react-native/commit/493dbb21907c71e2a220876eddd08a5ea075e1e8) by [@jakex7](https://github.com/jakex7))
|
||||
- Remove loadSourceForBridge in RCTRootViewFactory ([0c02b26c1e](https://github.com/facebook/react-native/commit/0c02b26c1e00ca27d7a3ba4244a0957d4cb473aa) by [@okwasniewski](https://github.com/okwasniewski))
|
||||
- Fix Multiline TextInput with a fixed height scrolls to the bottom when changing AttributedText ([f6badca2f9](https://github.com/facebook/react-native/commit/f6badca2f9a5f1e986dd76444bebde0d6049513d) by [@fabOnReact](https://github.com/fabOnReact))
|
||||
- Add missing forward blocks to RCTRootViewFactory ([9d79f05e68](https://github.com/facebook/react-native/commit/9d79f05e68cd64bf8b213ff89a25726184ef387c) by [@okwasniewski](https://github.com/okwasniewski))
|
||||
- Fixed text highlighting in the New Architecture ([eadcebbb3e](https://github.com/facebook/react-native/commit/eadcebbb3efe1af70f3f7321617df9bc7fde0371))
|
||||
- Allow importing RCTAppDelegate in Swift ([7c953698b4](https://github.com/facebook/react-native/commit/7c953698b41af7187504fa56a9a7c943ae724cd0) by [@okwasniewski](https://github.com/okwasniewski))
|
||||
- Fixed headers content type check for iOS bundle download ([d9b0f15c84](https://github.com/facebook/react-native/commit/d9b0f15c844abce5e97edfd401656d84d0c84133) by [@jayshah123](https://github.com/jayshah123))
|
||||
- Fixed archiving for Mac Catalyst ([767330f218](https://github.com/facebook/react-native/commit/767330f21885e668bc0d9b5b3063113d0446bcbc) by [@kesha-antonov](https://github.com/kesha-antonov))
|
||||
- Fixed missing header imports ([46f53e97f0](https://github.com/facebook/react-native/commit/46f53e97f0c193d1a92ac56d23b3bef40639dd09))
|
||||
|
||||
### Security
|
||||
|
||||
|
||||
|
||||
#### Android specific
|
||||
|
||||
|
||||
|
||||
#### iOS specific
|
||||
|
||||
|
||||
|
||||
### Unknown
|
||||
|
||||
- Release 0.75.0-rc.3 ([15b55714eb](https://github.com/facebook/react-native/commit/15b55714eb4ac0ece5ab9e553601826286a464da) by [@react-native-bot](https://github.com/react-native-bot))
|
||||
- Bump hermes to hermes-2024-07-01-RNv0.75.0-1edbe36ce92fef2c4d427f5c4e104f2758f4b692 ([2ab13798f9](https://github.com/facebook/react-native/commit/2ab13798f9636da321cbe5fbffdb47834fc130ac) by [@cortinico](https://github.com/cortinico))
|
||||
- Fix type import in testing scripts ([f938e3214c](https://github.com/facebook/react-native/commit/f938e3214c8ecc11d2075494b5fdd535487f71d2) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Release 0.75.0-rc.2 ([668358c47a](https://github.com/facebook/react-native/commit/668358c47ad9cbe699bc3e497f8cae84dcdd1459) by [@react-native-bot](https://github.com/react-native-bot))
|
||||
- Bump RC in testing script ([865aaeda58](https://github.com/facebook/react-native/commit/865aaeda582a4e7ba50a5e3877058bd3d02026c8) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Bump CLI to 14.0.0-alpha.11 ([6a155dd1cf](https://github.com/facebook/react-native/commit/6a155dd1cf45e7d96811e73db9d455c846e4bc9e) by [@cortinico](https://github.com/cortinico))
|
||||
- Release 0.75.0-rc.1 ([9120930288](https://github.com/facebook/react-native/commit/91209302881fb380e25f7a3c2f7a93597da136f4) by [@react-native-bot](https://github.com/react-native-bot))
|
||||
- [Release-Testing] Update the testing script to use the new template ([c9f335a568](https://github.com/facebook/react-native/commit/c9f335a56855f9c99a9f75c534e695b107bde5a1) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Bump CLI to 14.0.0-alpha.10 ([a300a2c057](https://github.com/facebook/react-native/commit/a300a2c057d834b399beadcfabce7eea7d5d3131) by [@cortinico](https://github.com/cortinico))
|
||||
- Bump react-native CLI dependency to alpha.9 ([453e00a017](https://github.com/facebook/react-native/commit/453e00a017109274f7332fba131ceaf209c08016) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Fix JS tests for release ([fafc71b5cb](https://github.com/facebook/react-native/commit/fafc71b5cb93c6f4fbf48ab752155dca5f66220e) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Release 0.75.0-rc.0 ([98b302e219](https://github.com/facebook/react-native/commit/98b302e2190bd1bc464cee20fe1d454e50034ba6) by [@react-native-bot](https://github.com/react-native-bot))
|
||||
- Release 0.75.0-rc.0 ([534fdc0005](https://github.com/facebook/react-native/commit/534fdc0005bd1ab3859014a4e17b315635b9c13b) by [@react-native-bot](https://github.com/react-native-bot))
|
||||
- Fix handling of GITHUB_REF_NAME ([609c7c05b1](https://github.com/facebook/react-native/commit/609c7c05b13214f2a834b251de095243f8dcbf68) by [@cortinico](https://github.com/cortinico))
|
||||
- Release 0.75.0-rc.0 ([1d69fe9d23](https://github.com/facebook/react-native/commit/1d69fe9d23371b6329b2eb0a90caf503c5dba4e9) by [@react-native-bot](https://github.com/react-native-bot))
|
||||
- Add debugging info for GITHUB_REF ([63d1a1e5eb](https://github.com/facebook/react-native/commit/63d1a1e5eb7ae86f8a9ac960823da407e6317bf9) by [@cortinico](https://github.com/cortinico))
|
||||
- Release 0.75.0-rc.0 ([abd96c21ec](https://github.com/facebook/react-native/commit/abd96c21ec8f8c61d025028e074d03e94e058bef) by [@react-native-bot](https://github.com/react-native-bot))
|
||||
- Fix release scripts to use GITHUB_REF and GITHUB_REF_NAME variables ([375c88478c](https://github.com/facebook/react-native/commit/375c88478c985976e1b59dfa7353042a18b4d132) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Release 0.75.0-rc.0 ([c2ebb30389](https://github.com/facebook/react-native/commit/c2ebb303897126996912a328b0a388ea47b8cb4f) by [@react-native-bot](https://github.com/react-native-bot))
|
||||
- Configure git user before attempting to publish a release ([f4b1dd1fa1](https://github.com/facebook/react-native/commit/f4b1dd1fa11374cae8a696833ad9ded0767cba8f) by [@cortinico](https://github.com/cortinico))
|
||||
- Use github bot token to commit the tag ([528097709a](https://github.com/facebook/react-native/commit/528097709aeef434b0d85565bfd89a4a9ff5644e) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Remove publishing jobs from cci ([d524c151cd](https://github.com/facebook/react-native/commit/d524c151cd2c9bc81a633b9232d323c10b8efa82) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Release 0.75.0-rc.0 ([1481140e68](https://github.com/facebook/react-native/commit/1481140e68500c7bc69a17c65ee417946e4d8e68) by [@react-native-bot](https://github.com/react-native-bot))
|
||||
- Fix double quotes for inputs.dry_run ([03591318fb](https://github.com/facebook/react-native/commit/03591318fbabdc0c06808316f471cc361b53c57f) by [@cortinico](https://github.com/cortinico))
|
||||
- Fix input types for create-release ([56e1c8bfdd](https://github.com/facebook/react-native/commit/56e1c8bfdd57600e79c0b17de1d2fd933d20b8f9) by [@cortinico](https://github.com/cortinico))
|
||||
- Configure git user before attempting to publish a release ([1b891357b2](https://github.com/facebook/react-native/commit/1b891357b2f1995f2344cc991be423ca66fa6770) by [@cortinico](https://github.com/cortinico))
|
||||
- Forward inputs to Create Release composite action ([e36b46f0c9](https://github.com/facebook/react-native/commit/e36b46f0c970dc3f1f5b5058a8d10834acdb2667) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- [Release Testing] Update the testing script to run with the community template ([b236f9bd82](https://github.com/facebook/react-native/commit/b236f9bd82374e5cf92e1ad622bba3b14f948a04) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Disable test_js_e2e on the 0.75 release branch ([44d4190581](https://github.com/facebook/react-native/commit/44d4190581f4097862db2fdd8e5b70785600faf4) by [@cortinico](https://github.com/cortinico))
|
||||
- Bump Hermes version ([492a0c1292](https://github.com/facebook/react-native/commit/492a0c12921f5c55e39b76a992e3cbffcdc734a6) by [@cortinico](https://github.com/cortinico))
|
||||
- Fix xplat sync syntax error ([b0c0bb4591](https://github.com/facebook/react-native/commit/b0c0bb45911434ea654ba7e2feff4686061eba7a) by [@rickhanlonii](https://github.com/rickhanlonii))
|
||||
- Add Perfetto Hermes Sampling Data Source ([5a4cb3de3d](https://github.com/facebook/react-native/commit/5a4cb3de3d91dc05976157e9a1512c2a8819fd1d))
|
||||
- Enable regenerator transform for hermes-canary ([a0237e96f1](https://github.com/facebook/react-native/commit/a0237e96f1f0b5908008c0435a4efea120e77ac4) by [@avp](https://github.com/avp))
|
||||
- Setup Wave 2 of Feature Flags for React Native ([a45c5895f9](https://github.com/facebook/react-native/commit/a45c5895f94f8e5893d7d26b4a6584928b496ffa) by [@yungsters](https://github.com/yungsters))
|
||||
- Fixing exposing ReactDelegate through ReactActivity for reload() ([e25860f07c](https://github.com/facebook/react-native/commit/e25860f07c6af8d529d618da3ded556485ca0a73) by [@arushikesarwani94](https://github.com/arushikesarwani94))
|
||||
- Update ktfmt component on FBS:master ([876914be55](https://github.com/facebook/react-native/commit/876914be556ca62d6aa77ec101debf09062b8922))
|
||||
- Translation auto-update for Apps/Wilde/scripts/intl-config.json on master ([0276500d19](https://github.com/facebook/react-native/commit/0276500d19a557d4a692c521924e753c118c473c) by [@undefined](https://github.com/undefined))
|
||||
- Fixup margin: auto and justification behavior for overflowed containers ([f21d9afe0b](https://github.com/facebook/react-native/commit/f21d9afe0b0ddd97d89e89886d0d8e58739174ac) by [@NickGerleman](https://github.com/NickGerleman))
|
||||
- Translation auto-update for i18n/oculus-mirage.config.json on master ([72e262eb5b](https://github.com/facebook/react-native/commit/72e262eb5bd87cd43c74053878449ff7f361f3a7) by [@undefined](https://github.com/undefined))
|
||||
- Apply clang-format 18 ([a5eeea814d](https://github.com/facebook/react-native/commit/a5eeea814de57cd307a6625c6991f48b778d356b) by [@zertosh](https://github.com/zertosh))
|
||||
- Fix broken build due to a land time race ([c32a053722](https://github.com/facebook/react-native/commit/c32a05372238bfacff0540f7d9c5e3d86cdb22cc) by [@rshest](https://github.com/rshest))
|
||||
- Fix typos. ([ebd170bec3](https://github.com/facebook/react-native/commit/ebd170bec30562e90fcaee3349d9bdde7b440297) by [@waywardmonkeys](https://github.com/waywardmonkeys))
|
||||
- Reduce warning level of distributed Yoga builds ([b696a7dc5e](https://github.com/facebook/react-native/commit/b696a7dc5e78dd42eb712e7c4b7d6f389526d933) by [@NickGerleman](https://github.com/NickGerleman))
|
||||
|
||||
#### Android Unknown
|
||||
|
||||
- Fix build_android by setting git safe folders ([fee2156642](https://github.com/facebook/react-native/commit/fee215664287ddca31c8400c87a825c8e9822290) by [@cortinico](https://github.com/cortinico))
|
||||
- Use bigger machines for Android Helloworld ([88c136ed36](https://github.com/facebook/react-native/commit/88c136ed365e203e972481cef011d6156976e12c) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
|
||||
#### iOS Unknown
|
||||
|
||||
- Fix Helloworld ios jobs ([2a0c175135](https://github.com/facebook/react-native/commit/2a0c1751353d4a245ddd94f1cff6fa543deac7b6) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Bump Podfile.lock ([52db082576](https://github.com/facebook/react-native/commit/52db082576dba69d1fd092e2a5ad13d3274a6fc3) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
- Bump Podfile.lock to RC.2 ([1f10d62700](https://github.com/facebook/react-native/commit/1f10d627002d9606bab08a4096a894eab954a989) by [@cipolleschi](https://github.com/cipolleschi))
|
||||
|
||||
#### Failed to parse
|
||||
|
||||
- Fling][Android] Add synchronous event support ([dbc0334159](https://github.com/facebook/react-native/commit/dbc0334159a257026e3c260ab32b3a4ee2339104))
|
||||
- Use our fork of the react-native-communti/cli-platform-ios use_native_modues.rb script ([c884d19a50](https://github.com/facebook/react-native/commit/c884d19a501081ffbc4b353d751ecc3e32d6f624) by [@blakef](https://github.com/blakef))
|
||||
- Enforce Activities using ReactDelegate implement DefaultHardwareBackBtnHandler. ([a2d277f740](https://github.com/facebook/react-native/commit/a2d277f740d8ee95137d42679a1ffd872962a108) by [@javache](https://github.com/javache))
|
||||
|
||||
## v0.74.3
|
||||
|
||||
### Added
|
||||
|
||||
- Add the ReactMarkerConstants.CONTENT_APPEARED support on Android in bridgeless mode. ([3c4d7618f0](https://github.com/facebook/react-native/commit/3c4d7618f00751b08f73ffcec9ef1f69d44136da) by [@Kudo](https://github.com/Kudo))
|
||||
|
||||
### Changed
|
||||
|
||||
- Feat: update CLI to 13.6.9 ([d1e2a35061](https://github.com/facebook/react-native/commit/d1e2a3506152abde9b870b1a63f16d00ec277ea6) by [@szymonrybczak](https://github.com/szymonrybczak))
|
||||
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- Support `customizeRootView` from `RCTRootViewFactory` ([3c4d761](https://github.com/facebook/react-native/commit/3c4d7618f00751b08f73ffcec9ef1f69d44136da) by [@Kudo](https://github.com/Kudo))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Codegen computes output path relative to project root instead of current working directory. ([d3e0430dea](https://github.com/facebook/react-native/commit/d3e0430deac573fd44792e6005d5de20e9ad2797) by [@dmytrorykun](https://github.com/dmytrorykun))
|
||||
|
||||
|
||||
### Android specific
|
||||
|
||||
- Android native rejections should be instanceof Error ([f4b0fcb9](https://github.com/facebook/react-native/commit/f4b0fcb92263667754348f82030f85cc941846ba) by [huzhanbo1996](https://github.com/huzhanbo1996))
|
||||
- Tentative fix for NPE `JavaTimerManager$IdleCallbackRunnable.cancel` ([988bf162a0](https://github.com/facebook/react-native/commit/988bf162a0f36d9919cebbebc1fca27b58be4ae5) by [@cortinico](https://github.com/cortinico))
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- Fixed Multiline TextInput with a fixed height scrolls to the bottom when changing AttributedText ([e210c7c5](https://github.com/facebook/react-native/commit/e210c7c5741202a6e1b372731b50fdb59a7232bb) by [@fabOnReact](https://github.com/fabOnReact))
|
||||
- Fixed border being drawn over children when no color was set ([a2b52af3](https://github.com/facebook/react-native/commit/a2b52af3bcc273cf85f01510c24d4e8da1b45656) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
|
||||
## v0.74.2
|
||||
|
||||
### Changed
|
||||
@@ -598,6 +1069,28 @@
|
||||
|
||||
- Bump activesupport to minimum 6.1.7.5 CVE-2023-38037. ([07a159f279](https://github.com/facebook/react-native/commit/07a159f279cdcbed29c9c437dec1c0b8ac2d852f) by [@lunaleaps](https://github.com/lunaleaps))
|
||||
|
||||
## v0.73.9
|
||||
|
||||
### Added
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- Add privacy manifest aggregation. ([f4b9d09](https://github.com/facebook/react-native/commit/f4b9d098c863fa36f261e5961ad13dd4cd2706f8) by [@aleqsio](https://github.com/aleqsio))
|
||||
|
||||
### Changed
|
||||
|
||||
- Feat: update CLI to 12.3.7 ([c7a1f2428f](https://github.com/facebook/react-native/commit/c7a1f2428fd6772e34b547ea23fa1d265c5d8a62) by [@szymonrybczak](https://github.com/szymonrybczak))
|
||||
|
||||
### Fixed
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- Remove invalidate observer instead of re-adding observer in DeviceInfo module ([9db3eb6](https://github.com/facebook/react-native/commit/9db3eb686201f6ad4fddf5300f348f0caf69cfad) by [@zhongwuzw](https://github.com/zhongwuzw))
|
||||
- Fix privacy aggregation ([6983a8b](https://github.com/facebook/react-native/commit/6983a8b1b9c33ea4e580a4e94e1e9535b6cb5d81) by [@aleqsio](https://github.com/aleqsio))
|
||||
- Privacy Manifest aggregation failing due to missing nil check ([115331b](https://github.com/facebook/react-native/commit/115331b213152df623ad1c7988c9295802af6850) by [@swrobel](https://github.com/swrobel))
|
||||
- In privacy manifest post install script, handle the case where the file reference doesn't have a path ([86cb45e](https://github.com/facebook/react-native/commit/86cb45e57786b0a62d9c523f9d5db4f8e5dc52df) by [@robertying](https://github.com/robertying))
|
||||
- Privacy Manifest aggregation failing due to no `NSPrivacyAccessedAPITypes` key ([4bb94fe](https://github.com/facebook/react-native/commit/4bb94fe1e6c6174af5c9148bfc00f4bc7a87cf19) by [@renchap](https://github.com/renchap))
|
||||
|
||||
## v0.73.8
|
||||
|
||||
### Added
|
||||
|
||||
@@ -3,5 +3,5 @@ source 'https://rubygems.org'
|
||||
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
||||
ruby ">= 2.6.10"
|
||||
|
||||
gem 'cocoapods', '~> 1.13'
|
||||
gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1'
|
||||
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ PLATFORMS
|
||||
|
||||
DEPENDENCIES
|
||||
activesupport (>= 6.1.7.5, < 7.1.0)
|
||||
cocoapods (~> 1.13)
|
||||
cocoapods (~> 1.13, != 1.15.1, != 1.15.0)
|
||||
|
||||
RUBY VERSION
|
||||
ruby 3.2.0p0
|
||||
|
||||
+2
-2
@@ -60,7 +60,7 @@ nexusPublishing {
|
||||
|
||||
tasks.register("clean", Delete::class.java) {
|
||||
description = "Remove all the build files and intermediate build outputs"
|
||||
dependsOn(gradle.includedBuild("react-native-gradle-plugin").task(":clean"))
|
||||
dependsOn(gradle.includedBuild("gradle-plugin").task(":clean"))
|
||||
subprojects.forEach {
|
||||
if (it.project.plugins.hasPlugin("com.android.library") ||
|
||||
it.project.plugins.hasPlugin("com.android.application")) {
|
||||
@@ -86,7 +86,7 @@ tasks.register("clean", Delete::class.java) {
|
||||
|
||||
tasks.register("build") {
|
||||
description = "Build and test all the React Native relevant projects."
|
||||
dependsOn(gradle.includedBuild("react-native-gradle-plugin").task(":build"))
|
||||
dependsOn(gradle.includedBuild("gradle-plugin").task(":build"))
|
||||
}
|
||||
|
||||
tasks.register("publishAllToMavenTempLocal") {
|
||||
|
||||
Vendored
+261
@@ -0,0 +1,261 @@
|
||||
/**
|
||||
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
|
||||
*
|
||||
* @flow strict-local
|
||||
*/
|
||||
|
||||
// Code modified from https://github.com/flow-typed/flow-typed/blob/master/definitions/npm/semver_v6.2.x/flow_v0.104.x-/semver_v6.2.x.js
|
||||
|
||||
declare module 'semver' {
|
||||
declare type Release =
|
||||
| 'major'
|
||||
| 'premajor'
|
||||
| 'minor'
|
||||
| 'preminor'
|
||||
| 'patch'
|
||||
| 'prepatch'
|
||||
| 'prerelease';
|
||||
|
||||
// The supported comparators are taken from the source here:
|
||||
// https://github.com/npm/node-semver/blob/8bd070b550db2646362c9883c8d008d32f66a234/semver.js#L623
|
||||
declare type Operator =
|
||||
| '==='
|
||||
| '!=='
|
||||
| '=='
|
||||
| '='
|
||||
| '' // Not sure why you would want this, but whatever.
|
||||
| '!='
|
||||
| '>'
|
||||
| '>='
|
||||
| '<'
|
||||
| '<=';
|
||||
|
||||
declare class SemVer {
|
||||
build: Array<string>;
|
||||
loose: ?boolean;
|
||||
major: number;
|
||||
minor: number;
|
||||
patch: number;
|
||||
prerelease: Array<string | number>;
|
||||
raw: string;
|
||||
version: string;
|
||||
|
||||
constructor(version: string | SemVer, options?: Options): SemVer;
|
||||
compare(other: string | SemVer): -1 | 0 | 1;
|
||||
compareMain(other: string | SemVer): -1 | 0 | 1;
|
||||
comparePre(other: string | SemVer): -1 | 0 | 1;
|
||||
compareBuild(other: string | SemVer): -1 | 0 | 1;
|
||||
format(): string;
|
||||
inc(release: Release, identifier: string): this;
|
||||
}
|
||||
|
||||
declare class Comparator {
|
||||
options?: Options;
|
||||
operator: Operator;
|
||||
semver: SemVer;
|
||||
value: string;
|
||||
|
||||
constructor(comp: string | Comparator, options?: Options): Comparator;
|
||||
parse(comp: string): void;
|
||||
test(version: string): boolean;
|
||||
}
|
||||
|
||||
declare class Range {
|
||||
loose: ?boolean;
|
||||
raw: string;
|
||||
set: Array<Array<Comparator>>;
|
||||
|
||||
constructor(range: string | Range, options?: Options): Range;
|
||||
format(): string;
|
||||
parseRange(range: string): Array<Comparator>;
|
||||
test(version: string): boolean;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
declare var SEMVER_SPEC_VERSION: string;
|
||||
declare var re: Array<RegExp>;
|
||||
declare var src: Array<string>;
|
||||
|
||||
declare type Options =
|
||||
| {
|
||||
options?: Options,
|
||||
includePrerelease?: boolean,
|
||||
}
|
||||
| boolean;
|
||||
|
||||
// Functions
|
||||
declare function valid(v: string | SemVer, options?: Options): string | null;
|
||||
declare function clean(v: string | SemVer, options?: Options): string | null;
|
||||
declare function inc(
|
||||
v: string | SemVer,
|
||||
release: Release,
|
||||
options?: Options,
|
||||
identifier?: string,
|
||||
): string | null;
|
||||
declare function inc(
|
||||
v: string | SemVer,
|
||||
release: Release,
|
||||
identifier: string,
|
||||
): string | null;
|
||||
declare function major(v: string | SemVer, options?: Options): number;
|
||||
declare function minor(v: string | SemVer, options?: Options): number;
|
||||
declare function patch(v: string | SemVer, options?: Options): number;
|
||||
declare function intersects(
|
||||
r1: string | SemVer,
|
||||
r2: string | SemVer,
|
||||
loose?: boolean,
|
||||
): boolean;
|
||||
declare function minVersion(r: string | Range): Range | null;
|
||||
|
||||
// Comparison
|
||||
declare function gt(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function gte(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function lt(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function lte(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function eq(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function neq(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function cmp(
|
||||
v1: string | SemVer,
|
||||
comparator: Operator,
|
||||
v2: string | SemVer,
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function compare(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
options?: Options,
|
||||
): -1 | 0 | 1;
|
||||
declare function rcompare(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
options?: Options,
|
||||
): -1 | 0 | 1;
|
||||
declare function diff(v1: string | SemVer, v2: string | SemVer): ?Release;
|
||||
declare function intersects(comparator: Comparator): boolean;
|
||||
declare function sort(
|
||||
list: Array<string | SemVer>,
|
||||
options?: Options,
|
||||
): Array<string | SemVer>;
|
||||
declare function rsort(
|
||||
list: Array<string | SemVer>,
|
||||
options?: Options,
|
||||
): Array<string | SemVer>;
|
||||
declare function compareIdentifiers(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
): -1 | 0 | 1;
|
||||
declare function rcompareIdentifiers(
|
||||
v1: string | SemVer,
|
||||
v2: string | SemVer,
|
||||
): -1 | 0 | 1;
|
||||
|
||||
// Ranges
|
||||
declare function validRange(
|
||||
range: string | Range,
|
||||
options?: Options,
|
||||
): string | null;
|
||||
declare function satisfies(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function maxSatisfying(
|
||||
versions: Array<string | SemVer>,
|
||||
range: string | Range,
|
||||
options?: Options,
|
||||
): string | SemVer | null;
|
||||
declare function minSatisfying(
|
||||
versions: Array<string | SemVer>,
|
||||
range: string | Range,
|
||||
options?: Options,
|
||||
): string | SemVer | null;
|
||||
declare function gtr(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function ltr(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function outside(
|
||||
version: string | SemVer,
|
||||
range: string | Range,
|
||||
hilo: '>' | '<',
|
||||
options?: Options,
|
||||
): boolean;
|
||||
declare function intersects(range: Range): boolean;
|
||||
|
||||
// Coercion
|
||||
declare function coerce(version: string | SemVer, options?: Options): ?SemVer;
|
||||
|
||||
// Not explicitly documented, or deprecated
|
||||
declare function parse(version: string, options?: Options): ?SemVer;
|
||||
declare function toComparators(
|
||||
range: string | Range,
|
||||
options?: Options,
|
||||
): Array<Array<string>>;
|
||||
|
||||
declare export default {
|
||||
SEMVER_SPEC_VERSION: typeof SEMVER_SPEC_VERSION,
|
||||
re: typeof re,
|
||||
src: typeof src,
|
||||
valid: typeof valid,
|
||||
clean: typeof clean,
|
||||
inc: typeof inc,
|
||||
major: typeof major,
|
||||
minor: typeof minor,
|
||||
patch: typeof patch,
|
||||
intersects: typeof intersects,
|
||||
minVersion: typeof minVersion,
|
||||
gt: typeof gt,
|
||||
gte: typeof gte,
|
||||
lt: typeof lt,
|
||||
lte: typeof lte,
|
||||
eq: typeof eq,
|
||||
neq: typeof neq,
|
||||
cmp: typeof cmp,
|
||||
compare: typeof compare,
|
||||
rcompare: typeof rcompare,
|
||||
diff: typeof diff,
|
||||
sort: typeof sort,
|
||||
rsort: typeof rsort,
|
||||
compareIdentifiers: typeof compareIdentifiers,
|
||||
rcompareIdentifiers: typeof rcompareIdentifiers,
|
||||
validRange: typeof validRange,
|
||||
satisfies: typeof satisfies,
|
||||
maxSatisfying: typeof maxSatisfying,
|
||||
minSatisfying: typeof minSatisfying,
|
||||
gtr: typeof gtr,
|
||||
ltr: typeof ltr,
|
||||
outside: typeof outside,
|
||||
coerce: typeof coerce,
|
||||
parse: typeof parse,
|
||||
toComparators: typeof toComparators,
|
||||
};
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -84,7 +86,8 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
Vendored
+94
-92
@@ -1,92 +1,94 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
||||
@@ -33,7 +33,6 @@ module.exports = {
|
||||
'<rootDir>/packages/react-native/template',
|
||||
'<rootDir>/packages/react-native/sdks',
|
||||
'<rootDir>/packages/react-native/Libraries/Renderer',
|
||||
'<rootDir>/packages/rn-tester/e2e',
|
||||
'<rootDir>/packages/react-native-test-renderer/src',
|
||||
],
|
||||
transformIgnorePatterns: ['node_modules/(?!@react-native/)'],
|
||||
|
||||
+6
-5
@@ -22,7 +22,7 @@
|
||||
"print-packages": "node ./scripts/monorepo/print",
|
||||
"shellcheck": "./scripts/circleci/analyze_scripts.sh",
|
||||
"start": "cd packages/rn-tester && npm run start",
|
||||
"set-version": "node ./scripts/releases/set-version",
|
||||
"set-version": "node ./scripts/releases/set-version.js",
|
||||
"test-android": "./gradlew :packages:react-native:ReactAndroid:test",
|
||||
"test-ci": "jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"",
|
||||
"test-e2e-local-clean": "node ./scripts/release-testing/test-e2e-local-clean.js",
|
||||
@@ -48,13 +48,14 @@
|
||||
"@definitelytyped/dtslint": "^0.0.127",
|
||||
"@jest/create-cache-key-function": "^29.6.3",
|
||||
"@pkgjs/parseargs": "^0.11.0",
|
||||
"@react-native/metro-babel-transformer": "0.75.0-main",
|
||||
"@react-native/metro-config": "0.75.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.76.0-main",
|
||||
"@react-native/metro-config": "0.76.0-main",
|
||||
"@tsconfig/node18": "1.0.1",
|
||||
"@types/react": "^18.2.6",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"ansi-styles": "^4.2.1",
|
||||
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
|
||||
"babel-plugin-syntax-hermes-parser": "0.22.0",
|
||||
"babel-plugin-transform-define": "^2.1.2",
|
||||
"babel-plugin-transform-flow-enums": "^0.0.2",
|
||||
"babel-preset-fbjs": "^3.4.0",
|
||||
@@ -76,7 +77,7 @@
|
||||
"eslint-plugin-redundant-undefined": "^0.4.0",
|
||||
"eslint-plugin-relay": "^1.8.3",
|
||||
"flow-api-translator": "0.22.0",
|
||||
"flow-bin": "^0.238.0",
|
||||
"flow-bin": "^0.239.1",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-eslint": "0.22.0",
|
||||
"hermes-transform": "0.22.0",
|
||||
@@ -99,7 +100,7 @@
|
||||
"signedsource": "^1.0.0",
|
||||
"supports-color": "^7.1.0",
|
||||
"typescript": "5.0.4",
|
||||
"ws": "^6.2.2"
|
||||
"ws": "^6.2.3"
|
||||
},
|
||||
"resolutions": {
|
||||
"react-is": "19.0.0-rc-fb9a90fa48-20240614"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/assets-registry",
|
||||
"version": "0.75.0-main",
|
||||
"version": "0.76.0-main",
|
||||
"description": "Asset support code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-plugin-codegen",
|
||||
"version": "0.75.0-main",
|
||||
"version": "0.76.0-main",
|
||||
"description": "Babel plugin to generate native module and view manager code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -25,7 +25,7 @@
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.75.0-main"
|
||||
"@react-native/codegen": "0.76.0-main"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/community-cli-plugin",
|
||||
"version": "0.75.0-main",
|
||||
"version": "0.76.0-main",
|
||||
"description": "Core CLI commands for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -22,17 +22,16 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native-community/cli-server-api": "14.0.0-alpha.2",
|
||||
"@react-native-community/cli-tools": "14.0.0-alpha.2",
|
||||
"@react-native/dev-middleware": "0.75.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.75.0-main",
|
||||
"@react-native-community/cli-server-api": "14.0.0-alpha.11",
|
||||
"@react-native-community/cli-tools": "14.0.0-alpha.11",
|
||||
"@react-native/dev-middleware": "0.76.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.76.0-main",
|
||||
"chalk": "^4.0.0",
|
||||
"execa": "^5.1.1",
|
||||
"metro": "^0.80.3",
|
||||
"metro-config": "^0.80.3",
|
||||
"metro-core": "^0.80.3",
|
||||
"node-fetch": "^2.2.0",
|
||||
"querystring": "^0.2.1",
|
||||
"readline": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -14,9 +14,9 @@ import type {ConfigT} from 'metro-config';
|
||||
import type {RequestOptions} from 'metro/src/shared/types.flow';
|
||||
|
||||
import loadMetroConfig from '../../utils/loadMetroConfig';
|
||||
import {logger} from '../../utils/logger';
|
||||
import parseKeyValueParamArray from '../../utils/parseKeyValueParamArray';
|
||||
import saveAssets from './saveAssets';
|
||||
import {logger} from '@react-native-community/cli-tools';
|
||||
import chalk from 'chalk';
|
||||
import Server from 'metro/src/Server';
|
||||
import metroBundle from 'metro/src/shared/output/bundle';
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
import type {AssetData} from 'metro/src/Assets';
|
||||
|
||||
import {logger} from '../../utils/logger';
|
||||
import {
|
||||
cleanAssetCatalog,
|
||||
getImageSet,
|
||||
@@ -20,7 +21,6 @@ import {
|
||||
import filterPlatformAssetScales from './filterPlatformAssetScales';
|
||||
import getAssetDestPathAndroid from './getAssetDestPathAndroid';
|
||||
import getAssetDestPathIOS from './getAssetDestPathIOS';
|
||||
import {logger} from '@react-native-community/cli-tools';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
@@ -111,7 +111,9 @@ function copyAll(filesToCopy: CopiedFiles) {
|
||||
} else {
|
||||
// queue.length === 0 is checked in previous branch, so this is string
|
||||
const src = queue.shift();
|
||||
// $FlowFixMe[incompatible-type]
|
||||
const dest = filesToCopy[src];
|
||||
// $FlowFixMe[incompatible-call]
|
||||
copy(src, dest, copyNext);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import type {Config} from '@react-native-community/cli-types';
|
||||
|
||||
import {KeyPressHandler} from '../../utils/KeyPressHandler';
|
||||
import {logger} from '@react-native-community/cli-tools';
|
||||
import {logger} from '../../utils/logger';
|
||||
import chalk from 'chalk';
|
||||
import execa from 'execa';
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
@@ -16,12 +16,13 @@ import typeof TerminalReporter from 'metro/src/lib/TerminalReporter';
|
||||
|
||||
import isDevServerRunning from '../../utils/isDevServerRunning';
|
||||
import loadMetroConfig from '../../utils/loadMetroConfig';
|
||||
import {logger} from '../../utils/logger';
|
||||
import * as version from '../../utils/version';
|
||||
import attachKeyHandlers from './attachKeyHandlers';
|
||||
import {
|
||||
createDevServerMiddleware,
|
||||
indexPageMiddleware,
|
||||
} from '@react-native-community/cli-server-api';
|
||||
import {logger, version} from '@react-native-community/cli-tools';
|
||||
import {createDevMiddleware} from '@react-native/dev-middleware';
|
||||
import chalk from 'chalk';
|
||||
import Metro from 'metro';
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import {CLIError, logger} from '@react-native-community/cli-tools';
|
||||
import {CLIError} from './errors';
|
||||
import {logger} from './logger';
|
||||
|
||||
const CTRL_C = '\u0003';
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
/**
|
||||
* A custom Error that creates a single-lined message to match current styling inside CLI.
|
||||
* Uses original stack trace when `originalError` is passed or erase the stack if it's not defined.
|
||||
*/
|
||||
export class CLIError extends Error {
|
||||
constructor(msg: string, originalError?: Error | string) {
|
||||
super(inlineString(msg));
|
||||
if (originalError != null) {
|
||||
this.stack =
|
||||
typeof originalError === 'string'
|
||||
? originalError
|
||||
: originalError.stack || ''.split('\n').slice(0, 2).join('\n');
|
||||
} else {
|
||||
// When the "originalError" is not passed, it means that we know exactly
|
||||
// what went wrong and provide means to fix it. In such cases showing the
|
||||
// stack is an unnecessary clutter to the CLI output, hence removing it.
|
||||
this.stack = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Raised when we're unable to find a package.json
|
||||
*/
|
||||
export class UnknownProjectError extends Error {}
|
||||
|
||||
export const inlineString = (str: string = ''): string =>
|
||||
str.replace(/(\s{2,})/gm, ' ').trim();
|
||||
@@ -12,8 +12,9 @@
|
||||
import type {Config} from '@react-native-community/cli-types';
|
||||
import type {ConfigT, InputConfigT, YargArguments} from 'metro-config';
|
||||
|
||||
import {CLIError} from './errors';
|
||||
import {logger} from './logger';
|
||||
import {reactNativePlatformResolver} from './metroPlatformResolver';
|
||||
import {CLIError, logger} from '@react-native-community/cli-tools';
|
||||
import {loadConfig, mergeConfig, resolveConfig} from 'metro-config';
|
||||
import path from 'path';
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import chalk from 'chalk';
|
||||
|
||||
const SEPARATOR = ', ';
|
||||
|
||||
let verbose: boolean = process.argv.includes('--verbose');
|
||||
let disabled: boolean = false;
|
||||
let hidden: boolean = false;
|
||||
|
||||
const formatMessages = (messages: Array<string>) =>
|
||||
chalk.reset(messages.join(SEPARATOR));
|
||||
|
||||
const success = (...messages: Array<string>) => {
|
||||
if (!disabled) {
|
||||
console.log(`${chalk.green.bold('success')} ${formatMessages(messages)}`);
|
||||
}
|
||||
};
|
||||
|
||||
const info = (...messages: Array<string>) => {
|
||||
if (!disabled) {
|
||||
console.log(`${chalk.cyan.bold('info')} ${formatMessages(messages)}`);
|
||||
}
|
||||
};
|
||||
|
||||
const warn = (...messages: Array<string>) => {
|
||||
if (!disabled) {
|
||||
console.warn(`${chalk.yellow.bold('warn')} ${formatMessages(messages)}`);
|
||||
}
|
||||
};
|
||||
|
||||
const error = (...messages: Array<string>) => {
|
||||
if (!disabled) {
|
||||
console.error(`${chalk.red.bold('error')} ${formatMessages(messages)}`);
|
||||
}
|
||||
};
|
||||
|
||||
const debug = (...messages: Array<string>) => {
|
||||
if (verbose && !disabled) {
|
||||
console.log(`${chalk.gray.bold('debug')} ${formatMessages(messages)}`);
|
||||
} else {
|
||||
hidden = true;
|
||||
}
|
||||
};
|
||||
|
||||
const log = (...messages: Array<string>) => {
|
||||
if (!disabled) {
|
||||
console.log(`${formatMessages(messages)}`);
|
||||
}
|
||||
};
|
||||
|
||||
const setVerbose = (level: boolean) => {
|
||||
verbose = level;
|
||||
};
|
||||
|
||||
const isVerbose = (): boolean => verbose;
|
||||
|
||||
const disable = () => {
|
||||
disabled = true;
|
||||
};
|
||||
|
||||
const enable = () => {
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
const hasDebugMessages = (): boolean => hidden;
|
||||
|
||||
let communityLogger;
|
||||
try {
|
||||
const {logger} = require('@react-native-community/cli-tools');
|
||||
logger.debug("Using @react-naive-community/cli-tools' logger");
|
||||
communityLogger = logger;
|
||||
} catch {
|
||||
// This is no longer a required dependency in react-native projects, but use it instead of
|
||||
// our forked version if it's available. Fail silently otherwise.
|
||||
}
|
||||
|
||||
type Logger = $ReadOnly<{
|
||||
debug: (...message: Array<string>) => void,
|
||||
error: (...message: Array<string>) => void,
|
||||
log: (...message: Array<string>) => void,
|
||||
info: (...message: Array<string>) => void,
|
||||
warn: (...message: Array<string>) => void,
|
||||
...
|
||||
}>;
|
||||
|
||||
export const logger: Logger = communityLogger ?? {
|
||||
success,
|
||||
info,
|
||||
warn,
|
||||
error,
|
||||
debug,
|
||||
log,
|
||||
setVerbose,
|
||||
isVerbose,
|
||||
hasDebugMessages,
|
||||
disable,
|
||||
enable,
|
||||
};
|
||||
|
||||
if (communityLogger == null) {
|
||||
logger.debug("Using @react-native/communityu-cli-plugin's logger");
|
||||
}
|
||||
@@ -9,8 +9,6 @@
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import querystring from 'querystring';
|
||||
|
||||
export default function parseKeyValueParamArray(
|
||||
keyValueArray: $ReadOnlyArray<string>,
|
||||
): Record<string, string> {
|
||||
@@ -23,8 +21,11 @@ export default function parseKeyValueParamArray(
|
||||
if (item.indexOf('&') !== -1) {
|
||||
throw new Error('Parameter cannot include "&" but found: ' + item);
|
||||
}
|
||||
Object.assign(result, querystring.parse(item));
|
||||
const params = new URLSearchParams(item);
|
||||
params.forEach((value, key) => {
|
||||
// $FlowExpectedError[prop-missing]
|
||||
result[key] = value;
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,219 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import {logger} from './logger';
|
||||
import chalk from 'chalk';
|
||||
import {readFileSync} from 'fs';
|
||||
import path from 'path';
|
||||
import semver from 'semver';
|
||||
|
||||
type Release = {
|
||||
// The current stable release
|
||||
stable: string,
|
||||
// The current candidate release. These are only populated if the latest release is a candidate release.
|
||||
candidate?: string,
|
||||
changelogUrl: string,
|
||||
diffUrl: string,
|
||||
};
|
||||
|
||||
interface DiffPurge {
|
||||
name: string;
|
||||
zipball_url: string;
|
||||
tarball_url: string;
|
||||
commit: {
|
||||
sha: string,
|
||||
url: string,
|
||||
};
|
||||
node_id: string;
|
||||
}
|
||||
|
||||
type Update = {
|
||||
// Only populated if an upgrade is available
|
||||
upgrade?: Release,
|
||||
// The project's package's current version
|
||||
current: string,
|
||||
// The project's package's name
|
||||
name: string,
|
||||
};
|
||||
|
||||
type LatestVersions = {
|
||||
candidate?: string,
|
||||
stable: string,
|
||||
};
|
||||
|
||||
type Headers = {
|
||||
'User-Agent': string,
|
||||
[header: string]: string,
|
||||
};
|
||||
|
||||
function getReactNativeVersion(projectRoot: string): string | void {
|
||||
try {
|
||||
const resolvedPath: string = require.resolve('react-native/package.json', {
|
||||
paths: [projectRoot],
|
||||
});
|
||||
logger.debug(
|
||||
`Found 'react-native' from '${projectRoot}' -> '${resolvedPath}'`,
|
||||
);
|
||||
return JSON.parse(readFileSync(resolvedPath, 'utf8')).version;
|
||||
} catch {
|
||||
logger.debug("Couldn't read the version of 'react-native'");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out a message if the user's version is behind a stable version of React Native
|
||||
*/
|
||||
export async function logIfUpdateAvailable(projectRoot: string): Promise<void> {
|
||||
const versions = await latest(projectRoot);
|
||||
if (!versions?.upgrade) {
|
||||
return;
|
||||
}
|
||||
if (semver.gt(versions.upgrade.stable, versions.current)) {
|
||||
logger.info(
|
||||
`React Native v${versions.upgrade.stable} is now available (your project is running on v${versions.name}).
|
||||
Changelog: ${chalk.dim.underline(versions.upgrade?.changelogUrl ?? 'none')}
|
||||
Diff: ${chalk.dim.underline(versions.upgrade?.diffUrl ?? 'none')}
|
||||
`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the latest stables version of React Native > current version
|
||||
*/
|
||||
async function latest(projectRoot: string): Promise<Update | void> {
|
||||
try {
|
||||
const currentVersion = getReactNativeVersion(projectRoot);
|
||||
if (currentVersion == null) {
|
||||
return;
|
||||
}
|
||||
const {name} = JSON.parse(
|
||||
readFileSync(path.join(projectRoot, 'package.json'), 'utf8'),
|
||||
);
|
||||
const upgrade = await getLatestRelease(name, currentVersion);
|
||||
|
||||
if (upgrade) {
|
||||
return {
|
||||
name,
|
||||
current: currentVersion,
|
||||
upgrade,
|
||||
};
|
||||
}
|
||||
} catch (e) {
|
||||
// We let the flow continue as this component is not vital for the rest of
|
||||
// the CLI.
|
||||
logger.debug(
|
||||
'Cannot detect current version of React Native, ' +
|
||||
'skipping check for a newer release',
|
||||
);
|
||||
logger.debug(e);
|
||||
}
|
||||
}
|
||||
|
||||
// $FlowFixMe
|
||||
function isDiffPurgeEntry(data: Partial<DiffPurge>): data is DiffPurge {
|
||||
return (
|
||||
[data.name, data.zipball_url, data.tarball_url, data.node_id].filter(
|
||||
e => typeof e !== 'undefined',
|
||||
).length === 0
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks via GitHub API if there is a newer stable React Native release and,
|
||||
* if it exists, returns the release data.
|
||||
*
|
||||
* If the latest release is not newer or if it's a prerelease, the function
|
||||
* will return undefined.
|
||||
*/
|
||||
export default async function getLatestRelease(
|
||||
name: string,
|
||||
currentVersion: string,
|
||||
): Promise<Release | void> {
|
||||
logger.debug('Checking for a newer version of React Native');
|
||||
try {
|
||||
logger.debug(`Current version: ${currentVersion}`);
|
||||
|
||||
// if the version is a nightly/canary build, we want to bail
|
||||
// since they are nightlies or unreleased versions
|
||||
if (['-canary', '-nightly'].some(s => currentVersion.includes(s))) {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.debug('Checking for newer releases on GitHub');
|
||||
const latestVersion = await getLatestRnDiffPurgeVersion(name);
|
||||
if (latestVersion == null) {
|
||||
logger.debug('Failed to get latest release');
|
||||
return;
|
||||
}
|
||||
const {stable, candidate} = latestVersion;
|
||||
logger.debug(`Latest release: ${stable} (${candidate ?? ''})`);
|
||||
|
||||
if (semver.compare(stable, currentVersion) >= 0) {
|
||||
return {
|
||||
stable,
|
||||
candidate,
|
||||
changelogUrl: buildChangelogUrl(stable),
|
||||
diffUrl: buildDiffUrl(currentVersion, stable),
|
||||
};
|
||||
}
|
||||
} catch (e) {
|
||||
logger.debug(
|
||||
'Something went wrong with remote version checking, moving on',
|
||||
);
|
||||
logger.debug(e);
|
||||
}
|
||||
}
|
||||
|
||||
function buildChangelogUrl(version: string) {
|
||||
return `https://github.com/facebook/react-native/releases/tag/v${version}`;
|
||||
}
|
||||
|
||||
function buildDiffUrl(oldVersion: string, newVersion: string) {
|
||||
return `https://react-native-community.github.io/upgrade-helper/?from=${oldVersion}&to=${newVersion}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the most recent React Native version available to upgrade to.
|
||||
*/
|
||||
async function getLatestRnDiffPurgeVersion(
|
||||
name: string,
|
||||
): Promise<LatestVersions | void> {
|
||||
const options = {
|
||||
// https://developer.github.com/v3/#user-agent-required
|
||||
headers: {'User-Agent': '@react-native/community-cli-plugin'} as Headers,
|
||||
};
|
||||
|
||||
const resp = await fetch(
|
||||
'https://api.github.com/repos/react-native-community/rn-diff-purge/tags',
|
||||
options,
|
||||
);
|
||||
|
||||
const result: LatestVersions = {stable: '0.0.0'};
|
||||
|
||||
if (resp.status !== 200) {
|
||||
return;
|
||||
}
|
||||
|
||||
const body: DiffPurge[] = (await resp.json()).filter(isDiffPurgeEntry);
|
||||
for (const {name: version} of body) {
|
||||
if (result.candidate != null && version.includes('-rc')) {
|
||||
result.candidate = version.substring(8);
|
||||
continue;
|
||||
}
|
||||
if (!version.includes('-rc')) {
|
||||
result.stable = version.substring(8);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/core-cli-utils",
|
||||
"version": "0.75.0-main",
|
||||
"version": "0.76.0-main",
|
||||
"description": "React Native CLI library for Frameworks to build on",
|
||||
"license": "MIT",
|
||||
"main": "./src/index.flow.js",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@generated SignedSource<<a5112919266a3a3f492b1f1336f63047>>
|
||||
Git revision: f7e972ce2917749a125fc0871781d9307ca336e8
|
||||
@generated SignedSource<<5e934414bfd4fcd0aeff6ccbb35fca59>>
|
||||
Git revision: a4fff8a0b4d44cb1dea89ffeac1b7cb4da8b151b
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebookexperimental/rn-chrome-devtools-frontend
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import*as e from"../../core/sdk/sdk.js";const i="__FUSEBOX_REACT_DEVTOOLS_DISPATCHER__";class n extends e.SDKModel.SDKModel{domainToListeners=new Map;constructor(e){super(e),this.initialize(e)}initialize(i){const n=i.model(e.RuntimeModel.RuntimeModel);n&&(n.addEventListener(e.RuntimeModel.Events.BindingCalled,this.bindingCalled,this),this.enable(i).then((()=>this.onInitialization())))}onInitialization(){this.dispatchEventToListeners("Initialized")}bindingCalled(e){const i=e.data.payload;try{const{domain:e,message:n}=JSON.parse(i);this.dispatchMessageToDomainEventListeners(e,n)}catch(e){throw new Error("Failed to parse bindingCalled event payload:",e)}}subscribeToDomainMessages(e,i){let n=this.domainToListeners.get(e);n||(n=new Set,this.domainToListeners.set(e,n)),n.add(i)}unsubscribeFromDomainMessages(e,i){const n=this.domainToListeners.get(e);n&&n.delete(i)}dispatchMessageToDomainEventListeners(e,i){const n=this.domainToListeners.get(e);if(!n)return;const t=[];for(const e of n)try{e(i)}catch(e){t.push(e)}if(t.length>0)throw new AggregateError(t,`[ReactDevToolsBindingsModel] Error occurred when calling event listeners for domain: ${e}`)}async initializeDomain(n){const t=this.target().model(e.RuntimeModel.RuntimeModel);if(!t)throw new Error(`[ReactDevToolsBindingsModel] Failed to initialize domain ${n}: runtime model is not available`);await t.agent.invoke_evaluate({expression:`void ${i}.initializeDomain('${n}')`})}async sendMessage(n,t){const o=this.target().model(e.RuntimeModel.RuntimeModel);if(!o)throw new Error(`[ReactDevToolsBindingsModel] Failed to send message for domain ${n}: runtime model is not available`);const s=JSON.stringify(t);await o.agent.invoke_evaluate({expression:`${i}.sendMessage('${n}', '${s}')`})}async enable(n){const t=n.model(e.RuntimeModel.RuntimeModel);if(!t)throw new Error("[ReactDevToolsBindingsModel] Failed to enable model: runtime model is not available");await t.agent.invoke_evaluate({expression:`${i}.BINDING_NAME`}).then((e=>e.result.value)).then((e=>t.agent.invoke_addBinding({name:e})))}}e.SDKModel.SDKModel.register(n,{capabilities:4,autostart:!1});var t=Object.freeze({__proto__:null,ReactDevToolsBindingsModel:n});export{t as ReactDevToolsBindingsModel};
|
||||
import*as e from"../../core/sdk/sdk.js";const i="__FUSEBOX_REACT_DEVTOOLS_DISPATCHER__";class n extends e.SDKModel.SDKModel{domainToListeners=new Map;constructor(e){super(e),this.initialize(e)}initialize(i){const n=i.model(e.RuntimeModel.RuntimeModel);n&&(n.addEventListener(e.RuntimeModel.Events.BindingCalled,this.bindingCalled,this),this.enable(i).then((()=>this.onInitialization())))}onInitialization(){this.dispatchEventToListeners("Initialized")}bindingCalled(e){const i=e.data.payload;let n=null;try{n=JSON.parse(i)}catch(e){throw new Error("Failed to parse bindingCalled event payload",{cause:e})}n&&this.dispatchMessageToDomainEventListeners(n.domain,n.message)}subscribeToDomainMessages(e,i){let n=this.domainToListeners.get(e);n||(n=new Set,this.domainToListeners.set(e,n)),n.add(i)}unsubscribeFromDomainMessages(e,i){const n=this.domainToListeners.get(e);n&&n.delete(i)}dispatchMessageToDomainEventListeners(e,i){const n=this.domainToListeners.get(e);if(!n)return;const t=[];for(const e of n)try{e(i)}catch(e){t.push(e)}if(t.length>0)throw new AggregateError(t,`[ReactDevToolsBindingsModel] Error occurred when calling event listeners for domain: ${e}`)}async initializeDomain(n){const t=this.target().model(e.RuntimeModel.RuntimeModel);if(!t)throw new Error(`[ReactDevToolsBindingsModel] Failed to initialize domain ${n}: runtime model is not available`);await t.agent.invoke_evaluate({expression:`void ${i}.initializeDomain('${n}')`})}async sendMessage(n,t){const o=this.target().model(e.RuntimeModel.RuntimeModel);if(!o)throw new Error(`[ReactDevToolsBindingsModel] Failed to send message for domain ${n}: runtime model is not available`);const s=JSON.stringify(t);await o.agent.invoke_evaluate({expression:`${i}.sendMessage('${n}', '${s}')`})}async enable(n){const t=n.model(e.RuntimeModel.RuntimeModel);if(!t)throw new Error("[ReactDevToolsBindingsModel] Failed to enable model: runtime model is not available");await t.agent.invoke_evaluate({expression:`${i}.BINDING_NAME`}).then((e=>e.result.value)).then((e=>t.agent.invoke_addBinding({name:e})))}}e.SDKModel.SDKModel.register(n,{capabilities:4,autostart:!1});var t=Object.freeze({__proto__:null,ReactDevToolsBindingsModel:n});export{t as ReactDevToolsBindingsModel};
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
import*as e from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";import*as i from"../../core/sdk/sdk.js";import*as s from"../../third_party/react-devtools/react-devtools.js";import*as o from"../../core/common/common.js";import*as n from"../../models/workspace/workspace.js";import*as r from"../../models/react_native/react_native.js";import*as a from"../../models/bindings/bindings.js";import*as d from"../../models/logs/logs.js";class l extends i.SDKModel.SDKModel{static FUSEBOX_BINDING_NAMESPACE="react-devtools";rdtModel;constructor(e){super(e);const t=e.model(r.ReactDevToolsBindingsModel.ReactDevToolsBindingsModel);if(!t)throw new Error("Failed to construct ReactDevToolsModel: ReactDevToolsBindingsModel was null");this.rdtModel=t,t.addEventListener("Initialized",this.initialize,this)}initialize(){const e=this.rdtModel;if(!e)throw new Error("Failed to initialize ReactDevToolsModel: ReactDevToolsBindingsModel was null");e.subscribeToDomainMessages(l.FUSEBOX_BINDING_NAMESPACE,(e=>this.onMessage(e))),e.initializeDomain(l.FUSEBOX_BINDING_NAMESPACE).then((()=>this.onInitialization()))}onInitialization(){this.dispatchEventToListeners("Initialized")}async sendMessage(e){const t=this.rdtModel;if(!t)throw new Error("Failed to send message from ReactDevToolsModel: ReactDevToolsBindingsModel was null");await t.sendMessage(l.FUSEBOX_BINDING_NAMESPACE,e)}onMessage(e){this.dispatchEventToListeners("MessageReceived",e)}}i.SDKModel.SDKModel.register(l,{capabilities:4,autostart:!1});var c=Object.freeze({__proto__:null,ReactDevToolsModel:l});const g={title:"React DevTools"},h=e.i18n.registerUIStrings("panels/react_devtools/ReactDevToolsView.ts",g),m=e.i18n.getLocalizedString.bind(void 0,h),M="main";function u(e,t){const{sourceURL:i,line:s,column:r}=t||e;!async function(e,t,i){const s=n.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e);if(s){const e=await a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().normalizeUILocation(s.uiLocation(t,i));return void o.Revealer.reveal(e)}const r=a.ResourceUtils.resourceForURL(e);if(r)return void o.Revealer.reveal(r);const l=d.NetworkLog.NetworkLog.instance().requestForURL(e);if(!l)throw new Error("Could not find resource for "+e);o.Revealer.reveal(l)}(i,s-1,r-1)}class v extends t.View.SimpleView{wall;bridge;store;listeners=new Set;constructor(){super(m(g.title)),this.wall={listen:e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),send:(e,t)=>this.sendMessage(e,t)},this.bridge=s.createBridge(this.wall),this.store=s.createStore(this.bridge),window.addEventListener("beforeunload",(()=>this.bridge.shutdown())),i.TargetManager.TargetManager.instance().addModelListener(l,"MessageReceived",this.onMessage,this),i.TargetManager.TargetManager.instance().addModelListener(l,"Initialized",this.initialize,this),i.TargetManager.TargetManager.instance().addModelListener(i.RuntimeModel.RuntimeModel,i.RuntimeModel.Events.ExecutionContextDestroyed,this.onExecutionContextDestroyed,this),i.TargetManager.TargetManager.instance().addModelListener(i.RuntimeModel.RuntimeModel,i.RuntimeModel.Events.ExecutionContextCreated,this.onExecutionContextCreated,this),this.renderLoader()}renderLoader(){const e=document.createElement("div");e.setAttribute("style","display: flex; flex: 1; justify-content: center; align-items: center");const t=document.createElement("span");t.classList.add("spinner"),e.appendChild(t),this.contentElement.appendChild(e)}clearLoader(){this.contentElement.removeChildren()}initialize(){this.clearLoader();const e=window.matchMedia("(prefers-color-scheme: dark)").matches;s.initialize(this.contentElement,{bridge:this.bridge,store:this.store,theme:e?"dark":"light",canViewElementSourceFunction:()=>!0,viewElementSourceFunction:u})}wasShown(){super.wasShown(),this.registerCSSFiles([s.CSS])}onMessage(e){if(e.data)for(const t of this.listeners)t(e.data)}sendMessage(e,t){for(const s of i.TargetManager.TargetManager.instance().models(l,{scoped:!0}))s.sendMessage({event:e,payload:t})}onExecutionContextDestroyed(e){e.data.name===M&&(this.contentElement.removeChildren(),this.bridge.shutdown(),this.listeners.clear(),this.renderLoader())}onExecutionContextCreated(e){e.data.name===M&&(this.bridge=s.createBridge(this.wall),this.store=s.createStore(this.bridge),this.initialize())}}var p=Object.freeze({__proto__:null,ReactDevToolsViewImpl:v});export{c as ReactDevToolsModel,p as ReactDevToolsView};
|
||||
import*as e from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";import*as o from"../../core/sdk/sdk.js";import*as n from"../../third_party/react-devtools/react-devtools.js";import*as s from"../../core/common/common.js";import*as i from"../../models/workspace/workspace.js";import*as r from"../../models/react_native/react_native.js";import*as a from"../../models/bindings/bindings.js";import*as d from"../../models/logs/logs.js";const l="main";class c extends o.SDKModel.SDKModel{static FUSEBOX_BINDING_NAMESPACE="react-devtools";rdtModel;constructor(e){super(e);const t=e.model(r.ReactDevToolsBindingsModel.ReactDevToolsBindingsModel);if(!t)throw new Error("Failed to construct ReactDevToolsModel: ReactDevToolsBindingsModel was null");this.rdtModel=t,t.addEventListener("Initialized",this.initialize,this)}initialize(){const e=this.rdtModel;if(!e)throw new Error("Failed to initialize ReactDevToolsModel: ReactDevToolsBindingsModel was null");e.subscribeToDomainMessages(c.FUSEBOX_BINDING_NAMESPACE,(e=>this.onMessage(e))),e.initializeDomain(c.FUSEBOX_BINDING_NAMESPACE).then((()=>this.onInitialization()))}onInitialization(){const e=function(){const e=t.Context.Context.instance().flavor(o.RuntimeModel.ExecutionContext);return e?.name!==l?null:e}();e&&this.dispatchEventToListeners("Initialized",e),o.TargetManager.TargetManager.instance().addModelListener(o.RuntimeModel.RuntimeModel,o.RuntimeModel.Events.ExecutionContextCreated,this.onExecutionContextCreated,this),o.TargetManager.TargetManager.instance().addModelListener(o.RuntimeModel.RuntimeModel,o.RuntimeModel.Events.ExecutionContextDestroyed,this.onExecutionContextDestroyed,this)}onExecutionContextCreated({data:e}){e.name===l&&this.dispatchEventToListeners("Initialized",e)}onExecutionContextDestroyed({data:e}){e.name===l&&this.dispatchEventToListeners("Destroyed")}onMessage(e){this.dispatchEventToListeners("MessageReceived",e)}async sendMessage(e){const t=this.rdtModel;if(!t)throw new Error("Failed to send message from ReactDevToolsModel: ReactDevToolsBindingsModel was null");return t.sendMessage(c.FUSEBOX_BINDING_NAMESPACE,e)}}o.SDKModel.SDKModel.register(c,{capabilities:4,autostart:!1});var g=Object.freeze({__proto__:null,ReactDevToolsModel:c});const h={title:"React DevTools"},u=e.i18n.registerUIStrings("panels/react_devtools/ReactDevToolsView.ts",h),m=e.i18n.getLocalizedString.bind(void 0,u);function M(e,t){const{sourceURL:o,line:n,column:r}=t||e;!async function(e,t,o){const n=i.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e);if(n){const e=await a.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().normalizeUILocation(n.uiLocation(t,o));return void s.Revealer.reveal(e)}const r=a.ResourceUtils.resourceForURL(e);if(r)return void s.Revealer.reveal(r);const l=d.NetworkLog.NetworkLog.instance().requestForURL(e);if(!l)throw new Error("Could not find resource for "+e);s.Revealer.reveal(l)}(o,n-1,r-1)}class v extends t.View.SimpleView{wall;bridge=null;store=null;executionContext=null;listeners=new Set;constructor(){super(m(h.title)),this.wall={listen:e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),send:(e,t)=>this.sendMessage(e,t)},window.addEventListener("beforeunload",(()=>this.bridge?.shutdown())),o.TargetManager.TargetManager.instance().addModelListener(c,"Initialized",this.onInitialized,this),o.TargetManager.TargetManager.instance().addModelListener(c,"Destroyed",this.onDestroyed,this),o.TargetManager.TargetManager.instance().addModelListener(c,"MessageReceived",this.onMessage,this),this.renderLoader()}onInitialized({data:e}){this.clearLoader(),this.executionContext=e,this.bridge=n.createBridge(this.wall),this.store=n.createStore(this.bridge);const t=window.matchMedia("(prefers-color-scheme: dark)").matches;n.initialize(this.contentElement,{bridge:this.bridge,store:this.store,theme:t?"dark":"light",canViewElementSourceFunction:()=>!0,viewElementSourceFunction:M})}onDestroyed(){this.contentElement.removeChildren(),this.executionContext=null,this.bridge?.shutdown(),this.bridge=null,this.store=null,this.listeners.clear(),this.renderLoader()}renderLoader(){const e=document.createElement("div");e.setAttribute("style","display: flex; flex: 1; justify-content: center; align-items: center");const t=document.createElement("span");t.classList.add("spinner"),e.appendChild(t),this.contentElement.appendChild(e)}clearLoader(){this.contentElement.removeChildren()}wasShown(){super.wasShown(),this.registerCSSFiles([n.CSS])}onMessage({data:e}){if(e)for(const t of this.listeners)t(e)}sendMessage(e,t){for(const n of o.TargetManager.TargetManager.instance().models(c,{scoped:!0}))n.sendMessage({event:e,payload:t})}}var p=Object.freeze({__proto__:null,ReactDevToolsViewImpl:v});export{g as ReactDevToolsModel,p as ReactDevToolsView};
|
||||
|
||||
+17
-14
@@ -1,53 +1,56 @@
|
||||
import*as e from"../../ui/legacy/legacy.js";import*as o from"../../core/host/host.js";import*as t from"../../core/i18n/i18n.js";import*as i from"../../ui/lit-html/lit-html.js";const n=new CSSStyleSheet;n.replaceSync('.rn-welcome-panel{display:flex;flex-direction:column;flex-shrink:0;align-items:stretch;justify-content:center;padding:36px;background-color:var(--color-background-elevation-0);min-height:100%}@media (min-width: 1000px){.rn-welcome-panel{flex-direction:row;align-items:center;justify-content:stretch;height:100%;padding:24px 60px}}.rn-welcome-hero{display:flex;flex-direction:column;flex-grow:1;flex-shrink:0;align-items:center;padding:16px;text-align:center}.rn-welcome-heading{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:4px;margin-right:12px}.rn-welcome-title{font-size:20px;font-weight:normal;color:var(--color-text-primary)}.rn-welcome-title-accessory{margin-left:12px;padding:4px 8px;border-radius:4px;background-color:var(--color-green);font-size:12px;color:var(--color-on-primary)}.rn-welcome-title-accessory-purple{background-color:var(--color-purple-bright)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--color-details-hairline)}.rn-welcome-docsfeed{display:flex;flex-direction:column;flex-shrink:0;align-items:stretch;max-width:700px;margin:0 auto;padding:24px}@media (min-width: 1000px){.rn-welcome-docsfeed{flex-shrink:1;width:45%;margin:0}}.rn-welcome-h2{font-size:16px;font-weight:normal;color:var(--color-text-primary)}.rn-welcome-docsfeed-item{display:flex;align-items:center;margin-bottom:8px;padding:8px;padding-right:16px;border:1px solid var(--color-details-hairline);border-radius:4px;background-color:var(--color-background);text-align:left;font-size:14px;cursor:pointer}.rn-welcome-docsfeed-item:hover{background-color:var(--color-background-elevation-0)}.rn-welcome-docsfeed-item p{margin:0;margin-bottom:4px;text-decoration:none}.rn-welcome-docsfeed-item :not(.devtools-link){color:var(--color-text-secondary)}.rn-welcome-image{aspect-ratio:calc(16 / 9);height:64px;margin-right:16px;border-radius:2px;background-color:var(--color-gray-100);background-position:center;background-size:cover}\n/*# sourceURL=rnWelcome.css */\n');const r={betaLabel:"Beta",techPreviewLabel:"Tech Preview",welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new",docsDebuggingBasics:"Debugging Basics",docsDebuggingBasicsDetail:"Overview of debugging tools in React Native",docsReactDevTools:"React DevTools",docsReactDevToolsDetail:"Debug React components with React DevTools",docsRNDevTools:"React Native DevTools",docsRNDevToolsDetail:"Explore features available in React Native DevTools"},{render:s,html:l}=i,c=t.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",r),a=t.i18n.getLocalizedString.bind(void 0,c);let d;class g extends e.Widget.VBox{options;static instance(e){return d||(d=new g(e)),d}constructor(e){super(!0,!0),this.options=e}wasShown(){super.wasShown(),this.registerCSSFiles([n]),this.render(),e.InspectorView.InspectorView.instance().showDrawer({focus:!0,hasTargetDrawer:!1})}_handleLinkPress(e){o.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(e)}render(){const{debuggerBrandName:e,showBetaLabel:o=!1,showTechPreviewLabel:t=!1,showDocs:i=!1}=this.options,n=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString();s(l`
|
||||
import*as e from"../../ui/legacy/legacy.js";import*as o from"../../core/host/host.js";import*as t from"../../core/i18n/i18n.js";import*as i from"../../core/sdk/sdk.js";import*as a from"../../ui/lit-html/lit-html.js";const r=new CSSStyleSheet;r.replaceSync('.rn-welcome-panel{display:flex;flex-direction:column;flex-shrink:0;align-items:stretch;justify-content:center;padding:36px;background-color:var(--color-background-elevation-0);min-height:100%}@media (min-width: 1000px){.rn-welcome-panel{flex-direction:row;align-items:center;justify-content:stretch;height:100%;padding:24px 60px}}.rn-welcome-hero{display:flex;flex-direction:column;flex-grow:1;flex-shrink:0;align-items:center;padding:16px;text-align:center}.rn-welcome-heading{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:4px;margin-right:12px}.rn-welcome-title{font-size:20px;font-weight:normal;color:var(--color-text-primary)}.rn-welcome-title-accessory{margin-left:12px;padding:4px 8px;border-radius:4px;background-color:var(--color-green);font-size:12px;color:var(--color-on-primary)}.rn-welcome-title-accessory-purple{background-color:var(--color-purple-bright)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--color-details-hairline)}.rn-welcome-version{position:fixed;bottom:0;right:8px;margin-top:24px;padding:4px 12px;border-radius:6px;background-color:var(--color-background-hover-overlay);color:var(--color-text-secondary);font-size:11px}.rn-welcome-docsfeed{display:flex;flex-direction:column;flex-shrink:0;align-items:stretch;max-width:700px;margin:0 auto;padding:24px}@media (min-width: 1000px){.rn-welcome-docsfeed{flex-shrink:1;width:45%;margin:0}}.rn-welcome-h2{font-size:16px;font-weight:normal;color:var(--color-text-primary)}.rn-welcome-docsfeed-item{display:flex;align-items:center;margin-bottom:8px;padding:8px;padding-right:16px;border:1px solid var(--color-details-hairline);border-radius:4px;background-color:var(--color-background);text-align:left;font-size:14px;cursor:pointer}.rn-welcome-docsfeed-item:hover{background-color:var(--color-background-elevation-0)}.rn-welcome-docsfeed-item p{margin:0;margin-bottom:4px;text-decoration:none}.rn-welcome-docsfeed-item :not(.devtools-link){color:var(--color-text-secondary)}.rn-welcome-image{aspect-ratio:calc(16 / 9);height:64px;margin-right:16px;border-radius:2px;background-color:var(--color-gray-100);background-position:center;background-size:cover}\n/*# sourceURL=rnWelcome.css */\n');const n={betaLabel:"Beta",techPreviewLabel:"Tech Preview",welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new",docsDebuggingBasics:"Debugging Basics",docsDebuggingBasicsDetail:"Overview of debugging tools in React Native",docsReactDevTools:"React DevTools",docsReactDevToolsDetail:"Debug React components with React DevTools",docsRNDevTools:"React Native DevTools",docsRNDevToolsDetail:"Explore features available in React Native DevTools"},{render:s,html:l}=a,c=t.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",n),d=t.i18n.getLocalizedString.bind(void 0,c);let g;class p extends e.Widget.VBox{options;#e;static instance(e){return g||(g=new p(e)),g}constructor(e){super(!0,!0),this.options=e,i.TargetManager.TargetManager.instance().observeModels(i.ReactNativeApplicationModel.ReactNativeApplicationModel,this)}wasShown(){super.wasShown(),this.registerCSSFiles([r]),this.render(),e.InspectorView.InspectorView.instance().showDrawer({focus:!0,hasTargetDrawer:!1})}modelAdded(e){e.ensureEnabled(),e.addEventListener("MetadataUpdated",this.#o,this),this.#e=e.metadataCached?.reactNativeVersion}modelRemoved(e){e.removeEventListener("MetadataUpdated",this.#o,this)}#o(e){this.#e=e.data.reactNativeVersion,this.isShowing()&&this.render()}_handleLinkPress(e){o.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(e)}render(){const{debuggerBrandName:e,showBetaLabel:o=!1,showTechPreviewLabel:t=!1,showDocs:i=!1}=this.options,a=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString();s(l`
|
||||
<div class="rn-welcome-panel">
|
||||
<header class="rn-welcome-hero">
|
||||
<div class="rn-welcome-heading">
|
||||
<img class="rn-welcome-icon" src="${n}" role="presentation" />
|
||||
<img class="rn-welcome-icon" src="${a}" role="presentation" />
|
||||
<h1 class="rn-welcome-title">
|
||||
${e()}
|
||||
</h1>
|
||||
${o?l`
|
||||
<div class="rn-welcome-title-accessory">
|
||||
${a(r.betaLabel)}
|
||||
${d(n.betaLabel)}
|
||||
</div>
|
||||
`:null}
|
||||
${t?l`
|
||||
<div class="rn-welcome-title-accessory rn-welcome-title-accessory-purple">
|
||||
${a(r.techPreviewLabel)}
|
||||
${d(n.techPreviewLabel)}
|
||||
</div>
|
||||
`:null}
|
||||
</div>
|
||||
<div class="rn-welcome-tagline">
|
||||
${a(r.welcomeMessage)}
|
||||
${d(n.welcomeMessage)}
|
||||
</div>
|
||||
<div class="rn-welcome-links">
|
||||
<x-link class="devtools-link" href="https://reactnative.dev/docs/debugging">
|
||||
${a(r.docsLabel)}
|
||||
${d(n.docsLabel)}
|
||||
</x-link>
|
||||
<x-link class="devtools-link" href="https://reactnative.dev/blog">
|
||||
${a(r.whatsNewLabel)}
|
||||
${d(n.whatsNewLabel)}
|
||||
</x-link>
|
||||
</div>
|
||||
${null!=this.#e?l`
|
||||
<p class="rn-welcome-version">React Native: <code>${this.#e}</code></p>
|
||||
`:null}
|
||||
</header>
|
||||
${i?l`
|
||||
<section class="rn-welcome-docsfeed">
|
||||
<h2 class="rn-welcome-h2">Learn</h2>
|
||||
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this._handleLinkPress.bind(this,"https://reactnative.dev/docs/debugging")} title="${a(r.docsDebuggingBasics)}">
|
||||
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this._handleLinkPress.bind(this,"https://reactnative.dev/docs/debugging")} title="${d(n.docsDebuggingBasics)}">
|
||||
<div class="rn-welcome-image" style="background-image: url('https://reactnative.dev/assets/images/debugging-dev-menu-2453a57e031a9da86b2ed42f16ffe82a.jpg')"></div>
|
||||
<div>
|
||||
<p class="devtools-link">${a(r.docsDebuggingBasics)}</p>
|
||||
<p>${a(r.docsDebuggingBasicsDetail)}</p>
|
||||
<p class="devtools-link">${d(n.docsDebuggingBasics)}</p>
|
||||
<p>${d(n.docsDebuggingBasicsDetail)}</p>
|
||||
</div>
|
||||
</button>
|
||||
<!-- TODO(huntie): Replace this item when React Native DevTools docs are complete -->
|
||||
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this._handleLinkPress.bind(this,"https://reactnative.dev/docs/debugging/react-devtools")} title="${a(r.docsReactDevTools)}">
|
||||
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this._handleLinkPress.bind(this,"https://reactnative.dev/docs/debugging/react-devtools")} title="${d(n.docsReactDevTools)}">
|
||||
<div class="rn-welcome-image" style="background-image: url('https://reactnative.dev/assets/images/debugging-react-devtools-detail-914f08a97163dd51ebe732fd8ae4ea3c.jpg')"></div>
|
||||
<div>
|
||||
<p class="devtools-link">${a(r.docsReactDevTools)}</p>
|
||||
<p>${a(r.docsReactDevToolsDetail)}</p>
|
||||
<p class="devtools-link">${d(n.docsReactDevTools)}</p>
|
||||
<p>${d(n.docsReactDevToolsDetail)}</p>
|
||||
</div>
|
||||
</button>
|
||||
</section>
|
||||
`:null}
|
||||
</div>
|
||||
`,this.contentElement,{host:this})}}var m=Object.freeze({__proto__:null,RNWelcomeImpl:g});export{m as RNWelcome};
|
||||
`,this.contentElement,{host:this})}}var m=Object.freeze({__proto__:null,RNWelcomeImpl:p});export{m as RNWelcome};
|
||||
|
||||
Vendored
+4
-4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-frontend",
|
||||
"version": "0.75.0-main",
|
||||
"version": "0.76.0-main",
|
||||
"description": "Debugger frontend for React Native based on Chrome DevTools",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/dev-middleware",
|
||||
"version": "0.75.0-main",
|
||||
"version": "0.76.0-main",
|
||||
"description": "Dev server middleware for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -23,17 +23,16 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@isaacs/ttlcache": "^1.4.1",
|
||||
"@react-native/debugger-frontend": "0.75.0-main",
|
||||
"@react-native/debugger-frontend": "0.76.0-main",
|
||||
"chrome-launcher": "^0.15.2",
|
||||
"chromium-edge-launcher": "^0.2.0",
|
||||
"connect": "^3.6.5",
|
||||
"debug": "^2.2.0",
|
||||
"node-fetch": "^2.2.0",
|
||||
"nullthrows": "^1.1.1",
|
||||
"open": "^7.0.3",
|
||||
"selfsigned": "^2.4.1",
|
||||
"serve-static": "^1.13.1",
|
||||
"ws": "^6.2.2"
|
||||
"ws": "^6.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
*/
|
||||
|
||||
import type {JSONSerializable} from '../inspector-proxy/types';
|
||||
import typeof * as NodeFetch from 'node-fetch';
|
||||
|
||||
import https from 'https';
|
||||
import {Agent} from 'undici';
|
||||
|
||||
declare var globalThis: $FlowFixMe;
|
||||
|
||||
/**
|
||||
* A version of `fetch` that is usable with the HTTPS server created in
|
||||
* ServerUtils (which uses a self-signed certificate).
|
||||
@@ -46,25 +46,34 @@ export async function fetchJson<T: JSONSerializable>(url: string): Promise<T> {
|
||||
return response.json();
|
||||
}
|
||||
|
||||
export function allowSelfSignedCertsInNodeFetch(): void {
|
||||
jest.mock('node-fetch', () => {
|
||||
const originalModule = jest.requireActual<NodeFetch>('node-fetch');
|
||||
const nodeFetch = originalModule.default;
|
||||
return {
|
||||
__esModule: true,
|
||||
...originalModule,
|
||||
default: (url, options) => {
|
||||
if (
|
||||
(url instanceof URL && url.protocol === 'https:') ||
|
||||
(typeof url === 'string' && url.startsWith('https:'))
|
||||
) {
|
||||
const agent = new https.Agent({
|
||||
rejectUnauthorized: false,
|
||||
});
|
||||
return nodeFetch(url.toString(), {agent, ...options});
|
||||
}
|
||||
return nodeFetch(url, options);
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Change the global fetch dispatcher to allow self-signed certificates.
|
||||
* This runs with Jest's `beforeAll` and `afterAll`, and restores the original dispatcher.
|
||||
*/
|
||||
export function withFetchSelfSignedCertsForAllTests() {
|
||||
const fetchOriginal = globalThis.fetch;
|
||||
const selfSignedCertDispatcher = new Agent({
|
||||
connect: {
|
||||
rejectUnauthorized: false,
|
||||
},
|
||||
});
|
||||
|
||||
let fetchSpy;
|
||||
|
||||
beforeAll(() => {
|
||||
// For some reason, setting the `selfSignedCertDispatcher` with `setGlobalDispatcher` doesn't work.
|
||||
// Instead of using `setGlobalDispatcher`, we'll use a spy to intercept the fetch calls and add the dispatcher.
|
||||
fetchSpy = jest
|
||||
.spyOn(globalThis, 'fetch')
|
||||
.mockImplementation((url, options) =>
|
||||
fetchOriginal(url, {
|
||||
...options,
|
||||
dispatcher: options?.dispatcher ?? selfSignedCertDispatcher,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
fetchSpy.mockRestore();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import type {
|
||||
WrappedEvent,
|
||||
} from '../inspector-proxy/types';
|
||||
|
||||
import nullthrows from 'nullthrows';
|
||||
import WebSocket from 'ws';
|
||||
|
||||
export class DeviceAgent {
|
||||
@@ -82,6 +83,11 @@ export class DeviceAgent {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// $FlowIgnore[unsafe-getters-setters]
|
||||
get socket(): WebSocket {
|
||||
return nullthrows(this.#ws);
|
||||
}
|
||||
}
|
||||
|
||||
export class DeviceMock extends DeviceAgent {
|
||||
|
||||
@@ -126,12 +126,15 @@ export async function createAndConnectTarget(
|
||||
}>,
|
||||
signal: AbortSignal,
|
||||
page: PageFromDevice,
|
||||
deviceId: ?string = null,
|
||||
): Promise<{device: DeviceMock, debugger_: DebuggerMock}> {
|
||||
let device;
|
||||
let debugger_;
|
||||
try {
|
||||
device = await createDeviceMock(
|
||||
`${serverRef.serverBaseWsUrl}/inspector/device?device=device&name=foo&app=bar`,
|
||||
`${serverRef.serverBaseWsUrl}/inspector/device?device=${
|
||||
deviceId ?? 'device' + Date.now()
|
||||
}&name=foo&app=bar`,
|
||||
signal,
|
||||
);
|
||||
device.getPages.mockImplementation(() => [page]);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import {allowSelfSignedCertsInNodeFetch} from './FetchUtils';
|
||||
import {withFetchSelfSignedCertsForAllTests} from './FetchUtils';
|
||||
import {
|
||||
createAndConnectTarget,
|
||||
parseJsonFromDataUri,
|
||||
@@ -33,16 +33,14 @@ jest.useRealTimers();
|
||||
|
||||
jest.setTimeout(10000);
|
||||
|
||||
beforeAll(() => {
|
||||
// inspector-proxy uses node-fetch for source map fetching.
|
||||
allowSelfSignedCertsInNodeFetch();
|
||||
|
||||
jest.resetModules();
|
||||
});
|
||||
|
||||
describe.each(['HTTP', 'HTTPS'])(
|
||||
'inspector proxy CDP rewriting hacks over %s',
|
||||
protocol => {
|
||||
// Inspector proxy tests are using a self-signed certificate for HTTPS tests.
|
||||
if (protocol === 'HTTPS') {
|
||||
withFetchSelfSignedCertsForAllTests();
|
||||
}
|
||||
|
||||
const serverRef = withServerForEachTest({
|
||||
logger: undefined,
|
||||
projectRoot: __dirname,
|
||||
|
||||
@@ -9,11 +9,17 @@
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import type {PageDescription} from '../inspector-proxy/types';
|
||||
import type {
|
||||
ConnectRequest,
|
||||
DisconnectRequest,
|
||||
JsonPagesListResponse,
|
||||
PageDescription,
|
||||
} from '../inspector-proxy/types';
|
||||
|
||||
import {fetchJson} from './FetchUtils';
|
||||
import {createDebuggerMock} from './InspectorDebuggerUtils';
|
||||
import {createDeviceMock} from './InspectorDeviceUtils';
|
||||
import {sendFromDebuggerToTarget} from './InspectorProtocolUtils';
|
||||
import {withAbortSignalForEachTest} from './ResourceUtils';
|
||||
import {withServerForEachTest} from './ServerUtils';
|
||||
import until from 'wait-for-expect';
|
||||
@@ -51,7 +57,7 @@ describe.each(['HTTP', 'HTTPS'])(
|
||||
},
|
||||
]);
|
||||
|
||||
let pageList: Array<PageDescription> = [];
|
||||
let pageList: JsonPagesListResponse = [];
|
||||
await until(async () => {
|
||||
pageList = (await fetchJson(
|
||||
`${serverRef.serverBaseUrl}/json`,
|
||||
@@ -148,5 +154,237 @@ describe.each(['HTTP', 'HTTPS'])(
|
||||
device1.close();
|
||||
}
|
||||
});
|
||||
|
||||
test('multiple debuggers to the same page on the same device', async () => {
|
||||
let device, debugger1, debugger2;
|
||||
try {
|
||||
// Connect a device to the proxy.
|
||||
device = await createDeviceMock(
|
||||
`${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
// Capture a log of events so we can assert on their order later.
|
||||
const events: Array<
|
||||
| ConnectRequest
|
||||
| DisconnectRequest
|
||||
| {event: 'create-debugger-mock', name: string},
|
||||
> = [];
|
||||
device.disconnect.mockImplementation(message => {
|
||||
events.push(message);
|
||||
});
|
||||
device.connect.mockImplementation(message => {
|
||||
events.push(message);
|
||||
});
|
||||
// Set up the page.
|
||||
device.getPages.mockImplementation(() => [
|
||||
{
|
||||
app: 'bar-app',
|
||||
id: 'page1',
|
||||
title: 'bar-title',
|
||||
vm: 'bar-vm',
|
||||
},
|
||||
]);
|
||||
let pageList: Array<PageDescription> = [];
|
||||
await until(async () => {
|
||||
pageList = (await fetchJson(
|
||||
`${serverRef.serverBaseUrl}/json`,
|
||||
// $FlowIgnore[unclear-type]
|
||||
): any);
|
||||
expect(pageList).toHaveLength(1);
|
||||
});
|
||||
const [{webSocketDebuggerUrl}] = pageList;
|
||||
|
||||
// Connect the first debugger and send a message.
|
||||
events.push({event: 'create-debugger-mock', name: 'debugger1'});
|
||||
debugger1 = await createDebuggerMock(
|
||||
webSocketDebuggerUrl,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
await sendFromDebuggerToTarget(debugger1, device, 'page1', {
|
||||
method: 'Runtime.enable',
|
||||
id: 0,
|
||||
});
|
||||
|
||||
// Connect the second debugger.
|
||||
events.push({event: 'create-debugger-mock', name: 'debugger2'});
|
||||
debugger2 = await createDebuggerMock(
|
||||
webSocketDebuggerUrl,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
|
||||
// The first debugger gets disconnected. TODO: In the future, we should
|
||||
// amend the protocol to allow for multiple debuggers to connect at the
|
||||
// same time.
|
||||
await until(async () => {
|
||||
expect([
|
||||
// CLOSING
|
||||
3,
|
||||
// CLOSED
|
||||
4,
|
||||
]).toContain(debugger1.socket.readyState);
|
||||
});
|
||||
|
||||
// Send a message from the second debugger.
|
||||
await sendFromDebuggerToTarget(debugger2, device, 'page1', {
|
||||
method: 'Debugger.enable',
|
||||
id: 1,
|
||||
});
|
||||
|
||||
// Check the order of `connect` and `disconnect` events received by the
|
||||
// device. `create-debugger-mock` events are included for convenience.
|
||||
expect(events).toEqual([
|
||||
{
|
||||
event: 'create-debugger-mock',
|
||||
name: 'debugger1',
|
||||
},
|
||||
{
|
||||
event: 'connect',
|
||||
payload: {
|
||||
pageId: 'page1',
|
||||
},
|
||||
},
|
||||
{
|
||||
event: 'create-debugger-mock',
|
||||
name: 'debugger2',
|
||||
},
|
||||
{
|
||||
// NOTE: For debugger1
|
||||
event: 'disconnect',
|
||||
payload: {
|
||||
pageId: 'page1',
|
||||
},
|
||||
},
|
||||
{
|
||||
// NOTE: For debugger2
|
||||
event: 'connect',
|
||||
payload: {
|
||||
pageId: 'page1',
|
||||
},
|
||||
},
|
||||
]);
|
||||
} finally {
|
||||
device?.close();
|
||||
debugger1?.close();
|
||||
debugger2?.close();
|
||||
}
|
||||
});
|
||||
|
||||
test('debugger connection to a nonexistent page is rejected', async () => {
|
||||
let device, debugger_;
|
||||
try {
|
||||
device = await createDeviceMock(
|
||||
`${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
// Set up a page.
|
||||
device.getPages.mockImplementation(() => [
|
||||
{
|
||||
app: 'bar-app',
|
||||
id: 'page1',
|
||||
title: 'bar-title',
|
||||
vm: 'bar-vm',
|
||||
},
|
||||
]);
|
||||
let pageList: Array<PageDescription> = [];
|
||||
await until(async () => {
|
||||
pageList = (await fetchJson(
|
||||
`${serverRef.serverBaseUrl}/json`,
|
||||
// $FlowIgnore[unclear-type]
|
||||
): any);
|
||||
expect(pageList).toHaveLength(1);
|
||||
});
|
||||
const [{webSocketDebuggerUrl}] = pageList;
|
||||
|
||||
// Connect the debugger to a nonexistent page.
|
||||
debugger_ = await createDebuggerMock(
|
||||
webSocketDebuggerUrl.replaceAll('page1', 'some-other-id'),
|
||||
autoCleanup.signal,
|
||||
);
|
||||
|
||||
// The debugger gets disconnected automatically.
|
||||
await until(async () => {
|
||||
expect([
|
||||
// CLOSING
|
||||
3,
|
||||
// CLOSED
|
||||
4,
|
||||
]).toContain(debugger_.socket.readyState);
|
||||
});
|
||||
|
||||
expect(device.connect).not.toHaveBeenCalled();
|
||||
expect(device.disconnect).not.toHaveBeenCalled();
|
||||
} finally {
|
||||
device?.close();
|
||||
debugger_?.close();
|
||||
}
|
||||
});
|
||||
|
||||
test('debugger connection to a nonexistent page does not kill the current debugger connection', async () => {
|
||||
let device, debugger1, debugger2;
|
||||
try {
|
||||
device = await createDeviceMock(
|
||||
`${serverRef.serverBaseWsUrl}/inspector/device?device=device1&name=foo&app=bar`,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
// Set up a page.
|
||||
device.getPages.mockImplementation(() => [
|
||||
{
|
||||
app: 'bar-app',
|
||||
id: 'page1',
|
||||
title: 'bar-title',
|
||||
vm: 'bar-vm',
|
||||
},
|
||||
]);
|
||||
let pageList: Array<PageDescription> = [];
|
||||
await until(async () => {
|
||||
pageList = (await fetchJson(
|
||||
`${serverRef.serverBaseUrl}/json`,
|
||||
// $FlowIgnore[unclear-type]
|
||||
): any);
|
||||
expect(pageList).toHaveLength(1);
|
||||
});
|
||||
const [{webSocketDebuggerUrl}] = pageList;
|
||||
|
||||
// Connect the first debugger.
|
||||
debugger1 = await createDebuggerMock(
|
||||
webSocketDebuggerUrl,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
|
||||
// Connect a second debugger to a nonexistent page.
|
||||
debugger2 = await createDebuggerMock(
|
||||
webSocketDebuggerUrl.replaceAll('page1', 'some-other-id'),
|
||||
autoCleanup.signal,
|
||||
);
|
||||
|
||||
// The second debugger gets disconnected automatically.
|
||||
await until(async () => {
|
||||
expect([
|
||||
// CLOSING
|
||||
3,
|
||||
// CLOSED
|
||||
4,
|
||||
]).toContain(debugger2.socket.readyState);
|
||||
});
|
||||
|
||||
// We can still send messages through the first debugger.
|
||||
await sendFromDebuggerToTarget(debugger1, device, 'page1', {
|
||||
method: 'Runtime.enable',
|
||||
id: 0,
|
||||
});
|
||||
|
||||
expect(device.connect).toHaveBeenCalledWith({
|
||||
event: 'connect',
|
||||
payload: {
|
||||
pageId: 'page1',
|
||||
},
|
||||
});
|
||||
expect(device.disconnect).not.toHaveBeenCalled();
|
||||
} finally {
|
||||
device?.close();
|
||||
debugger1?.close();
|
||||
debugger2?.close();
|
||||
}
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
@@ -0,0 +1,342 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import type {
|
||||
GetPagesResponse,
|
||||
JsonPagesListResponse,
|
||||
} from '../inspector-proxy/types';
|
||||
import type {DeviceMock} from './InspectorDeviceUtils';
|
||||
|
||||
import {fetchJson} from './FetchUtils';
|
||||
import {createDebuggerMock} from './InspectorDebuggerUtils';
|
||||
import {createDeviceMock} from './InspectorDeviceUtils';
|
||||
import {sendFromDebuggerToTarget} from './InspectorProtocolUtils';
|
||||
import {withAbortSignalForEachTest} from './ResourceUtils';
|
||||
import {withServerForEachTest} from './ServerUtils';
|
||||
import until from 'wait-for-expect';
|
||||
|
||||
// WebSocket is unreliable when using fake timers.
|
||||
jest.useRealTimers();
|
||||
|
||||
jest.setTimeout(10000);
|
||||
|
||||
const PAGE_DEFAULTS = {
|
||||
app: 'bar-app',
|
||||
id: 'page1',
|
||||
title: 'bar-title',
|
||||
vm: 'bar-vm',
|
||||
};
|
||||
|
||||
describe('inspector-proxy device socket handoff', () => {
|
||||
const serverRef = withServerForEachTest({
|
||||
logger: undefined,
|
||||
projectRoot: '',
|
||||
});
|
||||
const autoCleanup = withAbortSignalForEachTest();
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
test('device ID collision with no debugger connected', async () => {
|
||||
let device1, device2;
|
||||
try {
|
||||
({device: device1} = await connectDevice(
|
||||
'/inspector/device?device=device&name=foo&app=bar',
|
||||
[
|
||||
{
|
||||
...PAGE_DEFAULTS,
|
||||
vm: 'bar-vm',
|
||||
},
|
||||
],
|
||||
));
|
||||
|
||||
({device: device2} = await connectDevice(
|
||||
'/inspector/device?device=device&name=foo&app=bar',
|
||||
[
|
||||
{
|
||||
...PAGE_DEFAULTS,
|
||||
vm: 'bar-vm-updated',
|
||||
},
|
||||
],
|
||||
));
|
||||
|
||||
// There's no debugger-->page connection to disconnect.
|
||||
expect(device1.disconnect).not.toBeCalled();
|
||||
|
||||
// NOTE: It seems arbitrary that we don't close device1's socket here,
|
||||
// but that is the current behavior.
|
||||
expect(device1.socket.readyState).toBe(/* OPEN */ 1);
|
||||
} finally {
|
||||
device1?.close();
|
||||
device2?.close();
|
||||
}
|
||||
});
|
||||
|
||||
test('device ID collision with a debugger connected', async () => {
|
||||
let device1, device2, debugger_, webSocketDebuggerUrl;
|
||||
try {
|
||||
({
|
||||
device: device1,
|
||||
pageList: [{webSocketDebuggerUrl}],
|
||||
} = await connectDevice(
|
||||
'/inspector/device?device=device&name=foo&app=bar',
|
||||
[
|
||||
{
|
||||
...PAGE_DEFAULTS,
|
||||
vm: 'bar-vm',
|
||||
},
|
||||
],
|
||||
));
|
||||
|
||||
debugger_ = await createDebuggerMock(
|
||||
webSocketDebuggerUrl,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
|
||||
({device: device2} = await connectDevice(
|
||||
'/inspector/device?device=device&name=foo&app=bar',
|
||||
[
|
||||
{
|
||||
...PAGE_DEFAULTS,
|
||||
vm: 'bar-vm-updated',
|
||||
},
|
||||
],
|
||||
));
|
||||
|
||||
// Even having handed off the debugger connection to device2, we don't
|
||||
// send a `disconnect` event for it to device1. We may want to change
|
||||
// this behavior in the future.
|
||||
expect(device1.disconnect).not.toBeCalled();
|
||||
|
||||
expect([
|
||||
// CLOSING
|
||||
3,
|
||||
// CLOSED
|
||||
4,
|
||||
]).toContain(device1.socket.readyState);
|
||||
|
||||
// We can successfully send a message from the debugger to device2, even
|
||||
// though the initial debugger connection was to device1.
|
||||
device1.wrappedEventParsed.mockClear();
|
||||
const receivedByDevice2 = await sendFromDebuggerToTarget(
|
||||
debugger_,
|
||||
device2,
|
||||
'page1',
|
||||
{
|
||||
method: 'Console.enable',
|
||||
id: 0,
|
||||
},
|
||||
);
|
||||
expect(receivedByDevice2).toEqual({
|
||||
method: 'Console.enable',
|
||||
id: 0,
|
||||
});
|
||||
expect(device1.wrappedEventParsed).not.toBeCalled();
|
||||
} finally {
|
||||
device1?.close();
|
||||
device2?.close();
|
||||
debugger_?.close();
|
||||
}
|
||||
});
|
||||
|
||||
test.each([
|
||||
['app', 'name'],
|
||||
['name', 'app'],
|
||||
])(
|
||||
'device ID collision with no debugger connected, same %s and differing %s',
|
||||
async (sameParam, differingParam) => {
|
||||
let device1, device2, debugger_, webSocketDebuggerUrl;
|
||||
try {
|
||||
({device: device1} = await connectDevice(
|
||||
`/inspector/device?device=device&${sameParam}=foo&${differingParam}=bar`,
|
||||
[
|
||||
{
|
||||
...PAGE_DEFAULTS,
|
||||
vm: 'bar-vm',
|
||||
},
|
||||
],
|
||||
));
|
||||
|
||||
({
|
||||
device: device2,
|
||||
pageList: [{webSocketDebuggerUrl}],
|
||||
} = await connectDevice(
|
||||
`/inspector/device?device=device&${sameParam}=foo&${differingParam}=BAZ`,
|
||||
[
|
||||
{
|
||||
...PAGE_DEFAULTS,
|
||||
vm: 'bar-vm-updated',
|
||||
},
|
||||
],
|
||||
));
|
||||
|
||||
expect([
|
||||
// CLOSING
|
||||
3,
|
||||
// CLOSED
|
||||
4,
|
||||
]).toContain(device1.socket.readyState);
|
||||
|
||||
debugger_ = await createDebuggerMock(
|
||||
webSocketDebuggerUrl,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
|
||||
device1.wrappedEventParsed.mockClear();
|
||||
const receivedByDevice2 = await sendFromDebuggerToTarget(
|
||||
debugger_,
|
||||
device2,
|
||||
'page1',
|
||||
{
|
||||
method: 'Console.enable',
|
||||
id: 0,
|
||||
},
|
||||
);
|
||||
expect(receivedByDevice2).toEqual({
|
||||
method: 'Console.enable',
|
||||
id: 0,
|
||||
});
|
||||
expect(device1.wrappedEventParsed).not.toBeCalled();
|
||||
} finally {
|
||||
device1?.close();
|
||||
device2?.close();
|
||||
debugger_?.close();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
test.each([
|
||||
['app', 'name'],
|
||||
['name', 'app'],
|
||||
])(
|
||||
'device ID collision with a debugger connected, same %s and differing %s',
|
||||
async (sameParam, differingParam) => {
|
||||
let device1, device2, debugger_, webSocketDebuggerUrl;
|
||||
try {
|
||||
({
|
||||
device: device1,
|
||||
pageList: [{webSocketDebuggerUrl}],
|
||||
} = await connectDevice(
|
||||
`/inspector/device?device=device&${sameParam}=foo&${differingParam}=bar`,
|
||||
[
|
||||
{
|
||||
...PAGE_DEFAULTS,
|
||||
vm: 'bar-vm',
|
||||
},
|
||||
],
|
||||
));
|
||||
debugger_ = await createDebuggerMock(
|
||||
webSocketDebuggerUrl,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
({
|
||||
device: device2,
|
||||
pageList: [{webSocketDebuggerUrl}],
|
||||
} = await connectDevice(
|
||||
`/inspector/device?device=device&${sameParam}=foo&${differingParam}=BAZ`,
|
||||
[
|
||||
{
|
||||
...PAGE_DEFAULTS,
|
||||
vm: 'bar-vm-updated',
|
||||
},
|
||||
],
|
||||
));
|
||||
|
||||
expect([
|
||||
// CLOSING
|
||||
3,
|
||||
// CLOSED
|
||||
4,
|
||||
]).toContain(debugger_.socket.readyState);
|
||||
|
||||
// NOTE: It seems arbitrary that we don't send a `disconnect` message to
|
||||
// device1.
|
||||
expect(device1.disconnect).not.toBeCalled();
|
||||
|
||||
expect([
|
||||
// CLOSING
|
||||
3,
|
||||
// CLOSED
|
||||
4,
|
||||
]).toContain(device1.socket.readyState);
|
||||
|
||||
debugger_ = await createDebuggerMock(
|
||||
webSocketDebuggerUrl,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
device1.wrappedEventParsed.mockClear();
|
||||
const receivedByDevice2 = await sendFromDebuggerToTarget(
|
||||
debugger_,
|
||||
device2,
|
||||
'page1',
|
||||
{
|
||||
method: 'Console.enable',
|
||||
id: 0,
|
||||
},
|
||||
);
|
||||
expect(receivedByDevice2).toEqual({
|
||||
method: 'Console.enable',
|
||||
id: 0,
|
||||
});
|
||||
expect(device1.wrappedEventParsed).not.toBeCalled();
|
||||
} finally {
|
||||
device1?.close();
|
||||
device2?.close();
|
||||
debugger_?.close();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
// Helper function to create a DeviceMock and wait for its pages to be
|
||||
// reported by /json.
|
||||
async function connectDevice(
|
||||
wsUrlPath: string,
|
||||
pageListSpec: GetPagesResponse['payload'],
|
||||
): Promise<{
|
||||
device: DeviceMock,
|
||||
pageList: JsonPagesListResponse,
|
||||
}> {
|
||||
let device;
|
||||
try {
|
||||
device = await createDeviceMock(
|
||||
serverRef.serverBaseWsUrl + wsUrlPath,
|
||||
autoCleanup.signal,
|
||||
);
|
||||
device.getPages.mockImplementation(() => pageListSpec);
|
||||
let pageList: JsonPagesListResponse = [];
|
||||
await until(async () => {
|
||||
pageList = (await fetchJson(
|
||||
`${serverRef.serverBaseUrl}/json`,
|
||||
// $FlowIgnore[unclear-type]
|
||||
): any);
|
||||
expect(pageList).toEqual(
|
||||
expect.arrayContaining(
|
||||
pageListSpec.map(pageSpec =>
|
||||
expect.objectContaining({
|
||||
description: pageSpec.app,
|
||||
id: expect.stringContaining(pageSpec.id),
|
||||
title: pageSpec.title,
|
||||
vm: pageSpec.vm,
|
||||
}),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
return {
|
||||
device,
|
||||
pageList,
|
||||
};
|
||||
} catch (e) {
|
||||
device?.close();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -236,7 +236,7 @@ describe('inspector proxy React Native reloads', () => {
|
||||
* We can reuse our existing debugger connection to the synthetic page.
|
||||
* Messages from the updated page will be routed to the debugger.
|
||||
*/
|
||||
device1.sendWrappedEvent('originalPage-initial', {
|
||||
device1.sendWrappedEvent('originalPage-updated', {
|
||||
error: 'Another mock error',
|
||||
});
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import type {
|
||||
|
||||
import DeviceEventReporter from './DeviceEventReporter';
|
||||
import * as fs from 'fs';
|
||||
import fetch from 'node-fetch';
|
||||
import invariant from 'invariant';
|
||||
import * as path from 'path';
|
||||
import WS from 'ws';
|
||||
|
||||
@@ -57,7 +57,7 @@ const REWRITE_HOSTS_TO_LOCALHOST: Array<string> = [
|
||||
// more details.
|
||||
const FILE_PREFIX = 'file://';
|
||||
|
||||
type DebuggerInfo = {
|
||||
type DebuggerConnection = {
|
||||
// Debugger web socket connection
|
||||
socket: WS,
|
||||
// If we replaced address (like '10.0.2.2') to localhost we need to store original
|
||||
@@ -66,10 +66,6 @@ type DebuggerInfo = {
|
||||
prependedFilePrefix: boolean,
|
||||
pageId: string,
|
||||
userAgent: string | null,
|
||||
};
|
||||
|
||||
type DebuggerConnection = {
|
||||
...DebuggerInfo,
|
||||
customHandler: ?CustomMessageHandler,
|
||||
};
|
||||
|
||||
@@ -98,7 +94,7 @@ export default class Device {
|
||||
#deviceSocket: WS;
|
||||
|
||||
// Stores the most recent listing of device's pages, keyed by the `id` field.
|
||||
#pages: $ReadOnlyMap<string, Page>;
|
||||
#pages: $ReadOnlyMap<string, Page> = new Map();
|
||||
|
||||
// Stores information about currently connected debugger (if any).
|
||||
#debuggerConnection: ?DebuggerConnection = null;
|
||||
@@ -127,6 +123,8 @@ export default class Device {
|
||||
// The device message middleware factory function allowing implementers to handle unsupported CDP messages.
|
||||
#createCustomMessageHandler: ?CreateCustomMessageHandlerFn;
|
||||
|
||||
#connectedPageIds: Set<string> = new Set();
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
name: string,
|
||||
@@ -135,11 +133,30 @@ export default class Device {
|
||||
projectRoot: string,
|
||||
eventReporter: ?EventReporter,
|
||||
createMessageMiddleware: ?CreateCustomMessageHandlerFn,
|
||||
) {
|
||||
this.#dangerouslyConstruct(
|
||||
id,
|
||||
name,
|
||||
app,
|
||||
socket,
|
||||
projectRoot,
|
||||
eventReporter,
|
||||
createMessageMiddleware,
|
||||
);
|
||||
}
|
||||
|
||||
#dangerouslyConstruct(
|
||||
id: string,
|
||||
name: string,
|
||||
app: string,
|
||||
socket: WS,
|
||||
projectRoot: string,
|
||||
eventReporter: ?EventReporter,
|
||||
createMessageMiddleware: ?CreateCustomMessageHandlerFn,
|
||||
) {
|
||||
this.#id = id;
|
||||
this.#name = name;
|
||||
this.#app = app;
|
||||
this.#pages = new Map();
|
||||
this.#deviceSocket = socket;
|
||||
this.#projectRoot = projectRoot;
|
||||
this.#deviceEventReporter = eventReporter
|
||||
@@ -192,16 +209,77 @@ export default class Device {
|
||||
PAGES_POLLING_INTERVAL,
|
||||
);
|
||||
this.#deviceSocket.on('close', () => {
|
||||
this.#deviceEventReporter?.logDisconnection('device');
|
||||
// Device disconnected - close debugger connection.
|
||||
if (this.#debuggerConnection) {
|
||||
this.#debuggerConnection.socket.close();
|
||||
this.#debuggerConnection = null;
|
||||
if (socket === this.#deviceSocket) {
|
||||
this.#deviceEventReporter?.logDisconnection('device');
|
||||
// Device disconnected - close debugger connection.
|
||||
this.#terminateDebuggerConnection();
|
||||
clearInterval(this.#pagesPollingIntervalId);
|
||||
}
|
||||
clearInterval(this.#pagesPollingIntervalId);
|
||||
});
|
||||
}
|
||||
|
||||
#terminateDebuggerConnection() {
|
||||
const debuggerConnection = this.#debuggerConnection;
|
||||
if (debuggerConnection) {
|
||||
this.#sendDisconnectEventToDevice(
|
||||
this.#mapToDevicePageId(debuggerConnection.pageId),
|
||||
);
|
||||
debuggerConnection.socket.close();
|
||||
this.#debuggerConnection = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to recreate the device connection if there is a device ID collision.
|
||||
* 1. Checks if the same device is attempting to reconnect for the same app.
|
||||
* 2. If not, close both the device and debugger socket.
|
||||
* 3. If the debugger connection can be reused, close the device socket only.
|
||||
*
|
||||
* This hack attempts to allow users to reload the app, either as result of a
|
||||
* crash, or manually reloading, without having to restart the debugger.
|
||||
*/
|
||||
dangerouslyRecreateDevice(
|
||||
id: string,
|
||||
name: string,
|
||||
app: string,
|
||||
socket: WS,
|
||||
projectRoot: string,
|
||||
eventReporter: ?EventReporter,
|
||||
createMessageMiddleware: ?CreateCustomMessageHandlerFn,
|
||||
) {
|
||||
invariant(
|
||||
id === this.#id,
|
||||
'dangerouslyRecreateDevice() can only be used for the same device ID',
|
||||
);
|
||||
|
||||
const oldDebugger = this.#debuggerConnection;
|
||||
|
||||
if (this.#app !== app || this.#name !== name) {
|
||||
this.#deviceSocket.close();
|
||||
this.#terminateDebuggerConnection();
|
||||
}
|
||||
|
||||
this.#debuggerConnection = null;
|
||||
|
||||
if (oldDebugger) {
|
||||
oldDebugger.socket.removeAllListeners();
|
||||
this.#deviceSocket.close();
|
||||
this.handleDebuggerConnection(oldDebugger.socket, oldDebugger.pageId, {
|
||||
userAgent: oldDebugger.userAgent,
|
||||
});
|
||||
}
|
||||
|
||||
this.#dangerouslyConstruct(
|
||||
id,
|
||||
name,
|
||||
app,
|
||||
socket,
|
||||
projectRoot,
|
||||
eventReporter,
|
||||
createMessageMiddleware,
|
||||
);
|
||||
}
|
||||
|
||||
getName(): string {
|
||||
return this.#name;
|
||||
}
|
||||
@@ -229,20 +307,30 @@ export default class Device {
|
||||
userAgent: string | null,
|
||||
}>,
|
||||
) {
|
||||
const page: ?Page =
|
||||
pageId === REACT_NATIVE_RELOADABLE_PAGE_ID
|
||||
? this.#createSyntheticPage()
|
||||
: this.#pages.get(pageId);
|
||||
|
||||
if (!page) {
|
||||
debug(
|
||||
`Got new debugger connection for page ${pageId} of ${this.#name}, but no such page exists`,
|
||||
);
|
||||
socket.close();
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear any commands we were waiting on.
|
||||
this.#deviceEventReporter?.logDisconnection('debugger');
|
||||
|
||||
// Disconnect current debugger if we already have debugger connected.
|
||||
this.#terminateDebuggerConnection();
|
||||
|
||||
this.#deviceEventReporter?.logConnection('debugger', {
|
||||
pageId,
|
||||
frontendUserAgent: metadata.userAgent,
|
||||
});
|
||||
|
||||
// Disconnect current debugger if we already have debugger connected.
|
||||
if (this.#debuggerConnection) {
|
||||
this.#debuggerConnection.socket.close();
|
||||
this.#debuggerConnection = null;
|
||||
}
|
||||
|
||||
const debuggerInfo = {
|
||||
socket,
|
||||
prependedFilePrefix: false,
|
||||
@@ -251,18 +339,11 @@ export default class Device {
|
||||
customHandler: null,
|
||||
};
|
||||
|
||||
// TODO(moti): Handle null case explicitly, e.g. refuse to connect to
|
||||
// unknown pages.
|
||||
const page: ?Page =
|
||||
pageId === REACT_NATIVE_RELOADABLE_PAGE_ID
|
||||
? this.#createSyntheticPage()
|
||||
: this.#pages.get(pageId);
|
||||
|
||||
this.#debuggerConnection = debuggerInfo;
|
||||
|
||||
debug(`Got new debugger connection for page ${pageId} of ${this.#name}`);
|
||||
|
||||
if (page && this.#debuggerConnection && this.#createCustomMessageHandler) {
|
||||
if (this.#debuggerConnection && this.#createCustomMessageHandler) {
|
||||
this.#debuggerConnection.customHandler = this.#createCustomMessageHandler(
|
||||
{
|
||||
page,
|
||||
@@ -306,12 +387,7 @@ export default class Device {
|
||||
}
|
||||
}
|
||||
|
||||
this.#sendMessageToDevice({
|
||||
event: 'connect',
|
||||
payload: {
|
||||
pageId: this.#mapToDevicePageId(pageId),
|
||||
},
|
||||
});
|
||||
this.#sendConnectEventToDevice(this.#mapToDevicePageId(pageId));
|
||||
|
||||
// $FlowFixMe[incompatible-call]
|
||||
socket.on('message', (message: string) => {
|
||||
@@ -334,7 +410,7 @@ export default class Device {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!page || !this.#pageHasCapability(page, 'nativeSourceCodeFetching')) {
|
||||
if (!this.#pageHasCapability(page, 'nativeSourceCodeFetching')) {
|
||||
processedReq = this.#interceptClientMessageForSourceFetching(
|
||||
debuggerRequest,
|
||||
debuggerInfo,
|
||||
@@ -355,13 +431,9 @@ export default class Device {
|
||||
socket.on('close', () => {
|
||||
debug(`Debugger for page ${pageId} and ${this.#name} disconnected.`);
|
||||
this.#deviceEventReporter?.logDisconnection('debugger');
|
||||
this.#sendMessageToDevice({
|
||||
event: 'disconnect',
|
||||
payload: {
|
||||
pageId: this.#mapToDevicePageId(pageId),
|
||||
},
|
||||
});
|
||||
this.#debuggerConnection = null;
|
||||
if (this.#debuggerConnection?.socket === socket) {
|
||||
this.#terminateDebuggerConnection();
|
||||
}
|
||||
});
|
||||
|
||||
// $FlowFixMe[method-unbinding]
|
||||
@@ -373,38 +445,26 @@ export default class Device {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles cleaning up a duplicate device connection, by client-side device ID.
|
||||
* 1. Checks if the same device is attempting to reconnect for the same app.
|
||||
* 2. If not, close both the device and debugger socket.
|
||||
* 3. If the debugger connection can be reused, close the device socket only.
|
||||
*
|
||||
* This allows users to reload the app, either as result of a crash, or manually
|
||||
* reloading, without having to restart the debugger.
|
||||
*/
|
||||
handleDuplicateDeviceConnection(newDevice: Device) {
|
||||
if (
|
||||
this.#app !== newDevice.getApp() ||
|
||||
this.#name !== newDevice.getName()
|
||||
) {
|
||||
this.#deviceSocket.close();
|
||||
this.#debuggerConnection?.socket.close();
|
||||
#sendConnectEventToDevice(devicePageId: string) {
|
||||
if (this.#connectedPageIds.has(devicePageId)) {
|
||||
return;
|
||||
}
|
||||
this.#connectedPageIds.add(devicePageId);
|
||||
this.#sendMessageToDevice({
|
||||
event: 'connect',
|
||||
payload: {pageId: devicePageId},
|
||||
});
|
||||
}
|
||||
|
||||
const oldDebugger = this.#debuggerConnection;
|
||||
this.#debuggerConnection = null;
|
||||
|
||||
if (oldDebugger) {
|
||||
oldDebugger.socket.removeAllListeners();
|
||||
this.#deviceSocket.close();
|
||||
newDevice.handleDebuggerConnection(
|
||||
oldDebugger.socket,
|
||||
oldDebugger.pageId,
|
||||
{
|
||||
userAgent: oldDebugger.userAgent,
|
||||
},
|
||||
);
|
||||
#sendDisconnectEventToDevice(devicePageId: string) {
|
||||
if (!this.#connectedPageIds.has(devicePageId)) {
|
||||
return;
|
||||
}
|
||||
this.#connectedPageIds.delete(devicePageId);
|
||||
this.#sendMessageToDevice({
|
||||
event: 'disconnect',
|
||||
payload: {pageId: devicePageId},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -436,6 +496,7 @@ export default class Device {
|
||||
// locations).
|
||||
async #handleMessageFromDevice(message: MessageFromDevice) {
|
||||
if (message.event === 'getPages') {
|
||||
// Preserve ordering - getPages guarantees addition order.
|
||||
this.#pages = new Map(
|
||||
message.payload.map(({capabilities, ...page}) => [
|
||||
page.id,
|
||||
@@ -584,20 +645,10 @@ export default class Device {
|
||||
// page.
|
||||
|
||||
if (oldPageId != null) {
|
||||
this.#sendMessageToDevice({
|
||||
event: 'disconnect',
|
||||
payload: {
|
||||
pageId: oldPageId,
|
||||
},
|
||||
});
|
||||
this.#sendDisconnectEventToDevice(oldPageId);
|
||||
}
|
||||
|
||||
this.#sendMessageToDevice({
|
||||
event: 'connect',
|
||||
payload: {
|
||||
pageId: page.id,
|
||||
},
|
||||
});
|
||||
this.#sendConnectEventToDevice(page.id);
|
||||
|
||||
const toSend = [
|
||||
{method: 'Runtime.enable', id: 1e9},
|
||||
@@ -642,7 +693,6 @@ export default class Device {
|
||||
if ('sourceMapURL' in params) {
|
||||
for (const hostToRewrite of REWRITE_HOSTS_TO_LOCALHOST) {
|
||||
if (params.sourceMapURL.includes(hostToRewrite)) {
|
||||
// $FlowFixMe[cannot-write]
|
||||
payload.params.sourceMapURL = params.sourceMapURL.replace(
|
||||
hostToRewrite,
|
||||
'localhost',
|
||||
@@ -660,7 +710,6 @@ export default class Device {
|
||||
// message to the debug client.
|
||||
try {
|
||||
const sourceMap = await this.#fetchText(sourceMapURL);
|
||||
// $FlowFixMe[cannot-write]
|
||||
payload.params.sourceMapURL =
|
||||
'data:application/json;charset=utf-8;base64,' +
|
||||
Buffer.from(sourceMap).toString('base64');
|
||||
@@ -674,7 +723,6 @@ export default class Device {
|
||||
if ('url' in params) {
|
||||
for (const hostToRewrite of REWRITE_HOSTS_TO_LOCALHOST) {
|
||||
if (params.url.includes(hostToRewrite)) {
|
||||
// $FlowFixMe[cannot-write]
|
||||
payload.params.url = params.url.replace(hostToRewrite, 'localhost');
|
||||
debuggerInfo.originalSourceURLAddress = hostToRewrite;
|
||||
}
|
||||
@@ -685,7 +733,6 @@ export default class Device {
|
||||
// Chrome to not download source maps. In this case we want to prepend script ID
|
||||
// with 'file://' prefix.
|
||||
if (payload.params.url.match(/^[0-9a-z]+$/)) {
|
||||
// $FlowFixMe[cannot-write]
|
||||
payload.params.url = FILE_PREFIX + payload.params.url;
|
||||
debuggerInfo.prependedFilePrefix = true;
|
||||
}
|
||||
@@ -931,4 +978,8 @@ export default class Device {
|
||||
|
||||
return this.#pageHasCapability(page, 'prefersFuseboxFrontend');
|
||||
}
|
||||
|
||||
dangerouslyGetSocket(): WS {
|
||||
return this.#deviceSocket;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
import type {EventReporter} from '../types/EventReporter';
|
||||
import type {CDPResponse} from './cdp-types/messages';
|
||||
import type {DeepReadOnly} from './types';
|
||||
|
||||
import TTLCache from '@isaacs/ttlcache';
|
||||
|
||||
@@ -77,7 +78,7 @@ class DeviceEventReporter {
|
||||
}
|
||||
|
||||
logResponse(
|
||||
res: CDPResponse<>,
|
||||
res: DeepReadOnly<CDPResponse<>>,
|
||||
origin: 'device' | 'proxy',
|
||||
metadata: ResponseMetadata,
|
||||
): void {
|
||||
|
||||
@@ -43,6 +43,10 @@ const DEBUGGER_HEARTBEAT_INTERVAL_MS = 10000;
|
||||
const INTERNAL_ERROR_CODE = 1011;
|
||||
|
||||
export interface InspectorProxyQueries {
|
||||
/**
|
||||
* Returns list of page descriptions ordered by device connection order, then
|
||||
* page addition order.
|
||||
*/
|
||||
getPageDescriptions(): Array<PageDescription>;
|
||||
}
|
||||
|
||||
@@ -209,18 +213,28 @@ export default class InspectorProxy implements InspectorProxyQueries {
|
||||
const appName = query.app || 'Unknown';
|
||||
|
||||
const oldDevice = this.#devices.get(deviceId);
|
||||
const newDevice = new Device(
|
||||
deviceId,
|
||||
deviceName,
|
||||
appName,
|
||||
socket,
|
||||
this.#projectRoot,
|
||||
this.#eventReporter,
|
||||
this.#customMessageHandler,
|
||||
);
|
||||
|
||||
let newDevice;
|
||||
if (oldDevice) {
|
||||
oldDevice.handleDuplicateDeviceConnection(newDevice);
|
||||
oldDevice.dangerouslyRecreateDevice(
|
||||
deviceId,
|
||||
deviceName,
|
||||
appName,
|
||||
socket,
|
||||
this.#projectRoot,
|
||||
this.#eventReporter,
|
||||
this.#customMessageHandler,
|
||||
);
|
||||
newDevice = oldDevice;
|
||||
} else {
|
||||
newDevice = new Device(
|
||||
deviceId,
|
||||
deviceName,
|
||||
appName,
|
||||
socket,
|
||||
this.#projectRoot,
|
||||
this.#eventReporter,
|
||||
this.#customMessageHandler,
|
||||
);
|
||||
}
|
||||
|
||||
this.#devices.set(deviceId, newDevice);
|
||||
@@ -230,7 +244,9 @@ export default class InspectorProxy implements InspectorProxyQueries {
|
||||
);
|
||||
|
||||
socket.on('close', () => {
|
||||
this.#devices.delete(deviceId);
|
||||
if (this.#devices.get(deviceId)?.dangerouslyGetSocket() === socket) {
|
||||
this.#devices.delete(deviceId);
|
||||
}
|
||||
debug(`Device ${deviceName} disconnected.`);
|
||||
});
|
||||
} catch (e) {
|
||||
|
||||
@@ -9,35 +9,36 @@
|
||||
* @oncall react_native
|
||||
*/
|
||||
|
||||
import type {JSONSerializable} from '../types';
|
||||
import type {Commands, Events} from './protocol';
|
||||
|
||||
// Note: A CDP event is a JSON-RPC notification with no `id` member.
|
||||
export type CDPEvent<TEvent: $Keys<Events> = 'unknown'> = $ReadOnly<{
|
||||
export type CDPEvent<TEvent: $Keys<Events> = 'unknown'> = {
|
||||
method: TEvent,
|
||||
params: Events[TEvent],
|
||||
}>;
|
||||
};
|
||||
|
||||
export type CDPRequest<TCommand: $Keys<Commands> = 'unknown'> = $ReadOnly<{
|
||||
export type CDPRequest<TCommand: $Keys<Commands> = 'unknown'> = {
|
||||
method: TCommand,
|
||||
params: Commands[TCommand]['paramsType'],
|
||||
id: number,
|
||||
}>;
|
||||
};
|
||||
|
||||
export type CDPResponse<TCommand: $Keys<Commands> = 'unknown'> =
|
||||
| $ReadOnly<{
|
||||
| {
|
||||
result: Commands[TCommand]['resultType'],
|
||||
id: number,
|
||||
}>
|
||||
| $ReadOnly<{
|
||||
}
|
||||
| {
|
||||
error: CDPRequestError,
|
||||
id: number,
|
||||
}>;
|
||||
};
|
||||
|
||||
export type CDPRequestError = $ReadOnly<{
|
||||
export type CDPRequestError = {
|
||||
code: number,
|
||||
message: string,
|
||||
data?: mixed,
|
||||
}>;
|
||||
data?: JSONSerializable,
|
||||
};
|
||||
|
||||
export type CDPClientMessage =
|
||||
| CDPRequest<'Debugger.getScriptSource'>
|
||||
|
||||
@@ -11,17 +11,19 @@
|
||||
|
||||
// Adapted from https://github.com/ChromeDevTools/devtools-protocol/blob/master/types/protocol.d.ts
|
||||
|
||||
import type {JSONSerializable} from '../types';
|
||||
|
||||
type integer = number;
|
||||
|
||||
export interface Debugger {
|
||||
GetScriptSourceParams: $ReadOnly<{
|
||||
GetScriptSourceParams: {
|
||||
/**
|
||||
* Id of the script to get source for.
|
||||
*/
|
||||
scriptId: string,
|
||||
}>;
|
||||
};
|
||||
|
||||
GetScriptSourceResult: $ReadOnly<{
|
||||
GetScriptSourceResult: {
|
||||
/**
|
||||
* Script source (empty in case of Wasm bytecode).
|
||||
*/
|
||||
@@ -31,9 +33,9 @@ export interface Debugger {
|
||||
* Wasm bytecode. (Encoded as a base64 string when passed over JSON)
|
||||
*/
|
||||
bytecode?: string,
|
||||
}>;
|
||||
};
|
||||
|
||||
SetBreakpointByUrlParams: $ReadOnly<{
|
||||
SetBreakpointByUrlParams: {
|
||||
/**
|
||||
* Line number to set breakpoint at.
|
||||
*/
|
||||
@@ -65,9 +67,9 @@ export interface Debugger {
|
||||
* breakpoint if this expression evaluates to true.
|
||||
*/
|
||||
condition?: string,
|
||||
}>;
|
||||
};
|
||||
|
||||
ScriptParsedEvent: $ReadOnly<{
|
||||
ScriptParsedEvent: {
|
||||
/**
|
||||
* Identifier of the script parsed.
|
||||
*/
|
||||
@@ -82,12 +84,12 @@ export interface Debugger {
|
||||
* URL of source map associated with script (if any).
|
||||
*/
|
||||
sourceMapURL: string,
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export type Events = {
|
||||
'Debugger.scriptParsed': Debugger['ScriptParsedEvent'],
|
||||
[method: string]: mixed,
|
||||
[method: string]: JSONSerializable,
|
||||
};
|
||||
|
||||
export type Commands = {
|
||||
@@ -100,7 +102,7 @@ export type Commands = {
|
||||
resultType: void,
|
||||
},
|
||||
[method: string]: {
|
||||
paramsType: mixed,
|
||||
resultType: mixed,
|
||||
paramsType: JSONSerializable,
|
||||
resultType: JSONSerializable,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -146,3 +146,10 @@ export type JSONSerializable =
|
||||
| null
|
||||
| $ReadOnlyArray<JSONSerializable>
|
||||
| {+[string]: JSONSerializable};
|
||||
|
||||
export type DeepReadOnly<T> =
|
||||
T extends $ReadOnlyArray<infer V>
|
||||
? $ReadOnlyArray<DeepReadOnly<V>>
|
||||
: T extends {...}
|
||||
? {+[K in keyof T]: DeepReadOnly<T[K]>}
|
||||
: T;
|
||||
|
||||
@@ -59,7 +59,14 @@ export default function openDebuggerMiddleware({
|
||||
appId,
|
||||
device,
|
||||
launchId,
|
||||
}: {appId?: string, device?: string, launchId?: string, ...} = query;
|
||||
target: targetId,
|
||||
}: {
|
||||
appId?: string,
|
||||
device?: string,
|
||||
launchId?: string,
|
||||
target?: string,
|
||||
...
|
||||
} = query;
|
||||
|
||||
const targets = inspectorProxy.getPageDescriptions().filter(
|
||||
// Only use targets with better reloading support
|
||||
@@ -73,25 +80,27 @@ export default function openDebuggerMiddleware({
|
||||
const launchType: 'launch' | 'redirect' =
|
||||
req.method === 'POST' ? 'launch' : 'redirect';
|
||||
|
||||
if (typeof appId === 'string' || typeof device === 'string') {
|
||||
if (
|
||||
typeof targetId === 'string' ||
|
||||
typeof appId === 'string' ||
|
||||
typeof device === 'string'
|
||||
) {
|
||||
logger?.info(
|
||||
(launchType === 'launch' ? 'Launching' : 'Redirecting to') +
|
||||
' JS debugger (experimental)...',
|
||||
);
|
||||
if (typeof device === 'string') {
|
||||
target = targets.find(
|
||||
_target => _target.reactNative.logicalDeviceId === device,
|
||||
);
|
||||
}
|
||||
if (!target && typeof appId === 'string') {
|
||||
target = targets.find(_target => _target.description === appId);
|
||||
}
|
||||
} else {
|
||||
target = targets.find(
|
||||
_target =>
|
||||
(targetId == null || _target.id === targetId) &&
|
||||
(appId == null || _target.description === appId) &&
|
||||
(device == null || _target.reactNative.logicalDeviceId === device),
|
||||
);
|
||||
} else if (targets.length > 0) {
|
||||
logger?.info(
|
||||
(launchType === 'launch' ? 'Launching' : 'Redirecting to') +
|
||||
' JS debugger for first available target...',
|
||||
` JS debugger${targets.length === 1 ? '' : ' for most recently connected target'}...`,
|
||||
);
|
||||
target = targets[0];
|
||||
target = targets[targets.length - 1];
|
||||
}
|
||||
|
||||
if (!target) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-config",
|
||||
"version": "0.75.0-main",
|
||||
"version": "0.76.0-main",
|
||||
"description": "ESLint config for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -22,7 +22,7 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.20.0",
|
||||
"@babel/eslint-parser": "^7.20.0",
|
||||
"@react-native/eslint-plugin": "0.75.0-main",
|
||||
"@react-native/eslint-plugin": "0.76.0-main",
|
||||
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin",
|
||||
"version": "0.75.0-main",
|
||||
"version": "0.76.0-main",
|
||||
"description": "ESLint rules for @react-native/eslint-config",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin-specs",
|
||||
"version": "0.75.0-main",
|
||||
"version": "0.76.0-main",
|
||||
"description": "ESLint rules to validate NativeModule and Component Specs",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -31,7 +31,7 @@
|
||||
"@babel/eslint-parser": "^7.20.0",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
|
||||
"@babel/preset-flow": "^7.20.0",
|
||||
"@react-native/codegen": "0.75.0-main",
|
||||
"@react-native/codegen": "0.76.0-main",
|
||||
"make-dir": "^2.1.0",
|
||||
"pirates": "^4.0.1",
|
||||
"source-map-support": "0.5.0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
build/
|
||||
app-plugin/build/
|
||||
react-native-gradle-plugin/build/
|
||||
settings-plugin/build/
|
||||
shared/build/
|
||||
@@ -20,4 +20,4 @@ yarn add @react-native/gradle-plugin
|
||||
To run the tests in this package, run the following commands from the React Native root folder:
|
||||
|
||||
1. `yarn` to install the dependencies. You just need to run this once
|
||||
2. `yarn jest packages/react-native-gradle-plugin`.
|
||||
2. `./gradlew -p packages/gradle-plugin test`.
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
[versions]
|
||||
agp = "8.5.0"
|
||||
agp = "8.5.1"
|
||||
gson = "2.8.9"
|
||||
guava = "31.0.1-jre"
|
||||
javapoet = "1.13.0"
|
||||
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
+4
-1
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -84,7 +86,8 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
+7
@@ -1,3 +1,8 @@
|
||||
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
@REM
|
||||
@REM This source code is licensed under the MIT license found in the
|
||||
@REM LICENSE file in the root directory of this source tree.
|
||||
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@@ -13,6 +18,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "@react-native/gradle-plugin",
|
||||
"version": "0.75.0-main",
|
||||
"version": "0.76.0-main",
|
||||
"description": "Gradle Plugin for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/facebook/react-native.git",
|
||||
"directory": "packages/react-native-gradle-plugin"
|
||||
"directory": "packages/gradle-plugin"
|
||||
},
|
||||
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-gradle-plugin#readme",
|
||||
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/gradle-plugin#readme",
|
||||
"keywords": [
|
||||
"gradle",
|
||||
"plugin",
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user