From 1ed047269d2ffd54c186bc15d5dc5ccdfd62e12f Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 20 Oct 2022 03:46:58 +0000 Subject: [PATCH 1/5] chore: update scripts/update-javascript.sh to 7.16.0 --- CHANGELOG.md | 6 +-- package.json | 20 ++++---- yarn.lock | 126 +++++++++++++++++++++++++-------------------------- 3 files changed, 76 insertions(+), 76 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0945718d8c..b7eba758cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,9 @@ - Bump Android SDK from v6.4.3 to v6.5.0 ([#2535](https://github.com/getsentry/sentry-react-native/pull/2535)) - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#650) - [diff](https://github.com/getsentry/sentry-java/compare/6.4.3...6.5.0) -- Bump JavaScript SDK from v7.14.2 to v7.15.0 ([#2536](https://github.com/getsentry/sentry-react-native/pull/2536)) - - [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7150) - - [diff](https://github.com/getsentry/sentry-javascript/compare/7.14.2...7.15.0) +- Bump JavaScript SDK from v7.14.2 to v7.16.0 ([#2536](https://github.com/getsentry/sentry-react-native/pull/2536), [#2561](https://github.com/getsentry/sentry-react-native/pull/2561)) + - [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7160) + - [diff](https://github.com/getsentry/sentry-javascript/compare/7.14.2...7.16.0) - Bump Cocoa SDK from v7.27.1 to v7.28.0 ([#2548](https://github.com/getsentry/sentry-react-native/pull/2548)) - [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7280) - [diff](https://github.com/getsentry/sentry-cocoa/compare/7.27.1...7.28.0) diff --git a/package.json b/package.json index 5d2be59211..9bc26a17ba 100644 --- a/package.json +++ b/package.json @@ -40,20 +40,20 @@ "react-native": ">=0.56.0" }, "dependencies": { - "@sentry/browser": "7.15.0", + "@sentry/browser": "7.16.0", "@sentry/cli": "1.74.4", - "@sentry/core": "7.15.0", - "@sentry/hub": "7.15.0", - "@sentry/integrations": "7.15.0", - "@sentry/react": "7.15.0", - "@sentry/tracing": "7.15.0", - "@sentry/types": "7.15.0", - "@sentry/utils": "7.15.0", + "@sentry/core": "7.16.0", + "@sentry/hub": "7.16.0", + "@sentry/integrations": "7.16.0", + "@sentry/react": "7.16.0", + "@sentry/tracing": "7.16.0", + "@sentry/types": "7.16.0", + "@sentry/utils": "7.16.0", "@sentry/wizard": "1.2.17" }, "devDependencies": { - "@sentry-internal/eslint-config-sdk": "7.15.0", - "@sentry-internal/eslint-plugin-sdk": "7.15.0", + "@sentry-internal/eslint-config-sdk": "7.16.0", + "@sentry-internal/eslint-plugin-sdk": "7.16.0", "@sentry/typescript": "^5.20.1", "@types/jest": "^26.0.15", "@types/react": "^16.9.49", diff --git a/yarn.lock b/yarn.lock index 567e69fa2c..ec8087043f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1123,13 +1123,13 @@ sudo-prompt "^9.0.0" wcwidth "^1.0.1" -"@sentry-internal/eslint-config-sdk@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-7.15.0.tgz#7f33c6c39c720132d9816364d55751cd26ab34e4" - integrity sha512-ttLoetchz0NkRuv8xkab/NF3u67lwWidYAIr8dV0Gc/wuefLwGr/XWdHff1hadXk528/7ZJcnNVUAE9DeeWYvA== +"@sentry-internal/eslint-config-sdk@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-7.16.0.tgz#a626e2d248c8a079adc7e0855215b372e5294f65" + integrity sha512-rFbHI6RlO0Y1vwxtvRW/KyOiYBdT3kyKVIf4sXJxUc0IJ6ETmFXjGNRerWKUg3AF7m5QfHNsKQhHMKXhsCGPog== dependencies: - "@sentry-internal/eslint-plugin-sdk" "7.15.0" - "@sentry-internal/typescript" "7.15.0" + "@sentry-internal/eslint-plugin-sdk" "7.16.0" + "@sentry-internal/typescript" "7.16.0" "@typescript-eslint/eslint-plugin" "^3.9.0" "@typescript-eslint/parser" "^3.9.0" eslint-config-prettier "^6.11.0" @@ -1138,26 +1138,26 @@ eslint-plugin-jsdoc "^30.0.3" eslint-plugin-simple-import-sort "^5.0.3" -"@sentry-internal/eslint-plugin-sdk@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-7.15.0.tgz#49dfa926033d70948aaf1f304e4d98d1f50d13b9" - integrity sha512-CYCf6i/kt5m49XKYNz5ocgRDGUSpQvImyT/qXvZGWnj4jKNeie4/k3abua2Dj765zZ1IpNscAuBudOG7rBTRlQ== +"@sentry-internal/eslint-plugin-sdk@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-7.16.0.tgz#8675577a2781fae3cfac918d95fcd1ac731c8350" + integrity sha512-NlNZs8JlMA9wK2SaTrbznqk9P8P8yM0oj/HI7CnDJFuBStfbdFLuf025ejnSLXCfdPNRnHxKsHkq78jXyyA+Kg== dependencies: requireindex "~1.1.0" -"@sentry-internal/typescript@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-7.15.0.tgz#72daf80ff94ab8ba4ae22c39dd3ab888d38b9229" - integrity sha512-Gjc2/w1+vxmZIwSXAZYcuT99BjjOPXhHlCscOXLlGhPx5qNhnIXZ52StlQbCfW0P6Qg6H2d4P/OYUGTcOXd7gQ== +"@sentry-internal/typescript@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-7.16.0.tgz#a37c15649ed9d36d0e3ea0e1f622bb157308d5ce" + integrity sha512-cudpmUkvKmJNiCud5z/J+zbPDaulwClG/wLeK/+tFKz+qI5zrFWP9FGD4lTvL2wRyz8eQ4qTXtdaFK2RkxU/7A== -"@sentry/browser@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.15.0.tgz#1723dc8efcea9239d26072126755f61f6fb9448d" - integrity sha512-vZYr8L2JmniV8cns4yGOpX32moazz6tsllB1uv7XmmELW98sIuuugVFX0k6cBi89R8pyhdqULFCf9CL8CRguRg== +"@sentry/browser@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.16.0.tgz#afd2bac91857d2359272a0d9d2b1ee5ca7d69828" + integrity sha512-tJ063zvoF8Raw7mzQEXupOFPSN6v36WIbsDVGeFdToPCwViaBuATaxvWCrudGzsnBkMyItmTLJkzn9SEIXUOiw== dependencies: - "@sentry/core" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" "@sentry/cli@1.74.4": @@ -1184,60 +1184,60 @@ progress "^2.0.3" proxy-from-env "^1.1.0" -"@sentry/core@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.15.0.tgz#983e08326afdb8ddb10494372cd22b3886d683c9" - integrity sha512-W8d44g04GShBn4Z9VBTUhf1T9LTMfzUnETEx237zzUucv0kkyj3LsWQsJapWchMbmwr1V/CdnNDN+lGDm8iXQA== +"@sentry/core@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.16.0.tgz#60f9b54ef2ec524176b329e1d15be39c36da5953" + integrity sha512-vq6H1b/IPTvzDD9coQ3wIudvSjkAYuUlXb1dv69dRlq4v3st9dcKBps1Zf0lQ1i4TVlDLoe1iGMmNFglMF1Q5w== dependencies: - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/hub@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.15.0.tgz#d4da91c15ab0a1ee2d70796bf7b2fda35f06837f" - integrity sha512-v15sSoYuKJ9+BmDUX6qxAnCDhlClmw6TY9/rcIYbP2XSxsGrJcPy6VPOw4E21/1zGXnKiW7KvBkPeYEjIx7fWA== +"@sentry/hub@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.16.0.tgz#26d65a2f6c71d18ec7a20f352fa8c4c461db2940" + integrity sha512-eCM66JPS2nw+fQK3vpJhs6Lxf4FqOwPqIpFbJ2TivQ8kgJyolHOyeH/LsmJbcw97P4sc3O3LHt5v93vTKmlDrw== dependencies: - "@sentry/core" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/integrations@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.15.0.tgz#c2af3a2d2c0667216d76d829f24c5125b110e6c8" - integrity sha512-BGQynB/V4NDkFKAE4acolISNC2R3KWAXgo7DrTosqt/0FEqy96YhZrkqsnyqpAY5nRxMEdpDwEWR+eITlzNTrg== +"@sentry/integrations@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.16.0.tgz#fa6a2a2b7275efec5cf67c07eb76297447301ff2" + integrity sha512-PJRmFUHOKMf1APOlwxGB7Z6LHzJP4xL6OLSoiwnruRuHaGvdyILA53fr/A6wRMSPyTxJDJpNkcN36cA56mLxYA== dependencies: - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" localforage "^1.8.1" tslib "^1.9.3" -"@sentry/react@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.15.0.tgz#441ed851ca64afeef10abcb00302e0c95846404e" - integrity sha512-a+5+Og93YPtWSCmOFYa/qzrbvfgIZXShJk1bsIaEI0KdltTOVJBdwvLQc8OiIOBe/CMDVCmK1t2DqiWfOWj41w== +"@sentry/react@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.16.0.tgz#7b214736804b7516ba66230301bc6f0202060a91" + integrity sha512-tJH5zO4MPopzqZgi7Yd4iIB9Am5uGVefgkHaoeCGXffveEVWqEdjj8TqPL36SBb76gCmtpa01NBDsUSDZ1w/yw== dependencies: - "@sentry/browser" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/browser" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" hoist-non-react-statics "^3.3.2" tslib "^1.9.3" -"@sentry/tracing@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.15.0.tgz#ea516957b2ed39f389c21132f433b6470d54b465" - integrity sha512-c0Y3+z6EWsc+EJsfBcRtc58ugkWYa6+6KTu3ceMkx2ZgZTCmRUuzAb7yodMt/gwezBsxzq706fnQivx1lQgzlQ== +"@sentry/tracing@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.16.0.tgz#823b84abf0df08ecd16669547b4281e3c7a96ac9" + integrity sha512-8a9bViUY7oS35msBMouxkgz5OGd9NGutuKF7SQ8hPZwTcQPOxOwPyHccykgr56k6OmaDjGCLZMqZowaysJj+4g== dependencies: - "@sentry/core" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/types@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.15.0.tgz#50c57c924993d4dd16b43172d310c66384d17463" - integrity sha512-MN9haDRh9ZOsTotoDTHu2BT3sT8Vs1F0alhizUpDyjN2YgBCqR6JV+AbAE1XNHwS2+5zbppch1PwJUVeE58URQ== +"@sentry/types@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.16.0.tgz#79c06ada153a84feb949fa49b1c9d15f91decd79" + integrity sha512-i6D+OK6d0l/k+VQvRp/Pt21WkDEgVBUIZq+sOkEZJczbcfexVdXKeXXoYTD2vYuFq8Yy28fzlsZaKI+NoH94yQ== "@sentry/typescript@^5.20.1": version "5.20.1" @@ -1247,12 +1247,12 @@ tslint-config-prettier "^1.18.0" tslint-consistent-codestyle "^1.15.1" -"@sentry/utils@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.15.0.tgz#cda642a353a58fd6631979c1e5986788e6db6c43" - integrity sha512-akic22/6xa/RG5Mj7UN6pLc23VnX9zQlKM53L/q3yIr0juckSVthJiiFNdgdqrX03S1tHYlBgPeShKFFTHpkjA== +"@sentry/utils@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.16.0.tgz#b832520c661d4435808969ee04814ff8e20497b1" + integrity sha512-3Zh1txg7IRp4kZAdG27YF7K6lD1IZyuAo9KjoPg1Xzqa4DOZyASJuEkbf+rK2a9T4HrtVHHXJUsNbKg8WM3VHg== dependencies: - "@sentry/types" "7.15.0" + "@sentry/types" "7.16.0" tslib "^1.9.3" "@sentry/wizard@1.2.17": From 98208ed5217d1c49d4dea95dcbf408c6468d8cb0 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Fri, 21 Oct 2022 16:21:07 +0200 Subject: [PATCH 2/5] Use new JS SDK global object --- .../integrations/reactnativeerrorhandlers.ts | 7 +++---- src/js/sdk.tsx | 6 +++--- src/js/tracing/reactnavigation.ts | 9 ++++----- src/js/tracing/reactnavigationv4.ts | 9 ++++----- src/js/utils/worldwide.ts | 10 ++++++++++ test/tracing/reactnavigation.test.ts | 18 +++++++----------- test/tracing/reactnavigationv4.test.ts | 16 ++++++---------- 7 files changed, 37 insertions(+), 38 deletions(-) create mode 100644 src/js/utils/worldwide.ts diff --git a/src/js/integrations/reactnativeerrorhandlers.ts b/src/js/integrations/reactnativeerrorhandlers.ts index e3b75571fa..2369877ae6 100644 --- a/src/js/integrations/reactnativeerrorhandlers.ts +++ b/src/js/integrations/reactnativeerrorhandlers.ts @@ -1,8 +1,9 @@ import { getCurrentHub } from '@sentry/core'; import { Integration, SeverityLevel } from '@sentry/types'; -import { addExceptionMechanism, getGlobalObject, logger } from '@sentry/utils'; +import { addExceptionMechanism, logger } from '@sentry/utils'; import { ReactNativeClient } from '../client'; +import { RN_GLOBAL_OBJ } from '../utils/worldwide'; /** ReactNativeErrorHandlers Options */ interface ReactNativeErrorHandlersOptions { @@ -142,9 +143,7 @@ export class ReactNativeErrorHandlers implements Integration { // eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-extraneous-dependencies const Promise = require('promise/setimmediate/es6-extensions'); - const _global = getGlobalObject<{ Promise: typeof Promise }>(); - - if (Promise !== _global.Promise) { + if (Promise !== RN_GLOBAL_OBJ.Promise) { logger.warn( 'Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page.' ); diff --git a/src/js/sdk.tsx b/src/js/sdk.tsx index f44158975a..4f7c8ab273 100644 --- a/src/js/sdk.tsx +++ b/src/js/sdk.tsx @@ -6,7 +6,7 @@ import { getCurrentHub, } from '@sentry/react'; import { Integration, Scope, StackFrame, UserFeedback } from '@sentry/types'; -import { getGlobalObject, logger, stackParserFromStackParserOptions } from '@sentry/utils'; +import { logger, stackParserFromStackParserOptions } from '@sentry/utils'; import * as React from 'react'; import { ReactNativeClient } from './client'; @@ -25,6 +25,7 @@ import { ReactNativeProfiler, ReactNativeTracing } from './tracing'; import { makeReactNativeTransport } from './transports/native'; import { makeUtf8TextEncoder } from './transports/TextEncoder'; import { safeFactory, safeTracesSampler } from './utils/safe'; +import { RN_GLOBAL_OBJ } from './utils/worldwide'; const IGNORED_DEFAULT_INTEGRATIONS = [ 'GlobalHandlers', // We will use the react-native internal handlers @@ -130,8 +131,7 @@ export function init(passedOptions: ReactNativeOptions): void { }); initAndBind(ReactNativeClient, options); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-explicit-any - if (getGlobalObject().HermesInternal) { + if (RN_GLOBAL_OBJ.HermesInternal) { getCurrentHub().setTag('hermes', 'true'); } } diff --git a/src/js/tracing/reactnavigation.ts b/src/js/tracing/reactnavigation.ts index cc2bc64450..40c5608437 100644 --- a/src/js/tracing/reactnavigation.ts +++ b/src/js/tracing/reactnavigation.ts @@ -1,7 +1,8 @@ /* eslint-disable max-lines */ import { Transaction as TransactionType, TransactionContext } from '@sentry/types'; -import { getGlobalObject, logger } from '@sentry/utils'; +import { logger } from '@sentry/utils'; +import { RN_GLOBAL_OBJ } from '../utils/worldwide'; import { InternalRoutingInstrumentation, OnConfirmRoute, @@ -105,14 +106,12 @@ export class ReactNavigationInstrumentation extends InternalRoutingInstrumentati */ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types public registerNavigationContainer(navigationContainerRef: any): void { - const _global = getGlobalObject<{ __sentry_rn_v5_registered?: boolean }>(); - /* We prevent duplicate routing instrumentation to be initialized on fast refreshes Explanation: If the user triggers a fast refresh on the file that the instrumentation is initialized in, it will initialize a new instance and will cause undefined behavior. */ - if (!_global.__sentry_rn_v5_registered) { + if (!RN_GLOBAL_OBJ.__sentry_rn_v5_registered) { if ('current' in navigationContainerRef) { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access this._navigationContainer = navigationContainerRef.current; @@ -143,7 +142,7 @@ export class ReactNavigationInstrumentation extends InternalRoutingInstrumentati } } - _global.__sentry_rn_v5_registered = true; + RN_GLOBAL_OBJ.__sentry_rn_v5_registered = true; } else { logger.warn( '[ReactNavigationInstrumentation] Received invalid navigation container ref!' diff --git a/src/js/tracing/reactnavigationv4.ts b/src/js/tracing/reactnavigationv4.ts index 20c632393c..ec52f01f0f 100644 --- a/src/js/tracing/reactnavigationv4.ts +++ b/src/js/tracing/reactnavigationv4.ts @@ -1,7 +1,8 @@ /* eslint-disable max-lines */ import { Transaction, TransactionContext } from '@sentry/types'; -import { getGlobalObject, logger } from '@sentry/utils'; +import { logger } from '@sentry/utils'; +import { RN_GLOBAL_OBJ } from '../utils/worldwide'; import { InternalRoutingInstrumentation, OnConfirmRoute, @@ -124,14 +125,12 @@ class ReactNavigationV4Instrumentation extends InternalRoutingInstrumentation { */ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types public registerAppContainer(appContainerRef: any): void { - const _global = getGlobalObject<{ __sentry_rn_v4_registered?: boolean }>(); - /* We prevent duplicate routing instrumentation to be initialized on fast refreshes Explanation: If the user triggers a fast refresh on the file that the instrumentation is initialized in, it will initialize a new instance and will cause undefined behavior. */ - if (!_global.__sentry_rn_v4_registered) { + if (!RN_GLOBAL_OBJ.__sentry_rn_v4_registered) { if ('current' in appContainerRef) { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access this._appContainer = appContainerRef.current; @@ -153,7 +152,7 @@ class ReactNavigationV4Instrumentation extends InternalRoutingInstrumentation { this._initialStateHandled = true; } - _global.__sentry_rn_v4_registered = true; + RN_GLOBAL_OBJ.__sentry_rn_v4_registered = true; } else { logger.warn( '[ReactNavigationV4Instrumentation] Received invalid app container ref!' diff --git a/src/js/utils/worldwide.ts b/src/js/utils/worldwide.ts new file mode 100644 index 0000000000..190cf231fa --- /dev/null +++ b/src/js/utils/worldwide.ts @@ -0,0 +1,10 @@ +import { GLOBAL_OBJ, InternalGlobal } from '@sentry/utils'; + +export interface ReactNativeInternalGlobal extends InternalGlobal { + __sentry_rn_v4_registered?: boolean; + __sentry_rn_v5_registered?: boolean; + HermesInternal: unknown; + Promise: unknown; +} + +export const RN_GLOBAL_OBJ = GLOBAL_OBJ as ReactNativeInternalGlobal; diff --git a/test/tracing/reactnavigation.test.ts b/test/tracing/reactnavigation.test.ts index bf3fc9ffa9..e0c0906326 100644 --- a/test/tracing/reactnavigation.test.ts +++ b/test/tracing/reactnavigation.test.ts @@ -1,13 +1,13 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Transaction } from '@sentry/tracing'; import { TransactionContext } from '@sentry/types'; -import { getGlobalObject } from '@sentry/utils'; import { BLANK_TRANSACTION_CONTEXT, NavigationRoute, ReactNavigationInstrumentation, } from '../../src/js/tracing/reactnavigation'; +import { RN_GLOBAL_OBJ } from '../../src/js/utils/worldwide'; const dummyRoute = { name: 'Route', @@ -36,12 +36,8 @@ const getMockTransaction = () => { return transaction; }; -const _global = getGlobalObject<{ - __sentry_rn_v5_registered?: boolean; -}>(); - afterEach(() => { - _global.__sentry_rn_v5_registered = false; + RN_GLOBAL_OBJ.__sentry_rn_v5_registered = false; jest.resetAllMocks(); }); @@ -120,7 +116,7 @@ describe('ReactNavigationInstrumentation', () => { someParam: 42, }, }; - // If .getCurrentRoute() is undefined, ignore state change + // If .getCurrentRoute() is undefined, ignore state change mockNavigationContainerRef.current.currentRoute = undefined; mockNavigationContainerRef.current.listeners['state']({}); @@ -297,7 +293,7 @@ describe('ReactNavigationInstrumentation', () => { current: mockNavigationContainer, }); - expect(_global.__sentry_rn_v5_registered).toBe(true); + expect(RN_GLOBAL_OBJ.__sentry_rn_v5_registered).toBe(true); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockNavigationContainer.addListener).toHaveBeenNthCalledWith( @@ -318,7 +314,7 @@ describe('ReactNavigationInstrumentation', () => { const mockNavigationContainer = new MockNavigationContainer(); instrumentation.registerNavigationContainer(mockNavigationContainer); - expect(_global.__sentry_rn_v5_registered).toBe(true); + expect(RN_GLOBAL_OBJ.__sentry_rn_v5_registered).toBe(true); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockNavigationContainer.addListener).toHaveBeenNthCalledWith( @@ -335,7 +331,7 @@ describe('ReactNavigationInstrumentation', () => { }); test('does not register navigation container if there is an existing one', () => { - _global.__sentry_rn_v5_registered = true; + RN_GLOBAL_OBJ.__sentry_rn_v5_registered = true; const instrumentation = new ReactNavigationInstrumentation(); const mockNavigationContainer = new MockNavigationContainer(); @@ -343,7 +339,7 @@ describe('ReactNavigationInstrumentation', () => { current: mockNavigationContainer, }); - expect(_global.__sentry_rn_v5_registered).toBe(true); + expect(RN_GLOBAL_OBJ.__sentry_rn_v5_registered).toBe(true); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockNavigationContainer.addListener).not.toHaveBeenCalled(); diff --git a/test/tracing/reactnavigationv4.test.ts b/test/tracing/reactnavigationv4.test.ts index 9aaa2095f3..873bcb7c4b 100644 --- a/test/tracing/reactnavigationv4.test.ts +++ b/test/tracing/reactnavigationv4.test.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Transaction } from '@sentry/tracing'; import { TransactionContext } from '@sentry/types'; -import { getGlobalObject } from '@sentry/utils'; import { AppContainerInstance, @@ -10,6 +9,7 @@ import { NavigationStateV4, ReactNavigationV4Instrumentation, } from '../../src/js/tracing/reactnavigationv4'; +import { RN_GLOBAL_OBJ } from '../../src/js/utils/worldwide'; const initialRoute = { routeName: 'Initial Route', @@ -82,12 +82,8 @@ class MockAppContainer implements AppContainerInstance { } } -const _global = getGlobalObject<{ - __sentry_rn_v4_registered?: boolean; -}>(); - afterEach(() => { - _global.__sentry_rn_v4_registered = false; + RN_GLOBAL_OBJ.__sentry_rn_v4_registered = false; jest.resetAllMocks(); }); @@ -313,7 +309,7 @@ describe('ReactNavigationV4Instrumentation', () => { current: mockAppContainer, }); - expect(_global.__sentry_rn_v4_registered).toBe(true); + expect(RN_GLOBAL_OBJ.__sentry_rn_v4_registered).toBe(true); // eslint-disable-next-line @typescript-eslint/unbound-method expect(instrumentation.onRouteWillChange).toHaveBeenCalledTimes(1); @@ -336,7 +332,7 @@ describe('ReactNavigationV4Instrumentation', () => { const mockAppContainer = new MockAppContainer(); instrumentation.registerAppContainer(mockAppContainer); - expect(_global.__sentry_rn_v4_registered).toBe(true); + expect(RN_GLOBAL_OBJ.__sentry_rn_v4_registered).toBe(true); // eslint-disable-next-line @typescript-eslint/unbound-method expect(instrumentation.onRouteWillChange).toHaveBeenCalledTimes(1); @@ -345,7 +341,7 @@ describe('ReactNavigationV4Instrumentation', () => { }); test('does not register navigation container if there is an existing one', async () => { - _global.__sentry_rn_v4_registered = true; + RN_GLOBAL_OBJ.__sentry_rn_v4_registered = true; const instrumentation = new ReactNavigationV4Instrumentation(); const mockTransaction = getMockTransaction(); @@ -361,7 +357,7 @@ describe('ReactNavigationV4Instrumentation', () => { const mockAppContainer = new MockAppContainer(); instrumentation.registerAppContainer(mockAppContainer); - expect(_global.__sentry_rn_v4_registered).toBe(true); + expect(RN_GLOBAL_OBJ.__sentry_rn_v4_registered).toBe(true); await new Promise((resolve) => { setTimeout(() => { From ea51a76c714de8d7d96931a017f93940a86918b3 Mon Sep 17 00:00:00 2001 From: GitHub Date: Sat, 22 Oct 2022 03:42:49 +0000 Subject: [PATCH 3/5] chore: update scripts/update-javascript.sh to 7.16.0 --- CHANGELOG.md | 6 +-- package.json | 20 ++++---- yarn.lock | 126 +++++++++++++++++++++++++-------------------------- 3 files changed, 76 insertions(+), 76 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0945718d8c..b7eba758cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,9 @@ - Bump Android SDK from v6.4.3 to v6.5.0 ([#2535](https://github.com/getsentry/sentry-react-native/pull/2535)) - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#650) - [diff](https://github.com/getsentry/sentry-java/compare/6.4.3...6.5.0) -- Bump JavaScript SDK from v7.14.2 to v7.15.0 ([#2536](https://github.com/getsentry/sentry-react-native/pull/2536)) - - [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7150) - - [diff](https://github.com/getsentry/sentry-javascript/compare/7.14.2...7.15.0) +- Bump JavaScript SDK from v7.14.2 to v7.16.0 ([#2536](https://github.com/getsentry/sentry-react-native/pull/2536), [#2561](https://github.com/getsentry/sentry-react-native/pull/2561)) + - [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7160) + - [diff](https://github.com/getsentry/sentry-javascript/compare/7.14.2...7.16.0) - Bump Cocoa SDK from v7.27.1 to v7.28.0 ([#2548](https://github.com/getsentry/sentry-react-native/pull/2548)) - [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7280) - [diff](https://github.com/getsentry/sentry-cocoa/compare/7.27.1...7.28.0) diff --git a/package.json b/package.json index 5d2be59211..9bc26a17ba 100644 --- a/package.json +++ b/package.json @@ -40,20 +40,20 @@ "react-native": ">=0.56.0" }, "dependencies": { - "@sentry/browser": "7.15.0", + "@sentry/browser": "7.16.0", "@sentry/cli": "1.74.4", - "@sentry/core": "7.15.0", - "@sentry/hub": "7.15.0", - "@sentry/integrations": "7.15.0", - "@sentry/react": "7.15.0", - "@sentry/tracing": "7.15.0", - "@sentry/types": "7.15.0", - "@sentry/utils": "7.15.0", + "@sentry/core": "7.16.0", + "@sentry/hub": "7.16.0", + "@sentry/integrations": "7.16.0", + "@sentry/react": "7.16.0", + "@sentry/tracing": "7.16.0", + "@sentry/types": "7.16.0", + "@sentry/utils": "7.16.0", "@sentry/wizard": "1.2.17" }, "devDependencies": { - "@sentry-internal/eslint-config-sdk": "7.15.0", - "@sentry-internal/eslint-plugin-sdk": "7.15.0", + "@sentry-internal/eslint-config-sdk": "7.16.0", + "@sentry-internal/eslint-plugin-sdk": "7.16.0", "@sentry/typescript": "^5.20.1", "@types/jest": "^26.0.15", "@types/react": "^16.9.49", diff --git a/yarn.lock b/yarn.lock index 567e69fa2c..ec8087043f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1123,13 +1123,13 @@ sudo-prompt "^9.0.0" wcwidth "^1.0.1" -"@sentry-internal/eslint-config-sdk@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-7.15.0.tgz#7f33c6c39c720132d9816364d55751cd26ab34e4" - integrity sha512-ttLoetchz0NkRuv8xkab/NF3u67lwWidYAIr8dV0Gc/wuefLwGr/XWdHff1hadXk528/7ZJcnNVUAE9DeeWYvA== +"@sentry-internal/eslint-config-sdk@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-7.16.0.tgz#a626e2d248c8a079adc7e0855215b372e5294f65" + integrity sha512-rFbHI6RlO0Y1vwxtvRW/KyOiYBdT3kyKVIf4sXJxUc0IJ6ETmFXjGNRerWKUg3AF7m5QfHNsKQhHMKXhsCGPog== dependencies: - "@sentry-internal/eslint-plugin-sdk" "7.15.0" - "@sentry-internal/typescript" "7.15.0" + "@sentry-internal/eslint-plugin-sdk" "7.16.0" + "@sentry-internal/typescript" "7.16.0" "@typescript-eslint/eslint-plugin" "^3.9.0" "@typescript-eslint/parser" "^3.9.0" eslint-config-prettier "^6.11.0" @@ -1138,26 +1138,26 @@ eslint-plugin-jsdoc "^30.0.3" eslint-plugin-simple-import-sort "^5.0.3" -"@sentry-internal/eslint-plugin-sdk@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-7.15.0.tgz#49dfa926033d70948aaf1f304e4d98d1f50d13b9" - integrity sha512-CYCf6i/kt5m49XKYNz5ocgRDGUSpQvImyT/qXvZGWnj4jKNeie4/k3abua2Dj765zZ1IpNscAuBudOG7rBTRlQ== +"@sentry-internal/eslint-plugin-sdk@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-7.16.0.tgz#8675577a2781fae3cfac918d95fcd1ac731c8350" + integrity sha512-NlNZs8JlMA9wK2SaTrbznqk9P8P8yM0oj/HI7CnDJFuBStfbdFLuf025ejnSLXCfdPNRnHxKsHkq78jXyyA+Kg== dependencies: requireindex "~1.1.0" -"@sentry-internal/typescript@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-7.15.0.tgz#72daf80ff94ab8ba4ae22c39dd3ab888d38b9229" - integrity sha512-Gjc2/w1+vxmZIwSXAZYcuT99BjjOPXhHlCscOXLlGhPx5qNhnIXZ52StlQbCfW0P6Qg6H2d4P/OYUGTcOXd7gQ== +"@sentry-internal/typescript@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-7.16.0.tgz#a37c15649ed9d36d0e3ea0e1f622bb157308d5ce" + integrity sha512-cudpmUkvKmJNiCud5z/J+zbPDaulwClG/wLeK/+tFKz+qI5zrFWP9FGD4lTvL2wRyz8eQ4qTXtdaFK2RkxU/7A== -"@sentry/browser@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.15.0.tgz#1723dc8efcea9239d26072126755f61f6fb9448d" - integrity sha512-vZYr8L2JmniV8cns4yGOpX32moazz6tsllB1uv7XmmELW98sIuuugVFX0k6cBi89R8pyhdqULFCf9CL8CRguRg== +"@sentry/browser@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.16.0.tgz#afd2bac91857d2359272a0d9d2b1ee5ca7d69828" + integrity sha512-tJ063zvoF8Raw7mzQEXupOFPSN6v36WIbsDVGeFdToPCwViaBuATaxvWCrudGzsnBkMyItmTLJkzn9SEIXUOiw== dependencies: - "@sentry/core" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" "@sentry/cli@1.74.4": @@ -1184,60 +1184,60 @@ progress "^2.0.3" proxy-from-env "^1.1.0" -"@sentry/core@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.15.0.tgz#983e08326afdb8ddb10494372cd22b3886d683c9" - integrity sha512-W8d44g04GShBn4Z9VBTUhf1T9LTMfzUnETEx237zzUucv0kkyj3LsWQsJapWchMbmwr1V/CdnNDN+lGDm8iXQA== +"@sentry/core@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.16.0.tgz#60f9b54ef2ec524176b329e1d15be39c36da5953" + integrity sha512-vq6H1b/IPTvzDD9coQ3wIudvSjkAYuUlXb1dv69dRlq4v3st9dcKBps1Zf0lQ1i4TVlDLoe1iGMmNFglMF1Q5w== dependencies: - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/hub@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.15.0.tgz#d4da91c15ab0a1ee2d70796bf7b2fda35f06837f" - integrity sha512-v15sSoYuKJ9+BmDUX6qxAnCDhlClmw6TY9/rcIYbP2XSxsGrJcPy6VPOw4E21/1zGXnKiW7KvBkPeYEjIx7fWA== +"@sentry/hub@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.16.0.tgz#26d65a2f6c71d18ec7a20f352fa8c4c461db2940" + integrity sha512-eCM66JPS2nw+fQK3vpJhs6Lxf4FqOwPqIpFbJ2TivQ8kgJyolHOyeH/LsmJbcw97P4sc3O3LHt5v93vTKmlDrw== dependencies: - "@sentry/core" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/integrations@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.15.0.tgz#c2af3a2d2c0667216d76d829f24c5125b110e6c8" - integrity sha512-BGQynB/V4NDkFKAE4acolISNC2R3KWAXgo7DrTosqt/0FEqy96YhZrkqsnyqpAY5nRxMEdpDwEWR+eITlzNTrg== +"@sentry/integrations@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.16.0.tgz#fa6a2a2b7275efec5cf67c07eb76297447301ff2" + integrity sha512-PJRmFUHOKMf1APOlwxGB7Z6LHzJP4xL6OLSoiwnruRuHaGvdyILA53fr/A6wRMSPyTxJDJpNkcN36cA56mLxYA== dependencies: - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" localforage "^1.8.1" tslib "^1.9.3" -"@sentry/react@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.15.0.tgz#441ed851ca64afeef10abcb00302e0c95846404e" - integrity sha512-a+5+Og93YPtWSCmOFYa/qzrbvfgIZXShJk1bsIaEI0KdltTOVJBdwvLQc8OiIOBe/CMDVCmK1t2DqiWfOWj41w== +"@sentry/react@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.16.0.tgz#7b214736804b7516ba66230301bc6f0202060a91" + integrity sha512-tJH5zO4MPopzqZgi7Yd4iIB9Am5uGVefgkHaoeCGXffveEVWqEdjj8TqPL36SBb76gCmtpa01NBDsUSDZ1w/yw== dependencies: - "@sentry/browser" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/browser" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" hoist-non-react-statics "^3.3.2" tslib "^1.9.3" -"@sentry/tracing@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.15.0.tgz#ea516957b2ed39f389c21132f433b6470d54b465" - integrity sha512-c0Y3+z6EWsc+EJsfBcRtc58ugkWYa6+6KTu3ceMkx2ZgZTCmRUuzAb7yodMt/gwezBsxzq706fnQivx1lQgzlQ== +"@sentry/tracing@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.16.0.tgz#823b84abf0df08ecd16669547b4281e3c7a96ac9" + integrity sha512-8a9bViUY7oS35msBMouxkgz5OGd9NGutuKF7SQ8hPZwTcQPOxOwPyHccykgr56k6OmaDjGCLZMqZowaysJj+4g== dependencies: - "@sentry/core" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/types@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.15.0.tgz#50c57c924993d4dd16b43172d310c66384d17463" - integrity sha512-MN9haDRh9ZOsTotoDTHu2BT3sT8Vs1F0alhizUpDyjN2YgBCqR6JV+AbAE1XNHwS2+5zbppch1PwJUVeE58URQ== +"@sentry/types@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.16.0.tgz#79c06ada153a84feb949fa49b1c9d15f91decd79" + integrity sha512-i6D+OK6d0l/k+VQvRp/Pt21WkDEgVBUIZq+sOkEZJczbcfexVdXKeXXoYTD2vYuFq8Yy28fzlsZaKI+NoH94yQ== "@sentry/typescript@^5.20.1": version "5.20.1" @@ -1247,12 +1247,12 @@ tslint-config-prettier "^1.18.0" tslint-consistent-codestyle "^1.15.1" -"@sentry/utils@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.15.0.tgz#cda642a353a58fd6631979c1e5986788e6db6c43" - integrity sha512-akic22/6xa/RG5Mj7UN6pLc23VnX9zQlKM53L/q3yIr0juckSVthJiiFNdgdqrX03S1tHYlBgPeShKFFTHpkjA== +"@sentry/utils@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.16.0.tgz#b832520c661d4435808969ee04814ff8e20497b1" + integrity sha512-3Zh1txg7IRp4kZAdG27YF7K6lD1IZyuAo9KjoPg1Xzqa4DOZyASJuEkbf+rK2a9T4HrtVHHXJUsNbKg8WM3VHg== dependencies: - "@sentry/types" "7.15.0" + "@sentry/types" "7.16.0" tslib "^1.9.3" "@sentry/wizard@1.2.17": From 4a86d2eb230bed0e3fdfc7a1f59946aa3327409c Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Mon, 24 Oct 2022 10:35:25 +0200 Subject: [PATCH 4/5] Add JS docs --- src/js/utils/worldwide.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js/utils/worldwide.ts b/src/js/utils/worldwide.ts index 190cf231fa..39acf1f96a 100644 --- a/src/js/utils/worldwide.ts +++ b/src/js/utils/worldwide.ts @@ -1,5 +1,6 @@ import { GLOBAL_OBJ, InternalGlobal } from '@sentry/utils'; +/** Internal Global object interface with common and Sentry specific properties */ export interface ReactNativeInternalGlobal extends InternalGlobal { __sentry_rn_v4_registered?: boolean; __sentry_rn_v5_registered?: boolean; @@ -7,4 +8,5 @@ export interface ReactNativeInternalGlobal extends InternalGlobal { Promise: unknown; } +/** Get's the global object for the current JavaScript runtime */ export const RN_GLOBAL_OBJ = GLOBAL_OBJ as ReactNativeInternalGlobal; From 4483f4ca515550852f0f5037069e994d73ae797e Mon Sep 17 00:00:00 2001 From: GitHub Date: Mon, 24 Oct 2022 09:58:55 +0000 Subject: [PATCH 5/5] chore: update scripts/update-javascript.sh to 7.16.0 --- CHANGELOG.md | 6 +-- package.json | 20 ++++---- yarn.lock | 126 +++++++++++++++++++++++++-------------------------- 3 files changed, 76 insertions(+), 76 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0945718d8c..b7eba758cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,9 @@ - Bump Android SDK from v6.4.3 to v6.5.0 ([#2535](https://github.com/getsentry/sentry-react-native/pull/2535)) - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#650) - [diff](https://github.com/getsentry/sentry-java/compare/6.4.3...6.5.0) -- Bump JavaScript SDK from v7.14.2 to v7.15.0 ([#2536](https://github.com/getsentry/sentry-react-native/pull/2536)) - - [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7150) - - [diff](https://github.com/getsentry/sentry-javascript/compare/7.14.2...7.15.0) +- Bump JavaScript SDK from v7.14.2 to v7.16.0 ([#2536](https://github.com/getsentry/sentry-react-native/pull/2536), [#2561](https://github.com/getsentry/sentry-react-native/pull/2561)) + - [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7160) + - [diff](https://github.com/getsentry/sentry-javascript/compare/7.14.2...7.16.0) - Bump Cocoa SDK from v7.27.1 to v7.28.0 ([#2548](https://github.com/getsentry/sentry-react-native/pull/2548)) - [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7280) - [diff](https://github.com/getsentry/sentry-cocoa/compare/7.27.1...7.28.0) diff --git a/package.json b/package.json index 5d2be59211..9bc26a17ba 100644 --- a/package.json +++ b/package.json @@ -40,20 +40,20 @@ "react-native": ">=0.56.0" }, "dependencies": { - "@sentry/browser": "7.15.0", + "@sentry/browser": "7.16.0", "@sentry/cli": "1.74.4", - "@sentry/core": "7.15.0", - "@sentry/hub": "7.15.0", - "@sentry/integrations": "7.15.0", - "@sentry/react": "7.15.0", - "@sentry/tracing": "7.15.0", - "@sentry/types": "7.15.0", - "@sentry/utils": "7.15.0", + "@sentry/core": "7.16.0", + "@sentry/hub": "7.16.0", + "@sentry/integrations": "7.16.0", + "@sentry/react": "7.16.0", + "@sentry/tracing": "7.16.0", + "@sentry/types": "7.16.0", + "@sentry/utils": "7.16.0", "@sentry/wizard": "1.2.17" }, "devDependencies": { - "@sentry-internal/eslint-config-sdk": "7.15.0", - "@sentry-internal/eslint-plugin-sdk": "7.15.0", + "@sentry-internal/eslint-config-sdk": "7.16.0", + "@sentry-internal/eslint-plugin-sdk": "7.16.0", "@sentry/typescript": "^5.20.1", "@types/jest": "^26.0.15", "@types/react": "^16.9.49", diff --git a/yarn.lock b/yarn.lock index 567e69fa2c..ec8087043f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1123,13 +1123,13 @@ sudo-prompt "^9.0.0" wcwidth "^1.0.1" -"@sentry-internal/eslint-config-sdk@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-7.15.0.tgz#7f33c6c39c720132d9816364d55751cd26ab34e4" - integrity sha512-ttLoetchz0NkRuv8xkab/NF3u67lwWidYAIr8dV0Gc/wuefLwGr/XWdHff1hadXk528/7ZJcnNVUAE9DeeWYvA== +"@sentry-internal/eslint-config-sdk@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-7.16.0.tgz#a626e2d248c8a079adc7e0855215b372e5294f65" + integrity sha512-rFbHI6RlO0Y1vwxtvRW/KyOiYBdT3kyKVIf4sXJxUc0IJ6ETmFXjGNRerWKUg3AF7m5QfHNsKQhHMKXhsCGPog== dependencies: - "@sentry-internal/eslint-plugin-sdk" "7.15.0" - "@sentry-internal/typescript" "7.15.0" + "@sentry-internal/eslint-plugin-sdk" "7.16.0" + "@sentry-internal/typescript" "7.16.0" "@typescript-eslint/eslint-plugin" "^3.9.0" "@typescript-eslint/parser" "^3.9.0" eslint-config-prettier "^6.11.0" @@ -1138,26 +1138,26 @@ eslint-plugin-jsdoc "^30.0.3" eslint-plugin-simple-import-sort "^5.0.3" -"@sentry-internal/eslint-plugin-sdk@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-7.15.0.tgz#49dfa926033d70948aaf1f304e4d98d1f50d13b9" - integrity sha512-CYCf6i/kt5m49XKYNz5ocgRDGUSpQvImyT/qXvZGWnj4jKNeie4/k3abua2Dj765zZ1IpNscAuBudOG7rBTRlQ== +"@sentry-internal/eslint-plugin-sdk@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-7.16.0.tgz#8675577a2781fae3cfac918d95fcd1ac731c8350" + integrity sha512-NlNZs8JlMA9wK2SaTrbznqk9P8P8yM0oj/HI7CnDJFuBStfbdFLuf025ejnSLXCfdPNRnHxKsHkq78jXyyA+Kg== dependencies: requireindex "~1.1.0" -"@sentry-internal/typescript@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-7.15.0.tgz#72daf80ff94ab8ba4ae22c39dd3ab888d38b9229" - integrity sha512-Gjc2/w1+vxmZIwSXAZYcuT99BjjOPXhHlCscOXLlGhPx5qNhnIXZ52StlQbCfW0P6Qg6H2d4P/OYUGTcOXd7gQ== +"@sentry-internal/typescript@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-7.16.0.tgz#a37c15649ed9d36d0e3ea0e1f622bb157308d5ce" + integrity sha512-cudpmUkvKmJNiCud5z/J+zbPDaulwClG/wLeK/+tFKz+qI5zrFWP9FGD4lTvL2wRyz8eQ4qTXtdaFK2RkxU/7A== -"@sentry/browser@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.15.0.tgz#1723dc8efcea9239d26072126755f61f6fb9448d" - integrity sha512-vZYr8L2JmniV8cns4yGOpX32moazz6tsllB1uv7XmmELW98sIuuugVFX0k6cBi89R8pyhdqULFCf9CL8CRguRg== +"@sentry/browser@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.16.0.tgz#afd2bac91857d2359272a0d9d2b1ee5ca7d69828" + integrity sha512-tJ063zvoF8Raw7mzQEXupOFPSN6v36WIbsDVGeFdToPCwViaBuATaxvWCrudGzsnBkMyItmTLJkzn9SEIXUOiw== dependencies: - "@sentry/core" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" "@sentry/cli@1.74.4": @@ -1184,60 +1184,60 @@ progress "^2.0.3" proxy-from-env "^1.1.0" -"@sentry/core@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.15.0.tgz#983e08326afdb8ddb10494372cd22b3886d683c9" - integrity sha512-W8d44g04GShBn4Z9VBTUhf1T9LTMfzUnETEx237zzUucv0kkyj3LsWQsJapWchMbmwr1V/CdnNDN+lGDm8iXQA== +"@sentry/core@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.16.0.tgz#60f9b54ef2ec524176b329e1d15be39c36da5953" + integrity sha512-vq6H1b/IPTvzDD9coQ3wIudvSjkAYuUlXb1dv69dRlq4v3st9dcKBps1Zf0lQ1i4TVlDLoe1iGMmNFglMF1Q5w== dependencies: - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/hub@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.15.0.tgz#d4da91c15ab0a1ee2d70796bf7b2fda35f06837f" - integrity sha512-v15sSoYuKJ9+BmDUX6qxAnCDhlClmw6TY9/rcIYbP2XSxsGrJcPy6VPOw4E21/1zGXnKiW7KvBkPeYEjIx7fWA== +"@sentry/hub@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.16.0.tgz#26d65a2f6c71d18ec7a20f352fa8c4c461db2940" + integrity sha512-eCM66JPS2nw+fQK3vpJhs6Lxf4FqOwPqIpFbJ2TivQ8kgJyolHOyeH/LsmJbcw97P4sc3O3LHt5v93vTKmlDrw== dependencies: - "@sentry/core" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/integrations@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.15.0.tgz#c2af3a2d2c0667216d76d829f24c5125b110e6c8" - integrity sha512-BGQynB/V4NDkFKAE4acolISNC2R3KWAXgo7DrTosqt/0FEqy96YhZrkqsnyqpAY5nRxMEdpDwEWR+eITlzNTrg== +"@sentry/integrations@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.16.0.tgz#fa6a2a2b7275efec5cf67c07eb76297447301ff2" + integrity sha512-PJRmFUHOKMf1APOlwxGB7Z6LHzJP4xL6OLSoiwnruRuHaGvdyILA53fr/A6wRMSPyTxJDJpNkcN36cA56mLxYA== dependencies: - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" localforage "^1.8.1" tslib "^1.9.3" -"@sentry/react@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.15.0.tgz#441ed851ca64afeef10abcb00302e0c95846404e" - integrity sha512-a+5+Og93YPtWSCmOFYa/qzrbvfgIZXShJk1bsIaEI0KdltTOVJBdwvLQc8OiIOBe/CMDVCmK1t2DqiWfOWj41w== +"@sentry/react@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.16.0.tgz#7b214736804b7516ba66230301bc6f0202060a91" + integrity sha512-tJH5zO4MPopzqZgi7Yd4iIB9Am5uGVefgkHaoeCGXffveEVWqEdjj8TqPL36SBb76gCmtpa01NBDsUSDZ1w/yw== dependencies: - "@sentry/browser" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/browser" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" hoist-non-react-statics "^3.3.2" tslib "^1.9.3" -"@sentry/tracing@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.15.0.tgz#ea516957b2ed39f389c21132f433b6470d54b465" - integrity sha512-c0Y3+z6EWsc+EJsfBcRtc58ugkWYa6+6KTu3ceMkx2ZgZTCmRUuzAb7yodMt/gwezBsxzq706fnQivx1lQgzlQ== +"@sentry/tracing@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.16.0.tgz#823b84abf0df08ecd16669547b4281e3c7a96ac9" + integrity sha512-8a9bViUY7oS35msBMouxkgz5OGd9NGutuKF7SQ8hPZwTcQPOxOwPyHccykgr56k6OmaDjGCLZMqZowaysJj+4g== dependencies: - "@sentry/core" "7.15.0" - "@sentry/types" "7.15.0" - "@sentry/utils" "7.15.0" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/types@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.15.0.tgz#50c57c924993d4dd16b43172d310c66384d17463" - integrity sha512-MN9haDRh9ZOsTotoDTHu2BT3sT8Vs1F0alhizUpDyjN2YgBCqR6JV+AbAE1XNHwS2+5zbppch1PwJUVeE58URQ== +"@sentry/types@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.16.0.tgz#79c06ada153a84feb949fa49b1c9d15f91decd79" + integrity sha512-i6D+OK6d0l/k+VQvRp/Pt21WkDEgVBUIZq+sOkEZJczbcfexVdXKeXXoYTD2vYuFq8Yy28fzlsZaKI+NoH94yQ== "@sentry/typescript@^5.20.1": version "5.20.1" @@ -1247,12 +1247,12 @@ tslint-config-prettier "^1.18.0" tslint-consistent-codestyle "^1.15.1" -"@sentry/utils@7.15.0": - version "7.15.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.15.0.tgz#cda642a353a58fd6631979c1e5986788e6db6c43" - integrity sha512-akic22/6xa/RG5Mj7UN6pLc23VnX9zQlKM53L/q3yIr0juckSVthJiiFNdgdqrX03S1tHYlBgPeShKFFTHpkjA== +"@sentry/utils@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.16.0.tgz#b832520c661d4435808969ee04814ff8e20497b1" + integrity sha512-3Zh1txg7IRp4kZAdG27YF7K6lD1IZyuAo9KjoPg1Xzqa4DOZyASJuEkbf+rK2a9T4HrtVHHXJUsNbKg8WM3VHg== dependencies: - "@sentry/types" "7.15.0" + "@sentry/types" "7.16.0" tslib "^1.9.3" "@sentry/wizard@1.2.17":