@sentry/react-native 7.0.0-beta.1 → 7.0.0-beta.2
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.
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +36 -0
- package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
- package/android/src/newarch/java/io/sentry/react/replay/RNSentryReplayUnmaskManager.java +2 -2
- package/dist/js/index.d.ts +1 -1
- package/dist/js/index.d.ts.map +1 -1
- package/dist/js/index.js +1 -1
- package/dist/js/index.js.map +1 -1
- package/dist/js/integrations/default.d.ts.map +1 -1
- package/dist/js/integrations/default.js +2 -1
- package/dist/js/integrations/default.js.map +1 -1
- package/dist/js/integrations/exports.d.ts +1 -0
- package/dist/js/integrations/exports.d.ts.map +1 -1
- package/dist/js/integrations/exports.js +1 -0
- package/dist/js/integrations/exports.js.map +1 -1
- package/dist/js/integrations/primitiveTagIntegration.d.ts +16 -0
- package/dist/js/integrations/primitiveTagIntegration.d.ts.map +1 -0
- package/dist/js/integrations/primitiveTagIntegration.js +35 -0
- package/dist/js/integrations/primitiveTagIntegration.js.map +1 -0
- package/dist/js/integrations/reactnativeinfo.js +1 -1
- package/dist/js/integrations/reactnativeinfo.js.map +1 -1
- package/dist/js/options.d.ts +10 -0
- package/dist/js/options.d.ts.map +1 -1
- package/dist/js/options.js.map +1 -1
- package/dist/js/scopeSync.js +2 -2
- package/dist/js/scopeSync.js.map +1 -1
- package/dist/js/sdk.d.ts.map +1 -1
- package/dist/js/sdk.js +4 -3
- package/dist/js/sdk.js.map +1 -1
- package/dist/js/tools/metroconfig.d.ts +6 -0
- package/dist/js/tools/metroconfig.d.ts.map +1 -1
- package/dist/js/tools/metroconfig.js +5 -3
- package/dist/js/tools/metroconfig.js.map +1 -1
- package/dist/js/tools/sentryMetroSerializer.d.ts +1 -1
- package/dist/js/tools/sentryMetroSerializer.d.ts.map +1 -1
- package/dist/js/tools/sentryMetroSerializer.js +6 -42
- package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
- package/dist/js/tools/sentryReleaseInjector.d.ts +10 -0
- package/dist/js/tools/sentryReleaseInjector.d.ts.map +1 -0
- package/dist/js/tools/sentryReleaseInjector.js +30 -0
- package/dist/js/tools/sentryReleaseInjector.js.map +1 -0
- package/dist/js/tools/utils.d.ts +18 -1
- package/dist/js/tools/utils.d.ts.map +1 -1
- package/dist/js/tools/utils.js +69 -1
- package/dist/js/tools/utils.js.map +1 -1
- package/dist/js/utils/primitiveConverter.d.ts +6 -0
- package/dist/js/utils/primitiveConverter.d.ts.map +1 -0
- package/dist/js/utils/primitiveConverter.js +24 -0
- package/dist/js/utils/primitiveConverter.js.map +1 -0
- package/dist/js/utils/release.d.ts +9 -0
- package/dist/js/utils/release.d.ts.map +1 -0
- package/dist/js/utils/release.js +29 -0
- package/dist/js/utils/release.js.map +1 -0
- package/dist/js/utils/worldwide.d.ts +6 -0
- package/dist/js/utils/worldwide.d.ts.map +1 -1
- package/dist/js/utils/worldwide.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/dist/js/wrapper.d.ts +6 -2
- package/dist/js/wrapper.d.ts.map +1 -1
- package/dist/js/wrapper.js +16 -1
- package/dist/js/wrapper.js.map +1 -1
- package/ios/RNSentry.mm +92 -3
- package/ios/RNSentryExperimentalOptions.h +26 -0
- package/ios/RNSentryExperimentalOptions.m +22 -0
- package/ios/RNSentryVersion.m +1 -1
- package/package.json +3 -3
- package/plugin/build/withSentryAndroidGradlePlugin.d.ts +1 -0
- package/plugin/build/withSentryAndroidGradlePlugin.js +3 -3
- package/ts3.8/dist/js/index.d.ts +2 -1
- package/ts3.8/dist/js/integrations/exports.d.ts +1 -0
- package/ts3.8/dist/js/integrations/primitiveTagIntegration.d.ts +16 -0
- package/ts3.8/dist/js/options.d.ts +10 -0
- package/ts3.8/dist/js/utils/primitiveConverter.d.ts +6 -0
- package/ts3.8/dist/js/utils/release.d.ts +9 -0
- package/ts3.8/dist/js/utils/worldwide.d.ts +6 -0
- package/ts3.8/dist/js/version.d.ts +1 -1
- package/ts3.8/dist/js/wrapper.d.ts +6 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#import "RNSentryExperimentalOptions.h"
|
|
2
|
+
@import Sentry;
|
|
3
|
+
|
|
4
|
+
@implementation RNSentryExperimentalOptions
|
|
5
|
+
|
|
6
|
+
+ (void)setEnableUnhandledCPPExceptionsV2:(BOOL)enabled sentryOptions:(SentryOptions *)sentryOptions
|
|
7
|
+
{
|
|
8
|
+
if (sentryOptions == nil) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
sentryOptions.experimental.enableUnhandledCPPExceptionsV2 = enabled;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
+ (BOOL)getEnableUnhandledCPPExceptionsV2:(SentryOptions *)sentryOptions
|
|
15
|
+
{
|
|
16
|
+
if (sentryOptions == nil) {
|
|
17
|
+
return NO;
|
|
18
|
+
}
|
|
19
|
+
return sentryOptions.experimental.enableUnhandledCPPExceptionsV2;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@end
|
package/ios/RNSentryVersion.m
CHANGED
|
@@ -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.
|
|
6
|
+
NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"7.0.0-beta.2";
|
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.
|
|
5
|
+
"version": "7.0.0-beta.2",
|
|
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",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@sentry/babel-plugin-component-annotate": "3.5.0",
|
|
69
69
|
"@sentry/browser": "9.22.0",
|
|
70
|
-
"@sentry/cli": "2.
|
|
70
|
+
"@sentry/cli": "2.47.0",
|
|
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.
|
|
83
|
+
"@sentry/wizard": "5.3.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:${
|
|
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.');
|
package/ts3.8/dist/js/index.d.ts
CHANGED
|
@@ -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
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';
|
|
3
3
|
export { ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
|
|
4
|
-
export {
|
|
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
|
|
@@ -224,6 +224,16 @@ export interface BaseReactNativeOptions {
|
|
|
224
224
|
* This will be removed in the next major version.
|
|
225
225
|
*/
|
|
226
226
|
replaysOnErrorSampleRate?: number;
|
|
227
|
+
/**
|
|
228
|
+
* Experiment: A more reliable way to report unhandled C++ exceptions in iOS.
|
|
229
|
+
*
|
|
230
|
+
* 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.
|
|
231
|
+
*
|
|
232
|
+
* - Note: The mechanism of hooking into `__cxa_throw` could cause issues with symbolication on iOS due to caching of symbol references.
|
|
233
|
+
*
|
|
234
|
+
* @default false
|
|
235
|
+
*/
|
|
236
|
+
enableUnhandledCPPExceptionsV2?: boolean;
|
|
227
237
|
};
|
|
228
238
|
/**
|
|
229
239
|
* This options changes the placement of the attached stacktrace of `captureMessage` in the event.
|
|
@@ -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.
|
|
3
|
+
export declare const SDK_VERSION = "7.0.0-beta.2";
|
|
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
|
|
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
|