diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea564642f..70d76f5760 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,10 @@ - fix: pas maxBreadcrumbs to Android init - feat: Allow disabling native SDK initialization but still use it #1259 +- ref: Rename shouldInitializeNativeSdk to autoInitializeNativeSdk #1275 - fix: Fix parseErrorStack that only takes string in DebugSymbolicator event processor #1274 - fix: Only set "event" type in envelope item and not the payload #1271 - ## 2.1.0 - feat: Include @sentry/tracing and expose startTransaction #1167 diff --git a/src/js/options.ts b/src/js/options.ts index d83d01d91f..8677fe33f9 100644 --- a/src/js/options.ts +++ b/src/js/options.ts @@ -31,7 +31,7 @@ export interface ReactNativeOptions extends BrowserOptions { * * @default true */ - shouldInitializeNativeSdk?: boolean; + autoInitializeNativeSdk?: boolean; /** Maximum time to wait to drain the request queue, before the process is allowed to exit. */ shutdownTimeout?: number; diff --git a/src/js/sdk.ts b/src/js/sdk.ts index 622b278e9e..7804535be6 100644 --- a/src/js/sdk.ts +++ b/src/js/sdk.ts @@ -23,7 +23,7 @@ const DEFAULT_OPTIONS: ReactNativeOptions = { enableNative: true, enableNativeCrashHandling: true, enableNativeNagger: true, - shouldInitializeNativeSdk: true, + autoInitializeNativeSdk: true, }; /** diff --git a/src/js/wrapper.ts b/src/js/wrapper.ts index 81a5a89ce9..7732196b52 100644 --- a/src/js/wrapper.ts +++ b/src/js/wrapper.ts @@ -81,11 +81,11 @@ export const NATIVE = { async startWithOptions(_options: ReactNativeOptions): Promise { const options = { enableNative: true, - shouldInitializeNativeSdk: true, + autoInitializeNativeSdk: true, ..._options, }; - if (!options.shouldInitializeNativeSdk) { + if (!options.autoInitializeNativeSdk) { if (options.enableNativeNagger) { logger.warn("Note: Native Sentry SDK was not initialized."); } diff --git a/test/wrapper.test.ts b/test/wrapper.test.ts index e0fdee5b11..20df4b7d9a 100644 --- a/test/wrapper.test.ts +++ b/test/wrapper.test.ts @@ -93,7 +93,7 @@ describe("Tests Native Wrapper", () => { ); }); - test("does not initialize with shouldInitializeNativeSdk: false", async () => { + test("does not initialize with autoInitializeNativeSdk: false", async () => { const RN = require("react-native"); RN.NativeModules.RNSentry.startWithOptions = jest.fn(); @@ -102,7 +102,7 @@ describe("Tests Native Wrapper", () => { await NATIVE.startWithOptions({ dsn: "test", enableNative: true, - shouldInitializeNativeSdk: false, + autoInitializeNativeSdk: false, }); expect(RN.NativeModules.RNSentry.startWithOptions).not.toBeCalled();