Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 6.3.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Nov 25, 2024
2 parents 624d26f + db44eaf commit ce9976c
Show file tree
Hide file tree
Showing 21 changed files with 935 additions and 224 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # [email protected].4
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # [email protected].5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -55,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # [email protected].4
uses: github/codeql-action/autobuild@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # [email protected].5

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
Expand All @@ -66,4 +66,4 @@ jobs:
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # [email protected].4
uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # [email protected].5
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

### Dependencies

- Bump JavaScript SDK from v8.38.0 to v8.39.0 ([#4293](https://github.com/getsentry/sentry-react-native/pull/4293))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8390)
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.38.0...8.39.0)
- Bump JavaScript SDK from v8.38.0 to v8.40.0 ([#4293](https://github.com/getsentry/sentry-react-native/pull/4293), [#4304](https://github.com/getsentry/sentry-react-native/pull/4304))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8400)
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.38.0...8.40.0)

## 6.3.0-beta.2

Expand Down
2 changes: 1 addition & 1 deletion dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@sentry/react-native": "6.3.0-beta.2",
"@sentry/utils": "8.39.0",
"@sentry/utils": "8.40.0",
"@types/node": "^20.9.3",
"@types/react": "^18.2.64",
"appium": "2.4.1",
Expand Down
16 changes: 8 additions & 8 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@
},
"dependencies": {
"@sentry/babel-plugin-component-annotate": "2.20.1",
"@sentry/browser": "8.39.0",
"@sentry/browser": "8.40.0",
"@sentry/cli": "2.38.2",
"@sentry/core": "8.39.0",
"@sentry/react": "8.39.0",
"@sentry/types": "8.39.0",
"@sentry/utils": "8.39.0"
"@sentry/core": "8.40.0",
"@sentry/react": "8.40.0",
"@sentry/types": "8.40.0",
"@sentry/utils": "8.40.0"
},
"devDependencies": {
"@babel/core": "^7.23.5",
"@expo/metro-config": "0.17.5",
"@mswjs/interceptors": "^0.25.15",
"@react-native/babel-preset": "0.75.4",
"@sentry-internal/eslint-config-sdk": "8.39.0",
"@sentry-internal/eslint-plugin-sdk": "8.39.0",
"@sentry-internal/typescript": "8.39.0",
"@sentry-internal/eslint-config-sdk": "8.40.0",
"@sentry-internal/eslint-plugin-sdk": "8.40.0",
"@sentry-internal/typescript": "8.40.0",
"@sentry/wizard": "3.34.4",
"@testing-library/react-native": "^12.7.2",
"@types/jest": "^29.5.3",
Expand Down
9 changes: 9 additions & 0 deletions packages/core/test/tracing/integrations/appStart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import { NATIVE } from '../../../src/js/wrapper';
import { getDefaultTestClientOptions, TestClient } from '../../mocks/client';
import { mockFunction } from '../../testutils';

let dateNowSpy: jest.SpyInstance;

jest.mock('../../../src/js/wrapper', () => {
return {
NATIVE: {
Expand Down Expand Up @@ -1057,6 +1059,9 @@ function mockTooOldAppStart() {
function mockReactNativeBundleExecutionStartTimestamp() {
RN_GLOBAL_OBJ.nativePerformanceNow = () => 100; // monotonic clock like `performance.now()`
RN_GLOBAL_OBJ.__BUNDLE_START_TIME__ = 50; // 50ms after time origin

const currentTimeMilliseconds = Date.now();
dateNowSpy = jest.spyOn(Date, 'now').mockImplementation(() => currentTimeMilliseconds);
}

/**
Expand All @@ -1065,6 +1070,10 @@ function mockReactNativeBundleExecutionStartTimestamp() {
function clearReactNativeBundleExecutionStartTimestamp() {
delete RN_GLOBAL_OBJ.nativePerformanceNow;
delete RN_GLOBAL_OBJ.__BUNDLE_START_TIME__;

if (dateNowSpy) {
dateNowSpy.mockRestore();
}
}

function set__DEV__(value: boolean) {
Expand Down
2 changes: 2 additions & 0 deletions samples/expo/app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Button, StyleSheet } from 'react-native';
import Constants from 'expo-constants';
import * as Sentry from '@sentry/react-native';
import { reloadAppAsync } from 'expo';

import { Text, View } from '@/components/Themed';
import { setScopeProperties } from '@/utils/setScopeProperties';
Expand Down Expand Up @@ -82,6 +83,7 @@ export default function TabOneScreen() {
console.log('Sentry.close() completed.');
}}
/>
<Button title="Reload" onPress={() => reloadAppAsync()} />
</View>
);
}
Expand Down
6 changes: 3 additions & 3 deletions samples/react-native-macos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"@react-navigation/bottom-tabs": "^6.5.12",
"@react-navigation/native": "^6.1.9",
"@react-navigation/stack": "^6.3.20",
"@sentry/react": "8.39.0",
"@sentry/react": "8.40.0",
"@sentry/react-native": "6.3.0-beta.2",
"@sentry/types": "8.39.0",
"@sentry/utils": "8.39.0",
"@sentry/types": "8.40.0",
"@sentry/utils": "8.40.0",
"delay": "^6.0.0",
"react": "18.2.0",
"react-native": "0.73.9",
Expand Down
1 change: 1 addition & 0 deletions samples/react-native/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ruby "3.3.0"
gem 'cocoapods', '1.15.2'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'fastlane', '2.220.0'
gem 'xcodeproj', '< 1.26.0'
2 changes: 1 addition & 1 deletion samples/react-native/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ GEM
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-darwin)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
Expand Down Expand Up @@ -280,6 +279,7 @@ DEPENDENCIES
activesupport (>= 6.1.7.5, < 7.1.0)
cocoapods (= 1.15.2)
fastlane (= 2.220.0)
xcodeproj (< 1.26.0)

RUBY VERSION
ruby 3.3.0p0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ 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
import io.sentry.Hint
import io.sentry.SentryEvent
Expand Down Expand Up @@ -40,7 +41,7 @@ class MainApplication() : Application(), ReactApplication {
// When the native init is enabled the `autoInitializeNativeSdk`
// in JS has to be set to `false`
// this.initializeSentry()
SoLoader.init(this, false)
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()
Expand Down
8 changes: 5 additions & 3 deletions samples/react-native/android/app/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ project(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)

# App needs to add and link against tm (TurboModules) folder
add_subdirectory(${REACT_ANDROID_DIR}/../../../tm/ tm_build)
target_link_libraries(${CMAKE_PROJECT_NAME} tm)
# Define where the additional source code lives. We need to crawl back the jni, main, src, app, android folders
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ../../../../../tm/NativeSampleModule.cpp)

# Define where CMake can find the additional header files. We need to crawl back the jni, main, src, app, android folders
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ../../../../../tm)
4 changes: 4 additions & 0 deletions samples/react-native/android/app/src/main/jni/OnLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include <DefaultComponentsRegistry.h>
#include <DefaultTurboModuleManagerDelegate.h>
#include <NativeSampleModule.h>
#include <autolinking.h>
#include <fbjni/fbjni.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
Expand Down Expand Up @@ -71,6 +72,9 @@ cxxModuleProvider(const std::string &name, const std::shared_ptr<CallInvoker> &j
// if (name == NativeCxxModuleExample::kModuleName) {
// return std::make_shared<NativeCxxModuleExample>(jsInvoker);
// }
if (name == NativeSampleModule::kModuleName) {
return std::make_shared<NativeSampleModule>(jsInvoker);
}

// And we fallback to the CXX module providers autolinked
return autolinking_cxxModuleProvider(name, jsInvoker);
Expand Down
6 changes: 3 additions & 3 deletions samples/react-native/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 34
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.24"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion samples/react-native/android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
"$(inherited)",
);
INFOPLIST_FILE = sentryreactnativesampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -475,7 +475,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
INFOPLIST_FILE = sentryreactnativesampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -507,6 +507,7 @@
ENABLE_BITCODE = NO;
INFOPLIST_FILE = sentryreactnativesample/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Sentry RN";
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -541,6 +542,7 @@
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 97JCY7859U;
INFOPLIST_FILE = sentryreactnativesample/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Sentry RN";
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -622,7 +624,7 @@
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
);
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD = "";
LDPLUSPLUS = "";
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -711,7 +713,7 @@
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
);
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD = "";
LDPLUSPLUS = "";
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import "AppDelegate.h"

#import <RCTAppDelegate+Protected.h>
#import <React/CoreModulesPlugins.h>
#import <React/RCTBundleURLProvider.h>
#import <ReactCommon/RCTTurboModuleManager.h>
Expand Down
41 changes: 22 additions & 19 deletions samples/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"postinstall": "patch-package",
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start --experimental-debugger",
"start": "react-native start",
"test": "jest",
"lint": "npx eslint . --ext .js,.jsx,.ts,.tsx",
"fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
Expand All @@ -21,32 +21,35 @@
"build-android-release-splits-flavors": "export SENTRY_SAMPLE_ENABLE_ABI_SPLIT=true; export SENTRY_SAMPLE_ENABLE_FLAVORS=true; cd android; ./gradlew assembleRelease; cd .."
},
"dependencies": {
"@react-navigation/bottom-tabs": "^6.5.12",
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.17",
"@react-navigation/stack": "^6.3.20",
"@react-navigation/bottom-tabs": "^7.0.4",
"@react-navigation/native": "^7.0.3",
"@react-navigation/native-stack": "^7.0.3",
"@react-navigation/stack": "^7.0.3",
"@sentry/react-native": "6.3.0-beta.2",
"delay": "^6.0.0",
"react": "18.3.1",
"react-native": "0.75.4",
"react-native-gesture-handler": "^2.18.1",
"react-native-reanimated": "3.15.0",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.35.0",
"react-native-svg": "^15.6.0",
"react-native-vector-icons": "^10.0.3",
"react-native": "0.76.3",
"react-native-gesture-handler": "^2.21.1",
"react-native-reanimated": "3.16.1",
"react-native-safe-area-context": "4.14.0",
"react-native-screens": "4.1.0",
"react-native-svg": "^15.9.0",
"react-native-vector-icons": "^10.2.0",
"react-native-webview": "^13.12.3",
"react-redux": "^8.1.3",
"redux": "^4.2.1"
},
"devDependencies": {
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@react-native/babel-preset": "0.75.4",
"@react-native/eslint-config": "0.75.4",
"@react-native/metro-config": "0.75.4",
"@react-native/typescript-config": "0.75.4",
"@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.76.3",
"@react-native/eslint-config": "0.76.3",
"@react-native/metro-config": "0.76.3",
"@react-native/typescript-config": "0.76.3",
"@sentry/babel-plugin-component-annotate": "^2.18.0",
"@types/react": "^18.2.65",
"@types/react-native-vector-icons": "^6.4.18",
Expand Down
4 changes: 4 additions & 0 deletions samples/react-native/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ import HeavyNavigationScreen from './Screens/HeavyNavigationScreen';
import WebviewScreen from './Screens/WebviewScreen';
import { isTurboModuleEnabled } from '@sentry/react-native/dist/js/utils/environment';

if (typeof setImmediate === 'undefined') {
require('setimmediate');
}

LogBox.ignoreAllLogs();
const isMobileOs = Platform.OS === 'android' || Platform.OS === 'ios';

Expand Down
3 changes: 1 addition & 2 deletions samples/react-native/tm/NativePlatformSampleModule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { TurboModule } from 'react-native';
import { TurboModuleRegistry } from 'react-native';
import {TurboModule, TurboModuleRegistry} from 'react-native';

export interface Spec extends TurboModule {
crashOrString(): string;
Expand Down
Loading

0 comments on commit ce9976c

Please sign in to comment.