From ddc055269a330116a386e595d3952b88af6cd24a Mon Sep 17 00:00:00 2001 From: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:23:42 +0100 Subject: [PATCH 1/2] Publish/6.4.0 (#4344) * chore(changelog): Copy 6.4.0-beta.1 entry * release: 6.4.0 --------- Co-authored-by: getsentry-bot Co-authored-by: getsentry-bot Co-authored-by: LucasZF --- CHANGELOG.md | 23 +++++++++++++++++++ dev-packages/e2e-tests/package.json | 4 ++-- dev-packages/type-check/package.json | 2 +- lerna.json | 2 +- packages/core/package.json | 2 +- packages/core/src/js/version.ts | 2 +- performance-tests/TestAppPlain/package.json | 2 +- performance-tests/TestAppSentry/package.json | 4 ++-- samples/expo/app.json | 6 ++--- samples/expo/package.json | 4 ++-- samples/react-native-macos/package.json | 4 ++-- samples/react-native/android/app/build.gradle | 4 ++-- .../ios/sentryreactnativesample/Info.plist | 2 +- .../sentryreactnativesampleTests/Info.plist | 2 +- samples/react-native/package.json | 4 ++-- yarn.lock | 12 +++++----- 16 files changed, 51 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74ab39f333..94e8f03e90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,29 @@ - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7181) - [diff](https://github.com/getsentry/sentry-java/compare/7.18.0...7.18.1) +## 6.4.0 + +### Features + +- Add Replay Custom Masking for iOS, Android and Web ([#4224](https://github.com/getsentry/sentry-react-native/pull/4224), [#4265](https://github.com/getsentry/sentry-react-native/pull/4265), [#4272](https://github.com/getsentry/sentry-react-native/pull/4272), [#4314](https://github.com/getsentry/sentry-react-native/pull/4314)) + + ```jsx + import * as Sentry from '@sentry/react-native'; + + const Example = () => { + return ( + + + ${"All children of Sentry.Mask will be masked."} + + + ${"Only direct children of Sentry.Unmask will be unmasked."} + + + ); + }; + ``` + ## 6.4.0-beta.1 ### Features diff --git a/dev-packages/e2e-tests/package.json b/dev-packages/e2e-tests/package.json index 53e763e4b6..ab4319cea9 100644 --- a/dev-packages/e2e-tests/package.json +++ b/dev-packages/e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "sentry-react-native-e2e-tests", - "version": "6.4.0-beta.1", + "version": "6.4.0", "private": true, "description": "Sentry React Native End to End Tests Library", "main": "dist/index.js", @@ -13,7 +13,7 @@ "devDependencies": { "@babel/preset-env": "^7.25.3", "@babel/preset-typescript": "^7.18.6", - "@sentry/react-native": "6.4.0-beta.1", + "@sentry/react-native": "6.4.0", "@sentry/utils": "8.40.0", "@types/node": "^20.9.3", "@types/react": "^18.2.64", diff --git a/dev-packages/type-check/package.json b/dev-packages/type-check/package.json index 9106fa5707..d42951bd44 100644 --- a/dev-packages/type-check/package.json +++ b/dev-packages/type-check/package.json @@ -1,7 +1,7 @@ { "name": "sentry-react-native-type-check", "private": true, - "version": "6.4.0-beta.1", + "version": "6.4.0", "scripts": { "type-check": "./run-type-check.sh" } diff --git a/lerna.json b/lerna.json index 8df6ac2db7..2570bc2d60 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "6.4.0-beta.1", + "version": "6.4.0", "packages": [ "packages/*", "dev-packages/*", diff --git a/packages/core/package.json b/packages/core/package.json index 6403cc787e..dd88c414f8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -2,7 +2,7 @@ "name": "@sentry/react-native", "homepage": "https://github.com/getsentry/sentry-react-native", "repository": "https://github.com/getsentry/sentry-react-native", - "version": "6.4.0-beta.1", + "version": "6.4.0", "description": "Official Sentry SDK for react-native", "typings": "dist/js/index.d.ts", "types": "dist/js/index.d.ts", diff --git a/packages/core/src/js/version.ts b/packages/core/src/js/version.ts index e67dc5efc7..116de554fb 100644 --- a/packages/core/src/js/version.ts +++ b/packages/core/src/js/version.ts @@ -1,3 +1,3 @@ export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native'; export const SDK_NAME = 'sentry.javascript.react-native'; -export const SDK_VERSION = '6.4.0-beta.1'; +export const SDK_VERSION = '6.4.0'; diff --git a/performance-tests/TestAppPlain/package.json b/performance-tests/TestAppPlain/package.json index 0435d98a0b..4a92a49348 100644 --- a/performance-tests/TestAppPlain/package.json +++ b/performance-tests/TestAppPlain/package.json @@ -1,6 +1,6 @@ { "name": "TestAppPlain", - "version": "6.4.0-beta.1", + "version": "6.4.0", "private": true, "scripts": { "android": "react-native run-android", diff --git a/performance-tests/TestAppSentry/package.json b/performance-tests/TestAppSentry/package.json index 115b308673..8062005765 100644 --- a/performance-tests/TestAppSentry/package.json +++ b/performance-tests/TestAppSentry/package.json @@ -1,6 +1,6 @@ { "name": "TestAppSentry", - "version": "6.4.0-beta.1", + "version": "6.4.0", "private": true, "scripts": { "android": "react-native run-android", @@ -8,7 +8,7 @@ "start": "react-native start" }, "dependencies": { - "@sentry/react-native": "6.4.0-beta.1", + "@sentry/react-native": "6.4.0", "react": "18.1.0", "react-native": "0.70.6" }, diff --git a/samples/expo/app.json b/samples/expo/app.json index d1d6870567..e90dfc9204 100644 --- a/samples/expo/app.json +++ b/samples/expo/app.json @@ -4,7 +4,7 @@ "slug": "sentry-react-native-expo-sample", "jsEngine": "hermes", "scheme": "sentry-expo-sample", - "version": "6.4.0-beta.1", + "version": "6.4.0", "orientation": "portrait", "icon": "./assets/icon.png", "userInterfaceStyle": "light", @@ -19,7 +19,7 @@ "ios": { "supportsTablet": true, "bundleIdentifier": "io.sentry.expo.sample", - "buildNumber": "33" + "buildNumber": "34" }, "android": { "adaptiveIcon": { @@ -27,7 +27,7 @@ "backgroundColor": "#ffffff" }, "package": "io.sentry.expo.sample", - "versionCode": 33 + "versionCode": 34 }, "web": { "bundler": "metro", diff --git a/samples/expo/package.json b/samples/expo/package.json index a25ec3bf3a..2a0f9eca92 100644 --- a/samples/expo/package.json +++ b/samples/expo/package.json @@ -1,6 +1,6 @@ { "name": "sentry-react-native-expo-sample", - "version": "6.4.0-beta.1", + "version": "6.4.0", "main": "expo-router/entry", "scripts": { "start": "expo start", @@ -16,7 +16,7 @@ "set-version": "npx react-native-version --skip-tag --never-amend" }, "dependencies": { - "@sentry/react-native": "6.4.0-beta.1", + "@sentry/react-native": "6.4.0", "@types/react": "~18.3.12", "expo": "^52.0.0", "expo-constants": "~17.0.3", diff --git a/samples/react-native-macos/package.json b/samples/react-native-macos/package.json index 0c21ef7ce7..f840cfc382 100644 --- a/samples/react-native-macos/package.json +++ b/samples/react-native-macos/package.json @@ -1,6 +1,6 @@ { "name": "sentry-react-native-macos-sample", - "version": "6.4.0-beta.1", + "version": "6.4.0", "private": true, "scripts": { "start": "react-native start --experimental-debugger", @@ -17,7 +17,7 @@ "@react-navigation/native": "^6.1.9", "@react-navigation/stack": "^6.3.20", "@sentry/react": "8.40.0", - "@sentry/react-native": "6.4.0-beta.1", + "@sentry/react-native": "6.4.0", "@sentry/types": "8.40.0", "@sentry/utils": "8.40.0", "delay": "^6.0.0", diff --git a/samples/react-native/android/app/build.gradle b/samples/react-native/android/app/build.gradle index ced667a4e5..320cda26f0 100644 --- a/samples/react-native/android/app/build.gradle +++ b/samples/react-native/android/app/build.gradle @@ -136,8 +136,8 @@ android { applicationId "io.sentry.reactnative.sample" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 35 - versionName "6.4.0-beta.1" + versionCode 36 + versionName "6.4.0" } signingConfigs { diff --git a/samples/react-native/ios/sentryreactnativesample/Info.plist b/samples/react-native/ios/sentryreactnativesample/Info.plist index e27b1fea42..5ad873ca8e 100644 --- a/samples/react-native/ios/sentryreactnativesample/Info.plist +++ b/samples/react-native/ios/sentryreactnativesample/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 40 + 41 LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/samples/react-native/ios/sentryreactnativesampleTests/Info.plist b/samples/react-native/ios/sentryreactnativesampleTests/Info.plist index 2ded0b77c6..028b4ca8da 100644 --- a/samples/react-native/ios/sentryreactnativesampleTests/Info.plist +++ b/samples/react-native/ios/sentryreactnativesampleTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 40 + 41 diff --git a/samples/react-native/package.json b/samples/react-native/package.json index 4788f733ca..4c0069d099 100644 --- a/samples/react-native/package.json +++ b/samples/react-native/package.json @@ -1,6 +1,6 @@ { "name": "sentry-react-native-sample", - "version": "6.4.0-beta.1", + "version": "6.4.0", "private": true, "scripts": { "postinstall": "patch-package", @@ -25,7 +25,7 @@ "@react-navigation/native": "^7.0.3", "@react-navigation/native-stack": "^7.0.3", "@react-navigation/stack": "^7.0.3", - "@sentry/react-native": "6.4.0-beta.1", + "@sentry/react-native": "6.4.0", "delay": "^6.0.0", "react": "18.3.1", "react-native": "0.76.3", diff --git a/yarn.lock b/yarn.lock index 30025ea02e..2a809dbccd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7818,7 +7818,7 @@ __metadata: languageName: node linkType: hard -"@sentry/react-native@6.4.0-beta.1, @sentry/react-native@workspace:packages/core": +"@sentry/react-native@6.4.0, @sentry/react-native@workspace:packages/core": version: 0.0.0-use.local resolution: "@sentry/react-native@workspace:packages/core" dependencies: @@ -9493,7 +9493,7 @@ __metadata: dependencies: "@babel/core": ^7.12.9 "@babel/runtime": ^7.12.5 - "@sentry/react-native": 6.4.0-beta.1 + "@sentry/react-native": 6.4.0 metro-react-native-babel-preset: ^0.72.3 react: 18.1.0 react-native: 0.70.6 @@ -24294,7 +24294,7 @@ __metadata: dependencies: "@babel/preset-env": ^7.25.3 "@babel/preset-typescript": ^7.18.6 - "@sentry/react-native": 6.4.0-beta.1 + "@sentry/react-native": 6.4.0 "@sentry/utils": 8.40.0 "@types/node": ^20.9.3 "@types/react": ^18.2.64 @@ -24324,7 +24324,7 @@ __metadata: "@babel/core": ^7.26.0 "@babel/preset-env": ^7.26.0 "@sentry/babel-plugin-component-annotate": ^2.18.0 - "@sentry/react-native": 6.4.0-beta.1 + "@sentry/react-native": 6.4.0 "@types/node": 20.10.4 "@types/react": ~18.3.12 expo: ^52.0.0 @@ -24359,7 +24359,7 @@ __metadata: "@react-navigation/native": ^6.1.9 "@react-navigation/stack": ^6.3.20 "@sentry/react": 8.40.0 - "@sentry/react-native": 6.4.0-beta.1 + "@sentry/react-native": 6.4.0 "@sentry/types": 8.40.0 "@sentry/utils": 8.40.0 "@types/react": ^18.2.65 @@ -24406,7 +24406,7 @@ __metadata: "@react-navigation/native-stack": ^7.0.3 "@react-navigation/stack": ^7.0.3 "@sentry/babel-plugin-component-annotate": ^2.18.0 - "@sentry/react-native": 6.4.0-beta.1 + "@sentry/react-native": 6.4.0 "@types/react": ^18.2.65 "@types/react-native-vector-icons": ^6.4.18 "@types/react-test-renderer": ^18.0.0 From 9385d74e04969875ca82c1aa773c11128c1024fe Mon Sep 17 00:00:00 2001 From: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com> Date: Wed, 11 Dec 2024 09:23:19 +0100 Subject: [PATCH 2/2] fix(ios): Disable HTTP Client errors in sentry-cocoa to avoid duplicates (#4347) --- CHANGELOG.md | 1 + .../RNSentryCocoaTesterTests/RNSentryTests.mm | 16 ++++++++++++++++ packages/core/ios/RNSentry.mm | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94e8f03e90..7bf0372f0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ - Return `lastEventId` export from `@sentry/core` ([#4315](https://github.com/getsentry/sentry-react-native/pull/4315)) - Don't log file not found errors when loading envs in `sentry-expo-upload-sourcemaps` ([#4332](https://github.com/getsentry/sentry-react-native/pull/4332)) - Navigation Span should have no parent by default ([#4326](https://github.com/getsentry/sentry-react-native/pull/4326)) +- Disable HTTP Client Errors on iOS ([#4347](https://github.com/getsentry/sentry-react-native/pull/4347)) ### Dependencies diff --git a/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm b/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm index df720ee1af..6e63793b85 100644 --- a/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm +++ b/packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.mm @@ -38,6 +38,22 @@ - (void)testCreateOptionsWithDictionaryRemovesPerformanceProperties XCTAssertEqual(actualOptions.enableTracing, false, @"EnableTracing should not be passed to native"); } +- (void)testCaptureFailedRequestsIsDisabled +{ + RNSentry *rnSentry = [[RNSentry alloc] init]; + NSError *error = nil; + + NSDictionary *_Nonnull mockedReactNativeDictionary = @{ + @"dsn" : @"https://abcd@efgh.ingest.sentry.io/123456", + }; + SentryOptions *actualOptions = [rnSentry createOptionsWithDictionary:mockedReactNativeDictionary + error:&error]; + + XCTAssertNotNil(actualOptions, @"Did not create sentry options"); + XCTAssertNil(error, @"Should not pass no error"); + XCTAssertFalse(actualOptions.enableCaptureFailedRequests); +} + - (void)testCreateOptionsWithDictionaryNativeCrashHandlingDefault { RNSentry *rnSentry = [[RNSentry alloc] init]; diff --git a/packages/core/ios/RNSentry.mm b/packages/core/ios/RNSentry.mm index ab22df9ec8..fc4091d220 100644 --- a/packages/core/ios/RNSentry.mm +++ b/packages/core/ios/RNSentry.mm @@ -215,7 +215,7 @@ - (SentryOptions *_Nullable)createOptionsWithDictionary:(NSDictionary *_Nonnull) } // Failed requests can only be enabled in one SDK to avoid duplicates - sentryOptions.enableCaptureFailedRequests = @NO; + sentryOptions.enableCaptureFailedRequests = NO; return sentryOptions; }