@sentry/react-native 7.0.0-beta.1 → 7.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/RNSentry.podspec +1 -1
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +65 -0
  4. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  5. package/android/src/newarch/java/io/sentry/react/replay/RNSentryReplayUnmaskManager.java +2 -2
  6. package/dist/js/index.d.ts +2 -2
  7. package/dist/js/index.d.ts.map +1 -1
  8. package/dist/js/index.js +2 -2
  9. package/dist/js/index.js.map +1 -1
  10. package/dist/js/integrations/default.d.ts.map +1 -1
  11. package/dist/js/integrations/default.js +2 -1
  12. package/dist/js/integrations/default.js.map +1 -1
  13. package/dist/js/integrations/exports.d.ts +1 -0
  14. package/dist/js/integrations/exports.d.ts.map +1 -1
  15. package/dist/js/integrations/exports.js +1 -0
  16. package/dist/js/integrations/exports.js.map +1 -1
  17. package/dist/js/integrations/primitiveTagIntegration.d.ts +16 -0
  18. package/dist/js/integrations/primitiveTagIntegration.d.ts.map +1 -0
  19. package/dist/js/integrations/primitiveTagIntegration.js +35 -0
  20. package/dist/js/integrations/primitiveTagIntegration.js.map +1 -0
  21. package/dist/js/integrations/reactnativeinfo.js +1 -1
  22. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  23. package/dist/js/options.d.ts +18 -0
  24. package/dist/js/options.d.ts.map +1 -1
  25. package/dist/js/options.js.map +1 -1
  26. package/dist/js/scopeSync.js +2 -2
  27. package/dist/js/scopeSync.js.map +1 -1
  28. package/dist/js/sdk.d.ts.map +1 -1
  29. package/dist/js/sdk.js +4 -3
  30. package/dist/js/sdk.js.map +1 -1
  31. package/dist/js/tools/metroconfig.d.ts +6 -0
  32. package/dist/js/tools/metroconfig.d.ts.map +1 -1
  33. package/dist/js/tools/metroconfig.js +5 -3
  34. package/dist/js/tools/metroconfig.js.map +1 -1
  35. package/dist/js/tools/sentryMetroSerializer.d.ts +1 -1
  36. package/dist/js/tools/sentryMetroSerializer.d.ts.map +1 -1
  37. package/dist/js/tools/sentryMetroSerializer.js +6 -42
  38. package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
  39. package/dist/js/tools/sentryReleaseInjector.d.ts +10 -0
  40. package/dist/js/tools/sentryReleaseInjector.d.ts.map +1 -0
  41. package/dist/js/tools/sentryReleaseInjector.js +30 -0
  42. package/dist/js/tools/sentryReleaseInjector.js.map +1 -0
  43. package/dist/js/tools/utils.d.ts +18 -1
  44. package/dist/js/tools/utils.d.ts.map +1 -1
  45. package/dist/js/tools/utils.js +69 -1
  46. package/dist/js/tools/utils.js.map +1 -1
  47. package/dist/js/tracing/span.d.ts.map +1 -1
  48. package/dist/js/tracing/span.js +6 -0
  49. package/dist/js/tracing/span.js.map +1 -1
  50. package/dist/js/utils/primitiveConverter.d.ts +6 -0
  51. package/dist/js/utils/primitiveConverter.d.ts.map +1 -0
  52. package/dist/js/utils/primitiveConverter.js +24 -0
  53. package/dist/js/utils/primitiveConverter.js.map +1 -0
  54. package/dist/js/utils/release.d.ts +9 -0
  55. package/dist/js/utils/release.d.ts.map +1 -0
  56. package/dist/js/utils/release.js +29 -0
  57. package/dist/js/utils/release.js.map +1 -0
  58. package/dist/js/utils/worldwide.d.ts +6 -0
  59. package/dist/js/utils/worldwide.d.ts.map +1 -1
  60. package/dist/js/utils/worldwide.js.map +1 -1
  61. package/dist/js/version.d.ts +1 -1
  62. package/dist/js/version.d.ts.map +1 -1
  63. package/dist/js/version.js +1 -1
  64. package/dist/js/version.js.map +1 -1
  65. package/dist/js/wrapper.d.ts +6 -2
  66. package/dist/js/wrapper.d.ts.map +1 -1
  67. package/dist/js/wrapper.js +16 -1
  68. package/dist/js/wrapper.js.map +1 -1
  69. package/ios/RNSentry.h +7 -1
  70. package/ios/RNSentry.mm +126 -24
  71. package/ios/RNSentryExperimentalOptions.h +26 -0
  72. package/ios/RNSentryExperimentalOptions.m +22 -0
  73. package/ios/RNSentryReplay.mm +4 -0
  74. package/ios/RNSentryReplayBreadcrumbConverter.h +1 -1
  75. package/ios/RNSentryReplayBreadcrumbConverter.m +17 -4
  76. package/ios/RNSentryReplayQuality.h +13 -0
  77. package/ios/RNSentryReplayQuality.m +25 -0
  78. package/ios/RNSentryVersion.m +1 -1
  79. package/ios/SentrySDKWrapper.h +18 -0
  80. package/ios/SentrySDKWrapper.m +31 -0
  81. package/package.json +4 -4
  82. package/plugin/build/withSentryAndroidGradlePlugin.d.ts +1 -0
  83. package/plugin/build/withSentryAndroidGradlePlugin.js +3 -3
  84. package/scripts/expo-upload-sourcemaps.js +4 -1
  85. package/scripts/sentry-xcode-debug-files.sh +25 -2
  86. package/scripts/sentry-xcode.sh +23 -3
  87. package/sentry.gradle +27 -6
  88. package/ts3.8/dist/js/index.d.ts +3 -2
  89. package/ts3.8/dist/js/integrations/exports.d.ts +1 -0
  90. package/ts3.8/dist/js/integrations/primitiveTagIntegration.d.ts +16 -0
  91. package/ts3.8/dist/js/options.d.ts +18 -0
  92. package/ts3.8/dist/js/utils/primitiveConverter.d.ts +6 -0
  93. package/ts3.8/dist/js/utils/release.d.ts +9 -0
  94. package/ts3.8/dist/js/utils/worldwide.d.ts +6 -0
  95. package/ts3.8/dist/js/version.d.ts +1 -1
  96. package/ts3.8/dist/js/wrapper.d.ts +6 -2
@@ -0,0 +1,25 @@
1
+ #import "RNSentryReplayQuality.h"
2
+ @import Sentry;
3
+
4
+ @implementation RNSentryReplayQuality
5
+
6
+ + (SentryReplayQuality)parseReplayQuality:(NSString *_Nullable)qualityString
7
+ {
8
+ if (qualityString == nil) {
9
+ return SentryReplayQualityMedium;
10
+ }
11
+
12
+ NSString *lowercaseQuality = [qualityString lowercaseString];
13
+
14
+ if ([lowercaseQuality isEqualToString:@"low"]) {
15
+ return SentryReplayQualityLow;
16
+ } else if ([lowercaseQuality isEqualToString:@"medium"]) {
17
+ return SentryReplayQualityMedium;
18
+ } else if ([lowercaseQuality isEqualToString:@"high"]) {
19
+ return SentryReplayQualityHigh;
20
+ } else {
21
+ return SentryReplayQualityMedium;
22
+ }
23
+ }
24
+
25
+ @end
@@ -3,4 +3,4 @@
3
3
  NSString *const NATIVE_SDK_NAME = @"sentry.cocoa.react-native";
4
4
  NSString *const REACT_NATIVE_SDK_NAME = @"sentry.javascript.react-native";
5
5
  NSString *const REACT_NATIVE_SDK_PACKAGE_NAME = @"npm:@sentry/react-native";
6
- NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"7.0.0-beta.1";
6
+ NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"7.0.0-rc.1";
@@ -0,0 +1,18 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ @class SentryOptions;
4
+ @class SentryScope;
5
+
6
+ @interface SentrySDKWrapper : NSObject
7
+
8
+ + (void)configureScope:(void (^)(SentryScope *scope))callback;
9
+
10
+ + (void)crash;
11
+
12
+ + (void)close;
13
+
14
+ + (BOOL)crashedLastRun;
15
+
16
+ + (void)startWithOptions:(SentryOptions *)options;
17
+
18
+ @end
@@ -0,0 +1,31 @@
1
+ #import "SentrySDKWrapper.h"
2
+ @import Sentry;
3
+
4
+ @implementation SentrySDKWrapper
5
+
6
+ + (void)startWithOptions:(SentryOptions *)options
7
+ {
8
+ [SentrySDK startWithOptions:options];
9
+ }
10
+
11
+ + (void)crash
12
+ {
13
+ [SentrySDK crash];
14
+ }
15
+
16
+ + (void)close
17
+ {
18
+ [SentrySDK close];
19
+ }
20
+
21
+ + (BOOL)crashedLastRun
22
+ {
23
+ return [SentrySDK crashedLastRun];
24
+ }
25
+
26
+ + (void)configureScope:(void (^)(SentryScope *scope))callback
27
+ {
28
+ [SentrySDK configureScope:callback];
29
+ }
30
+
31
+ @end
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sentry/react-native",
3
3
  "homepage": "https://github.com/getsentry/sentry-react-native",
4
4
  "repository": "https://github.com/getsentry/sentry-react-native",
5
- "version": "7.0.0-beta.1",
5
+ "version": "7.0.0-rc.1",
6
6
  "description": "Official Sentry SDK for react-native",
7
7
  "typings": "dist/js/index.d.ts",
8
8
  "types": "dist/js/index.d.ts",
@@ -65,9 +65,9 @@
65
65
  "react-native": ">=0.65.0"
66
66
  },
67
67
  "dependencies": {
68
- "@sentry/babel-plugin-component-annotate": "3.5.0",
68
+ "@sentry/babel-plugin-component-annotate": "4.0.2",
69
69
  "@sentry/browser": "9.22.0",
70
- "@sentry/cli": "2.46.0",
70
+ "@sentry/cli": "2.50.2",
71
71
  "@sentry/core": "9.22.0",
72
72
  "@sentry/react": "9.22.0",
73
73
  "@sentry/types": "9.22.0"
@@ -80,7 +80,7 @@
80
80
  "@sentry-internal/eslint-config-sdk": "9.22.0",
81
81
  "@sentry-internal/eslint-plugin-sdk": "9.22.0",
82
82
  "@sentry-internal/typescript": "9.22.0",
83
- "@sentry/wizard": "5.1.0",
83
+ "@sentry/wizard": "6.1.0",
84
84
  "@testing-library/react-native": "^12.7.2",
85
85
  "@types/jest": "^29.5.13",
86
86
  "@types/node": "^20.9.3",
@@ -8,6 +8,7 @@ export interface SentryAndroidGradlePluginOptions {
8
8
  includeNativeSources?: boolean;
9
9
  includeSourceContext?: boolean;
10
10
  }
11
+ export declare const sentryAndroidGradlePluginVersion = "5.8.0";
11
12
  /**
12
13
  * Adds the Sentry Android Gradle Plugin to the project.
13
14
  * https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#enable-sentry-agp
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withSentryAndroidGradlePlugin = void 0;
3
+ exports.withSentryAndroidGradlePlugin = exports.sentryAndroidGradlePluginVersion = void 0;
4
4
  const config_plugins_1 = require("@expo/config-plugins");
5
5
  const utils_1 = require("./utils");
6
+ exports.sentryAndroidGradlePluginVersion = '5.8.0';
6
7
  /**
7
8
  * Adds the Sentry Android Gradle Plugin to the project.
8
9
  * https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#enable-sentry-agp
9
10
  */
10
11
  function withSentryAndroidGradlePlugin(config, { includeProguardMapping = true, dexguardEnabled = false, autoUploadProguardMapping = true, uploadNativeSymbols = true, autoUploadNativeSymbols = true, includeNativeSources = true, includeSourceContext = false, } = {}) {
11
- const version = '4.14.1';
12
12
  // Modify android/build.gradle
13
13
  const withSentryProjectBuildGradle = (config) => {
14
14
  return (0, config_plugins_1.withProjectBuildGradle)(config, (projectBuildGradle) => {
@@ -22,7 +22,7 @@ function withSentryAndroidGradlePlugin(config, { includeProguardMapping = true,
22
22
  (0, utils_1.warnOnce)('Cannot configure Sentry in android/build.gradle because it is not in Groovy.');
23
23
  return config;
24
24
  }
25
- const dependency = `classpath("io.sentry:sentry-android-gradle-plugin:${version}")`;
25
+ const dependency = `classpath("io.sentry:sentry-android-gradle-plugin:${exports.sentryAndroidGradlePluginVersion}")`;
26
26
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
27
27
  if (projectBuildGradle.modResults.contents.includes(dependency)) {
28
28
  (0, utils_1.warnOnce)('sentry-android-gradle-plugin dependency in already in android/build.gradle.');
@@ -129,7 +129,10 @@ try {
129
129
  console.warn(error);
130
130
  }
131
131
 
132
- loadDotenv(path.join(projectRoot, '.env.sentry-build-plugin'));
132
+ const sentryBuildPluginPath = path.join(projectRoot, '.env.sentry-build-plugin');
133
+ if (fs.existsSync(sentryBuildPluginPath)) {
134
+ loadDotenv();
135
+ }
133
136
 
134
137
  let sentryOrg = getEnvVar(SENTRY_ORG);
135
138
  let sentryUrl = getEnvVar(SENTRY_URL);
@@ -24,10 +24,33 @@ LOCAL_NODE_BINARY=${NODE_BINARY:-node}
24
24
  RN_PROJECT_ROOT="${PROJECT_DIR}/.."
25
25
 
26
26
  [ -z "$SENTRY_PROPERTIES" ] && export SENTRY_PROPERTIES=sentry.properties
27
- [ -z "$SENTRY_DOTENV_PATH" ] && export SENTRY_DOTENV_PATH="$RN_PROJECT_ROOT/.env.sentry-build-plugin"
27
+ [ -z "$SENTRY_DOTENV_PATH" ] && [ -f "$RN_PROJECT_ROOT/.env.sentry-build-plugin" ] && export SENTRY_DOTENV_PATH="$RN_PROJECT_ROOT/.env.sentry-build-plugin"
28
28
 
29
29
  [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_PACKAGE_PATH=$("$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('@sentry/cli/package.json'))")
30
- [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_EXECUTABLE="${SENTRY_CLI_PACKAGE_PATH}/bin/sentry-cli"
30
+ [ -z "$SOURCEMAP_FILE" ] && export SOURCEMAP_FILE="$DERIVED_FILE_DIR/main.jsbundle.map"
31
+
32
+ if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
33
+ # Try standard resolution safely
34
+ RESOLVED_PATH=$(
35
+ "$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('@sentry/cli/package.json'))" 2>/dev/null
36
+ ) || true
37
+ if [ -n "$RESOLVED_PATH" ]; then
38
+ SENTRY_CLI_PACKAGE_PATH="$RESOLVED_PATH/bin/sentry-cli"
39
+ else
40
+ # Fallback: parse NODE_PATH from the .bin/sentry-cli shim (file generated by PNPM)
41
+ PNPM_BIN_PATH="$PWD/../node_modules/@sentry/react-native/node_modules/.bin/sentry-cli"
42
+
43
+ if [ -f "$PNPM_BIN_PATH" ]; then
44
+ CLI_FILE_TEXT=$(cat "$PNPM_BIN_PATH")
45
+
46
+ # Filter where PNPM stored Sentry CLI
47
+ NODE_PATH_LINE=$(echo "$CLI_FILE_TEXT" | grep -oE 'NODE_PATH="[^"]+"' | head -n1)
48
+ NODE_PATH_VALUE=$(echo "$NODE_PATH_LINE" | sed -E 's/^NODE_PATH="([^"]+)".*/\1/')
49
+ SENTRY_CLI_PACKAGE_PATH=${NODE_PATH_VALUE%%/bin*}
50
+ fi
51
+ fi
52
+ fi
53
+ [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_EXECUTABLE="$SENTRY_CLI_PACKAGE_PATH"
31
54
 
32
55
  [[ $SENTRY_INCLUDE_NATIVE_SOURCES == "true" ]] && INCLUDE_SOURCES_FLAG="--include-sources" || INCLUDE_SOURCES_FLAG=""
33
56
 
@@ -13,11 +13,31 @@ LOCAL_NODE_BINARY=${NODE_BINARY:-node}
13
13
  RN_PROJECT_ROOT="${PROJECT_DIR}/.."
14
14
 
15
15
  [ -z "$SENTRY_PROPERTIES" ] && export SENTRY_PROPERTIES=sentry.properties
16
- [ -z "$SENTRY_DOTENV_PATH" ] && export SENTRY_DOTENV_PATH="$RN_PROJECT_ROOT/.env.sentry-build-plugin"
16
+ [ -z "$SENTRY_DOTENV_PATH" ] && [ -f "$RN_PROJECT_ROOT/.env.sentry-build-plugin" ] && export SENTRY_DOTENV_PATH="$RN_PROJECT_ROOT/.env.sentry-build-plugin"
17
17
  [ -z "$SOURCEMAP_FILE" ] && export SOURCEMAP_FILE="$DERIVED_FILE_DIR/main.jsbundle.map"
18
18
 
19
- [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_PACKAGE_PATH=$("$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('@sentry/cli/package.json'))")
20
- [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_EXECUTABLE="${SENTRY_CLI_PACKAGE_PATH}/bin/sentry-cli"
19
+ if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
20
+ # Try standard resolution safely
21
+ RESOLVED_PATH=$(
22
+ "$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('@sentry/cli/package.json'))" 2>/dev/null
23
+ ) || true
24
+ if [ -n "$RESOLVED_PATH" ]; then
25
+ SENTRY_CLI_PACKAGE_PATH="$RESOLVED_PATH/bin/sentry-cli"
26
+ else
27
+ # Fallback: parse NODE_PATH from the .bin/sentry-cli shim (file generated by PNPM)
28
+ PNPM_BIN_PATH="$PWD/../node_modules/@sentry/react-native/node_modules/.bin/sentry-cli"
29
+
30
+ if [ -f "$PNPM_BIN_PATH" ]; then
31
+ CLI_FILE_TEXT=$(cat "$PNPM_BIN_PATH")
32
+
33
+ # Filter where PNPM stored Sentry CLI
34
+ NODE_PATH_LINE=$(echo "$CLI_FILE_TEXT" | grep -oE 'NODE_PATH="[^"]+"' | head -n1)
35
+ NODE_PATH_VALUE=$(echo "$NODE_PATH_LINE" | sed -E 's/^NODE_PATH="([^"]+)".*/\1/')
36
+ SENTRY_CLI_PACKAGE_PATH=${NODE_PATH_VALUE%%/bin*}
37
+ fi
38
+ fi
39
+ fi
40
+ [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_EXECUTABLE="$SENTRY_CLI_PACKAGE_PATH"
21
41
 
22
42
  REACT_NATIVE_XCODE=$1
23
43
 
package/sentry.gradle CHANGED
@@ -167,11 +167,7 @@ project.afterEvaluate {
167
167
  project.logger.info("file not found '$propertiesFile' for '$variant'")
168
168
  }
169
169
 
170
- def resolvedCliPackage = null
171
- try {
172
- resolvedCliPackage = new File(["node", "--print", "require.resolve('@sentry/cli/package.json')"].execute(null, rootDir).text.trim()).getParentFile();
173
- } catch (Throwable ignored) {}
174
- def cliPackage = resolvedCliPackage != null && resolvedCliPackage.exists() ? resolvedCliPackage.getAbsolutePath() : "$reactRoot/node_modules/@sentry/cli"
170
+ def cliPackage = resolveSentryCliPackagePath(reactRoot)
175
171
  def cliExecutable = sentryProps.get("cli.executable", "$cliPackage/bin/sentry-cli")
176
172
 
177
173
  // fix path separator for Windows
@@ -205,7 +201,7 @@ project.afterEvaluate {
205
201
 
206
202
  project.logger.lifecycle("Sentry-CLI arguments: ${args}")
207
203
  def osCompatibility = Os.isFamily(Os.FAMILY_WINDOWS) ? ['cmd', '/c', 'node'] : []
208
- if (!System.getenv('SENTRY_DOTENV_PATH')) {
204
+ if (!System.getenv('SENTRY_DOTENV_PATH') && file("$reactRoot/.env.sentry-build-plugin").exists()) {
209
205
  environment('SENTRY_DOTENV_PATH', "$reactRoot/.env.sentry-build-plugin")
210
206
  }
211
207
  commandLine(*osCompatibility, *args)
@@ -306,6 +302,31 @@ def resolveSentryReactNativeSDKPath(reactRoot) {
306
302
  return sentryPackage
307
303
  }
308
304
 
305
+ def resolveSentryCliPackagePath(reactRoot) {
306
+ def resolvedCliPath = null
307
+ try {
308
+ resolvedCliPath = new File(["node", "--print", "require.resolve('@sentry/cli/package.json')"].execute(null, rootDir).text.trim()).getParentFile();
309
+ } catch (Throwable ignored) { // Check if it's located in .pnpm
310
+ try {
311
+ def pnpmRefPath = reactRoot.toString() + "/node_modules/@sentry/react-native/node_modules/.bin/sentry-cli"
312
+ def sentryCliFile = new File(pnpmRefPath)
313
+
314
+ if (sentryCliFile.exists()) {
315
+ def cliFileText = sentryCliFile.text
316
+ def matcher = cliFileText =~ /NODE_PATH="([^"]*?)@sentry\/cli\//
317
+
318
+ if (matcher.find()) {
319
+ def match = matcher.group(1)
320
+ resolvedCliPath = new File(match + "@sentry/cli")
321
+ }
322
+ }
323
+ } catch (Throwable ignored2) {} // if the resolve fails we fallback to the default path
324
+ }
325
+
326
+ def cliPackage = resolvedCliPath != null && resolvedCliPath.exists() ? resolvedCliPath.getAbsolutePath() : "$reactRoot/node_modules/@sentry/cli"
327
+ return cliPackage
328
+ }
329
+
309
330
  /** Compose lookup map of build variants - to - outputs. */
310
331
  def extractReleasesInfo() {
311
332
  def releases = [:]
@@ -1,7 +1,8 @@
1
1
  export type { Breadcrumb, SdkInfo, Event, Exception, SendFeedbackParams, SeverityLevel, Span, StackFrame, Stacktrace, Thread, User, UserFeedback, ErrorEvent, TransactionEvent, } from '@sentry/core';
2
- export { addBreadcrumb, captureException, captureEvent, captureFeedback, captureMessage, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startInactiveSpan, startSpan, startSpanManual, getActiveSpan, getRootSpan, withActiveSpan, suppressTracing, spanToJSON, spanIsSampled, setMeasurement, getCurrentScope, getGlobalScope, getIsolationScope, getClient, setCurrentClient, addEventProcessor, lastEventId, } from '@sentry/core';
2
+ export { addBreadcrumb, addIntegration, captureException, captureEvent, captureFeedback, captureMessage, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startInactiveSpan, startSpan, startSpanManual, getActiveSpan, getRootSpan, withActiveSpan, suppressTracing, spanToJSON, spanIsSampled, setMeasurement, getCurrentScope, getGlobalScope, getIsolationScope, getClient, setCurrentClient, addEventProcessor, lastEventId, } from '@sentry/core';
3
3
  export { ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
4
- export { logger, consoleLoggingIntegration } from '@sentry/browser';
4
+ export type { FeatureFlagsIntegration } from '@sentry/browser';
5
+ export { logger, consoleLoggingIntegration, featureFlagsIntegration } from '@sentry/browser';
5
6
  export * from './integrations/exports';
6
7
  export { SDK_NAME, SDK_VERSION } from './version';
7
8
  export type { ReactNativeOptions } from './options';
@@ -23,5 +23,6 @@ export { createReactNativeRewriteFrames } from './rewriteframes';
23
23
  export { appRegistryIntegration } from './appRegistry';
24
24
  export { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';
25
25
  export { breadcrumbsIntegration } from './breadcrumbs';
26
+ export { primitiveTagIntegration } from './primitiveTagIntegration';
26
27
  export { browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, extraErrorDataIntegration, } from '@sentry/react';
27
28
  //# sourceMappingURL=exports.d.ts.map
@@ -0,0 +1,16 @@
1
+ import type { Integration } from '@sentry/core';
2
+ export declare const INTEGRATION_NAME = "PrimitiveTagIntegration";
3
+ /**
4
+ * Format tags set with Primitive values with a standard string format.
5
+ *
6
+ * When this Integration is enable, the following types will have the following behaviour:
7
+ *
8
+ * Unaltered: string, null, number, and undefined values remain unchanged.
9
+ *
10
+ * Altered:
11
+ * Boolean values are now capitalized: true -> True, false -> False.
12
+ * Symbols are stringified.
13
+ *
14
+ */
15
+ export declare const primitiveTagIntegration: () => Integration;
16
+ //# sourceMappingURL=primitiveTagIntegration.d.ts.map
@@ -207,6 +207,13 @@ export interface BaseReactNativeOptions {
207
207
  * problems.
208
208
  */
209
209
  shutdownTimeout?: number;
210
+ /**
211
+ * Defines the quality of the session replay. The higher the quality, the more accurate the replay
212
+ * will be, but also more data to transfer and more CPU load.
213
+ *
214
+ * @default 'medium'
215
+ */
216
+ replaysSessionQuality?: SentryReplayQuality;
210
217
  /**
211
218
  * Options which are in beta, or otherwise not guaranteed to be stable.
212
219
  */
@@ -224,6 +231,16 @@ export interface BaseReactNativeOptions {
224
231
  * This will be removed in the next major version.
225
232
  */
226
233
  replaysOnErrorSampleRate?: number;
234
+ /**
235
+ * Experiment: A more reliable way to report unhandled C++ exceptions in iOS.
236
+ *
237
+ * This approach hooks into all instances of the `__cxa_throw` function, which provides a more comprehensive and consistent exception handling across an app’s runtime, regardless of the number of C++ modules or how they’re linked. It helps in obtaining accurate stack traces.
238
+ *
239
+ * - Note: The mechanism of hooking into `__cxa_throw` could cause issues with symbolication on iOS due to caching of symbol references.
240
+ *
241
+ * @default false
242
+ */
243
+ enableUnhandledCPPExceptionsV2?: boolean;
227
244
  };
228
245
  /**
229
246
  * This options changes the placement of the attached stacktrace of `captureMessage` in the event.
@@ -233,6 +250,7 @@ export interface BaseReactNativeOptions {
233
250
  */
234
251
  useThreadsForMessageStack?: boolean;
235
252
  }
253
+ export type SentryReplayQuality = 'low' | 'medium' | 'high';
236
254
  export interface ReactNativeTransportOptions extends BrowserTransportOptions {
237
255
  /**
238
256
  * @deprecated use `maxQueueSize` in the root of the SDK options.
@@ -0,0 +1,6 @@
1
+ import type { Primitive } from '@sentry/core';
2
+ /**
3
+ * Converts primitive to string.
4
+ */
5
+ export declare function PrimitiveToString(primitive: Primitive): string | undefined;
6
+ //# sourceMappingURL=primitiveConverter.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ *
3
+ */
4
+ export declare function createReleaseFromGlobalReleaseConstants(): string | undefined;
5
+ /**
6
+ *
7
+ */
8
+ export declare function getDefaultRelease(): string | undefined;
9
+ //# sourceMappingURL=release.d.ts.map
@@ -31,6 +31,12 @@ export interface ReactNativeInternalGlobal extends InternalGlobal {
31
31
  nativePerformanceNow?: () => number;
32
32
  TextEncoder?: TextEncoder;
33
33
  alert?: (message: string) => void;
34
+ SENTRY_RELEASE?: {
35
+ /** Used by Sentry Webpack Plugin, not used by RN, only to silence TS */
36
+ id?: string;
37
+ name?: string;
38
+ version?: string;
39
+ };
34
40
  }
35
41
  type TextEncoder = {
36
42
  new (): {
@@ -1,4 +1,4 @@
1
1
  export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
2
2
  export declare const SDK_NAME = "sentry.javascript.react-native";
3
- export declare const SDK_VERSION = "7.0.0-beta.1";
3
+ export declare const SDK_VERSION = "7.0.0-rc.1";
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Breadcrumb, Envelope, EnvelopeItem, Event, Package, SeverityLevel, User } from '@sentry/core';
1
+ import type { Breadcrumb, Envelope, EnvelopeItem, Event, Package, Primitive, SeverityLevel, User } from '@sentry/core';
2
2
  import { Platform } from 'react-native';
3
3
  import type { NativeAppStartResponse, NativeDeviceContextsResponse, NativeFramesResponse, NativeReleaseResponse, NativeStackFrames, Spec } from './NativeRNSentry';
4
4
  import type { ReactNativeClientOptions } from './options';
@@ -17,6 +17,8 @@ export interface Screenshot {
17
17
  export type NativeSdkOptions = Partial<ReactNativeClientOptions> & {
18
18
  devServerUrl: string | undefined;
19
19
  defaultSidecarUrl: string | undefined;
20
+ ignoreErrorsStr?: string[] | undefined;
21
+ ignoreErrorsRegex?: string[] | undefined;
20
22
  } & {
21
23
  mobileReplayOptions: MobileReplayOptions | undefined;
22
24
  };
@@ -26,6 +28,7 @@ interface SentryNativeWrapper {
26
28
  platform: typeof Platform.OS;
27
29
  _NativeClientError: Error;
28
30
  _DisabledNativeError: Error;
31
+ _setPrimitiveProcessor: (processor: (value: Primitive) => void) => void;
29
32
  _processItem(envelopeItem: EnvelopeItem): EnvelopeItem;
30
33
  _processLevels(event: Event): Event;
31
34
  _processLevel(level: SeverityLevel): SeverityLevel;
@@ -54,7 +57,7 @@ interface SentryNativeWrapper {
54
57
  clearBreadcrumbs(): void;
55
58
  setExtra(key: string, extra: unknown): void;
56
59
  setUser(user: User | null): void;
57
- setTag(key: string, value: string): void;
60
+ setTag(key: string, value?: string): void;
58
61
  nativeCrash(): void;
59
62
  fetchModules(): Promise<Record<string, string> | null>;
60
63
  fetchViewHierarchy(): PromiseLike<Uint8Array | null>;
@@ -78,6 +81,7 @@ interface SentryNativeWrapper {
78
81
  popTimeToDisplayFor(key: string): Promise<number | undefined | null>;
79
82
  setActiveSpanId(spanId: string): void;
80
83
  encodeToBase64(data: Uint8Array): Promise<string | null>;
84
+ primitiveProcessor(value: Primitive): string;
81
85
  }
82
86
  /**
83
87
  * Our internal interface for calling native functions