From 179067d01793180c6cc95f8ddb74bd1ff4daddd2 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 7 Feb 2025 11:44:13 +0200 Subject: [PATCH 01/11] Bump Performance App to RN 0.77 --- .../TestAppPlain/{_bundle => .bundle}/config | 0 performance-tests/TestAppPlain/.eslintrc.js | 4 + performance-tests/TestAppPlain/.gitignore | 28 +- performance-tests/TestAppPlain/.prettierrc.js | 7 + .../TestAppPlain/.watchmanconfig | 1 + .../App.js => TestAppPlain/App.tsx} | 26 +- performance-tests/TestAppPlain/Gemfile | 8 +- .../TestAppPlain/android/app/_BUCK | 55 - .../TestAppPlain/android/app/build.gradle | 320 +---- .../TestAppPlain/android/app/build_defs.bzl | 19 - .../android/app/src/debug/AndroidManifest.xml | 6 +- .../com/testappplain/ReactNativeFlipper.java | 73 - .../android/app/src/main/AndroidManifest.xml | 6 +- .../java/com/testappplain/MainActivity.java | 48 - .../java/com/testappplain/MainActivity.kt | 22 + .../com/testappplain/MainApplication.java | 91 -- .../java/com/testappplain/MainApplication.kt | 44 + .../MainApplicationReactNativeHost.java | 117 -- .../components/MainComponentsRegistry.java | 36 - ...ApplicationTurboModuleManagerDelegate.java | 48 - .../android/app/src/main/jni/CMakeLists.txt | 5 - .../jni/MainApplicationModuleProvider.cpp | 33 - .../main/jni/MainApplicationModuleProvider.h | 15 - ...nApplicationTurboModuleManagerDelegate.cpp | 46 - ...ainApplicationTurboModuleManagerDelegate.h | 35 - .../src/main/jni/MainComponentsRegistry.cpp | 64 - .../app/src/main/jni/MainComponentsRegistry.h | 29 - .../android/app/src/main/jni/OnLoad.cpp | 12 - .../res/drawable/rn_edit_text_material.xml | 5 +- .../TestAppPlain/android/build.gradle | 50 +- .../TestAppPlain/android/debug.keystore | Bin 2257 -> 0 bytes .../TestAppPlain/android/gradle.properties | 15 +- .../android/gradle/wrapper/gradle-wrapper.jar | Bin 59821 -> 43583 bytes .../gradle/wrapper/gradle-wrapper.properties | 4 +- .../TestAppPlain/android/gradlew | 44 +- .../TestAppPlain/android/gradlew.bat | 183 +-- .../TestAppPlain/android/settings.gradle | 13 +- performance-tests/TestAppPlain/app.json | 2 +- .../TestAppPlain/babel.config.js | 2 +- .../ios/{_xcode.env => .xcode.env} | 0 performance-tests/TestAppPlain/ios/Podfile | 40 +- .../TestAppPlain.xcodeproj/project.pbxproj | 290 +--- .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../ios/TestAppPlain/AppDelegate.h | 8 - .../ios/TestAppPlain/AppDelegate.mm | 138 -- .../ios/TestAppPlain/AppDelegate.swift | 30 + .../TestAppPlain/ios/TestAppPlain/Info.plist | 19 +- .../ios/TestAppPlain/PrivacyInfo.xcprivacy | 37 + .../TestAppPlain/ios/TestAppPlain/main.m | 11 - .../ios/TestAppPlainTests/Info.plist | 24 - .../ios/TestAppPlainTests/TestAppPlainTests.m | 70 - performance-tests/TestAppPlain/jest.config.js | 3 + .../TestAppPlain/metro.config.js | 20 +- performance-tests/TestAppPlain/package.json | 33 +- performance-tests/TestAppPlain/tsconfig.json | 3 + .../TestAppSentry/{_bundle => .bundle}/config | 0 performance-tests/TestAppSentry/.eslintrc.js | 4 + performance-tests/TestAppSentry/.gitignore | 28 +- .../TestAppSentry/.prettierrc.js | 7 + .../TestAppSentry/.watchmanconfig | 1 + .../App.js => TestAppSentry/App.tsx} | 30 +- performance-tests/TestAppSentry/Gemfile | 8 +- .../TestAppSentry/android/app/_BUCK | 55 - .../TestAppSentry/android/app/build.gradle | 324 +---- .../TestAppSentry/android/app/build_defs.bzl | 19 - .../android/app/src/debug/AndroidManifest.xml | 6 +- .../com/testappsentry/ReactNativeFlipper.java | 73 - .../android/app/src/main/AndroidManifest.xml | 6 +- .../java/com/testappsentry/MainActivity.java | 48 - .../java/com/testappsentry/MainActivity.kt | 22 + .../com/testappsentry/MainApplication.java | 91 -- .../java/com/testappsentry/MainApplication.kt | 44 + .../MainApplicationReactNativeHost.java | 117 -- .../components/MainComponentsRegistry.java | 36 - ...ApplicationTurboModuleManagerDelegate.java | 48 - .../android/app/src/main/jni/CMakeLists.txt | 5 - .../jni/MainApplicationModuleProvider.cpp | 33 - .../main/jni/MainApplicationModuleProvider.h | 15 - ...nApplicationTurboModuleManagerDelegate.cpp | 46 - ...ainApplicationTurboModuleManagerDelegate.h | 35 - .../src/main/jni/MainComponentsRegistry.cpp | 64 - .../app/src/main/jni/MainComponentsRegistry.h | 29 - .../android/app/src/main/jni/OnLoad.cpp | 12 - .../res/drawable/rn_edit_text_material.xml | 5 +- .../TestAppSentry/android/build.gradle | 49 +- .../TestAppSentry/android/debug.keystore | Bin 2257 -> 0 bytes .../TestAppSentry/android/gradle.properties | 15 +- .../android/gradle/wrapper/gradle-wrapper.jar | Bin 59821 -> 43583 bytes .../gradle/wrapper/gradle-wrapper.properties | 4 +- .../TestAppSentry/android/gradlew | 44 +- .../TestAppSentry/android/gradlew.bat | 183 +-- .../TestAppSentry/android/settings.gradle | 13 +- performance-tests/TestAppSentry/app.json | 2 +- .../TestAppSentry/babel.config.js | 2 +- .../ios/{_xcode.env => .xcode.env} | 0 performance-tests/TestAppSentry/ios/Podfile | 40 +- .../TestAppSentry.xcodeproj/project.pbxproj | 288 +--- .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../ios/TestAppSentry/AppDelegate.h | 8 - .../ios/TestAppSentry/AppDelegate.mm | 138 -- .../ios/TestAppSentry/AppDelegate.swift | 30 + .../ios/TestAppSentry/Info.plist | 19 +- .../ios/TestAppSentry/PrivacyInfo.xcprivacy | 37 + .../TestAppSentry/ios/TestAppSentry/main.m | 11 - .../ios/TestAppSentryTests/Info.plist | 24 - .../TestAppSentryTests/TestAppSentryTests.m | 70 - .../TestAppSentry/jest.config.js | 3 + .../TestAppSentry/metro.config.js | 26 +- performance-tests/TestAppSentry/package.json | 38 +- performance-tests/TestAppSentry/tsconfig.json | 3 + yarn.lock | 1181 ++++------------- 111 files changed, 1299 insertions(+), 4398 deletions(-) rename performance-tests/TestAppPlain/{_bundle => .bundle}/config (100%) create mode 100644 performance-tests/TestAppPlain/.eslintrc.js create mode 100644 performance-tests/TestAppPlain/.prettierrc.js create mode 100644 performance-tests/TestAppPlain/.watchmanconfig rename performance-tests/{TestAppSentry/App.js => TestAppPlain/App.tsx} (83%) delete mode 100644 performance-tests/TestAppPlain/android/app/_BUCK delete mode 100644 performance-tests/TestAppPlain/android/app/build_defs.bzl delete mode 100644 performance-tests/TestAppPlain/android/app/src/debug/java/com/testappplain/ReactNativeFlipper.java delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainActivity.java create mode 100644 performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainActivity.kt delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.java create mode 100644 performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.kt delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/MainApplicationReactNativeHost.java delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/components/MainComponentsRegistry.java delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/jni/CMakeLists.txt delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationModuleProvider.cpp delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationModuleProvider.h delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/jni/MainComponentsRegistry.cpp delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/jni/MainComponentsRegistry.h delete mode 100644 performance-tests/TestAppPlain/android/app/src/main/jni/OnLoad.cpp delete mode 100644 performance-tests/TestAppPlain/android/debug.keystore rename performance-tests/TestAppPlain/ios/{_xcode.env => .xcode.env} (100%) delete mode 100644 performance-tests/TestAppPlain/ios/TestAppPlain.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 performance-tests/TestAppPlain/ios/TestAppPlain/AppDelegate.h delete mode 100644 performance-tests/TestAppPlain/ios/TestAppPlain/AppDelegate.mm create mode 100644 performance-tests/TestAppPlain/ios/TestAppPlain/AppDelegate.swift create mode 100644 performance-tests/TestAppPlain/ios/TestAppPlain/PrivacyInfo.xcprivacy delete mode 100644 performance-tests/TestAppPlain/ios/TestAppPlain/main.m delete mode 100644 performance-tests/TestAppPlain/ios/TestAppPlainTests/Info.plist delete mode 100644 performance-tests/TestAppPlain/ios/TestAppPlainTests/TestAppPlainTests.m create mode 100644 performance-tests/TestAppPlain/jest.config.js create mode 100644 performance-tests/TestAppPlain/tsconfig.json rename performance-tests/TestAppSentry/{_bundle => .bundle}/config (100%) create mode 100644 performance-tests/TestAppSentry/.eslintrc.js create mode 100644 performance-tests/TestAppSentry/.prettierrc.js create mode 100644 performance-tests/TestAppSentry/.watchmanconfig rename performance-tests/{TestAppPlain/App.js => TestAppSentry/App.tsx} (75%) delete mode 100644 performance-tests/TestAppSentry/android/app/_BUCK delete mode 100644 performance-tests/TestAppSentry/android/app/build_defs.bzl delete mode 100644 performance-tests/TestAppSentry/android/app/src/debug/java/com/testappsentry/ReactNativeFlipper.java delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainActivity.java create mode 100644 performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainActivity.kt delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.java create mode 100644 performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.kt delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/MainApplicationReactNativeHost.java delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/components/MainComponentsRegistry.java delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/jni/CMakeLists.txt delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationModuleProvider.cpp delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationModuleProvider.h delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/jni/MainComponentsRegistry.cpp delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/jni/MainComponentsRegistry.h delete mode 100644 performance-tests/TestAppSentry/android/app/src/main/jni/OnLoad.cpp delete mode 100644 performance-tests/TestAppSentry/android/debug.keystore rename performance-tests/TestAppSentry/ios/{_xcode.env => .xcode.env} (100%) delete mode 100644 performance-tests/TestAppSentry/ios/TestAppSentry.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 performance-tests/TestAppSentry/ios/TestAppSentry/AppDelegate.h delete mode 100644 performance-tests/TestAppSentry/ios/TestAppSentry/AppDelegate.mm create mode 100644 performance-tests/TestAppSentry/ios/TestAppSentry/AppDelegate.swift create mode 100644 performance-tests/TestAppSentry/ios/TestAppSentry/PrivacyInfo.xcprivacy delete mode 100644 performance-tests/TestAppSentry/ios/TestAppSentry/main.m delete mode 100644 performance-tests/TestAppSentry/ios/TestAppSentryTests/Info.plist delete mode 100644 performance-tests/TestAppSentry/ios/TestAppSentryTests/TestAppSentryTests.m create mode 100644 performance-tests/TestAppSentry/jest.config.js create mode 100644 performance-tests/TestAppSentry/tsconfig.json diff --git a/performance-tests/TestAppPlain/_bundle/config b/performance-tests/TestAppPlain/.bundle/config similarity index 100% rename from performance-tests/TestAppPlain/_bundle/config rename to performance-tests/TestAppPlain/.bundle/config diff --git a/performance-tests/TestAppPlain/.eslintrc.js b/performance-tests/TestAppPlain/.eslintrc.js new file mode 100644 index 0000000000..187894b6af --- /dev/null +++ b/performance-tests/TestAppPlain/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: '@react-native', +}; diff --git a/performance-tests/TestAppPlain/.gitignore b/performance-tests/TestAppPlain/.gitignore index d4b23394ce..d5ae456695 100644 --- a/performance-tests/TestAppPlain/.gitignore +++ b/performance-tests/TestAppPlain/.gitignore @@ -20,7 +20,7 @@ DerivedData *.hmap *.ipa *.xcuserstate -ios/.xcode.env.local +**/.xcode.env.local # Android/IntelliJ # @@ -30,6 +30,9 @@ build/ local.properties *.iml *.hprof +.cxx/ +*.keystore +!debug.keystore # node.js # @@ -37,12 +40,6 @@ node_modules/ npm-debug.log yarn-error.log -# BUCK -buck-out/ -\.buckd/ -*.keystore -!debug.keystore - # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the @@ -59,8 +56,19 @@ buck-out/ *.jsbundle # Ruby / CocoaPods -/ios/Pods/ +**/Pods/ /vendor/bundle/ -#Codegen -.cxx/ +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# testing +/coverage + +# Yarn +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions diff --git a/performance-tests/TestAppPlain/.prettierrc.js b/performance-tests/TestAppPlain/.prettierrc.js new file mode 100644 index 0000000000..2b540746a7 --- /dev/null +++ b/performance-tests/TestAppPlain/.prettierrc.js @@ -0,0 +1,7 @@ +module.exports = { + arrowParens: 'avoid', + bracketSameLine: true, + bracketSpacing: false, + singleQuote: true, + trailingComma: 'all', +}; diff --git a/performance-tests/TestAppPlain/.watchmanconfig b/performance-tests/TestAppPlain/.watchmanconfig new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/performance-tests/TestAppPlain/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/performance-tests/TestAppSentry/App.js b/performance-tests/TestAppPlain/App.tsx similarity index 83% rename from performance-tests/TestAppSentry/App.js rename to performance-tests/TestAppPlain/App.tsx index 0133c64368..125fe1b98e 100644 --- a/performance-tests/TestAppSentry/App.js +++ b/performance-tests/TestAppPlain/App.tsx @@ -3,11 +3,10 @@ * https://github.com/facebook/react-native * * @format - * @flow strict-local */ import React from 'react'; -import type {Node} from 'react'; +import type {PropsWithChildren} from 'react'; import { SafeAreaView, ScrollView, @@ -26,13 +25,11 @@ import { ReloadInstructions, } from 'react-native/Libraries/NewAppScreen'; -import * as Sentry from '@sentry/react-native'; +type SectionProps = PropsWithChildren<{ + title: string; +}>; -Sentry.init({ - dsn: 'https://1df17bd4e543fdb31351dee1768bb679@o447951.ingest.sentry.io/5428561', -}); - -const Section = ({children, title}): Node => { +function Section({children, title}: SectionProps): React.JSX.Element { const isDarkMode = useColorScheme() === 'dark'; return ( @@ -56,9 +53,9 @@ const Section = ({children, title}): Node => { ); -}; +} -const App: () => Node = () => { +function App(): React.JSX.Element { const isDarkMode = useColorScheme() === 'dark'; const backgroundStyle = { @@ -67,7 +64,10 @@ const App: () => Node = () => { return ( - + @@ -77,7 +77,7 @@ const App: () => Node = () => { backgroundColor: isDarkMode ? Colors.black : Colors.white, }}>
- Edit App.js to change this + Edit App.tsx to change this screen and then come back to see your edits.
@@ -94,7 +94,7 @@ const App: () => Node = () => { ); -}; +} const styles = StyleSheet.create({ sectionContainer: { diff --git a/performance-tests/TestAppPlain/Gemfile b/performance-tests/TestAppPlain/Gemfile index 5efda89f45..03278dd5eb 100644 --- a/performance-tests/TestAppPlain/Gemfile +++ b/performance-tests/TestAppPlain/Gemfile @@ -1,6 +1,10 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby '2.7.5' +ruby ">= 2.6.10" -gem 'cocoapods', '~> 1.11', '>= 1.11.2' +# Exclude problematic versions of cocoapods and activesupport that causes build failures. +gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' +gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' +gem 'xcodeproj', '< 1.26.0' +gem 'concurrent-ruby', '< 1.3.4' diff --git a/performance-tests/TestAppPlain/android/app/_BUCK b/performance-tests/TestAppPlain/android/app/_BUCK deleted file mode 100644 index 95225d463a..0000000000 --- a/performance-tests/TestAppPlain/android/app/_BUCK +++ /dev/null @@ -1,55 +0,0 @@ -# To learn about Buck see [Docs](https://buckbuild.com/). -# To run your application with Buck: -# - install Buck -# - `npm start` - to start the packager -# - `cd android` -# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` -# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck -# - `buck install -r android/app` - compile, install and run application -# - -load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") - -lib_deps = [] - -create_aar_targets(glob(["libs/*.aar"])) - -create_jar_targets(glob(["libs/*.jar"])) - -android_library( - name = "all-libs", - exported_deps = lib_deps, -) - -android_library( - name = "app-code", - srcs = glob([ - "src/main/java/**/*.java", - ]), - deps = [ - ":all-libs", - ":build_config", - ":res", - ], -) - -android_build_config( - name = "build_config", - package = "com.testappplain", -) - -android_resource( - name = "res", - package = "com.testappplain", - res = "src/main/res", -) - -android_binary( - name = "app", - keystore = "//android/keystores:debug", - manifest = "src/main/AndroidManifest.xml", - package_type = "debug", - deps = [ - ":app-code", - ], -) diff --git a/performance-tests/TestAppPlain/android/app/build.gradle b/performance-tests/TestAppPlain/android/app/build.gradle index 39f14fe281..5b68699db5 100644 --- a/performance-tests/TestAppPlain/android/app/build.gradle +++ b/performance-tests/TestAppPlain/android/app/build.gradle @@ -1,218 +1,89 @@ apply plugin: "com.android.application" - -import com.android.build.OutputFile - -/** - * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets - * and bundleReleaseJsAndAssets). - * These basically call `react-native bundle` with the correct arguments during the Android build - * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the - * bundle directly from the development server. Below you can see all the possible configurations - * and their defaults. If you decide to add a configuration block, make sure to add it before the - * `apply from: "../../node_modules/react-native/react.gradle"` line. - * - * project.ext.react = [ - * // the name of the generated asset file containing your JS bundle - * bundleAssetName: "index.android.bundle", - * - * // the entry file for bundle generation. If none specified and - * // "index.android.js" exists, it will be used. Otherwise "index.js" is - * // default. Can be overridden with ENTRY_FILE environment variable. - * entryFile: "index.android.js", - * - * // https://reactnative.dev/docs/performance#enable-the-ram-format - * bundleCommand: "ram-bundle", - * - * // whether to bundle JS and assets in debug mode - * bundleInDebug: false, - * - * // whether to bundle JS and assets in release mode - * bundleInRelease: true, - * - * // whether to bundle JS and assets in another build variant (if configured). - * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants - * // The configuration property can be in the following formats - * // 'bundleIn${productFlavor}${buildType}' - * // 'bundleIn${buildType}' - * // bundleInFreeDebug: true, - * // bundleInPaidRelease: true, - * // bundleInBeta: true, - * - * // whether to disable dev mode in custom build variants (by default only disabled in release) - * // for example: to disable dev mode in the staging build type (if configured) - * devDisabledInStaging: true, - * // The configuration property can be in the following formats - * // 'devDisabledIn${productFlavor}${buildType}' - * // 'devDisabledIn${buildType}' - * - * // the root of your project, i.e. where "package.json" lives - * root: "../../", - * - * // where to put the JS bundle asset in debug mode - * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", - * - * // where to put the JS bundle asset in release mode - * jsBundleDirRelease: "$buildDir/intermediates/assets/release", - * - * // where to put drawable resources / React Native assets, e.g. the ones you use via - * // require('./image.png')), in debug mode - * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", - * - * // where to put drawable resources / React Native assets, e.g. the ones you use via - * // require('./image.png')), in release mode - * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", - * - * // by default the gradle tasks are skipped if none of the JS files or assets change; this means - * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to - * // date; if you have any other folders that you want to ignore for performance reasons (gradle - * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ - * // for example, you might want to remove it from here. - * inputExcludes: ["android/**", "ios/**"], - * - * // override which node gets called and with what additional arguments - * nodeExecutableAndArgs: ["node"], - * - * // supply additional arguments to the packager - * extraPackagerArgs: [] - * ] - */ - -project.ext.react = [ - enableHermes: true, // clean and rebuild if changing -] - -apply from: "../../node_modules/react-native/react.gradle" +apply plugin: "org.jetbrains.kotlin.android" +apply plugin: "com.facebook.react" /** - * Set this to true to create two separate APKs instead of one: - * - An APK that only works on ARM devices - * - An APK that only works on x86 devices - * The advantage is the size of the APK is reduced by about 4MB. - * Upload all the APKs to the Play Store and people will download - * the correct one based on the CPU architecture of their device. + * This is the configuration block to customize your React Native Android app. + * By default you don't need to apply any configuration, just uncomment the lines you need. */ -def enableSeparateBuildPerCPUArchitecture = false +react { + /* Folders */ + // The root of your project, i.e. where "package.json" lives. Default is '../..' + // root = file("../../") + // The folder where the react-native NPM package is. Default is ../../node_modules/react-native + // reactNativeDir = file("../../node_modules/react-native") + // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen + // codegenDir = file("../../node_modules/@react-native/codegen") + // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js + // cliFile = file("../../node_modules/react-native/cli.js") + + /* Variants */ + // The list of variants to that are debuggable. For those we're going to + // skip the bundling of the JS bundle and the assets. By default is just 'debug'. + // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. + // debuggableVariants = ["liteDebug", "prodDebug"] + + /* Bundling */ + // A list containing the node command and its flags. Default is just 'node'. + // nodeExecutableAndArgs = ["node"] + // + // The command to run when bundling. By default is 'bundle' + // bundleCommand = "ram-bundle" + // + // The path to the CLI configuration file. Default is empty. + // bundleConfig = file(../rn-cli.config.js) + // + // The name of the generated asset file containing your JS bundle + // bundleAssetName = "MyApplication.android.bundle" + // + // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' + // entryFile = file("../js/MyApplication.android.js") + // + // A list of extra flags to pass to the 'bundle' commands. + // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle + // extraPackagerArgs = [] + + /* Hermes Commands */ + // The hermes compiler command to run. By default it is 'hermesc' + // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" + // + // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" + // hermesFlags = ["-O", "-output-source-map"] + + /* Autolinking */ + autolinkLibrariesWithApp() +} /** - * Run Proguard to shrink the Java bytecode in release builds. + * Set this to true to Run Proguard on Release builds to minify the Java bytecode. */ def enableProguardInReleaseBuilds = false /** - * The preferred build flavor of JavaScriptCore. + * The preferred build flavor of JavaScriptCore (JSC) * * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that - * give correct results when using with locales other than en-US. Note that + * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default. */ def jscFlavor = 'org.webkit:android-jsc:+' -/** - * Whether to enable the Hermes VM. - * - * This should be set on project.ext.react and that value will be read here. If it is not set - * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode - * and the benefits of using Hermes will therefore be sharply reduced. - */ -def enableHermes = project.ext.react.get("enableHermes", false); - -/** - * Architectures to build native code for. - */ -def reactNativeArchitectures() { - def value = project.getProperties().get("reactNativeArchitectures") - return value ? value.split(",") : ["arm64-v8a"] -} - android { ndkVersion rootProject.ext.ndkVersion + buildToolsVersion rootProject.ext.buildToolsVersion + compileSdk rootProject.ext.compileSdkVersion - compileSdkVersion rootProject.ext.compileSdkVersion - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - + namespace "com.testappplain" defaultConfig { applicationId "com.testappplain" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" - buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() - - if (isNewArchitectureEnabled()) { - // We configure the CMake build only if you decide to opt-in for the New Architecture. - externalNativeBuild { - cmake { - arguments "-DPROJECT_BUILD_DIR=$buildDir", - "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid", - "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build", - "-DNODE_MODULES_DIR=$rootDir/../node_modules", - "-DANDROID_STL=c++_shared" - } - } - if (!enableSeparateBuildPerCPUArchitecture) { - ndk { - abiFilters (*reactNativeArchitectures()) - } - } - } - } - - if (isNewArchitectureEnabled()) { - // We configure the NDK build only if you decide to opt-in for the New Architecture. - externalNativeBuild { - cmake { - path "$projectDir/src/main/jni/CMakeLists.txt" - } - } - def reactAndroidProjectDir = project(':ReactAndroid').projectDir - def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) { - dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck") - from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") - into("$buildDir/react-ndk/exported") - } - def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) { - dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck") - from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") - into("$buildDir/react-ndk/exported") - } - afterEvaluate { - // If you wish to add a custom TurboModule or component locally, - // you should uncomment this line. - // preBuild.dependsOn("generateCodegenArtifactsFromSchema") - preDebugBuild.dependsOn(packageReactNdkDebugLibs) - preReleaseBuild.dependsOn(packageReactNdkReleaseLibs) - - // Due to a bug inside AGP, we have to explicitly set a dependency - // between configureCMakeDebug* tasks and the preBuild tasks. - // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732 - configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild) - configureCMakeDebug.dependsOn(preDebugBuild) - reactNativeArchitectures().each { architecture -> - tasks.findByName("configureCMakeDebug[${architecture}]")?.configure { - dependsOn("preDebugBuild") - } - tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure { - dependsOn("preReleaseBuild") - } - } - } - } - - splits { - abi { - reset() - enable enableSeparateBuildPerCPUArchitecture - universalApk false // If true, also generate a universal APK - include (*reactNativeArchitectures()) - } } signingConfigs { debug { @@ -234,84 +105,15 @@ android { proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } - - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - variant.outputs.each { output -> - // For each separate APK per architecture, set a unique version code as described here: - // https://developer.android.com/studio/build/configure-apk-splits.html - // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. - def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] - def abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - defaultConfig.versionCode * 1000 + versionCodes.get(abi) - } - - } - } } dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - - //noinspection GradleDynamicVersion - implementation "com.facebook.react:react-native:+" // From node_modules - - implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" + // The version of react-native is set by the React Native Gradle Plugin + implementation("com.facebook.react:react-android") - debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { - exclude group:'com.facebook.fbjni' - } - - debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { - exclude group:'com.facebook.flipper' - exclude group:'com.squareup.okhttp3', module:'okhttp' - } - - debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { - exclude group:'com.facebook.flipper' - } - - if (enableHermes) { - //noinspection GradleDynamicVersion - implementation("com.facebook.react:hermes-engine:+") { // From node_modules - exclude group:'com.facebook.fbjni' - } + if (hermesEnabled.toBoolean()) { + implementation("com.facebook.react:hermes-android") } else { implementation jscFlavor } } - -if (isNewArchitectureEnabled()) { - // If new architecture is enabled, we let you build RN from source - // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. - // This will be applied to all the imported transtitive dependency. - configurations.all { - resolutionStrategy.dependencySubstitution { - substitute(module("com.facebook.react:react-native")) - .using(project(":ReactAndroid")) - .because("On New Architecture we're building React Native from source") - substitute(module("com.facebook.react:hermes-engine")) - .using(project(":ReactAndroid:hermes-engine")) - .because("On New Architecture we're building Hermes from source") - } - } -} - -// Run this once to be able to run the application with BUCK -// puts all compile dependencies into folder libs for BUCK to use -task copyDownloadableDepsToLibs(type: Copy) { - from configurations.implementation - into 'libs' -} - -apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) - -def isNewArchitectureEnabled() { - // To opt-in for the New Architecture, you can either: - // - Set `newArchEnabled` to true inside the `gradle.properties` file - // - Invoke gradle with `-newArchEnabled=true` - // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` - return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" -} diff --git a/performance-tests/TestAppPlain/android/app/build_defs.bzl b/performance-tests/TestAppPlain/android/app/build_defs.bzl deleted file mode 100644 index fff270f8d1..0000000000 --- a/performance-tests/TestAppPlain/android/app/build_defs.bzl +++ /dev/null @@ -1,19 +0,0 @@ -"""Helper definitions to glob .aar and .jar targets""" - -def create_aar_targets(aarfiles): - for aarfile in aarfiles: - name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] - lib_deps.append(":" + name) - android_prebuilt_aar( - name = name, - aar = aarfile, - ) - -def create_jar_targets(jarfiles): - for jarfile in jarfiles: - name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] - lib_deps.append(":" + name) - prebuilt_jar( - name = name, - binary_jar = jarfile, - ) diff --git a/performance-tests/TestAppPlain/android/app/src/debug/AndroidManifest.xml b/performance-tests/TestAppPlain/android/app/src/debug/AndroidManifest.xml index 4b185bc159..eb98c01afd 100644 --- a/performance-tests/TestAppPlain/android/app/src/debug/AndroidManifest.xml +++ b/performance-tests/TestAppPlain/android/app/src/debug/AndroidManifest.xml @@ -2,12 +2,8 @@ - - - - + tools:ignore="GoogleAppIndexingWarning"/> diff --git a/performance-tests/TestAppPlain/android/app/src/debug/java/com/testappplain/ReactNativeFlipper.java b/performance-tests/TestAppPlain/android/app/src/debug/java/com/testappplain/ReactNativeFlipper.java deleted file mode 100644 index 51dec88278..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/debug/java/com/testappplain/ReactNativeFlipper.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * 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. - */ -package com.testappplain; - -import android.content.Context; -import com.facebook.flipper.android.AndroidFlipperClient; -import com.facebook.flipper.android.utils.FlipperUtils; -import com.facebook.flipper.core.FlipperClient; -import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; -import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; -import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; -import com.facebook.flipper.plugins.inspector.DescriptorMapping; -import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; -import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; -import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; -import com.facebook.flipper.plugins.react.ReactFlipperPlugin; -import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; -import com.facebook.react.ReactInstanceEventListener; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.bridge.ReactContext; -import com.facebook.react.modules.network.NetworkingModule; -import okhttp3.OkHttpClient; - -public class ReactNativeFlipper { // NOPMD - Default RN Template - public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { - if (FlipperUtils.shouldEnableFlipper(context)) { - final FlipperClient client = AndroidFlipperClient.getInstance(context); - - client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); - client.addPlugin(new ReactFlipperPlugin()); - client.addPlugin(new DatabasesFlipperPlugin(context)); - client.addPlugin(new SharedPreferencesFlipperPlugin(context)); - client.addPlugin(CrashReporterPlugin.getInstance()); - - NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); - NetworkingModule.setCustomClientBuilder( - new NetworkingModule.CustomClientBuilder() { - @Override - public void apply(OkHttpClient.Builder builder) { - builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); - } - }); - client.addPlugin(networkFlipperPlugin); - client.start(); - - // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized - // Hence we run if after all native modules have been initialized - ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); - if (reactContext == null) { - reactInstanceManager.addReactInstanceEventListener( - new ReactInstanceEventListener() { - @Override - public void onReactContextInitialized(ReactContext reactContext) { - reactInstanceManager.removeReactInstanceEventListener(this); - reactContext.runOnNativeModulesQueueThread( - new Runnable() { - @Override - public void run() { - client.addPlugin(new FrescoFlipperPlugin()); - } - }); - } - }); - } else { - client.addPlugin(new FrescoFlipperPlugin()); - } - } - } -} diff --git a/performance-tests/TestAppPlain/android/app/src/main/AndroidManifest.xml b/performance-tests/TestAppPlain/android/app/src/main/AndroidManifest.xml index e9f850a4f2..e1892528b8 100644 --- a/performance-tests/TestAppPlain/android/app/src/main/AndroidManifest.xml +++ b/performance-tests/TestAppPlain/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + @@ -9,7 +8,8 @@ android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + android:supportsRtl="true"> getPackages() { - @SuppressWarnings("UnnecessaryLocalVariable") - List packages = new PackageList(this).getPackages(); - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - return packages; - } - - @Override - protected String getJSMainModuleName() { - return "index"; - } - }; - - private final ReactNativeHost mNewArchitectureNativeHost = - new MainApplicationReactNativeHost(this); - - @Override - public ReactNativeHost getReactNativeHost() { - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - return mNewArchitectureNativeHost; - } else { - return mReactNativeHost; - } - } - - @Override - public void onCreate() { - super.onCreate(); - // If you opted-in for the New Architecture, we enable the TurboModule system - ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; - SoLoader.init(this, /* native exopackage */ false); - initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); - } - - /** - * Loads Flipper in React Native templates. Call this in the onCreate method with something like - * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); - * - * @param context - * @param reactInstanceManager - */ - private static void initializeFlipper( // NOPMD - Default RN Template - Context context, ReactInstanceManager reactInstanceManager) { - if (BuildConfig.DEBUG) { - try { - /* - We use reflection here to pick up the class that initializes Flipper, - since Flipper library is not available in release mode - */ - Class aClass = Class.forName("com.testappplain.ReactNativeFlipper"); - aClass - .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) - .invoke(null, context, reactInstanceManager); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } catch (NoSuchMethodException e) { // NOPMD - Default RN Template - e.printStackTrace(); - } catch (IllegalAccessException e) { // NOPMD - Default RN Template - e.printStackTrace(); - } catch (InvocationTargetException e) { // NOPMD - Default RN Template - e.printStackTrace(); - } - } - } -} diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.kt b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.kt new file mode 100644 index 0000000000..35f0210889 --- /dev/null +++ b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.kt @@ -0,0 +1,44 @@ +package com.testappplain + +import android.app.Application +import com.facebook.react.PackageList +import com.facebook.react.ReactApplication +import com.facebook.react.ReactHost +import com.facebook.react.ReactNativeHost +import com.facebook.react.ReactPackage +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load +import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost +import com.facebook.react.defaults.DefaultReactNativeHost +import com.facebook.react.soloader.OpenSourceMergedSoMapping +import com.facebook.soloader.SoLoader + +class MainApplication : Application(), ReactApplication { + + override val reactNativeHost: ReactNativeHost = + object : DefaultReactNativeHost(this) { + override fun getPackages(): List = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + } + + override fun getJSMainModuleName(): String = "index" + + override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG + + override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED + override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED + } + + override val reactHost: ReactHost + get() = getDefaultReactHost(applicationContext, reactNativeHost) + + override fun onCreate() { + super.onCreate() + SoLoader.init(this, OpenSourceMergedSoMapping) + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + // If you opted-in for the New Architecture, we load the native entry point for this app. + load() + } + } +} diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/MainApplicationReactNativeHost.java b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/MainApplicationReactNativeHost.java deleted file mode 100644 index 3434f270dc..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/MainApplicationReactNativeHost.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.testappplain.newarchitecture; - -import android.app.Application; -import androidx.annotation.NonNull; -import com.facebook.react.PackageList; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.react.ReactPackageTurboModuleManagerDelegate; -import com.facebook.react.bridge.JSIModulePackage; -import com.facebook.react.bridge.JSIModuleProvider; -import com.facebook.react.bridge.JSIModuleSpec; -import com.facebook.react.bridge.JSIModuleType; -import com.facebook.react.bridge.JavaScriptContextHolder; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.UIManager; -import com.facebook.react.fabric.ComponentFactory; -import com.facebook.react.fabric.CoreComponentsRegistry; -import com.facebook.react.fabric.FabricJSIModuleProvider; -import com.facebook.react.fabric.ReactNativeConfig; -import com.facebook.react.uimanager.ViewManagerRegistry; -import com.testappplain.BuildConfig; -import com.testappplain.newarchitecture.components.MainComponentsRegistry; -import com.testappplain.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate; -import java.util.ArrayList; -import java.util.List; - -/** - * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both - * TurboModule delegates and the Fabric Renderer. - * - *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the - * `newArchEnabled` property). Is ignored otherwise. - */ -public class MainApplicationReactNativeHost extends ReactNativeHost { - public MainApplicationReactNativeHost(Application application) { - super(application); - } - - @Override - public boolean getUseDeveloperSupport() { - return BuildConfig.DEBUG; - } - - @Override - protected List getPackages() { - List packages = // NOPMD - Default RN Template - new PackageList(this).getPackages(); - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - // TurboModules must also be loaded here providing a valid TurboReactPackage implementation: - // packages.add(new TurboReactPackage() { ... }); - // If you have custom Fabric Components, their ViewManagers should also be loaded here - // inside a ReactPackage. - return packages; - } - - @Override - protected String getJSMainModuleName() { - return "index"; - } - - @NonNull - @Override - protected ReactPackageTurboModuleManagerDelegate.Builder - getReactPackageTurboModuleManagerDelegateBuilder() { - // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary - // for the new architecture and to use TurboModules correctly. - return new MainApplicationTurboModuleManagerDelegate.Builder(); - } - - @Override - protected JSIModulePackage getJSIModulePackage() { - return new JSIModulePackage() { - @Override - public List getJSIModules( - final ReactApplicationContext reactApplicationContext, - final JavaScriptContextHolder jsContext) { - final List specs = new ArrayList<>(); - - // Here we provide a new JSIModuleSpec that will be responsible of providing the - // custom Fabric Components. - specs.add( - new JSIModuleSpec() { - @Override - public JSIModuleType getJSIModuleType() { - return JSIModuleType.UIManager; - } - - @Override - public JSIModuleProvider getJSIModuleProvider() { - final ComponentFactory componentFactory = new ComponentFactory(); - CoreComponentsRegistry.register(componentFactory); - - // Here we register a Components Registry. - // The one that is generated with the template contains no components - // and just provides you the one from React Native core. - MainComponentsRegistry.register(componentFactory); - - final ReactInstanceManager reactInstanceManager = getReactInstanceManager(); - - ViewManagerRegistry viewManagerRegistry = - new ViewManagerRegistry( - reactInstanceManager.getOrCreateViewManagers(reactApplicationContext)); - - return new FabricJSIModuleProvider( - reactApplicationContext, - componentFactory, - ReactNativeConfig.DEFAULT_CONFIG, - viewManagerRegistry); - } - }); - return specs; - } - }; - } -} diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/components/MainComponentsRegistry.java b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/components/MainComponentsRegistry.java deleted file mode 100644 index e31cbd69e1..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/components/MainComponentsRegistry.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.testappplain.newarchitecture.components; - -import com.facebook.jni.HybridData; -import com.facebook.proguard.annotations.DoNotStrip; -import com.facebook.react.fabric.ComponentFactory; -import com.facebook.soloader.SoLoader; - -/** - * Class responsible to load the custom Fabric Components. This class has native methods and needs a - * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ - * folder for you). - * - *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the - * `newArchEnabled` property). Is ignored otherwise. - */ -@DoNotStrip -public class MainComponentsRegistry { // NOPMD - Default RN Template - static { - SoLoader.loadLibrary("fabricjni"); - } - - @DoNotStrip private final HybridData mHybridData; - - @DoNotStrip - private native HybridData initHybrid(ComponentFactory componentFactory); - - @DoNotStrip - private MainComponentsRegistry(ComponentFactory componentFactory) { - mHybridData = initHybrid(componentFactory); - } - - @DoNotStrip - public static MainComponentsRegistry register(ComponentFactory componentFactory) { - return new MainComponentsRegistry(componentFactory); - } -} diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java deleted file mode 100644 index a30d98ff76..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.testappplain.newarchitecture.modules; - -import com.facebook.jni.HybridData; -import com.facebook.react.ReactPackage; -import com.facebook.react.ReactPackageTurboModuleManagerDelegate; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.soloader.SoLoader; -import java.util.List; - -/** - * Class responsible to load the TurboModules. This class has native methods and needs a - * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ - * folder for you). - * - *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the - * `newArchEnabled` property). Is ignored otherwise. - */ -public class MainApplicationTurboModuleManagerDelegate - extends ReactPackageTurboModuleManagerDelegate { - - private static volatile boolean sIsSoLibraryLoaded; // NOPMD - Default RN Template - - protected MainApplicationTurboModuleManagerDelegate( - ReactApplicationContext reactApplicationContext, List packages) { - super(reactApplicationContext, packages); - } - - protected native HybridData initHybrid(); - - native boolean canCreateTurboModule(String moduleName); - - public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder { - protected MainApplicationTurboModuleManagerDelegate build( - ReactApplicationContext context, List packages) { - return new MainApplicationTurboModuleManagerDelegate(context, packages); - } - } - - @Override - protected synchronized void maybeLoadOtherSoLibraries() { - if (!sIsSoLibraryLoaded) { - // If you change the name of your application .so file in the Android.mk file, - // make sure you update the name here as well. - SoLoader.loadLibrary("testappplain_appmodules"); - sIsSoLibraryLoaded = true; - } - } -} diff --git a/performance-tests/TestAppPlain/android/app/src/main/jni/CMakeLists.txt b/performance-tests/TestAppPlain/android/app/src/main/jni/CMakeLists.txt deleted file mode 100644 index 14b7343bac..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/jni/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 3.13) -# Define the library name here. -project(testappplain_appmodules) -# This file includes all the necessary to let you build your application with the New Architecture. -include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) diff --git a/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationModuleProvider.cpp b/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationModuleProvider.cpp deleted file mode 100644 index 70e1fce274..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationModuleProvider.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "MainApplicationModuleProvider.h" - -#include -#include - -namespace facebook { -namespace react { - - std::shared_ptr - MainApplicationModuleProvider( - const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) - { - // Here you can provide your own module provider for TurboModules coming from - // either your application or from external libraries. The approach to follow - // is similar to the following (for a library called `samplelibrary`: - // - // auto module = samplelibrary_ModuleProvider(moduleName, params); - // if (module != nullptr) { - // return module; - // } - // return rncore_ModuleProvider(moduleName, params); - - // Module providers autolinked by RN CLI - auto rncli_module = rncli_ModuleProvider(moduleName, params); - if (rncli_module != nullptr) { - return rncli_module; - } - - return rncore_ModuleProvider(moduleName, params); - } - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationModuleProvider.h b/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationModuleProvider.h deleted file mode 100644 index a77063962a..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationModuleProvider.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include -#include - -#include - -namespace facebook { -namespace react { - - std::shared_ptr MainApplicationModuleProvider( - const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp b/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp deleted file mode 100644 index 6242cd6825..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include "MainApplicationTurboModuleManagerDelegate.h" -#include "MainApplicationModuleProvider.h" - -namespace facebook { -namespace react { - - jni::local_ref - MainApplicationTurboModuleManagerDelegate::initHybrid(jni::alias_ref) - { - return makeCxxInstance(); - } - - void - MainApplicationTurboModuleManagerDelegate::registerNatives() - { - registerHybrid({ - makeNativeMethod("initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid), - makeNativeMethod("canCreateTurboModule", - MainApplicationTurboModuleManagerDelegate::canCreateTurboModule), - }); - } - - std::shared_ptr - MainApplicationTurboModuleManagerDelegate::getTurboModule( - const std::string &name, const std::shared_ptr &jsInvoker) - { - // Not implemented yet: provide pure-C++ NativeModules here. - return nullptr; - } - - std::shared_ptr - MainApplicationTurboModuleManagerDelegate::getTurboModule( - const std::string &name, const JavaTurboModule::InitParams ¶ms) - { - return MainApplicationModuleProvider(name, params); - } - - bool - MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(const std::string &name) - { - return getTurboModule(name, nullptr) != nullptr - || getTurboModule(name, { .moduleName = name }) != nullptr; - } - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h b/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h deleted file mode 100644 index 36be4bb41f..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include - -#include -#include - -namespace facebook { -namespace react { - - class MainApplicationTurboModuleManagerDelegate - : public jni::HybridClass { - public: - // Adapt it to the package you used for your Java class. - static constexpr auto kJavaDescriptor = "Lcom/testappsentry/newarchitecture/modules/" - "MainApplicationTurboModuleManagerDelegate;"; - - static jni::local_ref initHybrid(jni::alias_ref); - - static void registerNatives(); - - std::shared_ptr getTurboModule( - const std::string &name, const std::shared_ptr &jsInvoker) override; - std::shared_ptr getTurboModule( - const std::string &name, const JavaTurboModule::InitParams ¶ms) override; - - /** - * Test-only method. Allows user to verify whether a TurboModule can be - * created by instances of this class. - */ - bool canCreateTurboModule(const std::string &name); - }; - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppPlain/android/app/src/main/jni/MainComponentsRegistry.cpp b/performance-tests/TestAppPlain/android/app/src/main/jni/MainComponentsRegistry.cpp deleted file mode 100644 index 4338b2a3a1..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/jni/MainComponentsRegistry.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "MainComponentsRegistry.h" - -#include -#include -#include -#include -#include - -namespace facebook { -namespace react { - - MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) { } - - std::shared_ptr - MainComponentsRegistry::sharedProviderRegistry() - { - auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry(); - - // Autolinked providers registered by RN CLI - rncli_registerProviders(providerRegistry); - - // Custom Fabric Components go here. You can register custom - // components coming from your App or from 3rd party libraries here. - // - // providerRegistry->add(concreteComponentDescriptorProvider< - // AocViewerComponentDescriptor>()); - return providerRegistry; - } - - jni::local_ref - MainComponentsRegistry::initHybrid(jni::alias_ref, ComponentFactory *delegate) - { - auto instance = makeCxxInstance(delegate); - - auto buildRegistryFunction = [](EventDispatcher::Weak const &eventDispatcher, - ContextContainer::Shared const &contextContainer) - -> ComponentDescriptorRegistry::Shared { - auto registry - = MainComponentsRegistry::sharedProviderRegistry() - ->createComponentDescriptorRegistry({ eventDispatcher, contextContainer }); - - auto mutableRegistry = std::const_pointer_cast(registry); - - mutableRegistry->setFallbackComponentDescriptor( - std::make_shared( - ComponentDescriptorParameters { eventDispatcher, contextContainer, nullptr })); - - return registry; - }; - - delegate->buildRegistryFunction = buildRegistryFunction; - return instance; - } - - void - MainComponentsRegistry::registerNatives() - { - registerHybrid({ - makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid), - }); - } - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppPlain/android/app/src/main/jni/MainComponentsRegistry.h b/performance-tests/TestAppPlain/android/app/src/main/jni/MainComponentsRegistry.h deleted file mode 100644 index e63cfe462a..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/jni/MainComponentsRegistry.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace facebook { -namespace react { - - class MainComponentsRegistry : public facebook::jni::HybridClass { - public: - // Adapt it to the package you used for your Java class. - constexpr static auto kJavaDescriptor - = "Lcom/testappplain/newarchitecture/components/MainComponentsRegistry;"; - - static void registerNatives(); - - MainComponentsRegistry(ComponentFactory *delegate); - - private: - static std::shared_ptr sharedProviderRegistry(); - - static jni::local_ref initHybrid( - jni::alias_ref, ComponentFactory *delegate); - }; - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppPlain/android/app/src/main/jni/OnLoad.cpp b/performance-tests/TestAppPlain/android/app/src/main/jni/OnLoad.cpp deleted file mode 100644 index e1e387162a..0000000000 --- a/performance-tests/TestAppPlain/android/app/src/main/jni/OnLoad.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "MainApplicationTurboModuleManagerDelegate.h" -#include "MainComponentsRegistry.h" -#include - -JNIEXPORT jint JNICALL -JNI_OnLoad(JavaVM *vm, void *) -{ - return facebook::jni::initialize(vm, [] { - facebook::react::MainApplicationTurboModuleManagerDelegate::registerNatives(); - facebook::react::MainComponentsRegistry::registerNatives(); - }); -} diff --git a/performance-tests/TestAppPlain/android/app/src/main/res/drawable/rn_edit_text_material.xml b/performance-tests/TestAppPlain/android/app/src/main/res/drawable/rn_edit_text_material.xml index f35d996202..5c25e728ea 100644 --- a/performance-tests/TestAppPlain/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ b/performance-tests/TestAppPlain/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -17,10 +17,11 @@ android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material" android:insetRight="@dimen/abc_edit_text_inset_horizontal_material" android:insetTop="@dimen/abc_edit_text_inset_top_material" - android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"> + android:insetBottom="@dimen/abc_edit_text_inset_bottom_material" + > - + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + NSLocationWhenInUseUsageDescription @@ -41,7 +38,7 @@ LaunchScreen UIRequiredDeviceCapabilities - armv7 + arm64 UISupportedInterfaceOrientations diff --git a/performance-tests/TestAppPlain/ios/TestAppPlain/PrivacyInfo.xcprivacy b/performance-tests/TestAppPlain/ios/TestAppPlain/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..41b8317f06 --- /dev/null +++ b/performance-tests/TestAppPlain/ios/TestAppPlain/PrivacyInfo.xcprivacy @@ -0,0 +1,37 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/performance-tests/TestAppPlain/ios/TestAppPlain/main.m b/performance-tests/TestAppPlain/ios/TestAppPlain/main.m deleted file mode 100644 index 742168d2e4..0000000000 --- a/performance-tests/TestAppPlain/ios/TestAppPlain/main.m +++ /dev/null @@ -1,11 +0,0 @@ -#import - -#import "AppDelegate.h" - -int -main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/performance-tests/TestAppPlain/ios/TestAppPlainTests/Info.plist b/performance-tests/TestAppPlain/ios/TestAppPlainTests/Info.plist deleted file mode 100644 index ba72822e87..0000000000 --- a/performance-tests/TestAppPlain/ios/TestAppPlainTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/performance-tests/TestAppPlain/ios/TestAppPlainTests/TestAppPlainTests.m b/performance-tests/TestAppPlain/ios/TestAppPlainTests/TestAppPlainTests.m deleted file mode 100644 index 7abbf13d6b..0000000000 --- a/performance-tests/TestAppPlain/ios/TestAppPlainTests/TestAppPlainTests.m +++ /dev/null @@ -1,70 +0,0 @@ -#import -#import - -#import -#import - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React" - -@interface TestAppPlainTests : XCTestCase - -@end - -@implementation TestAppPlainTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; -#ifdef DEBUG - RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, - NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); -#endif - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode - beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes - beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = - [self findSubviewInView:vc.view - matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - -#ifdef DEBUG - RCTSetLogFunction(RCTDefaultLogFunction); -#endif - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", - TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - -@end diff --git a/performance-tests/TestAppPlain/jest.config.js b/performance-tests/TestAppPlain/jest.config.js new file mode 100644 index 0000000000..8eb675e9bc --- /dev/null +++ b/performance-tests/TestAppPlain/jest.config.js @@ -0,0 +1,3 @@ +module.exports = { + preset: 'react-native', +}; diff --git a/performance-tests/TestAppPlain/metro.config.js b/performance-tests/TestAppPlain/metro.config.js index e91aba937c..ba95bf4a0a 100644 --- a/performance-tests/TestAppPlain/metro.config.js +++ b/performance-tests/TestAppPlain/metro.config.js @@ -1,17 +1,11 @@ +const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); + /** - * Metro configuration for React Native - * https://github.com/facebook/react-native + * Metro configuration + * https://reactnative.dev/docs/metro * - * @format + * @type {import('@react-native/metro-config').MetroConfig} */ +const config = {}; -module.exports = { - transformer: { - getTransformOptions: async () => ({ - transform: { - experimentalImportSupport: false, - inlineRequires: true, - }, - }), - }, -}; +module.exports = mergeConfig(getDefaultConfig(__dirname), config); diff --git a/performance-tests/TestAppPlain/package.json b/performance-tests/TestAppPlain/package.json index 67b6a8b3dd..d6e82239b1 100644 --- a/performance-tests/TestAppPlain/package.json +++ b/performance-tests/TestAppPlain/package.json @@ -5,18 +5,35 @@ "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", - "start": "react-native start" + "lint": "eslint .", + "start": "react-native start", + "test": "jest" }, "dependencies": { - "react": "18.1.0", - "react-native": "0.70.15" + "react": "18.3.1", + "react-native": "0.77.0" }, "devDependencies": { - "@babel/core": "^7.12.9", - "@babel/runtime": "^7.12.5", - "metro-react-native-babel-preset": "^0.72.3" + "@babel/core": "^7.25.2", + "@babel/preset-env": "^7.25.3", + "@babel/runtime": "^7.25.0", + "@react-native-community/cli": "15.0.1", + "@react-native-community/cli-platform-android": "15.0.1", + "@react-native-community/cli-platform-ios": "15.0.1", + "@react-native/babel-preset": "0.77.0", + "@react-native/eslint-config": "0.77.0", + "@react-native/metro-config": "0.77.0", + "@react-native/typescript-config": "0.77.0", + "@types/jest": "^29.5.13", + "@types/react": "^18.2.6", + "@types/react-test-renderer": "^18.0.0", + "eslint": "^8.19.0", + "jest": "^29.6.3", + "prettier": "2.8.8", + "react-test-renderer": "18.3.1", + "typescript": "5.0.4" }, - "jest": { - "preset": "react-native" + "engines": { + "node": ">=18" } } diff --git a/performance-tests/TestAppPlain/tsconfig.json b/performance-tests/TestAppPlain/tsconfig.json new file mode 100644 index 0000000000..304ab4e2d8 --- /dev/null +++ b/performance-tests/TestAppPlain/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@react-native/typescript-config/tsconfig.json" +} diff --git a/performance-tests/TestAppSentry/_bundle/config b/performance-tests/TestAppSentry/.bundle/config similarity index 100% rename from performance-tests/TestAppSentry/_bundle/config rename to performance-tests/TestAppSentry/.bundle/config diff --git a/performance-tests/TestAppSentry/.eslintrc.js b/performance-tests/TestAppSentry/.eslintrc.js new file mode 100644 index 0000000000..187894b6af --- /dev/null +++ b/performance-tests/TestAppSentry/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: '@react-native', +}; diff --git a/performance-tests/TestAppSentry/.gitignore b/performance-tests/TestAppSentry/.gitignore index d4b23394ce..d5ae456695 100644 --- a/performance-tests/TestAppSentry/.gitignore +++ b/performance-tests/TestAppSentry/.gitignore @@ -20,7 +20,7 @@ DerivedData *.hmap *.ipa *.xcuserstate -ios/.xcode.env.local +**/.xcode.env.local # Android/IntelliJ # @@ -30,6 +30,9 @@ build/ local.properties *.iml *.hprof +.cxx/ +*.keystore +!debug.keystore # node.js # @@ -37,12 +40,6 @@ node_modules/ npm-debug.log yarn-error.log -# BUCK -buck-out/ -\.buckd/ -*.keystore -!debug.keystore - # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the @@ -59,8 +56,19 @@ buck-out/ *.jsbundle # Ruby / CocoaPods -/ios/Pods/ +**/Pods/ /vendor/bundle/ -#Codegen -.cxx/ +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# testing +/coverage + +# Yarn +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions diff --git a/performance-tests/TestAppSentry/.prettierrc.js b/performance-tests/TestAppSentry/.prettierrc.js new file mode 100644 index 0000000000..2b540746a7 --- /dev/null +++ b/performance-tests/TestAppSentry/.prettierrc.js @@ -0,0 +1,7 @@ +module.exports = { + arrowParens: 'avoid', + bracketSameLine: true, + bracketSpacing: false, + singleQuote: true, + trailingComma: 'all', +}; diff --git a/performance-tests/TestAppSentry/.watchmanconfig b/performance-tests/TestAppSentry/.watchmanconfig new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/performance-tests/TestAppSentry/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/performance-tests/TestAppPlain/App.js b/performance-tests/TestAppSentry/App.tsx similarity index 75% rename from performance-tests/TestAppPlain/App.js rename to performance-tests/TestAppSentry/App.tsx index f85f38d87a..7352745552 100644 --- a/performance-tests/TestAppPlain/App.js +++ b/performance-tests/TestAppSentry/App.tsx @@ -3,11 +3,10 @@ * https://github.com/facebook/react-native * * @format - * @flow strict-local */ import React from 'react'; -import type {Node} from 'react'; +import type {PropsWithChildren} from 'react'; import { SafeAreaView, ScrollView, @@ -25,8 +24,20 @@ import { LearnMoreLinks, ReloadInstructions, } from 'react-native/Libraries/NewAppScreen'; +import * as Sentry from '@sentry/react-native'; -const Section = ({children, title}): Node => { +Sentry.init({ + dsn: 'https://1df17bd4e543fdb31351dee1768bb679@o447951.ingest.sentry.io/5428561', + + // uncomment the line below to enable Spotlight (https://spotlightjs.com) + // spotlight: __DEV__, +}); + +type SectionProps = PropsWithChildren<{ + title: string; +}>; + +function Section({children, title}: SectionProps): React.JSX.Element { const isDarkMode = useColorScheme() === 'dark'; return ( @@ -50,9 +61,9 @@ const Section = ({children, title}): Node => { ); -}; +} -const App: () => Node = () => { +function App(): React.JSX.Element { const isDarkMode = useColorScheme() === 'dark'; const backgroundStyle = { @@ -61,7 +72,10 @@ const App: () => Node = () => { return ( - + @@ -71,7 +85,7 @@ const App: () => Node = () => { backgroundColor: isDarkMode ? Colors.black : Colors.white, }}>

- Edit App.js to change this + Edit App.tsx to change this screen and then come back to see your edits.
@@ -88,7 +102,7 @@ const App: () => Node = () => { ); -}; +} const styles = StyleSheet.create({ sectionContainer: { diff --git a/performance-tests/TestAppSentry/Gemfile b/performance-tests/TestAppSentry/Gemfile index 5efda89f45..03278dd5eb 100644 --- a/performance-tests/TestAppSentry/Gemfile +++ b/performance-tests/TestAppSentry/Gemfile @@ -1,6 +1,10 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby '2.7.5' +ruby ">= 2.6.10" -gem 'cocoapods', '~> 1.11', '>= 1.11.2' +# Exclude problematic versions of cocoapods and activesupport that causes build failures. +gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' +gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' +gem 'xcodeproj', '< 1.26.0' +gem 'concurrent-ruby', '< 1.3.4' diff --git a/performance-tests/TestAppSentry/android/app/_BUCK b/performance-tests/TestAppSentry/android/app/_BUCK deleted file mode 100644 index 8f665dc4cf..0000000000 --- a/performance-tests/TestAppSentry/android/app/_BUCK +++ /dev/null @@ -1,55 +0,0 @@ -# To learn about Buck see [Docs](https://buckbuild.com/). -# To run your application with Buck: -# - install Buck -# - `npm start` - to start the packager -# - `cd android` -# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` -# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck -# - `buck install -r android/app` - compile, install and run application -# - -load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") - -lib_deps = [] - -create_aar_targets(glob(["libs/*.aar"])) - -create_jar_targets(glob(["libs/*.jar"])) - -android_library( - name = "all-libs", - exported_deps = lib_deps, -) - -android_library( - name = "app-code", - srcs = glob([ - "src/main/java/**/*.java", - ]), - deps = [ - ":all-libs", - ":build_config", - ":res", - ], -) - -android_build_config( - name = "build_config", - package = "com.testappsentry", -) - -android_resource( - name = "res", - package = "com.testappsentry", - res = "src/main/res", -) - -android_binary( - name = "app", - keystore = "//android/keystores:debug", - manifest = "src/main/AndroidManifest.xml", - package_type = "debug", - deps = [ - ":app-code", - ], -) diff --git a/performance-tests/TestAppSentry/android/app/build.gradle b/performance-tests/TestAppSentry/android/app/build.gradle index 3808e3b32e..9c2b2c1047 100644 --- a/performance-tests/TestAppSentry/android/app/build.gradle +++ b/performance-tests/TestAppSentry/android/app/build.gradle @@ -1,221 +1,90 @@ apply plugin: "com.android.application" - -import com.android.build.OutputFile - -/** - * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets - * and bundleReleaseJsAndAssets). - * These basically call `react-native bundle` with the correct arguments during the Android build - * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the - * bundle directly from the development server. Below you can see all the possible configurations - * and their defaults. If you decide to add a configuration block, make sure to add it before the - * `apply from: "../../node_modules/react-native/react.gradle"` line. - * - * project.ext.react = [ - * // the name of the generated asset file containing your JS bundle - * bundleAssetName: "index.android.bundle", - * - * // the entry file for bundle generation. If none specified and - * // "index.android.js" exists, it will be used. Otherwise "index.js" is - * // default. Can be overridden with ENTRY_FILE environment variable. - * entryFile: "index.android.js", - * - * // https://reactnative.dev/docs/performance#enable-the-ram-format - * bundleCommand: "ram-bundle", - * - * // whether to bundle JS and assets in debug mode - * bundleInDebug: false, - * - * // whether to bundle JS and assets in release mode - * bundleInRelease: true, - * - * // whether to bundle JS and assets in another build variant (if configured). - * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants - * // The configuration property can be in the following formats - * // 'bundleIn${productFlavor}${buildType}' - * // 'bundleIn${buildType}' - * // bundleInFreeDebug: true, - * // bundleInPaidRelease: true, - * // bundleInBeta: true, - * - * // whether to disable dev mode in custom build variants (by default only disabled in release) - * // for example: to disable dev mode in the staging build type (if configured) - * devDisabledInStaging: true, - * // The configuration property can be in the following formats - * // 'devDisabledIn${productFlavor}${buildType}' - * // 'devDisabledIn${buildType}' - * - * // the root of your project, i.e. where "package.json" lives - * root: "../../", - * - * // where to put the JS bundle asset in debug mode - * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", - * - * // where to put the JS bundle asset in release mode - * jsBundleDirRelease: "$buildDir/intermediates/assets/release", - * - * // where to put drawable resources / React Native assets, e.g. the ones you use via - * // require('./image.png')), in debug mode - * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", - * - * // where to put drawable resources / React Native assets, e.g. the ones you use via - * // require('./image.png')), in release mode - * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", - * - * // by default the gradle tasks are skipped if none of the JS files or assets change; this means - * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to - * // date; if you have any other folders that you want to ignore for performance reasons (gradle - * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ - * // for example, you might want to remove it from here. - * inputExcludes: ["android/**", "ios/**"], - * - * // override which node gets called and with what additional arguments - * nodeExecutableAndArgs: ["node"], - * - * // supply additional arguments to the packager - * extraPackagerArgs: [] - * ] - */ - -project.ext.react = [ - enableHermes: true, // clean and rebuild if changing -] - -apply from: "../../node_modules/react-native/react.gradle" -// Disabled to avoid CLI failures when uploading symbols. -// TODO does it also add any native dependencies? Doesn't seem so at the moment (v5.0.0-alpha) -// apply from: "../../node_modules/@sentry/react-native/sentry.gradle" +apply plugin: "org.jetbrains.kotlin.android" +apply plugin: "com.facebook.react" /** - * Set this to true to create two separate APKs instead of one: - * - An APK that only works on ARM devices - * - An APK that only works on x86 devices - * The advantage is the size of the APK is reduced by about 4MB. - * Upload all the APKs to the Play Store and people will download - * the correct one based on the CPU architecture of their device. + * This is the configuration block to customize your React Native Android app. + * By default you don't need to apply any configuration, just uncomment the lines you need. */ -def enableSeparateBuildPerCPUArchitecture = false +react { + /* Folders */ + // The root of your project, i.e. where "package.json" lives. Default is '../..' + // root = file("../../") + // The folder where the react-native NPM package is. Default is ../../node_modules/react-native + // reactNativeDir = file("../../node_modules/react-native") + // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen + // codegenDir = file("../../node_modules/@react-native/codegen") + // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js + // cliFile = file("../../node_modules/react-native/cli.js") + + /* Variants */ + // The list of variants to that are debuggable. For those we're going to + // skip the bundling of the JS bundle and the assets. By default is just 'debug'. + // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. + // debuggableVariants = ["liteDebug", "prodDebug"] + + /* Bundling */ + // A list containing the node command and its flags. Default is just 'node'. + // nodeExecutableAndArgs = ["node"] + // + // The command to run when bundling. By default is 'bundle' + // bundleCommand = "ram-bundle" + // + // The path to the CLI configuration file. Default is empty. + // bundleConfig = file(../rn-cli.config.js) + // + // The name of the generated asset file containing your JS bundle + // bundleAssetName = "MyApplication.android.bundle" + // + // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' + // entryFile = file("../js/MyApplication.android.js") + // + // A list of extra flags to pass to the 'bundle' commands. + // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle + // extraPackagerArgs = [] + + /* Hermes Commands */ + // The hermes compiler command to run. By default it is 'hermesc' + // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" + // + // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" + // hermesFlags = ["-O", "-output-source-map"] + + /* Autolinking */ + autolinkLibrariesWithApp() +} /** - * Run Proguard to shrink the Java bytecode in release builds. + * Set this to true to Run Proguard on Release builds to minify the Java bytecode. */ def enableProguardInReleaseBuilds = false /** - * The preferred build flavor of JavaScriptCore. + * The preferred build flavor of JavaScriptCore (JSC) * * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that - * give correct results when using with locales other than en-US. Note that + * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default. */ def jscFlavor = 'org.webkit:android-jsc:+' -/** - * Whether to enable the Hermes VM. - * - * This should be set on project.ext.react and that value will be read here. If it is not set - * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode - * and the benefits of using Hermes will therefore be sharply reduced. - */ -def enableHermes = project.ext.react.get("enableHermes", false); - -/** - * Architectures to build native code for. - */ -def reactNativeArchitectures() { - def value = project.getProperties().get("reactNativeArchitectures") - return value ? value.split(",") : ["arm64-v8a"] -} - +apply from: new File(["node", "--print", "require.resolve('@sentry/react-native/package.json')"].execute().text.trim(), "../sentry.gradle") android { ndkVersion rootProject.ext.ndkVersion + buildToolsVersion rootProject.ext.buildToolsVersion + compileSdk rootProject.ext.compileSdkVersion - compileSdkVersion rootProject.ext.compileSdkVersion - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - + namespace "com.testappsentry" defaultConfig { applicationId "com.testappsentry" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" - buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() - - if (isNewArchitectureEnabled()) { - // We configure the CMake build only if you decide to opt-in for the New Architecture. - externalNativeBuild { - cmake { - arguments "-DPROJECT_BUILD_DIR=$buildDir", - "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid", - "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build", - "-DNODE_MODULES_DIR=$rootDir/../node_modules", - "-DANDROID_STL=c++_shared" - } - } - if (!enableSeparateBuildPerCPUArchitecture) { - ndk { - abiFilters (*reactNativeArchitectures()) - } - } - } - } - - if (isNewArchitectureEnabled()) { - // We configure the NDK build only if you decide to opt-in for the New Architecture. - externalNativeBuild { - cmake { - path "$projectDir/src/main/jni/CMakeLists.txt" - } - } - def reactAndroidProjectDir = project(':ReactAndroid').projectDir - def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) { - dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck") - from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") - into("$buildDir/react-ndk/exported") - } - def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) { - dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck") - from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") - into("$buildDir/react-ndk/exported") - } - afterEvaluate { - // If you wish to add a custom TurboModule or component locally, - // you should uncomment this line. - // preBuild.dependsOn("generateCodegenArtifactsFromSchema") - preDebugBuild.dependsOn(packageReactNdkDebugLibs) - preReleaseBuild.dependsOn(packageReactNdkReleaseLibs) - - // Due to a bug inside AGP, we have to explicitly set a dependency - // between configureCMakeDebug* tasks and the preBuild tasks. - // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732 - configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild) - configureCMakeDebug.dependsOn(preDebugBuild) - reactNativeArchitectures().each { architecture -> - tasks.findByName("configureCMakeDebug[${architecture}]")?.configure { - dependsOn("preDebugBuild") - } - tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure { - dependsOn("preReleaseBuild") - } - } - } - } - - splits { - abi { - reset() - enable enableSeparateBuildPerCPUArchitecture - universalApk false // If true, also generate a universal APK - include (*reactNativeArchitectures()) - } } signingConfigs { debug { @@ -237,84 +106,15 @@ android { proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } - - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - variant.outputs.each { output -> - // For each separate APK per architecture, set a unique version code as described here: - // https://developer.android.com/studio/build/configure-apk-splits.html - // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. - def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] - def abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - defaultConfig.versionCode * 1000 + versionCodes.get(abi) - } - - } - } } dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - - //noinspection GradleDynamicVersion - implementation "com.facebook.react:react-native:+" // From node_modules - - implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" + // The version of react-native is set by the React Native Gradle Plugin + implementation("com.facebook.react:react-android") - debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { - exclude group:'com.facebook.fbjni' - } - - debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { - exclude group:'com.facebook.flipper' - exclude group:'com.squareup.okhttp3', module:'okhttp' - } - - debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { - exclude group:'com.facebook.flipper' - } - - if (enableHermes) { - //noinspection GradleDynamicVersion - implementation("com.facebook.react:hermes-engine:+") { // From node_modules - exclude group:'com.facebook.fbjni' - } + if (hermesEnabled.toBoolean()) { + implementation("com.facebook.react:hermes-android") } else { implementation jscFlavor } } - -if (isNewArchitectureEnabled()) { - // If new architecture is enabled, we let you build RN from source - // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. - // This will be applied to all the imported transtitive dependency. - configurations.all { - resolutionStrategy.dependencySubstitution { - substitute(module("com.facebook.react:react-native")) - .using(project(":ReactAndroid")) - .because("On New Architecture we're building React Native from source") - substitute(module("com.facebook.react:hermes-engine")) - .using(project(":ReactAndroid:hermes-engine")) - .because("On New Architecture we're building Hermes from source") - } - } -} - -// Run this once to be able to run the application with BUCK -// puts all compile dependencies into folder libs for BUCK to use -task copyDownloadableDepsToLibs(type: Copy) { - from configurations.implementation - into 'libs' -} - -apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) - -def isNewArchitectureEnabled() { - // To opt-in for the New Architecture, you can either: - // - Set `newArchEnabled` to true inside the `gradle.properties` file - // - Invoke gradle with `-newArchEnabled=true` - // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` - return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" -} diff --git a/performance-tests/TestAppSentry/android/app/build_defs.bzl b/performance-tests/TestAppSentry/android/app/build_defs.bzl deleted file mode 100644 index fff270f8d1..0000000000 --- a/performance-tests/TestAppSentry/android/app/build_defs.bzl +++ /dev/null @@ -1,19 +0,0 @@ -"""Helper definitions to glob .aar and .jar targets""" - -def create_aar_targets(aarfiles): - for aarfile in aarfiles: - name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] - lib_deps.append(":" + name) - android_prebuilt_aar( - name = name, - aar = aarfile, - ) - -def create_jar_targets(jarfiles): - for jarfile in jarfiles: - name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] - lib_deps.append(":" + name) - prebuilt_jar( - name = name, - binary_jar = jarfile, - ) diff --git a/performance-tests/TestAppSentry/android/app/src/debug/AndroidManifest.xml b/performance-tests/TestAppSentry/android/app/src/debug/AndroidManifest.xml index 4b185bc159..eb98c01afd 100644 --- a/performance-tests/TestAppSentry/android/app/src/debug/AndroidManifest.xml +++ b/performance-tests/TestAppSentry/android/app/src/debug/AndroidManifest.xml @@ -2,12 +2,8 @@ - - - - + tools:ignore="GoogleAppIndexingWarning"/> diff --git a/performance-tests/TestAppSentry/android/app/src/debug/java/com/testappsentry/ReactNativeFlipper.java b/performance-tests/TestAppSentry/android/app/src/debug/java/com/testappsentry/ReactNativeFlipper.java deleted file mode 100644 index 1268731455..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/debug/java/com/testappsentry/ReactNativeFlipper.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * 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. - */ -package com.testappsentry; - -import android.content.Context; -import com.facebook.flipper.android.AndroidFlipperClient; -import com.facebook.flipper.android.utils.FlipperUtils; -import com.facebook.flipper.core.FlipperClient; -import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; -import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; -import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; -import com.facebook.flipper.plugins.inspector.DescriptorMapping; -import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; -import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; -import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; -import com.facebook.flipper.plugins.react.ReactFlipperPlugin; -import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; -import com.facebook.react.ReactInstanceEventListener; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.bridge.ReactContext; -import com.facebook.react.modules.network.NetworkingModule; -import okhttp3.OkHttpClient; - -public class ReactNativeFlipper { // NOPMD - Default RN Template - public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { - if (FlipperUtils.shouldEnableFlipper(context)) { - final FlipperClient client = AndroidFlipperClient.getInstance(context); - - client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); - client.addPlugin(new ReactFlipperPlugin()); - client.addPlugin(new DatabasesFlipperPlugin(context)); - client.addPlugin(new SharedPreferencesFlipperPlugin(context)); - client.addPlugin(CrashReporterPlugin.getInstance()); - - NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); - NetworkingModule.setCustomClientBuilder( - new NetworkingModule.CustomClientBuilder() { - @Override - public void apply(OkHttpClient.Builder builder) { - builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); - } - }); - client.addPlugin(networkFlipperPlugin); - client.start(); - - // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized - // Hence we run if after all native modules have been initialized - ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); - if (reactContext == null) { - reactInstanceManager.addReactInstanceEventListener( - new ReactInstanceEventListener() { - @Override - public void onReactContextInitialized(ReactContext reactContext) { - reactInstanceManager.removeReactInstanceEventListener(this); - reactContext.runOnNativeModulesQueueThread( - new Runnable() { - @Override - public void run() { - client.addPlugin(new FrescoFlipperPlugin()); - } - }); - } - }); - } else { - client.addPlugin(new FrescoFlipperPlugin()); - } - } - } -} diff --git a/performance-tests/TestAppSentry/android/app/src/main/AndroidManifest.xml b/performance-tests/TestAppSentry/android/app/src/main/AndroidManifest.xml index cd2501980d..e1892528b8 100644 --- a/performance-tests/TestAppSentry/android/app/src/main/AndroidManifest.xml +++ b/performance-tests/TestAppSentry/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + @@ -9,7 +8,8 @@ android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + android:supportsRtl="true"> getPackages() { - @SuppressWarnings("UnnecessaryLocalVariable") - List packages = new PackageList(this).getPackages(); - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - return packages; - } - - @Override - protected String getJSMainModuleName() { - return "index"; - } - }; - - private final ReactNativeHost mNewArchitectureNativeHost = - new MainApplicationReactNativeHost(this); - - @Override - public ReactNativeHost getReactNativeHost() { - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - return mNewArchitectureNativeHost; - } else { - return mReactNativeHost; - } - } - - @Override - public void onCreate() { - super.onCreate(); - // If you opted-in for the New Architecture, we enable the TurboModule system - ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; - SoLoader.init(this, /* native exopackage */ false); - initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); - } - - /** - * Loads Flipper in React Native templates. Call this in the onCreate method with something like - * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); - * - * @param context - * @param reactInstanceManager - */ - private static void initializeFlipper( // NOPMD - Default RN Template - Context context, ReactInstanceManager reactInstanceManager) { - if (BuildConfig.DEBUG) { - try { - /* - We use reflection here to pick up the class that initializes Flipper, - since Flipper library is not available in release mode - */ - Class aClass = Class.forName("com.testappsentry.ReactNativeFlipper"); - aClass - .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) - .invoke(null, context, reactInstanceManager); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } catch (NoSuchMethodException e) { // NOPMD - Default RN Template - e.printStackTrace(); - } catch (IllegalAccessException e) { // NOPMD - Default RN Template - e.printStackTrace(); - } catch (InvocationTargetException e) { // NOPMD - Default RN Template - e.printStackTrace(); - } - } - } -} diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.kt b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.kt new file mode 100644 index 0000000000..64f33a7ef0 --- /dev/null +++ b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.kt @@ -0,0 +1,44 @@ +package com.testappsentry + +import android.app.Application +import com.facebook.react.PackageList +import com.facebook.react.ReactApplication +import com.facebook.react.ReactHost +import com.facebook.react.ReactNativeHost +import com.facebook.react.ReactPackage +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load +import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost +import com.facebook.react.defaults.DefaultReactNativeHost +import com.facebook.react.soloader.OpenSourceMergedSoMapping +import com.facebook.soloader.SoLoader + +class MainApplication : Application(), ReactApplication { + + override val reactNativeHost: ReactNativeHost = + object : DefaultReactNativeHost(this) { + override fun getPackages(): List = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + } + + override fun getJSMainModuleName(): String = "index" + + override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG + + override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED + override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED + } + + override val reactHost: ReactHost + get() = getDefaultReactHost(applicationContext, reactNativeHost) + + override fun onCreate() { + super.onCreate() + SoLoader.init(this, OpenSourceMergedSoMapping) + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + // If you opted-in for the New Architecture, we load the native entry point for this app. + load() + } + } +} diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/MainApplicationReactNativeHost.java b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/MainApplicationReactNativeHost.java deleted file mode 100644 index 43bb6f70b3..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/MainApplicationReactNativeHost.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.testappsentry.newarchitecture; - -import android.app.Application; -import androidx.annotation.NonNull; -import com.facebook.react.PackageList; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.react.ReactPackageTurboModuleManagerDelegate; -import com.facebook.react.bridge.JSIModulePackage; -import com.facebook.react.bridge.JSIModuleProvider; -import com.facebook.react.bridge.JSIModuleSpec; -import com.facebook.react.bridge.JSIModuleType; -import com.facebook.react.bridge.JavaScriptContextHolder; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.UIManager; -import com.facebook.react.fabric.ComponentFactory; -import com.facebook.react.fabric.CoreComponentsRegistry; -import com.facebook.react.fabric.FabricJSIModuleProvider; -import com.facebook.react.fabric.ReactNativeConfig; -import com.facebook.react.uimanager.ViewManagerRegistry; -import com.testappsentry.BuildConfig; -import com.testappsentry.newarchitecture.components.MainComponentsRegistry; -import com.testappsentry.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate; -import java.util.ArrayList; -import java.util.List; - -/** - * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both - * TurboModule delegates and the Fabric Renderer. - * - *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the - * `newArchEnabled` property). Is ignored otherwise. - */ -public class MainApplicationReactNativeHost extends ReactNativeHost { - public MainApplicationReactNativeHost(Application application) { - super(application); - } - - @Override - public boolean getUseDeveloperSupport() { - return BuildConfig.DEBUG; - } - - @Override - protected List getPackages() { - List packages = // NOPMD - Default RN Template - new PackageList(this).getPackages(); - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - // TurboModules must also be loaded here providing a valid TurboReactPackage implementation: - // packages.add(new TurboReactPackage() { ... }); - // If you have custom Fabric Components, their ViewManagers should also be loaded here - // inside a ReactPackage. - return packages; - } - - @Override - protected String getJSMainModuleName() { - return "index"; - } - - @NonNull - @Override - protected ReactPackageTurboModuleManagerDelegate.Builder - getReactPackageTurboModuleManagerDelegateBuilder() { - // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary - // for the new architecture and to use TurboModules correctly. - return new MainApplicationTurboModuleManagerDelegate.Builder(); - } - - @Override - protected JSIModulePackage getJSIModulePackage() { - return new JSIModulePackage() { - @Override - public List getJSIModules( - final ReactApplicationContext reactApplicationContext, - final JavaScriptContextHolder jsContext) { - final List specs = new ArrayList<>(); - - // Here we provide a new JSIModuleSpec that will be responsible of providing the - // custom Fabric Components. - specs.add( - new JSIModuleSpec() { - @Override - public JSIModuleType getJSIModuleType() { - return JSIModuleType.UIManager; - } - - @Override - public JSIModuleProvider getJSIModuleProvider() { - final ComponentFactory componentFactory = new ComponentFactory(); - CoreComponentsRegistry.register(componentFactory); - - // Here we register a Components Registry. - // The one that is generated with the template contains no components - // and just provides you the one from React Native core. - MainComponentsRegistry.register(componentFactory); - - final ReactInstanceManager reactInstanceManager = getReactInstanceManager(); - - ViewManagerRegistry viewManagerRegistry = - new ViewManagerRegistry( - reactInstanceManager.getOrCreateViewManagers(reactApplicationContext)); - - return new FabricJSIModuleProvider( - reactApplicationContext, - componentFactory, - ReactNativeConfig.DEFAULT_CONFIG, - viewManagerRegistry); - } - }); - return specs; - } - }; - } -} diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/components/MainComponentsRegistry.java b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/components/MainComponentsRegistry.java deleted file mode 100644 index 9e4080b380..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/components/MainComponentsRegistry.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.testappsentry.newarchitecture.components; - -import com.facebook.jni.HybridData; -import com.facebook.proguard.annotations.DoNotStrip; -import com.facebook.react.fabric.ComponentFactory; -import com.facebook.soloader.SoLoader; - -/** - * Class responsible to load the custom Fabric Components. This class has native methods and needs a - * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ - * folder for you). - * - *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the - * `newArchEnabled` property). Is ignored otherwise. - */ -@DoNotStrip -public class MainComponentsRegistry { // NOPMD - Default RN Template - static { - SoLoader.loadLibrary("fabricjni"); - } - - @DoNotStrip private final HybridData mHybridData; - - @DoNotStrip - private native HybridData initHybrid(ComponentFactory componentFactory); - - @DoNotStrip - private MainComponentsRegistry(ComponentFactory componentFactory) { - mHybridData = initHybrid(componentFactory); - } - - @DoNotStrip - public static MainComponentsRegistry register(ComponentFactory componentFactory) { - return new MainComponentsRegistry(componentFactory); - } -} diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java deleted file mode 100644 index 4ff41fbcaf..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.testappsentry.newarchitecture.modules; - -import com.facebook.jni.HybridData; -import com.facebook.react.ReactPackage; -import com.facebook.react.ReactPackageTurboModuleManagerDelegate; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.soloader.SoLoader; -import java.util.List; - -/** - * Class responsible to load the TurboModules. This class has native methods and needs a - * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ - * folder for you). - * - *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the - * `newArchEnabled` property). Is ignored otherwise. - */ -public class MainApplicationTurboModuleManagerDelegate - extends ReactPackageTurboModuleManagerDelegate { - - private static volatile boolean sIsSoLibraryLoaded; // NOPMD - Default RN Template - - protected MainApplicationTurboModuleManagerDelegate( - ReactApplicationContext reactApplicationContext, List packages) { - super(reactApplicationContext, packages); - } - - protected native HybridData initHybrid(); - - native boolean canCreateTurboModule(String moduleName); - - public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder { - protected MainApplicationTurboModuleManagerDelegate build( - ReactApplicationContext context, List packages) { - return new MainApplicationTurboModuleManagerDelegate(context, packages); - } - } - - @Override - protected synchronized void maybeLoadOtherSoLibraries() { - if (!sIsSoLibraryLoaded) { - // If you change the name of your application .so file in the Android.mk file, - // make sure you update the name here as well. - SoLoader.loadLibrary("testappsentry_appmodules"); - sIsSoLibraryLoaded = true; - } - } -} diff --git a/performance-tests/TestAppSentry/android/app/src/main/jni/CMakeLists.txt b/performance-tests/TestAppSentry/android/app/src/main/jni/CMakeLists.txt deleted file mode 100644 index f2b34e9f42..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/jni/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 3.13) -# Define the library name here. -project(testappsentry_appmodules) -# This file includes all the necessary to let you build your application with the New Architecture. -include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) diff --git a/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationModuleProvider.cpp b/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationModuleProvider.cpp deleted file mode 100644 index 70e1fce274..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationModuleProvider.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "MainApplicationModuleProvider.h" - -#include -#include - -namespace facebook { -namespace react { - - std::shared_ptr - MainApplicationModuleProvider( - const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) - { - // Here you can provide your own module provider for TurboModules coming from - // either your application or from external libraries. The approach to follow - // is similar to the following (for a library called `samplelibrary`: - // - // auto module = samplelibrary_ModuleProvider(moduleName, params); - // if (module != nullptr) { - // return module; - // } - // return rncore_ModuleProvider(moduleName, params); - - // Module providers autolinked by RN CLI - auto rncli_module = rncli_ModuleProvider(moduleName, params); - if (rncli_module != nullptr) { - return rncli_module; - } - - return rncore_ModuleProvider(moduleName, params); - } - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationModuleProvider.h b/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationModuleProvider.h deleted file mode 100644 index a77063962a..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationModuleProvider.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include -#include - -#include - -namespace facebook { -namespace react { - - std::shared_ptr MainApplicationModuleProvider( - const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp b/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp deleted file mode 100644 index 6242cd6825..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include "MainApplicationTurboModuleManagerDelegate.h" -#include "MainApplicationModuleProvider.h" - -namespace facebook { -namespace react { - - jni::local_ref - MainApplicationTurboModuleManagerDelegate::initHybrid(jni::alias_ref) - { - return makeCxxInstance(); - } - - void - MainApplicationTurboModuleManagerDelegate::registerNatives() - { - registerHybrid({ - makeNativeMethod("initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid), - makeNativeMethod("canCreateTurboModule", - MainApplicationTurboModuleManagerDelegate::canCreateTurboModule), - }); - } - - std::shared_ptr - MainApplicationTurboModuleManagerDelegate::getTurboModule( - const std::string &name, const std::shared_ptr &jsInvoker) - { - // Not implemented yet: provide pure-C++ NativeModules here. - return nullptr; - } - - std::shared_ptr - MainApplicationTurboModuleManagerDelegate::getTurboModule( - const std::string &name, const JavaTurboModule::InitParams ¶ms) - { - return MainApplicationModuleProvider(name, params); - } - - bool - MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(const std::string &name) - { - return getTurboModule(name, nullptr) != nullptr - || getTurboModule(name, { .moduleName = name }) != nullptr; - } - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h b/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h deleted file mode 100644 index 36be4bb41f..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include - -#include -#include - -namespace facebook { -namespace react { - - class MainApplicationTurboModuleManagerDelegate - : public jni::HybridClass { - public: - // Adapt it to the package you used for your Java class. - static constexpr auto kJavaDescriptor = "Lcom/testappsentry/newarchitecture/modules/" - "MainApplicationTurboModuleManagerDelegate;"; - - static jni::local_ref initHybrid(jni::alias_ref); - - static void registerNatives(); - - std::shared_ptr getTurboModule( - const std::string &name, const std::shared_ptr &jsInvoker) override; - std::shared_ptr getTurboModule( - const std::string &name, const JavaTurboModule::InitParams ¶ms) override; - - /** - * Test-only method. Allows user to verify whether a TurboModule can be - * created by instances of this class. - */ - bool canCreateTurboModule(const std::string &name); - }; - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppSentry/android/app/src/main/jni/MainComponentsRegistry.cpp b/performance-tests/TestAppSentry/android/app/src/main/jni/MainComponentsRegistry.cpp deleted file mode 100644 index 4338b2a3a1..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/jni/MainComponentsRegistry.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "MainComponentsRegistry.h" - -#include -#include -#include -#include -#include - -namespace facebook { -namespace react { - - MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) { } - - std::shared_ptr - MainComponentsRegistry::sharedProviderRegistry() - { - auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry(); - - // Autolinked providers registered by RN CLI - rncli_registerProviders(providerRegistry); - - // Custom Fabric Components go here. You can register custom - // components coming from your App or from 3rd party libraries here. - // - // providerRegistry->add(concreteComponentDescriptorProvider< - // AocViewerComponentDescriptor>()); - return providerRegistry; - } - - jni::local_ref - MainComponentsRegistry::initHybrid(jni::alias_ref, ComponentFactory *delegate) - { - auto instance = makeCxxInstance(delegate); - - auto buildRegistryFunction = [](EventDispatcher::Weak const &eventDispatcher, - ContextContainer::Shared const &contextContainer) - -> ComponentDescriptorRegistry::Shared { - auto registry - = MainComponentsRegistry::sharedProviderRegistry() - ->createComponentDescriptorRegistry({ eventDispatcher, contextContainer }); - - auto mutableRegistry = std::const_pointer_cast(registry); - - mutableRegistry->setFallbackComponentDescriptor( - std::make_shared( - ComponentDescriptorParameters { eventDispatcher, contextContainer, nullptr })); - - return registry; - }; - - delegate->buildRegistryFunction = buildRegistryFunction; - return instance; - } - - void - MainComponentsRegistry::registerNatives() - { - registerHybrid({ - makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid), - }); - } - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppSentry/android/app/src/main/jni/MainComponentsRegistry.h b/performance-tests/TestAppSentry/android/app/src/main/jni/MainComponentsRegistry.h deleted file mode 100644 index c9466dcc43..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/jni/MainComponentsRegistry.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace facebook { -namespace react { - - class MainComponentsRegistry : public facebook::jni::HybridClass { - public: - // Adapt it to the package you used for your Java class. - constexpr static auto kJavaDescriptor - = "Lcom/testappsentry/newarchitecture/components/MainComponentsRegistry;"; - - static void registerNatives(); - - MainComponentsRegistry(ComponentFactory *delegate); - - private: - static std::shared_ptr sharedProviderRegistry(); - - static jni::local_ref initHybrid( - jni::alias_ref, ComponentFactory *delegate); - }; - -} // namespace react -} // namespace facebook diff --git a/performance-tests/TestAppSentry/android/app/src/main/jni/OnLoad.cpp b/performance-tests/TestAppSentry/android/app/src/main/jni/OnLoad.cpp deleted file mode 100644 index e1e387162a..0000000000 --- a/performance-tests/TestAppSentry/android/app/src/main/jni/OnLoad.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "MainApplicationTurboModuleManagerDelegate.h" -#include "MainComponentsRegistry.h" -#include - -JNIEXPORT jint JNICALL -JNI_OnLoad(JavaVM *vm, void *) -{ - return facebook::jni::initialize(vm, [] { - facebook::react::MainApplicationTurboModuleManagerDelegate::registerNatives(); - facebook::react::MainComponentsRegistry::registerNatives(); - }); -} diff --git a/performance-tests/TestAppSentry/android/app/src/main/res/drawable/rn_edit_text_material.xml b/performance-tests/TestAppSentry/android/app/src/main/res/drawable/rn_edit_text_material.xml index f35d996202..5c25e728ea 100644 --- a/performance-tests/TestAppSentry/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ b/performance-tests/TestAppSentry/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -17,10 +17,11 @@ android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material" android:insetRight="@dimen/abc_edit_text_inset_horizontal_material" android:insetTop="@dimen/abc_edit_text_inset_top_material" - android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"> + android:insetBottom="@dimen/abc_edit_text_inset_bottom_material" + > - + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + NSLocationWhenInUseUsageDescription @@ -41,7 +38,7 @@ LaunchScreen UIRequiredDeviceCapabilities - armv7 + arm64 UISupportedInterfaceOrientations diff --git a/performance-tests/TestAppSentry/ios/TestAppSentry/PrivacyInfo.xcprivacy b/performance-tests/TestAppSentry/ios/TestAppSentry/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..41b8317f06 --- /dev/null +++ b/performance-tests/TestAppSentry/ios/TestAppSentry/PrivacyInfo.xcprivacy @@ -0,0 +1,37 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/performance-tests/TestAppSentry/ios/TestAppSentry/main.m b/performance-tests/TestAppSentry/ios/TestAppSentry/main.m deleted file mode 100644 index 742168d2e4..0000000000 --- a/performance-tests/TestAppSentry/ios/TestAppSentry/main.m +++ /dev/null @@ -1,11 +0,0 @@ -#import - -#import "AppDelegate.h" - -int -main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/performance-tests/TestAppSentry/ios/TestAppSentryTests/Info.plist b/performance-tests/TestAppSentry/ios/TestAppSentryTests/Info.plist deleted file mode 100644 index ba72822e87..0000000000 --- a/performance-tests/TestAppSentry/ios/TestAppSentryTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/performance-tests/TestAppSentry/ios/TestAppSentryTests/TestAppSentryTests.m b/performance-tests/TestAppSentry/ios/TestAppSentryTests/TestAppSentryTests.m deleted file mode 100644 index bce8f7d71e..0000000000 --- a/performance-tests/TestAppSentry/ios/TestAppSentryTests/TestAppSentryTests.m +++ /dev/null @@ -1,70 +0,0 @@ -#import -#import - -#import -#import - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React" - -@interface TestAppSentryTests : XCTestCase - -@end - -@implementation TestAppSentryTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; -#ifdef DEBUG - RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, - NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); -#endif - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode - beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes - beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = - [self findSubviewInView:vc.view - matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - -#ifdef DEBUG - RCTSetLogFunction(RCTDefaultLogFunction); -#endif - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", - TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - -@end diff --git a/performance-tests/TestAppSentry/jest.config.js b/performance-tests/TestAppSentry/jest.config.js new file mode 100644 index 0000000000..8eb675e9bc --- /dev/null +++ b/performance-tests/TestAppSentry/jest.config.js @@ -0,0 +1,3 @@ +module.exports = { + preset: 'react-native', +}; diff --git a/performance-tests/TestAppSentry/metro.config.js b/performance-tests/TestAppSentry/metro.config.js index 0c9c988fe2..f07541ee53 100644 --- a/performance-tests/TestAppSentry/metro.config.js +++ b/performance-tests/TestAppSentry/metro.config.js @@ -1,19 +1,15 @@ -const { withMonorepo } = require('sentry-react-native-samples-utils/metro'); +const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); + +const { + withSentryConfig +} = require("@sentry/react-native/metro"); /** - * Metro configuration for React Native - * https://github.com/facebook/react-native + * Metro configuration + * https://reactnative.dev/docs/metro * - * @format + * @type {import('@react-native/metro-config').MetroConfig} */ -module.exports = withMonorepo({ - transformer: { - getTransformOptions: async () => ({ - transform: { - experimentalImportSupport: false, - inlineRequires: true, - }, - }), - }, - projectRoot: __dirname, -}); +const config = {}; + +module.exports = withSentryConfig(mergeConfig(getDefaultConfig(__dirname), config)); \ No newline at end of file diff --git a/performance-tests/TestAppSentry/package.json b/performance-tests/TestAppSentry/package.json index de301f4bf2..8e69300087 100644 --- a/performance-tests/TestAppSentry/package.json +++ b/performance-tests/TestAppSentry/package.json @@ -1,24 +1,40 @@ { "name": "TestAppSentry", - "version": "6.6.0", + "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", - "start": "react-native start" + "lint": "eslint .", + "start": "react-native start", + "test": "jest" }, "dependencies": { - "@sentry/react-native": "6.6.0", - "react": "18.1.0", - "react-native": "0.70.15" + "@sentry/react-native": "^6.6.0", + "react": "18.3.1", + "react-native": "0.77.0" }, "devDependencies": { - "@babel/core": "^7.12.9", - "@babel/runtime": "^7.12.5", - "metro-react-native-babel-preset": "^0.72.3", - "sentry-react-native-samples-utils": "workspace:^" + "@babel/core": "^7.25.2", + "@babel/preset-env": "^7.25.3", + "@babel/runtime": "^7.25.0", + "@react-native-community/cli": "15.0.1", + "@react-native-community/cli-platform-android": "15.0.1", + "@react-native-community/cli-platform-ios": "15.0.1", + "@react-native/babel-preset": "0.77.0", + "@react-native/eslint-config": "0.77.0", + "@react-native/metro-config": "0.77.0", + "@react-native/typescript-config": "0.77.0", + "@types/jest": "^29.5.13", + "@types/react": "^18.2.6", + "@types/react-test-renderer": "^18.0.0", + "eslint": "^8.19.0", + "jest": "^29.6.3", + "prettier": "2.8.8", + "react-test-renderer": "18.3.1", + "typescript": "5.0.4" }, - "jest": { - "preset": "react-native" + "engines": { + "node": ">=18" } } diff --git a/performance-tests/TestAppSentry/tsconfig.json b/performance-tests/TestAppSentry/tsconfig.json new file mode 100644 index 0000000000..304ab4e2d8 --- /dev/null +++ b/performance-tests/TestAppSentry/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@react-native/typescript-config/tsconfig.json" +} diff --git a/yarn.lock b/yarn.lock index aea7ac6181..e572031873 100644 --- a/yarn.lock +++ b/yarn.lock @@ -443,7 +443,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.12.9, @babel/core@npm:^7.13.16, @babel/core@npm:^7.14.0, @babel/core@npm:^7.20.0, @babel/core@npm:^7.22.5, @babel/core@npm:^7.23.9": +"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.20.0, @babel/core@npm:^7.22.5, @babel/core@npm:^7.23.9": version: 7.25.2 resolution: "@babel/core@npm:7.25.2" dependencies: @@ -540,18 +540,6 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.14.0, @babel/generator@npm:^7.25.6": - version: 7.25.6 - resolution: "@babel/generator@npm:7.25.6" - dependencies: - "@babel/types": ^7.25.6 - "@jridgewell/gen-mapping": ^0.3.5 - "@jridgewell/trace-mapping": ^0.3.25 - jsesc: ^2.5.1 - checksum: b55975cd664f5602304d868bb34f4ee3bed6f5c7ce8132cd92ff27a46a53a119def28a182d91992e86f75db904f63094a81247703c4dc96e4db0c03fd04bcd68 - languageName: node - linkType: hard - "@babel/generator@npm:^7.20.0, @babel/generator@npm:^7.20.5, @babel/generator@npm:^7.25.0, @babel/generator@npm:^7.25.4, @babel/generator@npm:^7.7.2": version: 7.25.5 resolution: "@babel/generator@npm:7.25.5" @@ -564,6 +552,18 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/generator@npm:7.25.6" + dependencies: + "@babel/types": ^7.25.6 + "@jridgewell/gen-mapping": ^0.3.5 + "@jridgewell/trace-mapping": ^0.3.25 + jsesc: ^2.5.1 + checksum: b55975cd664f5602304d868bb34f4ee3bed6f5c7ce8132cd92ff27a46a53a119def28a182d91992e86f75db904f63094a81247703c4dc96e4db0c03fd04bcd68 + languageName: node + linkType: hard + "@babel/generator@npm:^7.25.7": version: 7.25.7 resolution: "@babel/generator@npm:7.25.7" @@ -1212,17 +1212,6 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.14.0, @babel/parser@npm:^7.25.6": - version: 7.25.6 - resolution: "@babel/parser@npm:7.25.6" - dependencies: - "@babel/types": ^7.25.6 - bin: - parser: ./bin/babel-parser.js - checksum: 85b237ded09ee43cc984493c35f3b1ff8a83e8dbbb8026b8132e692db6567acc5a1659ec928e4baa25499ddd840d7dae9dee3062be7108fe23ec5f94a8066b1e - languageName: node - linkType: hard - "@babel/parser@npm:^7.24.7, @babel/parser@npm:^7.26.5, @babel/parser@npm:^7.26.7": version: 7.26.7 resolution: "@babel/parser@npm:7.26.7" @@ -1245,6 +1234,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/parser@npm:7.25.6" + dependencies: + "@babel/types": ^7.25.6 + bin: + parser: ./bin/babel-parser.js + checksum: 85b237ded09ee43cc984493c35f3b1ff8a83e8dbbb8026b8132e692db6567acc5a1659ec928e4baa25499ddd840d7dae9dee3062be7108fe23ec5f94a8066b1e + languageName: node + linkType: hard + "@babel/parser@npm:^7.25.7": version: 7.25.7 resolution: "@babel/parser@npm:7.25.7" @@ -1448,7 +1448,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.0.0, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.13.8, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.0": +"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.13.8, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.0": version: 7.18.6 resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" dependencies: @@ -1499,7 +1499,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-optional-chaining@npm:^7.0.0, @babel/plugin-proposal-optional-chaining@npm:^7.13.12, @babel/plugin-proposal-optional-chaining@npm:^7.20.0": +"@babel/plugin-proposal-optional-chaining@npm:^7.13.12, @babel/plugin-proposal-optional-chaining@npm:^7.20.0": version: 7.21.0 resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" dependencies: @@ -1576,7 +1576,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-dynamic-import@npm:^7.0.0, @babel/plugin-syntax-dynamic-import@npm:^7.8.0, @babel/plugin-syntax-dynamic-import@npm:^7.8.3": +"@babel/plugin-syntax-dynamic-import@npm:^7.8.0, @babel/plugin-syntax-dynamic-import@npm:^7.8.3": version: 7.8.3 resolution: "@babel/plugin-syntax-dynamic-import@npm:7.8.3" dependencies: @@ -1609,7 +1609,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-flow@npm:^7.0.0, @babel/plugin-syntax-flow@npm:^7.12.1, @babel/plugin-syntax-flow@npm:^7.18.0, @babel/plugin-syntax-flow@npm:^7.2.0, @babel/plugin-syntax-flow@npm:^7.24.7": +"@babel/plugin-syntax-flow@npm:^7.0.0, @babel/plugin-syntax-flow@npm:^7.12.1, @babel/plugin-syntax-flow@npm:^7.18.0, @babel/plugin-syntax-flow@npm:^7.24.7": version: 7.24.7 resolution: "@babel/plugin-syntax-flow@npm:7.24.7" dependencies: @@ -1912,7 +1912,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-to-generator@npm:^7.0.0, @babel/plugin-transform-async-to-generator@npm:^7.20.0, @babel/plugin-transform-async-to-generator@npm:^7.24.7": +"@babel/plugin-transform-async-to-generator@npm:^7.20.0, @babel/plugin-transform-async-to-generator@npm:^7.24.7": version: 7.24.7 resolution: "@babel/plugin-transform-async-to-generator@npm:7.24.7" dependencies: @@ -2253,7 +2253,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-exponentiation-operator@npm:^7.0.0, @babel/plugin-transform-exponentiation-operator@npm:^7.24.7": +"@babel/plugin-transform-exponentiation-operator@npm:^7.24.7": version: 7.24.7 resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.24.7" dependencies: @@ -3881,21 +3881,6 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.14.0, @babel/traverse@npm:^7.7.4": - version: 7.25.6 - resolution: "@babel/traverse@npm:7.25.6" - dependencies: - "@babel/code-frame": ^7.24.7 - "@babel/generator": ^7.25.6 - "@babel/parser": ^7.25.6 - "@babel/template": ^7.25.0 - "@babel/types": ^7.25.6 - debug: ^4.3.1 - globals: ^11.1.0 - checksum: 11ee47269aa4356f2d6633a05b9af73405b5ed72c09378daf644289b686ef852035a6ac9aa410f601991993c6bbf72006795b5478283b78eb1ca77874ada7737 - languageName: node - linkType: hard - "@babel/traverse@npm:^7.25.7": version: 7.25.7 resolution: "@babel/traverse@npm:7.25.7" @@ -3941,6 +3926,21 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.7.4": + version: 7.25.6 + resolution: "@babel/traverse@npm:7.25.6" + dependencies: + "@babel/code-frame": ^7.24.7 + "@babel/generator": ^7.25.6 + "@babel/parser": ^7.25.6 + "@babel/template": ^7.25.0 + "@babel/types": ^7.25.6 + debug: ^4.3.1 + globals: ^11.1.0 + checksum: 11ee47269aa4356f2d6633a05b9af73405b5ed72c09378daf644289b686ef852035a6ac9aa410f601991993c6bbf72006795b5478283b78eb1ca77874ada7737 + languageName: node + linkType: hard + "@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.17, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.4, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": version: 7.25.4 resolution: "@babel/types@npm:7.25.4" @@ -5038,15 +5038,6 @@ __metadata: languageName: node linkType: hard -"@jest/create-cache-key-function@npm:^27.0.1": - version: 27.5.1 - resolution: "@jest/create-cache-key-function@npm:27.5.1" - dependencies: - "@jest/types": ^27.5.1 - checksum: a6c3a8c769aca6f66f5dc80f1c77e66980b4f213a6b2a15a92ba3595f032848a1261c06c9c798dcf2b672b1ffbefad5085af89d130548741c85ddbe0cf4284e7 - languageName: node - linkType: hard - "@jest/create-cache-key-function@npm:^29.2.1, @jest/create-cache-key-function@npm:^29.6.3": version: 29.7.0 resolution: "@jest/create-cache-key-function@npm:29.7.0" @@ -5230,19 +5221,6 @@ __metadata: languageName: node linkType: hard -"@jest/types@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/types@npm:27.5.1" - dependencies: - "@types/istanbul-lib-coverage": ^2.0.0 - "@types/istanbul-reports": ^3.0.0 - "@types/node": "*" - "@types/yargs": ^16.0.0 - chalk: ^4.0.0 - checksum: d1f43cc946d87543ddd79d49547aab2399481d34025d5c5f2025d3d99c573e1d9832fa83cef25e9d9b07a8583500229d15bbb07b8e233d127d911d133e2f14b1 - languageName: node - linkType: hard - "@jest/types@npm:^29.6.3": version: 29.6.3 resolution: "@jest/types@npm:29.6.3" @@ -6032,27 +6010,27 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-clean@npm:15.1.3": - version: 15.1.3 - resolution: "@react-native-community/cli-clean@npm:15.1.3" +"@react-native-community/cli-clean@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-clean@npm:15.0.1" dependencies: - "@react-native-community/cli-tools": 15.1.3 + "@react-native-community/cli-tools": 15.0.1 chalk: ^4.1.2 execa: ^5.0.0 fast-glob: ^3.3.2 - checksum: 95777b9786a0e7787033d251258e7dbacd530c31bd2f2919798643e9bebb94aa07b9936d9f65c68db199deeb7d4fd66fa993d0e89e40c61c2d014580da3da2f8 + checksum: ea6c663ec56cfe3a2c4fac7d3f0fec2ac8de9c34458f241b2afdf7f45dfb00d1de9e367fec732f8fef6e2b17046f4ed03c3be2ea4d2075633197dc23c516f986 languageName: node linkType: hard -"@react-native-community/cli-clean@npm:^9.2.1": - version: 9.2.1 - resolution: "@react-native-community/cli-clean@npm:9.2.1" +"@react-native-community/cli-clean@npm:15.1.3": + version: 15.1.3 + resolution: "@react-native-community/cli-clean@npm:15.1.3" dependencies: - "@react-native-community/cli-tools": ^9.2.1 + "@react-native-community/cli-tools": 15.1.3 chalk: ^4.1.2 - execa: ^1.0.0 - prompts: ^2.4.0 - checksum: 52286695a7197a3679125bf05e33bbcecd9d116d25ba2960a55888d35a9cecc5b1a6857d8edff7bfa2593e11ad496b823f7a5fae5d838c41556a63abd3d62955 + execa: ^5.0.0 + fast-glob: ^3.3.2 + checksum: 95777b9786a0e7787033d251258e7dbacd530c31bd2f2919798643e9bebb94aa07b9936d9f65c68db199deeb7d4fd66fa993d0e89e40c61c2d014580da3da2f8 languageName: node linkType: hard @@ -6068,6 +6046,18 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-config-apple@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-config-apple@npm:15.0.1" + dependencies: + "@react-native-community/cli-tools": 15.0.1 + chalk: ^4.1.2 + execa: ^5.0.0 + fast-glob: ^3.3.2 + checksum: 67b9be8b6cce14f764a5734b9599eb7d1095c7fb5c06b0b6cd3518cf3a00c90026018c1eb8d497338da092a3cdcaa9b33fec34c5b766a4517c70293e5f1df58d + languageName: node + linkType: hard + "@react-native-community/cli-config-apple@npm:15.1.3": version: 15.1.3 resolution: "@react-native-community/cli-config-apple@npm:15.1.3" @@ -6108,30 +6098,31 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-config@npm:15.1.3": - version: 15.1.3 - resolution: "@react-native-community/cli-config@npm:15.1.3" +"@react-native-community/cli-config@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-config@npm:15.0.1" dependencies: - "@react-native-community/cli-tools": 15.1.3 + "@react-native-community/cli-tools": 15.0.1 chalk: ^4.1.2 cosmiconfig: ^9.0.0 deepmerge: ^4.3.0 fast-glob: ^3.3.2 joi: ^17.2.1 - checksum: 3e8fc8fc9f683ddebe8177b38ba5811e18456c5da3f2779796e9491733a0aae0f3c0dcc431ceaa1622fcef5276cfb8e10bed91cb7a9bf1243bd5d585bc0a4e56 + checksum: 23314bcdf465974ee71a01792f0a1149ea51eea1dc66416e53aa2bc3a123dba6a8e0654d68211d2b20570bc875145b2e5d4abf923190c685c0021bb280230c3f languageName: node linkType: hard -"@react-native-community/cli-config@npm:^9.2.1": - version: 9.2.1 - resolution: "@react-native-community/cli-config@npm:9.2.1" +"@react-native-community/cli-config@npm:15.1.3": + version: 15.1.3 + resolution: "@react-native-community/cli-config@npm:15.1.3" dependencies: - "@react-native-community/cli-tools": ^9.2.1 - cosmiconfig: ^5.1.0 - deepmerge: ^3.2.0 - glob: ^7.1.3 + "@react-native-community/cli-tools": 15.1.3 + chalk: ^4.1.2 + cosmiconfig: ^9.0.0 + deepmerge: ^4.3.0 + fast-glob: ^3.3.2 joi: ^17.2.1 - checksum: 95a6f8f380677b4ed43bbb6853cf9c889cd5be05a89452cc471e4c873bb0939be698f5685261d99113c439df988e8f6022478302878ca8e682fd963b3488703f + checksum: 3e8fc8fc9f683ddebe8177b38ba5811e18456c5da3f2779796e9491733a0aae0f3c0dcc431ceaa1622fcef5276cfb8e10bed91cb7a9bf1243bd5d585bc0a4e56 languageName: node linkType: hard @@ -6153,21 +6144,21 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-debugger-ui@npm:15.1.3": - version: 15.1.3 - resolution: "@react-native-community/cli-debugger-ui@npm:15.1.3" +"@react-native-community/cli-debugger-ui@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-debugger-ui@npm:15.0.1" dependencies: serve-static: ^1.13.1 - checksum: 0f52a737cfd4ee8d7d735f7031590e02f127df9e7cde78653c68ec694a4806eec6ce641406f5ce7ae50947e44f02cff5c4ec94d5fb76e372b42d12f78d3f49ed + checksum: a97bb195f3722b91e0acf4c63f4e6956d572f5a275a13be01513b6797bd81ad0b838aa4fc8440131e64c39547c8e83feebb6435a34773269355a497122ed2209 languageName: node linkType: hard -"@react-native-community/cli-debugger-ui@npm:^9.0.0": - version: 9.0.0 - resolution: "@react-native-community/cli-debugger-ui@npm:9.0.0" +"@react-native-community/cli-debugger-ui@npm:15.1.3": + version: 15.1.3 + resolution: "@react-native-community/cli-debugger-ui@npm:15.1.3" dependencies: serve-static: ^1.13.1 - checksum: 32e16e3d5c7b5cc4f16a1b3242c7bb33e358301a11736ba03d567dd63d4e8517cf7428cfabcbbe59ce527f68d72489d5ede1e76ba8dd399965e9cf8366dc38e8 + checksum: 0f52a737cfd4ee8d7d735f7031590e02f127df9e7cde78653c68ec694a4806eec6ce641406f5ce7ae50947e44f02cff5c4ec94d5fb76e372b42d12f78d3f49ed languageName: node linkType: hard @@ -6219,15 +6210,15 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-doctor@npm:15.1.3": - version: 15.1.3 - resolution: "@react-native-community/cli-doctor@npm:15.1.3" +"@react-native-community/cli-doctor@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-doctor@npm:15.0.1" dependencies: - "@react-native-community/cli-config": 15.1.3 - "@react-native-community/cli-platform-android": 15.1.3 - "@react-native-community/cli-platform-apple": 15.1.3 - "@react-native-community/cli-platform-ios": 15.1.3 - "@react-native-community/cli-tools": 15.1.3 + "@react-native-community/cli-config": 15.0.1 + "@react-native-community/cli-platform-android": 15.0.1 + "@react-native-community/cli-platform-apple": 15.0.1 + "@react-native-community/cli-platform-ios": 15.0.1 + "@react-native-community/cli-tools": 15.0.1 chalk: ^4.1.2 command-exists: ^1.2.8 deepmerge: ^4.3.0 @@ -6239,31 +6230,31 @@ __metadata: strip-ansi: ^5.2.0 wcwidth: ^1.0.1 yaml: ^2.2.1 - checksum: 9be335ef0203b15d20d8b13f052a742f6faf67435c614ad9e714707ebc04d76a0a8845baafa49e80d05f3fe3822c4020cc60a568c1c4564a50e8d35bea7e3169 + checksum: 6df1825df9f563096e48528f16d0bc521aceb2933e864921c8092eeeeeade0893963964897a6145b26a3d4de72ce05259f2d06f873eae64796d8c3815f22f1a5 languageName: node linkType: hard -"@react-native-community/cli-doctor@npm:^9.3.0": - version: 9.3.0 - resolution: "@react-native-community/cli-doctor@npm:9.3.0" +"@react-native-community/cli-doctor@npm:15.1.3": + version: 15.1.3 + resolution: "@react-native-community/cli-doctor@npm:15.1.3" dependencies: - "@react-native-community/cli-config": ^9.2.1 - "@react-native-community/cli-platform-ios": ^9.3.0 - "@react-native-community/cli-tools": ^9.2.1 + "@react-native-community/cli-config": 15.1.3 + "@react-native-community/cli-platform-android": 15.1.3 + "@react-native-community/cli-platform-apple": 15.1.3 + "@react-native-community/cli-platform-ios": 15.1.3 + "@react-native-community/cli-tools": 15.1.3 chalk: ^4.1.2 command-exists: ^1.2.8 - envinfo: ^7.7.2 - execa: ^1.0.0 - hermes-profile-transformer: ^0.0.6 - ip: ^1.1.5 + deepmerge: ^4.3.0 + envinfo: ^7.13.0 + execa: ^5.0.0 node-stream-zip: ^1.9.1 ora: ^5.4.1 - prompts: ^2.4.0 - semver: ^6.3.0 + semver: ^7.5.2 strip-ansi: ^5.2.0 - sudo-prompt: ^9.0.0 wcwidth: ^1.0.1 - checksum: 5bea6203f0f83f798ef4d7957f4de8b5fea2469d287c0d71c04cb108a2627893a6a385fc19b79337ad9bdc7ba474c65e23e2496735f9e4b4d5759a51dff71204 + yaml: ^2.2.1 + checksum: 9be335ef0203b15d20d8b13f052a742f6faf67435c614ad9e714707ebc04d76a0a8845baafa49e80d05f3fe3822c4020cc60a568c1c4564a50e8d35bea7e3169 languageName: node linkType: hard @@ -6291,19 +6282,6 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-hermes@npm:^9.3.4": - version: 9.3.4 - resolution: "@react-native-community/cli-hermes@npm:9.3.4" - dependencies: - "@react-native-community/cli-platform-android": ^9.3.4 - "@react-native-community/cli-tools": ^9.2.1 - chalk: ^4.1.2 - hermes-profile-transformer: ^0.0.6 - ip: ^1.1.5 - checksum: e5a3ae7875e154e34e7f2cd46a613e98be703156cdb4574341a423ff9ba09f1a7bd1c63fa687ac51c573343b4e3075a7480406f7efebfed6652b623a0a07502c - languageName: node - linkType: hard - "@react-native-community/cli-platform-android@npm:12.3.6": version: 12.3.6 resolution: "@react-native-community/cli-platform-android@npm:12.3.6" @@ -6332,6 +6310,20 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-platform-android@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-platform-android@npm:15.0.1" + dependencies: + "@react-native-community/cli-tools": 15.0.1 + chalk: ^4.1.2 + execa: ^5.0.0 + fast-glob: ^3.3.2 + fast-xml-parser: ^4.4.1 + logkitty: ^0.7.1 + checksum: 6c5e5912b7c81a6cb9076ae08897470090e1ff20fdaa502d500b4700235f2411942c6e38e3373111efa025dee9a1d3cc71dea6a4c42a89272f0d56b1eeb7b38a + languageName: node + linkType: hard + "@react-native-community/cli-platform-android@npm:15.1.3": version: 15.1.3 resolution: "@react-native-community/cli-platform-android@npm:15.1.3" @@ -6345,18 +6337,16 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-platform-android@npm:9.3.4, @react-native-community/cli-platform-android@npm:^9.3.4": - version: 9.3.4 - resolution: "@react-native-community/cli-platform-android@npm:9.3.4" +"@react-native-community/cli-platform-apple@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-platform-apple@npm:15.0.1" dependencies: - "@react-native-community/cli-tools": ^9.2.1 + "@react-native-community/cli-config-apple": 15.0.1 + "@react-native-community/cli-tools": 15.0.1 chalk: ^4.1.2 - execa: ^1.0.0 - fs-extra: ^8.1.0 - glob: ^7.1.3 - logkitty: ^0.7.1 - slash: ^3.0.0 - checksum: cf15fb4d77961fac62e710953518076164319d2189e9131e69d54dfa354cebda30986b6f2ba81eac29295c34507fe4bf7fb0915b63924c2e19ac9b3611066462 + execa: ^5.0.0 + fast-xml-parser: ^4.4.1 + checksum: 27278ff8790fddc220cba9daa4b05cb027403b7c3b81cd3f025b09f52ceccd41f68e86b71d493794eadc2d54fa4a5f6a1032608c4ec7ce928cc1985dce7b9bd2 languageName: node linkType: hard @@ -6401,6 +6391,15 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli-platform-ios@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-platform-ios@npm:15.0.1" + dependencies: + "@react-native-community/cli-platform-apple": 15.0.1 + checksum: 27b4775af43ce06e9315fda54f299e96405975c44d20a495443074d2818fc085dcb85cf2d2e6581990b71ab2e9ffc7d88666337bec8eb9412e80abf8dd793851 + languageName: node + linkType: hard + "@react-native-community/cli-platform-ios@npm:15.1.3": version: 15.1.3 resolution: "@react-native-community/cli-platform-ios@npm:15.1.3" @@ -6410,19 +6409,6 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-platform-ios@npm:9.3.0, @react-native-community/cli-platform-ios@npm:^9.3.0": - version: 9.3.0 - resolution: "@react-native-community/cli-platform-ios@npm:9.3.0" - dependencies: - "@react-native-community/cli-tools": ^9.2.1 - chalk: ^4.1.2 - execa: ^1.0.0 - glob: ^7.1.3 - ora: ^5.4.1 - checksum: c4bf882af92e8557458de98cd57327845c2cc7045bdd1e6cc2ded5911134ea19d75276de4a1bb609e51096207970bc8ccb8a836a9d87bb692dc3f67b48ebfd24 - languageName: node - linkType: hard - "@react-native-community/cli-plugin-metro@npm:12.3.6": version: 12.3.6 resolution: "@react-native-community/cli-plugin-metro@npm:12.3.6" @@ -6437,24 +6423,6 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-plugin-metro@npm:^9.3.3": - version: 9.3.3 - resolution: "@react-native-community/cli-plugin-metro@npm:9.3.3" - dependencies: - "@react-native-community/cli-server-api": ^9.2.1 - "@react-native-community/cli-tools": ^9.2.1 - chalk: ^4.1.2 - metro: 0.72.4 - metro-config: 0.72.4 - metro-core: 0.72.4 - metro-react-native-babel-transformer: 0.72.4 - metro-resolver: 0.72.4 - metro-runtime: 0.72.4 - readline: ^1.3.0 - checksum: 6d3f5ba9c5d275a2d0cea7182d29fb5dccb6d656dd9d5377b943524a1da187c9ab0b338cd22cc1561482826e490c1cc8c1c723521debd0e2a6688a2de12cfd5f - languageName: node - linkType: hard - "@react-native-community/cli-server-api@npm:12.3.6": version: 12.3.6 resolution: "@react-native-community/cli-server-api@npm:12.3.6" @@ -6489,12 +6457,12 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-server-api@npm:15.1.3": - version: 15.1.3 - resolution: "@react-native-community/cli-server-api@npm:15.1.3" +"@react-native-community/cli-server-api@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-server-api@npm:15.0.1" dependencies: - "@react-native-community/cli-debugger-ui": 15.1.3 - "@react-native-community/cli-tools": 15.1.3 + "@react-native-community/cli-debugger-ui": 15.0.1 + "@react-native-community/cli-tools": 15.0.1 compression: ^1.7.1 connect: ^3.6.5 errorhandler: ^1.5.1 @@ -6502,24 +6470,24 @@ __metadata: pretty-format: ^26.6.2 serve-static: ^1.13.1 ws: ^6.2.3 - checksum: 2bc164d6fc33298b3df8fbe6b27745b72ea3287a4b87c1dd32a77c8a277b62882d6cec3c12915496568d04ee3989ad01de81b4088b18cd40ddd5cb0532260903 + checksum: 354eba589433251a56db7edf005886aa3c4886ff70f52b999db7c3718435f01a3f1081bc56cc681a1b7de2fa50ea4891c4ea673fe0a02eb855ecbc001bd86654 languageName: node linkType: hard -"@react-native-community/cli-server-api@npm:^9.2.1": - version: 9.2.1 - resolution: "@react-native-community/cli-server-api@npm:9.2.1" +"@react-native-community/cli-server-api@npm:15.1.3": + version: 15.1.3 + resolution: "@react-native-community/cli-server-api@npm:15.1.3" dependencies: - "@react-native-community/cli-debugger-ui": ^9.0.0 - "@react-native-community/cli-tools": ^9.2.1 + "@react-native-community/cli-debugger-ui": 15.1.3 + "@react-native-community/cli-tools": 15.1.3 compression: ^1.7.1 connect: ^3.6.5 - errorhandler: ^1.5.0 + errorhandler: ^1.5.1 nocache: ^3.0.1 pretty-format: ^26.6.2 serve-static: ^1.13.1 - ws: ^7.5.1 - checksum: 0452310b2d499560458249101d9ad75886a1553aab6deec6e84d968d5de95bb206266d6254d2b500b3492d266b99fd5e1e0eafb686142900fba6a272ceb4038a + ws: ^6.2.3 + checksum: 2bc164d6fc33298b3df8fbe6b27745b72ea3287a4b87c1dd32a77c8a277b62882d6cec3c12915496568d04ee3989ad01de81b4088b18cd40ddd5cb0532260903 languageName: node linkType: hard @@ -6559,9 +6527,9 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-tools@npm:15.1.3": - version: 15.1.3 - resolution: "@react-native-community/cli-tools@npm:15.1.3" +"@react-native-community/cli-tools@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-tools@npm:15.0.1" dependencies: appdirsjs: ^1.2.4 chalk: ^4.1.2 @@ -6574,24 +6542,26 @@ __metadata: semver: ^7.5.2 shell-quote: ^1.7.3 sudo-prompt: ^9.0.0 - checksum: f62997b7ed16df5beffc699c7556eebe0b27a63ac0b10dcf8af3e2875231183752e4a1a7e55e9d60f0b9cbfd7c3a2dd264eccc0e3430b81660538e27d5deffc8 + checksum: 0c40d5aa2306a2bfc1ee15362d045b0eff3cb162dd1b070f504508b2bbdd00c791151cf9f8679d248b4480b75b758e60b8d0cf3c19a19a02b4b4ece9928a119c languageName: node linkType: hard -"@react-native-community/cli-tools@npm:^9.2.1": - version: 9.2.1 - resolution: "@react-native-community/cli-tools@npm:9.2.1" +"@react-native-community/cli-tools@npm:15.1.3": + version: 15.1.3 + resolution: "@react-native-community/cli-tools@npm:15.1.3" dependencies: appdirsjs: ^1.2.4 chalk: ^4.1.2 + execa: ^5.0.0 find-up: ^5.0.0 mime: ^2.4.1 - node-fetch: ^2.6.0 open: ^6.2.0 ora: ^5.4.1 - semver: ^6.3.0 + prompts: ^2.4.2 + semver: ^7.5.2 shell-quote: ^1.7.3 - checksum: 8f99ec43b5bc7b5f90e32cae5ba10f5d64e4f2ca2dfb0b51ac71aae5215747c0672ed05752def89eb47cbdc41231afc29f450ffdc6151bd06f4bf4584a3f4bea + sudo-prompt: ^9.0.0 + checksum: f62997b7ed16df5beffc699c7556eebe0b27a63ac0b10dcf8af3e2875231183752e4a1a7e55e9d60f0b9cbfd7c3a2dd264eccc0e3430b81660538e27d5deffc8 languageName: node linkType: hard @@ -6613,21 +6583,21 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-types@npm:15.1.3": - version: 15.1.3 - resolution: "@react-native-community/cli-types@npm:15.1.3" +"@react-native-community/cli-types@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli-types@npm:15.0.1" dependencies: joi: ^17.2.1 - checksum: 5551e218499645ec7f1c8c3e24cfed427a5b4fab54d376b20f04fbe6b304bbf7dc69a7e64677e10c5d263ab8d98a37cb26d006ce0bcdad0d9710e09568fd297e + checksum: 77452486158afcf1f03a3596135b6dba16dba5dd10209dacd5a6a4b176df36d37b8e49af61590d5a64df4907cf0575b6f37e0a3893335f961a9380edaee32152 languageName: node linkType: hard -"@react-native-community/cli-types@npm:^9.1.0": - version: 9.1.0 - resolution: "@react-native-community/cli-types@npm:9.1.0" +"@react-native-community/cli-types@npm:15.1.3": + version: 15.1.3 + resolution: "@react-native-community/cli-types@npm:15.1.3" dependencies: joi: ^17.2.1 - checksum: 4ac2b9ba8f05562a30201595f90e12ce7f28f0eed1f34e30a0a085525227c8862454dabeccb5da5eebc21e2856e365b2241599b7182eb5721ebcdfe631407eac + checksum: 5551e218499645ec7f1c8c3e24cfed427a5b4fab54d376b20f04fbe6b304bbf7dc69a7e64677e10c5d263ab8d98a37cb26d006ce0bcdad0d9710e09568fd297e languageName: node linkType: hard @@ -6687,6 +6657,32 @@ __metadata: languageName: node linkType: hard +"@react-native-community/cli@npm:15.0.1": + version: 15.0.1 + resolution: "@react-native-community/cli@npm:15.0.1" + dependencies: + "@react-native-community/cli-clean": 15.0.1 + "@react-native-community/cli-config": 15.0.1 + "@react-native-community/cli-debugger-ui": 15.0.1 + "@react-native-community/cli-doctor": 15.0.1 + "@react-native-community/cli-server-api": 15.0.1 + "@react-native-community/cli-tools": 15.0.1 + "@react-native-community/cli-types": 15.0.1 + chalk: ^4.1.2 + commander: ^9.4.1 + deepmerge: ^4.3.0 + execa: ^5.0.0 + find-up: ^5.0.0 + fs-extra: ^8.1.0 + graceful-fs: ^4.1.3 + prompts: ^2.4.2 + semver: ^7.5.2 + bin: + rnc-cli: build/bin.js + checksum: 26c98ef67b4b89d3af13f2a3b19e51c7b2de5d320ca908cb628ca22b32bff5a17b8a1cc7f4b0ece303c4e53dc10e8ac0e88df9b376e63ebc97acb8d358f78c2e + languageName: node + linkType: hard + "@react-native-community/cli@npm:15.1.3": version: 15.1.3 resolution: "@react-native-community/cli@npm:15.1.3" @@ -6713,33 +6709,6 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli@npm:9.3.5": - version: 9.3.5 - resolution: "@react-native-community/cli@npm:9.3.5" - dependencies: - "@react-native-community/cli-clean": ^9.2.1 - "@react-native-community/cli-config": ^9.2.1 - "@react-native-community/cli-debugger-ui": ^9.0.0 - "@react-native-community/cli-doctor": ^9.3.0 - "@react-native-community/cli-hermes": ^9.3.4 - "@react-native-community/cli-plugin-metro": ^9.3.3 - "@react-native-community/cli-server-api": ^9.2.1 - "@react-native-community/cli-tools": ^9.2.1 - "@react-native-community/cli-types": ^9.1.0 - chalk: ^4.1.2 - commander: ^9.4.0 - execa: ^1.0.0 - find-up: ^4.1.0 - fs-extra: ^8.1.0 - graceful-fs: ^4.1.3 - prompts: ^2.4.0 - semver: ^6.3.0 - bin: - react-native: build/bin.js - checksum: f7664e852f6278331c122122708929983e61842a28a4972db11d5ffc009a6cf0fc18c4ab91397c825b498e109c530e41faf2d1871a803aa2c4a54565fbbdc1e5 - languageName: node - linkType: hard - "@react-native-mac/virtualized-lists@npm:^0.73.3": version: 0.73.3 resolution: "@react-native-mac/virtualized-lists@npm:0.73.3" @@ -6773,13 +6742,6 @@ __metadata: languageName: node linkType: hard -"@react-native/assets@npm:1.0.0": - version: 1.0.0 - resolution: "@react-native/assets@npm:1.0.0" - checksum: 4525dd1704e98b753f8fdbbc1ca373299686100cddad1e0b80556d612b9812fa743ae9f83cfe55fd8fb51fb90a5c0caa7b27b3137515224bc7f9c2c09e8f6b5b - languageName: node - linkType: hard - "@react-native/babel-plugin-codegen@npm:0.73.4": version: 0.73.4 resolution: "@react-native/babel-plugin-codegen@npm:0.73.4" @@ -7353,13 +7315,6 @@ __metadata: languageName: node linkType: hard -"@react-native/normalize-color@npm:2.0.0": - version: 2.0.0 - resolution: "@react-native/normalize-color@npm:2.0.0" - checksum: 2da373297f0d22b700edb9ab1b2cca34684e94a5dfe172e1cfd114e74ac17e139e802bc671e9868e0a580190eccbf3fa804f67be8cc1d9cbd0e216e994495931 - languageName: node - linkType: hard - "@react-native/normalize-color@npm:^2.0.0": version: 2.1.0 resolution: "@react-native/normalize-color@npm:2.1.0" @@ -7395,13 +7350,6 @@ __metadata: languageName: node linkType: hard -"@react-native/polyfills@npm:2.0.0": - version: 2.0.0 - resolution: "@react-native/polyfills@npm:2.0.0" - checksum: 6f2a0d1c8c4df4f20e8adac92fcfaec0fb536d097f96fbfd56bdb21b0a3afc4157f82d084b6851093255f58d350818f7ad28098818d584f654533eeb9cba2656 - languageName: node - linkType: hard - "@react-native/typescript-config@npm:0.73.1": version: 0.73.1 resolution: "@react-native/typescript-config@npm:0.73.1" @@ -8116,7 +8064,7 @@ __metadata: languageName: node linkType: hard -"@sentry/react-native@6.6.0, @sentry/react-native@workspace:packages/core": +"@sentry/react-native@6.6.0, @sentry/react-native@^6.6.0, @sentry/react-native@workspace:packages/core": version: 0.0.0-use.local resolution: "@sentry/react-native@workspace:packages/core" dependencies: @@ -8957,6 +8905,16 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:^18.2.6": + version: 18.3.18 + resolution: "@types/react@npm:18.3.18" + dependencies: + "@types/prop-types": "*" + csstype: ^3.0.2 + checksum: 5933597bc9f53e282f0438f0bb76d0f0fab60faabe760ea806e05ffe6f5c61b9b4d363e1a03a8fea47c510d493c6cf926cdeeba9f7074fa97b61940c350245e7 + languageName: node + linkType: hard + "@types/react@npm:~18.3.12": version: 18.3.12 resolution: "@types/react@npm:18.3.12" @@ -9163,15 +9121,6 @@ __metadata: languageName: node linkType: hard -"@types/yargs@npm:^16.0.0": - version: 16.0.9 - resolution: "@types/yargs@npm:16.0.9" - dependencies: - "@types/yargs-parser": "*" - checksum: 00d9276ed4e0f17a78c1ed57f644a8c14061959bd5bfab113d57f082ea4b663ba97f71b89371304a34a2dba5061e9ae4523e357e577ba61834d661f82c223bf8 - languageName: node - linkType: hard - "@types/yargs@npm:^17.0.8": version: 17.0.33 resolution: "@types/yargs@npm:17.0.33" @@ -9787,11 +9736,26 @@ __metadata: version: 0.0.0-use.local resolution: "TestAppPlain@workspace:performance-tests/TestAppPlain" dependencies: - "@babel/core": ^7.12.9 - "@babel/runtime": ^7.12.5 - metro-react-native-babel-preset: ^0.72.3 - react: 18.1.0 - react-native: 0.70.15 + "@babel/core": ^7.25.2 + "@babel/preset-env": ^7.25.3 + "@babel/runtime": ^7.25.0 + "@react-native-community/cli": 15.0.1 + "@react-native-community/cli-platform-android": 15.0.1 + "@react-native-community/cli-platform-ios": 15.0.1 + "@react-native/babel-preset": 0.77.0 + "@react-native/eslint-config": 0.77.0 + "@react-native/metro-config": 0.77.0 + "@react-native/typescript-config": 0.77.0 + "@types/jest": ^29.5.13 + "@types/react": ^18.2.6 + "@types/react-test-renderer": ^18.0.0 + eslint: ^8.19.0 + jest: ^29.6.3 + prettier: 2.8.8 + react: 18.3.1 + react-native: 0.77.0 + react-test-renderer: 18.3.1 + typescript: 5.0.4 languageName: unknown linkType: soft @@ -9799,13 +9763,27 @@ __metadata: version: 0.0.0-use.local resolution: "TestAppSentry@workspace:performance-tests/TestAppSentry" dependencies: - "@babel/core": ^7.12.9 - "@babel/runtime": ^7.12.5 - "@sentry/react-native": 6.6.0 - metro-react-native-babel-preset: ^0.72.3 - react: 18.1.0 - react-native: 0.70.15 - sentry-react-native-samples-utils: "workspace:^" + "@babel/core": ^7.25.2 + "@babel/preset-env": ^7.25.3 + "@babel/runtime": ^7.25.0 + "@react-native-community/cli": 15.0.1 + "@react-native-community/cli-platform-android": 15.0.1 + "@react-native-community/cli-platform-ios": 15.0.1 + "@react-native/babel-preset": 0.77.0 + "@react-native/eslint-config": 0.77.0 + "@react-native/metro-config": 0.77.0 + "@react-native/typescript-config": 0.77.0 + "@sentry/react-native": ^6.6.0 + "@types/jest": ^29.5.13 + "@types/react": ^18.2.6 + "@types/react-test-renderer": ^18.0.0 + eslint: ^8.19.0 + jest: ^29.6.3 + prettier: 2.8.8 + react: 18.3.1 + react-native: 0.77.0 + react-test-renderer: 18.3.1 + typescript: 5.0.4 languageName: unknown linkType: soft @@ -9832,13 +9810,6 @@ __metadata: languageName: node linkType: hard -"absolute-path@npm:^0.0.0": - version: 0.0.0 - resolution: "absolute-path@npm:0.0.0" - checksum: f707356265b46adb3a2f2c6505b0058f7786d3d2f6edc2aacfb8af6ba66d8d86166a281ed45081559579df2bb9977b2fe9df0925548a2f1b4d0d4d2b3eb062d2 - languageName: node - linkType: hard - "accepts@npm:^1.3.7, accepts@npm:^1.3.8, accepts@npm:~1.3.5, accepts@npm:~1.3.7, accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" @@ -10762,7 +10733,7 @@ __metadata: languageName: node linkType: hard -"async@npm:^3.2.2, async@npm:^3.2.3, async@npm:^3.2.4": +"async@npm:^3.2.3, async@npm:^3.2.4": version: 3.2.6 resolution: "async@npm:3.2.6" checksum: ee6eb8cd8a0ab1b58bd2a3ed6c415e93e773573a91d31df9d5ef559baafa9dab37d3b096fa7993e84585cac3697b2af6ddb9086f45d3ac8cae821bb2aab65682 @@ -11178,7 +11149,7 @@ __metadata: languageName: node linkType: hard -"base64-js@npm:^1.1.2, base64-js@npm:^1.2.3, base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": +"base64-js@npm:^1.2.3, base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": version: 1.5.1 resolution: "base64-js@npm:1.5.1" checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005 @@ -11626,7 +11597,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.0.0, camelcase@npm:^6.2.0": +"camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d @@ -12148,20 +12119,13 @@ __metadata: languageName: node linkType: hard -"commander@npm:^9.3.0, commander@npm:^9.4.0, commander@npm:^9.4.1, commander@npm:^9.5.0": +"commander@npm:^9.3.0, commander@npm:^9.4.1, commander@npm:^9.5.0": version: 9.5.0 resolution: "commander@npm:9.5.0" checksum: c7a3e27aa59e913b54a1bafd366b88650bc41d6651f0cbe258d4ff09d43d6a7394232a4dadd0bf518b3e696fdf595db1028a0d82c785b88bd61f8a440cecfade languageName: node linkType: hard -"commander@npm:~2.14.1": - version: 2.14.1 - resolution: "commander@npm:2.14.1" - checksum: 26bd49febeac8efabb7488fb5a4a2480b04bc4c4eef3c50da93eead72959f7a5232d003deda5b9761937205721274e80108f6d1d2b45ae7a8387cfb92031084e - languageName: node - linkType: hard - "comment-parser@npm:^0.7.6": version: 0.7.6 resolution: "comment-parser@npm:0.7.6" @@ -12968,13 +12932,6 @@ __metadata: languageName: node linkType: hard -"deepmerge@npm:^3.2.0": - version: 3.3.0 - resolution: "deepmerge@npm:3.3.0" - checksum: 4322195389e0170a0443c07b36add19b90249802c4b47b96265fdc5f5d8beddf491d5e50cbc5bfd65f85ccf76598173083863c202f5463b3b667aca8be75d5ac - languageName: node - linkType: hard - "deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.0, deepmerge@npm:^4.3.1": version: 4.3.1 resolution: "deepmerge@npm:4.3.1" @@ -13726,7 +13683,7 @@ __metadata: languageName: node linkType: hard -"envinfo@npm:7.13.0, envinfo@npm:^7.10.0, envinfo@npm:^7.7.2": +"envinfo@npm:7.13.0, envinfo@npm:^7.10.0": version: 7.13.0 resolution: "envinfo@npm:7.13.0" bin: @@ -13776,7 +13733,7 @@ __metadata: languageName: node linkType: hard -"errorhandler@npm:^1.5.0, errorhandler@npm:^1.5.1": +"errorhandler@npm:^1.5.1": version: 1.5.1 resolution: "errorhandler@npm:1.5.1" dependencies: @@ -15340,13 +15297,6 @@ __metadata: languageName: node linkType: hard -"flow-parser@npm:^0.121.0": - version: 0.121.0 - resolution: "flow-parser@npm:0.121.0" - checksum: 2d9a9724b903f4c2eae63f8e1442f97c8284516197bebd746cdbba938ff0a17f2dd7a2bc74ca9a987556af0f43d31a793b251ae30660d6b5e914f0c2e8501d2d - languageName: node - linkType: hard - "flow-parser@npm:^0.206.0": version: 0.206.0 resolution: "flow-parser@npm:0.206.0" @@ -15484,17 +15434,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^1.0.0": - version: 1.0.0 - resolution: "fs-extra@npm:1.0.0" - dependencies: - graceful-fs: ^4.1.2 - jsonfile: ^2.1.0 - klaw: ^1.0.0 - checksum: 9d3642621f42c810e9a32e6ecf97f6f827fdffb001316504d2102d87b4505b8bda1197d43e38e5b1db1faa240b022380b489a0e378b739e1cadef0df9aad4b5f - languageName: node - linkType: hard - "fs-extra@npm:^11.1.0, fs-extra@npm:^11.2.0": version: 11.2.0 resolution: "fs-extra@npm:11.2.0" @@ -15561,7 +15500,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:^2.1.2, fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": +"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -15571,7 +15510,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@^2.1.2#~builtin, fsevents@patch:fsevents@^2.3.2#~builtin, fsevents@patch:fsevents@npm%3A^2.3.2#~builtin, fsevents@patch:fsevents@~2.3.2#~builtin": +"fsevents@patch:fsevents@^2.3.2#~builtin, fsevents@patch:fsevents@npm%3A^2.3.2#~builtin, fsevents@patch:fsevents@~2.3.2#~builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -16091,7 +16030,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:4.2.11, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.3, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:4.2.11, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.3, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 @@ -16248,13 +16187,6 @@ __metadata: languageName: node linkType: hard -"hermes-estree@npm:0.8.0": - version: 0.8.0 - resolution: "hermes-estree@npm:0.8.0" - checksum: 3a169d1751d8bed000c665314205e4f033f9dd0506ac0f72528c31853f7ac3d0a13abd34c7cd69d8f5b57effd730d7da9fdadb0a3fb35303769a12f90dd0a61f - languageName: node - linkType: hard - "hermes-parser@npm:0.15.0": version: 0.15.0 resolution: "hermes-parser@npm:0.15.0" @@ -16300,15 +16232,6 @@ __metadata: languageName: node linkType: hard -"hermes-parser@npm:0.8.0": - version: 0.8.0 - resolution: "hermes-parser@npm:0.8.0" - dependencies: - hermes-estree: 0.8.0 - checksum: 0c992bdc6c98482aef0c8bc3b55c84769d80536aa6becf9c3e296caf19647ba4fa1c516e50e313dfe44dadce140c7dc9f9f5ceee36091cf9835bbcd101b1b974 - languageName: node - linkType: hard - "hermes-profile-transformer@npm:^0.0.6": version: 0.0.6 resolution: "hermes-profile-transformer@npm:0.0.6" @@ -16527,15 +16450,6 @@ __metadata: languageName: node linkType: hard -"image-size@npm:^0.6.0": - version: 0.6.3 - resolution: "image-size@npm:0.6.3" - bin: - image-size: bin/image-size.js - checksum: cfd01d7672d584a4dd09d29bcf593c4bec3c9bb63769a51f735bd10673a7ddce7445da79771ea70b582a114b35bb4c148366b027ee9d1071c1a051aead54c788 - languageName: node - linkType: hard - "image-size@npm:^1.0.2": version: 1.1.1 resolution: "image-size@npm:1.1.1" @@ -16795,13 +16709,6 @@ __metadata: languageName: node linkType: hard -"ip@npm:^1.1.5": - version: 1.1.9 - resolution: "ip@npm:1.1.9" - checksum: b6d91fd45a856e3bd6d4f601ea0619d90f3517638f6918ebd079f959a8a6308568d8db5ef4fdf037e0d9cfdcf264f46833dfeea81ca31309cf0a7eb4b1307b84 - languageName: node - linkType: hard - "ipaddr.js@npm:1.9.1, ipaddr.js@npm:^1.9.0": version: 1.9.1 resolution: "ipaddr.js@npm:1.9.1" @@ -17674,13 +17581,6 @@ __metadata: languageName: node linkType: hard -"jest-get-type@npm:^26.3.0": - version: 26.3.0 - resolution: "jest-get-type@npm:26.3.0" - checksum: 1cc6465ae4f5e880be22ba52fd270fa64c21994915f81b41f8f7553a7957dd8e077cc8d03035de9412e2d739f8bad6a032ebb5dab5805692a5fb9e20dd4ea666 - languageName: node - linkType: hard - "jest-get-type@npm:^29.0.0, jest-get-type@npm:^29.6.3": version: 29.6.3 resolution: "jest-get-type@npm:29.6.3" @@ -17773,13 +17673,6 @@ __metadata: languageName: node linkType: hard -"jest-regex-util@npm:^27.0.6": - version: 27.5.1 - resolution: "jest-regex-util@npm:27.5.1" - checksum: d45ca7a9543616a34f7f3079337439cf07566e677a096472baa2810e274b9808b76767c97b0a4029b8a5b82b9d256dee28ef9ad4138b2b9e5933f6fac106c418 - languageName: node - linkType: hard - "jest-regex-util@npm:^29.0.0, jest-regex-util@npm:^29.6.3": version: 29.6.3 resolution: "jest-regex-util@npm:29.6.3" @@ -17869,17 +17762,7 @@ __metadata: jest-util: "npm:^29.7.0" slash: "npm:^3.0.0" strip-bom: "npm:^4.0.0" - checksum: d19f113d013e80691e07047f68e1e3448ef024ff2c6b586ce4f90cd7d4c62a2cd1d460110491019719f3c59bfebe16f0e201ed005ef9f80e2cf798c374eed54e - languageName: node - linkType: hard - -"jest-serializer@npm:^27.0.6": - version: 27.5.1 - resolution: "jest-serializer@npm:27.5.1" - dependencies: - "@types/node": "*" - graceful-fs: ^4.2.9 - checksum: 803e03a552278610edc6753c0dd9fa5bb5cd3ca47414a7b2918106efb62b79fd5e9ae785d0a21f12a299fa599fea8acc1fa6dd41283328cee43962cf7df9bb44 + checksum: d19f113d013e80691e07047f68e1e3448ef024ff2c6b586ce4f90cd7d4c62a2cd1d460110491019719f3c59bfebe16f0e201ed005ef9f80e2cf798c374eed54e languageName: node linkType: hard @@ -17911,20 +17794,6 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^27.2.0": - version: 27.5.1 - resolution: "jest-util@npm:27.5.1" - dependencies: - "@jest/types": ^27.5.1 - "@types/node": "*" - chalk: ^4.0.0 - ci-info: ^3.2.0 - graceful-fs: ^4.2.9 - picomatch: ^2.2.3 - checksum: ac8d122f6daf7a035dcea156641fd3701aeba245417c40836a77e35b3341b9c02ddc5d904cfcd4ddbaa00ab854da76d3b911870cafdcdbaff90ea471de26c7d7 - languageName: node - linkType: hard - "jest-util@npm:^29.0.0, jest-util@npm:^29.7.0": version: 29.7.0 resolution: "jest-util@npm:29.7.0" @@ -17939,20 +17808,6 @@ __metadata: languageName: node linkType: hard -"jest-validate@npm:^26.5.2": - version: 26.6.2 - resolution: "jest-validate@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - camelcase: ^6.0.0 - chalk: ^4.0.0 - jest-get-type: ^26.3.0 - leven: ^3.1.0 - pretty-format: ^26.6.2 - checksum: bac11d6586d9b8885328a4a66eec45b692e45ac23034a5c09eb0ee32de324f2d3d52b073e0c34e9c222b3642b083d1152a736cf24c52109e4957537d731ca62b - languageName: node - linkType: hard - "jest-validate@npm:^29.6.3, jest-validate@npm:^29.7.0": version: 29.7.0 resolution: "jest-validate@npm:29.7.0" @@ -18011,17 +17866,6 @@ __metadata: languageName: node linkType: hard -"jest-worker@npm:^27.2.0": - version: 27.5.1 - resolution: "jest-worker@npm:27.5.1" - dependencies: - "@types/node": "*" - merge-stream: ^2.0.0 - supports-color: ^8.0.0 - checksum: 98cd68b696781caed61c983a3ee30bf880b5bd021c01d98f47b143d4362b85d0737f8523761e2713d45e18b4f9a2b98af1eaee77afade4111bb65c77d6f7c980 - languageName: node - linkType: hard - "jest-worker@npm:^29.6.3, jest-worker@npm:^29.7.0": version: 29.7.0 resolution: "jest-worker@npm:29.7.0" @@ -18148,13 +17992,6 @@ __metadata: languageName: node linkType: hard -"jsc-android@npm:^250230.2.1": - version: 250230.2.1 - resolution: "jsc-android@npm:250230.2.1" - checksum: 11b7c41a0a9192ea4697e61f72a65341afd143550159bbc951cfe8e08eaee4fb119a7f4b9241de15b7156a873f0faef677f6ee72c243ace013e537bfc819dd6d - languageName: node - linkType: hard - "jsc-android@npm:^250231.0.0": version: 250231.0.0 resolution: "jsc-android@npm:250231.0.0" @@ -18431,18 +18268,6 @@ __metadata: languageName: node linkType: hard -"jsonfile@npm:^2.1.0": - version: 2.4.0 - resolution: "jsonfile@npm:2.4.0" - dependencies: - graceful-fs: ^4.1.6 - dependenciesMeta: - graceful-fs: - optional: true - checksum: f5064aabbc9e35530dc471d8b203ae1f40dbe949ddde4391c6f6a6d310619a15f0efdae5587df594d1d70c555193aaeee9d2ed4aec9ffd5767bd5e4e62d49c3d - languageName: node - linkType: hard - "jsonfile@npm:^4.0.0": version: 4.0.0 resolution: "jsonfile@npm:4.0.0" @@ -18552,18 +18377,6 @@ __metadata: languageName: node linkType: hard -"klaw@npm:^1.0.0": - version: 1.3.1 - resolution: "klaw@npm:1.3.1" - dependencies: - graceful-fs: ^4.1.9 - dependenciesMeta: - graceful-fs: - optional: true - checksum: 8f69e4797c26e7c3f2426bfa85f38a3da3c2cb1b4c6bd850d2377aed440d41ce9d806f2885c2e2e224372c56af4b1d43b8a499adecf9a05e7373dc6b8b7c52e4 - languageName: node - linkType: hard - "kleur@npm:^3.0.3": version: 3.0.3 resolution: "kleur@npm:3.0.3" @@ -19426,18 +19239,6 @@ __metadata: languageName: node linkType: hard -"metro-babel-transformer@npm:0.72.4": - version: 0.72.4 - resolution: "metro-babel-transformer@npm:0.72.4" - dependencies: - "@babel/core": ^7.14.0 - hermes-parser: 0.8.0 - metro-source-map: 0.72.4 - nullthrows: ^1.1.1 - checksum: 15938419a7d689dd77db33db1848009051b3024dac770a72a22092ebac2fcd9ad7fe390f6cb393d0dac2010ee8cb90ffc93d2d16829d478357c5364f6581c893 - languageName: node - linkType: hard - "metro-babel-transformer@npm:0.80.10": version: 0.80.10 resolution: "metro-babel-transformer@npm:0.80.10" @@ -19462,13 +19263,6 @@ __metadata: languageName: node linkType: hard -"metro-cache-key@npm:0.72.4": - version: 0.72.4 - resolution: "metro-cache-key@npm:0.72.4" - checksum: 7d2abe03fe2ed737ca4fd5148f7b7e47698fc1d5f8ac553199529a5578cbc461c0f8f6417236fc6c472d89d2575dbdc16f5eea858c70da8cf17b9a50ba841f3e - languageName: node - linkType: hard - "metro-cache-key@npm:0.80.10": version: 0.80.10 resolution: "metro-cache-key@npm:0.80.10" @@ -19487,16 +19281,6 @@ __metadata: languageName: node linkType: hard -"metro-cache@npm:0.72.4": - version: 0.72.4 - resolution: "metro-cache@npm:0.72.4" - dependencies: - metro-core: 0.72.4 - rimraf: ^2.5.4 - checksum: bde59087e63f0ea9b670dbebcc00edadd7beaec9e1795ffbdf3e223b9ad53858154ccc1c25f9fa7202cd4592b615dae63d2e2982e2e13e66cfcfc573cfe6f68c - languageName: node - linkType: hard - "metro-cache@npm:0.80.10": version: 0.80.10 resolution: "metro-cache@npm:0.80.10" @@ -19519,20 +19303,6 @@ __metadata: languageName: node linkType: hard -"metro-config@npm:0.72.4": - version: 0.72.4 - resolution: "metro-config@npm:0.72.4" - dependencies: - cosmiconfig: ^5.0.5 - jest-validate: ^26.5.2 - metro: 0.72.4 - metro-cache: 0.72.4 - metro-core: 0.72.4 - metro-runtime: 0.72.4 - checksum: ed9f69b8fb781e3bd048b98ea5136d86117b54f7689b607911002937f792a93e7aed03e8eabdea1b2a6c595113e85f67ebec46888f38a526cc95d85c0e30a0b1 - languageName: node - linkType: hard - "metro-config@npm:0.80.10, metro-config@npm:^0.80.3": version: 0.80.10 resolution: "metro-config@npm:0.80.10" @@ -19565,16 +19335,6 @@ __metadata: languageName: node linkType: hard -"metro-core@npm:0.72.4": - version: 0.72.4 - resolution: "metro-core@npm:0.72.4" - dependencies: - lodash.throttle: ^4.1.1 - metro-resolver: 0.72.4 - checksum: ab8318a67fc51285f0ac147a2935b79dae446cad24233e54560a1a8f6df47e9b134ef6d62f7965fe30680740cb402b5ba9b2a6301ab9552390bf9680b65aa294 - languageName: node - linkType: hard - "metro-core@npm:0.80.10, metro-core@npm:^0.80.3": version: 0.80.10 resolution: "metro-core@npm:0.80.10" @@ -19597,30 +19357,6 @@ __metadata: languageName: node linkType: hard -"metro-file-map@npm:0.72.4": - version: 0.72.4 - resolution: "metro-file-map@npm:0.72.4" - dependencies: - abort-controller: ^3.0.0 - anymatch: ^3.0.3 - debug: ^2.2.0 - fb-watchman: ^2.0.0 - fsevents: ^2.1.2 - graceful-fs: ^4.2.4 - invariant: ^2.2.4 - jest-regex-util: ^27.0.6 - jest-serializer: ^27.0.6 - jest-util: ^27.2.0 - jest-worker: ^27.2.0 - micromatch: ^4.0.4 - walker: ^1.0.7 - dependenciesMeta: - fsevents: - optional: true - checksum: 6fce50129fa357cbd179f000128d2cd3b17de1af24aa0ba07b9fba3b9c9976b490749851c0c70db6ecbabb76a5da978dd99189cdd452b7acd6f8f1b286020677 - languageName: node - linkType: hard - "metro-file-map@npm:0.80.10": version: 0.80.10 resolution: "metro-file-map@npm:0.80.10" @@ -19667,27 +19403,6 @@ __metadata: languageName: node linkType: hard -"metro-hermes-compiler@npm:0.72.4": - version: 0.72.4 - resolution: "metro-hermes-compiler@npm:0.72.4" - checksum: 8510f8c768713b115aaff0501ca9d7fb6d4dcf76c12775c8e615c3b88e8f0e0ab9ba165bcf1cff9f40ea1ce8c8368a0e1c5a39a674feb0f864e461ba842dac43 - languageName: node - linkType: hard - -"metro-inspector-proxy@npm:0.72.4": - version: 0.72.4 - resolution: "metro-inspector-proxy@npm:0.72.4" - dependencies: - connect: ^3.6.5 - debug: ^2.2.0 - ws: ^7.5.1 - yargs: ^15.3.1 - bin: - metro-inspector-proxy: src/cli.js - checksum: 4ae878ff56c647ce32336e8dcdee7e7dc20f7e15d128c93d22873779c93c43767976c4fe02ab23dadf6f66f92ba700a88b35c352a1503d6f6b9eb869881f3b2f - languageName: node - linkType: hard - "metro-minify-terser@npm:0.80.10": version: 0.80.10 resolution: "metro-minify-terser@npm:0.80.10" @@ -19708,64 +19423,6 @@ __metadata: languageName: node linkType: hard -"metro-minify-uglify@npm:0.72.4": - version: 0.72.4 - resolution: "metro-minify-uglify@npm:0.72.4" - dependencies: - uglify-es: ^3.1.9 - checksum: d9a8e220d965b08bc2954c43b333bae3b0dcde162a61b649b7906c18169487c621b52591e0fa154877ebfc9f259a98673d34fbbbe64d084ca36b31361c11721a - languageName: node - linkType: hard - -"metro-react-native-babel-preset@npm:0.72.4, metro-react-native-babel-preset@npm:^0.72.3": - version: 0.72.4 - resolution: "metro-react-native-babel-preset@npm:0.72.4" - dependencies: - "@babel/core": ^7.14.0 - "@babel/plugin-proposal-async-generator-functions": ^7.0.0 - "@babel/plugin-proposal-class-properties": ^7.0.0 - "@babel/plugin-proposal-export-default-from": ^7.0.0 - "@babel/plugin-proposal-nullish-coalescing-operator": ^7.0.0 - "@babel/plugin-proposal-object-rest-spread": ^7.0.0 - "@babel/plugin-proposal-optional-catch-binding": ^7.0.0 - "@babel/plugin-proposal-optional-chaining": ^7.0.0 - "@babel/plugin-syntax-dynamic-import": ^7.0.0 - "@babel/plugin-syntax-export-default-from": ^7.0.0 - "@babel/plugin-syntax-flow": ^7.2.0 - "@babel/plugin-syntax-nullish-coalescing-operator": ^7.0.0 - "@babel/plugin-syntax-optional-chaining": ^7.0.0 - "@babel/plugin-transform-arrow-functions": ^7.0.0 - "@babel/plugin-transform-async-to-generator": ^7.0.0 - "@babel/plugin-transform-block-scoping": ^7.0.0 - "@babel/plugin-transform-classes": ^7.0.0 - "@babel/plugin-transform-computed-properties": ^7.0.0 - "@babel/plugin-transform-destructuring": ^7.0.0 - "@babel/plugin-transform-exponentiation-operator": ^7.0.0 - "@babel/plugin-transform-flow-strip-types": ^7.0.0 - "@babel/plugin-transform-function-name": ^7.0.0 - "@babel/plugin-transform-literals": ^7.0.0 - "@babel/plugin-transform-modules-commonjs": ^7.0.0 - "@babel/plugin-transform-named-capturing-groups-regex": ^7.0.0 - "@babel/plugin-transform-parameters": ^7.0.0 - "@babel/plugin-transform-react-display-name": ^7.0.0 - "@babel/plugin-transform-react-jsx": ^7.0.0 - "@babel/plugin-transform-react-jsx-self": ^7.0.0 - "@babel/plugin-transform-react-jsx-source": ^7.0.0 - "@babel/plugin-transform-runtime": ^7.0.0 - "@babel/plugin-transform-shorthand-properties": ^7.0.0 - "@babel/plugin-transform-spread": ^7.0.0 - "@babel/plugin-transform-sticky-regex": ^7.0.0 - "@babel/plugin-transform-template-literals": ^7.0.0 - "@babel/plugin-transform-typescript": ^7.5.0 - "@babel/plugin-transform-unicode-regex": ^7.0.0 - "@babel/template": ^7.0.0 - react-refresh: ^0.4.0 - peerDependencies: - "@babel/core": "*" - checksum: eb713f71cb0ed3e6fa7d7efae68f8681a2da8321754185206627b1ebe5d460d1c9fc723ca13e57b682801bf77b59b6e13162da3775e160a62f8e85ace62c3c38 - languageName: node - linkType: hard - "metro-react-native-babel-preset@npm:0.76.8": version: 0.76.8 resolution: "metro-react-native-babel-preset@npm:0.76.8" @@ -19815,32 +19472,6 @@ __metadata: languageName: node linkType: hard -"metro-react-native-babel-transformer@npm:0.72.4": - version: 0.72.4 - resolution: "metro-react-native-babel-transformer@npm:0.72.4" - dependencies: - "@babel/core": ^7.14.0 - babel-preset-fbjs: ^3.4.0 - hermes-parser: 0.8.0 - metro-babel-transformer: 0.72.4 - metro-react-native-babel-preset: 0.72.4 - metro-source-map: 0.72.4 - nullthrows: ^1.1.1 - peerDependencies: - "@babel/core": "*" - checksum: 235680d4e41d4e12550337580744668e77853cfdce16fcb0fb7f2816a27ef948f1f92cb7f89494f18298ea557bb5b2ba4c9f44e6577d74dec60f276e11d2c3e8 - languageName: node - linkType: hard - -"metro-resolver@npm:0.72.4": - version: 0.72.4 - resolution: "metro-resolver@npm:0.72.4" - dependencies: - absolute-path: ^0.0.0 - checksum: 74ca29ac03717c7054f2b30b2b9cd1599cd7cb0525b813d39492a159c0bed4c7e634a7dcd930b3276dcf82d63146358feeeb6248bf1687a76a8607d0b8e23306 - languageName: node - linkType: hard - "metro-resolver@npm:0.80.10": version: 0.80.10 resolution: "metro-resolver@npm:0.80.10" @@ -19859,16 +19490,6 @@ __metadata: languageName: node linkType: hard -"metro-runtime@npm:0.72.4": - version: 0.72.4 - resolution: "metro-runtime@npm:0.72.4" - dependencies: - "@babel/runtime": ^7.0.0 - react-refresh: ^0.4.0 - checksum: ec807aa14e11bddbc8d9a238c7786f679cb0ee602f29f99f7f89dabff496a64d96deaf0b632604e13d46a4651381b6d7dfdacdfa047034253320b8b48a9e49ed - languageName: node - linkType: hard - "metro-runtime@npm:0.80.10, metro-runtime@npm:^0.80.3": version: 0.80.10 resolution: "metro-runtime@npm:0.80.10" @@ -19889,22 +19510,6 @@ __metadata: languageName: node linkType: hard -"metro-source-map@npm:0.72.4": - version: 0.72.4 - resolution: "metro-source-map@npm:0.72.4" - dependencies: - "@babel/traverse": ^7.14.0 - "@babel/types": ^7.0.0 - invariant: ^2.2.4 - metro-symbolicate: 0.72.4 - nullthrows: ^1.1.1 - ob1: 0.72.4 - source-map: ^0.5.6 - vlq: ^1.0.0 - checksum: 5e4b6c6c0b821afea6c5803dfb9fb2abcd5e880f97861bc30bd45b2d8f015f6a1ba968fc2f5f370c990965d434e4deff7b437b8d2edef89345a4d406e61cceaf - languageName: node - linkType: hard - "metro-source-map@npm:0.80.10, metro-source-map@npm:^0.80.3": version: 0.80.10 resolution: "metro-source-map@npm:0.80.10" @@ -19940,22 +19545,6 @@ __metadata: languageName: node linkType: hard -"metro-symbolicate@npm:0.72.4": - version: 0.72.4 - resolution: "metro-symbolicate@npm:0.72.4" - dependencies: - invariant: ^2.2.4 - metro-source-map: 0.72.4 - nullthrows: ^1.1.1 - source-map: ^0.5.6 - through2: ^2.0.1 - vlq: ^1.0.0 - bin: - metro-symbolicate: src/index.js - checksum: 7fc4be1e426b25af78daceeace1cd8f34cc24035a7a91074183910a719ec20897923b38c2e67fceba5fb0c34cadad50f291d35def8fa630eccb5b658f6868637 - languageName: node - linkType: hard - "metro-symbolicate@npm:0.80.10": version: 0.80.10 resolution: "metro-symbolicate@npm:0.80.10" @@ -19990,19 +19579,6 @@ __metadata: languageName: node linkType: hard -"metro-transform-plugins@npm:0.72.4": - version: 0.72.4 - resolution: "metro-transform-plugins@npm:0.72.4" - dependencies: - "@babel/core": ^7.14.0 - "@babel/generator": ^7.14.0 - "@babel/template": ^7.0.0 - "@babel/traverse": ^7.14.0 - nullthrows: ^1.1.1 - checksum: 484831311f7b0619cbe7fa505f529aae8ffbd4cfa5e6e3929abec702351606d5ba98377862d71c20db4c2d7d0cdfacb3467502c66cd21811252f89ae28d585cf - languageName: node - linkType: hard - "metro-transform-plugins@npm:0.80.10": version: 0.80.10 resolution: "metro-transform-plugins@npm:0.80.10" @@ -20031,27 +19607,6 @@ __metadata: languageName: node linkType: hard -"metro-transform-worker@npm:0.72.4": - version: 0.72.4 - resolution: "metro-transform-worker@npm:0.72.4" - dependencies: - "@babel/core": ^7.14.0 - "@babel/generator": ^7.14.0 - "@babel/parser": ^7.14.0 - "@babel/types": ^7.0.0 - babel-preset-fbjs: ^3.4.0 - metro: 0.72.4 - metro-babel-transformer: 0.72.4 - metro-cache: 0.72.4 - metro-cache-key: 0.72.4 - metro-hermes-compiler: 0.72.4 - metro-source-map: 0.72.4 - metro-transform-plugins: 0.72.4 - nullthrows: ^1.1.1 - checksum: 022e3b9b68c61ca3ec08ef5ad0665850903c4c44f6bae885abe28b26bdc4f52a7120767569110b31c65cf3ddef11c3e99605d03c9d83210383b266ab67a866b5 - languageName: node - linkType: hard - "metro-transform-worker@npm:0.80.10": version: 0.80.10 resolution: "metro-transform-worker@npm:0.80.10" @@ -20094,67 +19649,6 @@ __metadata: languageName: node linkType: hard -"metro@npm:0.72.4": - version: 0.72.4 - resolution: "metro@npm:0.72.4" - dependencies: - "@babel/code-frame": ^7.0.0 - "@babel/core": ^7.14.0 - "@babel/generator": ^7.14.0 - "@babel/parser": ^7.14.0 - "@babel/template": ^7.0.0 - "@babel/traverse": ^7.14.0 - "@babel/types": ^7.0.0 - absolute-path: ^0.0.0 - accepts: ^1.3.7 - async: ^3.2.2 - chalk: ^4.0.0 - ci-info: ^2.0.0 - connect: ^3.6.5 - debug: ^2.2.0 - denodeify: ^1.2.1 - error-stack-parser: ^2.0.6 - fs-extra: ^1.0.0 - graceful-fs: ^4.2.4 - hermes-parser: 0.8.0 - image-size: ^0.6.0 - invariant: ^2.2.4 - jest-worker: ^27.2.0 - jsc-safe-url: ^0.2.2 - lodash.throttle: ^4.1.1 - metro-babel-transformer: 0.72.4 - metro-cache: 0.72.4 - metro-cache-key: 0.72.4 - metro-config: 0.72.4 - metro-core: 0.72.4 - metro-file-map: 0.72.4 - metro-hermes-compiler: 0.72.4 - metro-inspector-proxy: 0.72.4 - metro-minify-uglify: 0.72.4 - metro-react-native-babel-preset: 0.72.4 - metro-resolver: 0.72.4 - metro-runtime: 0.72.4 - metro-source-map: 0.72.4 - metro-symbolicate: 0.72.4 - metro-transform-plugins: 0.72.4 - metro-transform-worker: 0.72.4 - mime-types: ^2.1.27 - node-fetch: ^2.2.0 - nullthrows: ^1.1.1 - rimraf: ^2.5.4 - serialize-error: ^2.1.0 - source-map: ^0.5.6 - strip-ansi: ^6.0.0 - temp: 0.8.3 - throat: ^5.0.0 - ws: ^7.5.1 - yargs: ^15.3.1 - bin: - metro: src/cli.js - checksum: a92db36211c03da9f8a2bfa31fe401fd66ed1ccd8ce56a013a893abbe83c4313cc4cc1ab81495e9ec719ed2f4768ec74e3a1b6e327b627272a845640ca3894d7 - languageName: node - linkType: hard - "metro@npm:0.80.10, metro@npm:^0.80.3": version: 0.80.10 resolution: "metro@npm:0.80.10" @@ -21285,13 +20779,6 @@ __metadata: languageName: node linkType: hard -"ob1@npm:0.72.4": - version: 0.72.4 - resolution: "ob1@npm:0.72.4" - checksum: 81b360262cce0a922d8836b2d2a33e83fbc32517acf0226bd837b80471c4014ded4e16746c3e0397bd1f3c2af880d1bca886505ae445b045c5b0753b4c59638a - languageName: node - linkType: hard - "ob1@npm:0.80.10": version: 0.80.10 resolution: "ob1@npm:0.80.10" @@ -21563,7 +21050,7 @@ __metadata: languageName: node linkType: hard -"os-tmpdir@npm:^1.0.0, os-tmpdir@npm:~1.0.2": +"os-tmpdir@npm:~1.0.2": version: 1.0.2 resolution: "os-tmpdir@npm:1.0.2" checksum: 5666560f7b9f10182548bf7013883265be33620b1c1b4a4d405c25be2636f970c5488ff3e6c48de75b55d02bde037249fe5dbfbb4c0fb7714953d56aed062e6d @@ -22468,7 +21955,7 @@ __metadata: languageName: node linkType: hard -"prompts@npm:^2.0.1, prompts@npm:^2.2.1, prompts@npm:^2.3.2, prompts@npm:^2.4.0, prompts@npm:^2.4.2": +"prompts@npm:^2.0.1, prompts@npm:^2.2.1, prompts@npm:^2.3.2, prompts@npm:^2.4.2": version: 2.4.2 resolution: "prompts@npm:2.4.2" dependencies: @@ -22722,16 +22209,6 @@ __metadata: languageName: node linkType: hard -"react-devtools-core@npm:4.27.7": - version: 4.27.7 - resolution: "react-devtools-core@npm:4.27.7" - dependencies: - shell-quote: ^1.6.1 - ws: ^7 - checksum: 64e97e1f0c6b24dfbb8e3dae4d39438719a9bffc48ce7eb0c411342eb7fc3ac4e626ab316314d5c2a5c169b98d418049b7e774cae5d02b53afac208e13e2e3d9 - languageName: node - linkType: hard - "react-devtools-core@npm:^4.27.7": version: 4.28.5 resolution: "react-devtools-core@npm:4.28.5" @@ -22838,18 +22315,6 @@ __metadata: languageName: node linkType: hard -"react-native-codegen@npm:^0.70.7": - version: 0.70.7 - resolution: "react-native-codegen@npm:0.70.7" - dependencies: - "@babel/parser": ^7.14.0 - flow-parser: ^0.121.0 - jscodeshift: ^0.14.0 - nullthrows: ^1.1.1 - checksum: dfbf05ea6c5bcdff09ed2288919d8270bdb8ab78a7a973f2dbd970e63357bdf9fee05d95a2c9bee3795a609332e5ca37f667384ebe1cca61e4cb8f81e5aeabba - languageName: node - linkType: hard - "react-native-gesture-handler@npm:2.14.0": version: 2.14.0 resolution: "react-native-gesture-handler@npm:2.14.0" @@ -22895,13 +22360,6 @@ __metadata: languageName: node linkType: hard -"react-native-gradle-plugin@npm:^0.70.3": - version: 0.70.3 - resolution: "react-native-gradle-plugin@npm:0.70.3" - checksum: 04a3379842bcb4709ac6b37e093a3de59acd33b28b200885843b13908fac685a77ab81d732c34090c56e5c0eec971d578b227f302bd04fe7901e8792d434f41f - languageName: node - linkType: hard - "react-native-helmet-async@npm:2.0.4": version: 2.0.4 resolution: "react-native-helmet-async@npm:2.0.4" @@ -23210,50 +22668,6 @@ __metadata: languageName: node linkType: hard -"react-native@npm:0.70.15": - version: 0.70.15 - resolution: "react-native@npm:0.70.15" - dependencies: - "@jest/create-cache-key-function": ^27.0.1 - "@react-native-community/cli": 9.3.5 - "@react-native-community/cli-platform-android": 9.3.4 - "@react-native-community/cli-platform-ios": 9.3.0 - "@react-native/assets": 1.0.0 - "@react-native/normalize-color": 2.0.0 - "@react-native/polyfills": 2.0.0 - abort-controller: ^3.0.0 - anser: ^1.4.9 - base64-js: ^1.1.2 - event-target-shim: ^5.0.1 - invariant: ^2.2.4 - jsc-android: ^250230.2.1 - memoize-one: ^5.0.0 - metro-react-native-babel-transformer: 0.72.4 - metro-runtime: 0.72.4 - metro-source-map: 0.72.4 - mkdirp: ^0.5.1 - nullthrows: ^1.1.1 - pretty-format: ^26.5.2 - promise: ^8.3.0 - react-devtools-core: 4.27.7 - react-native-codegen: ^0.70.7 - react-native-gradle-plugin: ^0.70.3 - react-refresh: ^0.4.0 - react-shallow-renderer: ^16.15.0 - regenerator-runtime: ^0.13.2 - scheduler: ^0.22.0 - stacktrace-parser: ^0.1.3 - use-sync-external-store: ^1.0.0 - whatwg-fetch: ^3.0.0 - ws: ^6.1.4 - peerDependencies: - react: 18.1.0 - bin: - react-native: cli.js - checksum: 036106696c690f429de6d1dd0da0d19e91b9b7dfde6b02e57e208fc42d4e7fb202007ada8d1d1faeb2a3ce03ad5ea17bd95d1adc3c84b8bde8f8f16413253231 - languageName: node - linkType: hard - "react-native@npm:0.73.9": version: 0.73.9 resolution: "react-native@npm:0.73.9" @@ -23495,15 +22909,6 @@ __metadata: languageName: node linkType: hard -"react@npm:18.1.0": - version: 18.1.0 - resolution: "react@npm:18.1.0" - dependencies: - loose-envify: ^1.1.0 - checksum: 5bb296b561b43ef2220395da4faac86c14a087c8c80e1a7598a5740f01ee605c11eaf249985c1e2000971c4cd32ccb46d40f00479bbd9fb6b1c7cf857393b7d4 - languageName: node - linkType: hard - "react@npm:18.2.0": version: 18.2.0 resolution: "react@npm:18.2.0" @@ -24156,7 +23561,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^2.5.4, rimraf@npm:^2.6.3": +"rimraf@npm:^2.6.3": version: 2.7.1 resolution: "rimraf@npm:2.7.1" dependencies: @@ -24200,15 +23605,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:~2.2.6": - version: 2.2.8 - resolution: "rimraf@npm:2.2.8" - bin: - rimraf: ./bin.js - checksum: 01804e1c0430eeece3fd778e836e9682c011e126d42a4f560e930f8cdc2d99c7e586e63d18c5a65accbd51f9ac57706177550de0538c1dd45c335755605de166 - languageName: node - linkType: hard - "rimraf@npm:~2.4.0": version: 2.4.5 resolution: "rimraf@npm:2.4.5" @@ -24375,15 +23771,6 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.22.0": - version: 0.22.0 - resolution: "scheduler@npm:0.22.0" - dependencies: - loose-envify: ^1.1.0 - checksum: a8ef5cab769c020cd6382ad9ecc3f72dbde56a50a36639b3a42ad9c11f7724f03700bcad373044059b8067d4a6365154dc7c0ca8027ef20ff4900cf58a0fc2c5 - languageName: node - linkType: hard - "scheduler@npm:^0.23.0, scheduler@npm:^0.23.2": version: 0.23.2 resolution: "scheduler@npm:0.23.2" @@ -25362,7 +24749,7 @@ __metadata: languageName: node linkType: hard -"stacktrace-parser@npm:^0.1.10, stacktrace-parser@npm:^0.1.3": +"stacktrace-parser@npm:^0.1.10": version: 0.1.10 resolution: "stacktrace-parser@npm:0.1.10" dependencies: @@ -25993,16 +25380,6 @@ __metadata: languageName: node linkType: hard -"temp@npm:0.8.3": - version: 0.8.3 - resolution: "temp@npm:0.8.3" - dependencies: - os-tmpdir: ^1.0.0 - rimraf: ~2.2.6 - checksum: bfc6f1223dd568c21efb279433f40dbb4fe269da2ca2c622f6f50276751325ba9a2888628a342bc2c56764164ee6430229319604cf0a862d480151f8ae65ca5b - languageName: node - linkType: hard - "temp@npm:^0.8.4": version: 0.8.4 resolution: "temp@npm:0.8.4" @@ -26729,18 +26106,6 @@ __metadata: languageName: node linkType: hard -"uglify-es@npm:^3.1.9": - version: 3.3.10 - resolution: "uglify-es@npm:3.3.10" - dependencies: - commander: ~2.14.1 - source-map: ~0.6.1 - bin: - uglifyjs: bin/uglifyjs - checksum: 22b028b6454c4d684c76617e9ac5b8da0e56611b32cd5d89e797225d6f1022f697a5642d9084319436df3aed462225749f8287d37bf67dccda1ac9d0365dd950 - languageName: node - linkType: hard - "uglify-js@npm:^3.1.4, uglify-js@npm:^3.17.4": version: 3.19.2 resolution: "uglify-js@npm:3.19.2" @@ -27626,7 +26991,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^6.1.4, ws@npm:^6.2.2, ws@npm:^6.2.3": +"ws@npm:^6.2.2, ws@npm:^6.2.3": version: 6.2.3 resolution: "ws@npm:6.2.3" dependencies: @@ -27835,7 +27200,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^15.1.0, yargs@npm:^15.3.1": +"yargs@npm:^15.1.0": version: 15.4.1 resolution: "yargs@npm:15.4.1" dependencies: From 96cc841d38b590f54e6ea8c0b9a407878a27a2c0 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 7 Feb 2025 13:07:00 +0200 Subject: [PATCH 02/11] Update metro.config for monorepo --- .../TestAppSentry/metro.config.js | 25 +++++++++++-------- performance-tests/TestAppSentry/package.json | 3 ++- yarn.lock | 5 ++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/performance-tests/TestAppSentry/metro.config.js b/performance-tests/TestAppSentry/metro.config.js index f07541ee53..4488997aee 100644 --- a/performance-tests/TestAppSentry/metro.config.js +++ b/performance-tests/TestAppSentry/metro.config.js @@ -1,15 +1,20 @@ -const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); - -const { - withSentryConfig -} = require("@sentry/react-native/metro"); +const { withMonorepo } = require('sentry-react-native-samples-utils/metro'); /** - * Metro configuration - * https://reactnative.dev/docs/metro + * Metro configuration for React Native + * https://github.com/facebook/react-native * - * @type {import('@react-native/metro-config').MetroConfig} + * @format */ -const config = {}; +module.exports = withMonorepo({ + transformer: { + getTransformOptions: async () => ({ + transform: { + experimentalImportSupport: false, + inlineRequires: true, + }, + }), + }, + projectRoot: __dirname, +}); -module.exports = withSentryConfig(mergeConfig(getDefaultConfig(__dirname), config)); \ No newline at end of file diff --git a/performance-tests/TestAppSentry/package.json b/performance-tests/TestAppSentry/package.json index 8e69300087..0b3d01a4fd 100644 --- a/performance-tests/TestAppSentry/package.json +++ b/performance-tests/TestAppSentry/package.json @@ -10,7 +10,7 @@ "test": "jest" }, "dependencies": { - "@sentry/react-native": "^6.6.0", + "@sentry/react-native": "6.6.0", "react": "18.3.1", "react-native": "0.77.0" }, @@ -32,6 +32,7 @@ "jest": "^29.6.3", "prettier": "2.8.8", "react-test-renderer": "18.3.1", + "sentry-react-native-samples-utils": "workspace:^", "typescript": "5.0.4" }, "engines": { diff --git a/yarn.lock b/yarn.lock index e572031873..948ad1d6be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8064,7 +8064,7 @@ __metadata: languageName: node linkType: hard -"@sentry/react-native@6.6.0, @sentry/react-native@^6.6.0, @sentry/react-native@workspace:packages/core": +"@sentry/react-native@6.6.0, @sentry/react-native@workspace:packages/core": version: 0.0.0-use.local resolution: "@sentry/react-native@workspace:packages/core" dependencies: @@ -9773,7 +9773,7 @@ __metadata: "@react-native/eslint-config": 0.77.0 "@react-native/metro-config": 0.77.0 "@react-native/typescript-config": 0.77.0 - "@sentry/react-native": ^6.6.0 + "@sentry/react-native": 6.6.0 "@types/jest": ^29.5.13 "@types/react": ^18.2.6 "@types/react-test-renderer": ^18.0.0 @@ -9783,6 +9783,7 @@ __metadata: react: 18.3.1 react-native: 0.77.0 react-test-renderer: 18.3.1 + sentry-react-native-samples-utils: "workspace:^" typescript: 5.0.4 languageName: unknown linkType: soft From 4341263bffacaac774137a855f81427fd676ab28 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 7 Feb 2025 13:19:27 +0200 Subject: [PATCH 03/11] Lint fixes --- .../java/com/testappplain/MainActivity.kt | 22 ++++--- .../java/com/testappplain/MainApplication.kt | 57 ++++++++++--------- .../ios/TestAppPlain/AppDelegate.swift | 4 +- .../java/com/testappsentry/MainActivity.kt | 22 ++++--- .../java/com/testappsentry/MainApplication.kt | 57 ++++++++++--------- .../ios/TestAppSentry/AppDelegate.swift | 4 +- 6 files changed, 82 insertions(+), 84 deletions(-) diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainActivity.kt b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainActivity.kt index c1dc950148..e2333b50d0 100644 --- a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainActivity.kt +++ b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainActivity.kt @@ -6,17 +6,15 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnable import com.facebook.react.defaults.DefaultReactActivityDelegate class MainActivity : ReactActivity() { + /** + * Returns the name of the main component registered from JavaScript. This is used to schedule + * rendering of the component. + */ + override fun getMainComponentName(): String = "TestAppPlain" - /** - * Returns the name of the main component registered from JavaScript. This is used to schedule - * rendering of the component. - */ - override fun getMainComponentName(): String = "TestAppPlain" - - /** - * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] - * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] - */ - override fun createReactActivityDelegate(): ReactActivityDelegate = - DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) + /** + * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] + * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] + */ + override fun createReactActivityDelegate(): ReactActivityDelegate = DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) } diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.kt b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.kt index 35f0210889..2ea5f6468d 100644 --- a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.kt +++ b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.kt @@ -12,33 +12,34 @@ import com.facebook.react.defaults.DefaultReactNativeHost import com.facebook.react.soloader.OpenSourceMergedSoMapping import com.facebook.soloader.SoLoader -class MainApplication : Application(), ReactApplication { - - override val reactNativeHost: ReactNativeHost = - object : DefaultReactNativeHost(this) { - override fun getPackages(): List = - PackageList(this).packages.apply { - // Packages that cannot be autolinked yet can be added manually here, for example: - // add(MyReactNativePackage()) - } - - override fun getJSMainModuleName(): String = "index" - - override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG - - override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED - override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED - } - - override val reactHost: ReactHost - get() = getDefaultReactHost(applicationContext, reactNativeHost) - - override fun onCreate() { - super.onCreate() - SoLoader.init(this, OpenSourceMergedSoMapping) - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - load() +class MainApplication : + Application(), + ReactApplication { + override val reactNativeHost: ReactNativeHost = + object : DefaultReactNativeHost(this) { + override fun getPackages(): List = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + } + + override fun getJSMainModuleName(): String = "index" + + override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG + + override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED + override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED + } + + override val reactHost: ReactHost + get() = getDefaultReactHost(applicationContext, reactNativeHost) + + override fun onCreate() { + super.onCreate() + SoLoader.init(this, OpenSourceMergedSoMapping) + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + // If you opted-in for the New Architecture, we load the native entry point for this app. + load() + } } - } } diff --git a/performance-tests/TestAppPlain/ios/TestAppPlain/AppDelegate.swift b/performance-tests/TestAppPlain/ios/TestAppPlain/AppDelegate.swift index ac1946e900..3b36adc168 100644 --- a/performance-tests/TestAppPlain/ios/TestAppPlain/AppDelegate.swift +++ b/performance-tests/TestAppPlain/ios/TestAppPlain/AppDelegate.swift @@ -1,11 +1,11 @@ -import UIKit import React import React_RCTAppDelegate import ReactAppDependencyProvider +import UIKit @main class AppDelegate: RCTAppDelegate { - override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { + override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { self.moduleName = "TestAppPlain" self.dependencyProvider = RCTAppDependencyProvider() diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainActivity.kt b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainActivity.kt index 4c290ba51c..3bba8479f6 100644 --- a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainActivity.kt +++ b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainActivity.kt @@ -6,17 +6,15 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnable import com.facebook.react.defaults.DefaultReactActivityDelegate class MainActivity : ReactActivity() { + /** + * Returns the name of the main component registered from JavaScript. This is used to schedule + * rendering of the component. + */ + override fun getMainComponentName(): String = "TestAppSentry" - /** - * Returns the name of the main component registered from JavaScript. This is used to schedule - * rendering of the component. - */ - override fun getMainComponentName(): String = "TestAppSentry" - - /** - * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] - * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] - */ - override fun createReactActivityDelegate(): ReactActivityDelegate = - DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) + /** + * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] + * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] + */ + override fun createReactActivityDelegate(): ReactActivityDelegate = DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) } diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.kt b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.kt index 64f33a7ef0..24f040d0db 100644 --- a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.kt +++ b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.kt @@ -12,33 +12,34 @@ import com.facebook.react.defaults.DefaultReactNativeHost import com.facebook.react.soloader.OpenSourceMergedSoMapping import com.facebook.soloader.SoLoader -class MainApplication : Application(), ReactApplication { - - override val reactNativeHost: ReactNativeHost = - object : DefaultReactNativeHost(this) { - override fun getPackages(): List = - PackageList(this).packages.apply { - // Packages that cannot be autolinked yet can be added manually here, for example: - // add(MyReactNativePackage()) - } - - override fun getJSMainModuleName(): String = "index" - - override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG - - override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED - override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED - } - - override val reactHost: ReactHost - get() = getDefaultReactHost(applicationContext, reactNativeHost) - - override fun onCreate() { - super.onCreate() - SoLoader.init(this, OpenSourceMergedSoMapping) - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - load() +class MainApplication : + Application(), + ReactApplication { + override val reactNativeHost: ReactNativeHost = + object : DefaultReactNativeHost(this) { + override fun getPackages(): List = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + } + + override fun getJSMainModuleName(): String = "index" + + override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG + + override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED + override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED + } + + override val reactHost: ReactHost + get() = getDefaultReactHost(applicationContext, reactNativeHost) + + override fun onCreate() { + super.onCreate() + SoLoader.init(this, OpenSourceMergedSoMapping) + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + // If you opted-in for the New Architecture, we load the native entry point for this app. + load() + } } - } } diff --git a/performance-tests/TestAppSentry/ios/TestAppSentry/AppDelegate.swift b/performance-tests/TestAppSentry/ios/TestAppSentry/AppDelegate.swift index bd916942d1..78a0ff44c9 100644 --- a/performance-tests/TestAppSentry/ios/TestAppSentry/AppDelegate.swift +++ b/performance-tests/TestAppSentry/ios/TestAppSentry/AppDelegate.swift @@ -1,11 +1,11 @@ -import UIKit import React import React_RCTAppDelegate import ReactAppDependencyProvider +import UIKit @main class AppDelegate: RCTAppDelegate { - override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { + override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { self.moduleName = "TestAppSentry" self.dependencyProvider = RCTAppDependencyProvider() From ec6dafcc91c4734a89bb52197fcbe655ddf411db Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 7 Feb 2025 13:24:52 +0200 Subject: [PATCH 04/11] Adds tests --- .../TestAppPlain/__tests__/App.test.tsx | 13 +++++++++++++ .../TestAppSentry/__tests__/App.test.tsx | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 performance-tests/TestAppPlain/__tests__/App.test.tsx create mode 100644 performance-tests/TestAppSentry/__tests__/App.test.tsx diff --git a/performance-tests/TestAppPlain/__tests__/App.test.tsx b/performance-tests/TestAppPlain/__tests__/App.test.tsx new file mode 100644 index 0000000000..e532f701ee --- /dev/null +++ b/performance-tests/TestAppPlain/__tests__/App.test.tsx @@ -0,0 +1,13 @@ +/** + * @format + */ + +import React from 'react'; +import ReactTestRenderer from 'react-test-renderer'; +import App from '../App'; + +test('renders correctly', async () => { + await ReactTestRenderer.act(() => { + ReactTestRenderer.create(); + }); +}); diff --git a/performance-tests/TestAppSentry/__tests__/App.test.tsx b/performance-tests/TestAppSentry/__tests__/App.test.tsx new file mode 100644 index 0000000000..e532f701ee --- /dev/null +++ b/performance-tests/TestAppSentry/__tests__/App.test.tsx @@ -0,0 +1,13 @@ +/** + * @format + */ + +import React from 'react'; +import ReactTestRenderer from 'react-test-renderer'; +import App from '../App'; + +test('renders correctly', async () => { + await ReactTestRenderer.act(() => { + ReactTestRenderer.create(); + }); +}); From 94ab8eb9508534a14a4a922c7d54a14b495b092a Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 7 Feb 2025 13:39:36 +0200 Subject: [PATCH 05/11] Bump xcode version --- .github/workflows/e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 172bb5c833..a6d922997f 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -53,7 +53,7 @@ jobs: - uses: ./.github/actions/disk-cleanup if: ${{ matrix.platform == 'android' }} - - run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer + - run: sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer if: ${{ matrix.platform == 'ios' }} - run: corepack enable @@ -221,7 +221,7 @@ jobs: echo "SENTRY_RELEASE=$SENTRY_RELEASE" echo "SENTRY_DIST=$SENTRY_DIST" - - run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer + - run: sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer if: ${{ matrix.platform == 'ios' && matrix.rn-version == '0.65.3' }} - run: corepack enable From ef1f5f1d4fb47d6eeaf5bd583a7a1bb8ab4f13f0 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 7 Feb 2025 14:43:35 +0200 Subject: [PATCH 06/11] Update xcode projects --- .../TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj | 6 ++++-- .../ios/TestAppSentry.xcodeproj/project.pbxproj | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj b/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj index 785447c4c5..5206a216c2 100644 --- a/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj +++ b/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj @@ -260,6 +260,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 97JCY7859U; ENABLE_BITCODE = NO; INFOPLIST_FILE = TestAppPlain/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.1; @@ -273,7 +274,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.rn.perf-test-app-plain""; PRODUCT_NAME = TestAppPlain; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -288,6 +289,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = TestAppPlain/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( @@ -300,7 +302,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.rn.perf-test-app-plain""; PRODUCT_NAME = TestAppPlain; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; diff --git a/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj b/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj index 587f3b3f09..dfce2ea6bc 100644 --- a/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj +++ b/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj @@ -275,6 +275,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 97JCY7859U; ENABLE_BITCODE = NO; INFOPLIST_FILE = TestAppSentry/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.1; @@ -288,7 +289,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.rn.perf-test-app-sentry"; PRODUCT_NAME = TestAppSentry; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -303,6 +304,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = TestAppSentry/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( @@ -315,7 +317,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.rn.perf-test-app-sentry"; PRODUCT_NAME = TestAppSentry; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; From 8a9b3a08f8968702620b3a94b80d8863553b7ac0 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 7 Feb 2025 16:50:22 +0200 Subject: [PATCH 07/11] Removes generated tests --- .../TestAppPlain/__tests__/App.test.tsx | 13 ------------- performance-tests/TestAppPlain/package.json | 3 +-- .../TestAppSentry/__tests__/App.test.tsx | 13 ------------- performance-tests/TestAppSentry/metro.config.js | 3 +++ performance-tests/TestAppSentry/package.json | 3 +-- 5 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 performance-tests/TestAppPlain/__tests__/App.test.tsx delete mode 100644 performance-tests/TestAppSentry/__tests__/App.test.tsx diff --git a/performance-tests/TestAppPlain/__tests__/App.test.tsx b/performance-tests/TestAppPlain/__tests__/App.test.tsx deleted file mode 100644 index e532f701ee..0000000000 --- a/performance-tests/TestAppPlain/__tests__/App.test.tsx +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @format - */ - -import React from 'react'; -import ReactTestRenderer from 'react-test-renderer'; -import App from '../App'; - -test('renders correctly', async () => { - await ReactTestRenderer.act(() => { - ReactTestRenderer.create(); - }); -}); diff --git a/performance-tests/TestAppPlain/package.json b/performance-tests/TestAppPlain/package.json index d6e82239b1..e1c850dc77 100644 --- a/performance-tests/TestAppPlain/package.json +++ b/performance-tests/TestAppPlain/package.json @@ -6,8 +6,7 @@ "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", - "start": "react-native start", - "test": "jest" + "start": "react-native start" }, "dependencies": { "react": "18.3.1", diff --git a/performance-tests/TestAppSentry/__tests__/App.test.tsx b/performance-tests/TestAppSentry/__tests__/App.test.tsx deleted file mode 100644 index e532f701ee..0000000000 --- a/performance-tests/TestAppSentry/__tests__/App.test.tsx +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @format - */ - -import React from 'react'; -import ReactTestRenderer from 'react-test-renderer'; -import App from '../App'; - -test('renders correctly', async () => { - await ReactTestRenderer.act(() => { - ReactTestRenderer.create(); - }); -}); diff --git a/performance-tests/TestAppSentry/metro.config.js b/performance-tests/TestAppSentry/metro.config.js index 4488997aee..0379cf6d9b 100644 --- a/performance-tests/TestAppSentry/metro.config.js +++ b/performance-tests/TestAppSentry/metro.config.js @@ -15,6 +15,9 @@ module.exports = withMonorepo({ }, }), }, + resolver: { + assetExts: ['png', 'jpg', 'jpeg', 'gif', 'svg'], + }, projectRoot: __dirname, }); diff --git a/performance-tests/TestAppSentry/package.json b/performance-tests/TestAppSentry/package.json index 0b3d01a4fd..a1095e4dff 100644 --- a/performance-tests/TestAppSentry/package.json +++ b/performance-tests/TestAppSentry/package.json @@ -6,8 +6,7 @@ "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", - "start": "react-native start", - "test": "jest" + "start": "react-native start" }, "dependencies": { "@sentry/react-native": "6.6.0", From f48b9ead5db3a70b3a77313bfab046c1a4b44f7d Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 7 Feb 2025 16:56:11 +0200 Subject: [PATCH 08/11] Revert xcode change --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a6d922997f..0b9982290c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -221,7 +221,7 @@ jobs: echo "SENTRY_RELEASE=$SENTRY_RELEASE" echo "SENTRY_DIST=$SENTRY_DIST" - - run: sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer + - run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer if: ${{ matrix.platform == 'ios' && matrix.rn-version == '0.65.3' }} - run: corepack enable From bebc6829e7941b4faa65d61df2feab5db6cfe350 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 7 Feb 2025 17:18:02 +0200 Subject: [PATCH 09/11] Fix bundle identifier typo --- .../TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj b/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj index 5206a216c2..a2ff3114b5 100644 --- a/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj +++ b/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj @@ -274,7 +274,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.rn.perf-test-app-plain""; + PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.rn.perf-test-app-plain"; PRODUCT_NAME = TestAppPlain; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -302,7 +302,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.rn.perf-test-app-plain""; + PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.rn.perf-test-app-plain"; PRODUCT_NAME = TestAppPlain; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; From 2783e05758e9f63e01b84e3b64b626f261b0deaf Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 7 Feb 2025 17:55:23 +0200 Subject: [PATCH 10/11] Fix signing --- .../TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj | 2 ++ .../TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj | 3 +++ performance-tests/TestAppSentry/metro.config.js | 3 --- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj b/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj index a2ff3114b5..4cdffd84e4 100644 --- a/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj +++ b/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj @@ -419,6 +419,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -450,6 +451,7 @@ "-DFOLLY_CFG_NO_COROUTINES=1", "-DFOLLY_HAVE_CLOCK_GETTIME=1", ); + PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.rn.perf-test-app-plain"; OTHER_LDFLAGS = ( "$(inherited)", " ", diff --git a/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj b/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj index dfce2ea6bc..509ad2b6b4 100644 --- a/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj +++ b/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj @@ -354,6 +354,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -434,6 +435,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -465,6 +467,7 @@ "-DFOLLY_CFG_NO_COROUTINES=1", "-DFOLLY_HAVE_CLOCK_GETTIME=1", ); + PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.rn.perf-test-app-sentry"; OTHER_LDFLAGS = ( "$(inherited)", " ", diff --git a/performance-tests/TestAppSentry/metro.config.js b/performance-tests/TestAppSentry/metro.config.js index 0379cf6d9b..4488997aee 100644 --- a/performance-tests/TestAppSentry/metro.config.js +++ b/performance-tests/TestAppSentry/metro.config.js @@ -15,9 +15,6 @@ module.exports = withMonorepo({ }, }), }, - resolver: { - assetExts: ['png', 'jpg', 'jpeg', 'gif', 'svg'], - }, projectRoot: __dirname, }); From 04511a8ac20557f8d61ef5c4f68942c47bc21f6e Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 10 Feb 2025 15:46:42 +0200 Subject: [PATCH 11/11] Fix metro config for monorepo --- .../TestAppPlain.xcodeproj/project.pbxproj | 2 +- .../TestAppSentry.xcodeproj/project.pbxproj | 2 +- .../TestAppSentry/metro.config.js | 26 +++++++++---------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj b/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj index 4cdffd84e4..01ff929bc5 100644 --- a/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj +++ b/performance-tests/TestAppPlain/ios/TestAppPlain.xcodeproj/project.pbxproj @@ -451,11 +451,11 @@ "-DFOLLY_CFG_NO_COROUTINES=1", "-DFOLLY_HAVE_CLOCK_GETTIME=1", ); - PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.rn.perf-test-app-plain"; OTHER_LDFLAGS = ( "$(inherited)", " ", ); + PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.rn.perf-test-app-plain"; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; diff --git a/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj b/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj index 509ad2b6b4..7ad5b9941e 100644 --- a/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj +++ b/performance-tests/TestAppSentry/ios/TestAppSentry.xcodeproj/project.pbxproj @@ -467,11 +467,11 @@ "-DFOLLY_CFG_NO_COROUTINES=1", "-DFOLLY_HAVE_CLOCK_GETTIME=1", ); - PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.rn.perf-test-app-sentry"; OTHER_LDFLAGS = ( "$(inherited)", " ", ); + PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.rn.perf-test-app-sentry"; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; diff --git a/performance-tests/TestAppSentry/metro.config.js b/performance-tests/TestAppSentry/metro.config.js index 4488997aee..214984878c 100644 --- a/performance-tests/TestAppSentry/metro.config.js +++ b/performance-tests/TestAppSentry/metro.config.js @@ -1,20 +1,18 @@ +const { withSentryConfig } = require('@sentry/react-native/metro'); +const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); + const { withMonorepo } = require('sentry-react-native-samples-utils/metro'); /** - * Metro configuration for React Native - * https://github.com/facebook/react-native + * Metro configuration + * https://reactnative.dev/docs/metro * - * @format + * @type {import('metro-config').MetroConfig} */ -module.exports = withMonorepo({ - transformer: { - getTransformOptions: async () => ({ - transform: { - experimentalImportSupport: false, - inlineRequires: true, - }, - }), - }, - projectRoot: __dirname, -}); +const config = {}; + +const mergedConfig = mergeConfig(getDefaultConfig(__dirname), config); + +const sentryConfig = withSentryConfig(mergedConfig); +module.exports = withMonorepo(sentryConfig);