From 95a83fd506e877865ad5cbc0b306e1419142ab26 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 30 Sep 2022 09:39:25 +0200 Subject: [PATCH 01/10] chore(deps): update Cocoa SDK to v7.27.0 (#2506) Co-authored-by: GitHub --- CHANGELOG.md | 6 +++--- RNSentry.podspec | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2190f6a39..ef35729ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,9 +16,9 @@ ### Dependencies -- Bump Cocoa SDK from v7.25.1 to v7.26.0 ([#2500](https://github.com/getsentry/sentry-react-native/pull/2500)) - - [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7260) - - [diff](https://github.com/getsentry/sentry-cocoa/compare/7.25.1...7.26.0) +- Bump Cocoa SDK from v7.25.1 to v7.27.0 ([#2500](https://github.com/getsentry/sentry-react-native/pull/2500), [#2506](https://github.com/getsentry/sentry-react-native/pull/2506)) + - [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7270) + - [diff](https://github.com/getsentry/sentry-cocoa/compare/7.25.1...7.27.0) - Bump JavaScript SDK from v7.13.0 to v7.14.0 ([#2504](https://github.com/getsentry/sentry-react-native/pull/2504)) - [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7140) - [diff](https://github.com/getsentry/sentry-javascript/compare/7.13.0...7.14.0) diff --git a/RNSentry.podspec b/RNSentry.podspec index 12756c8c9..f154f6c99 100644 --- a/RNSentry.podspec +++ b/RNSentry.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.preserve_paths = '*.js' s.dependency 'React-Core' - s.dependency 'Sentry', '7.26.0' + s.dependency 'Sentry', '7.27.0' s.source_files = 'ios/RNSentry.{h,m}' s.public_header_files = 'ios/RNSentry.h' From 00db8d4e00cf38ef78eb0eea34673adf5650e9b0 Mon Sep 17 00:00:00 2001 From: Ivan Sorokin Date: Fri, 30 Sep 2022 12:41:32 +0200 Subject: [PATCH 02/10] fix(reactnavigation): ignore state change when getCurrentRoute() is undefined (#2484) --- CHANGELOG.md | 1 + src/js/tracing/reactnavigation.ts | 6 +++--- test/tracing/reactnavigation.test.ts | 8 ++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef35729ed..0c9d2ad1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixes - SDK Gracefully downgrades when callback throws an error ([#2502](https://github.com/getsentry/sentry-react-native/pull/2502)) +- React Navigation v5 ignores when current route is undefined after state changed. ([#2484](https://github.com/getsentry/sentry-react-native/pull/2484)) ### Features diff --git a/src/js/tracing/reactnavigation.ts b/src/js/tracing/reactnavigation.ts index 3dcae3a42..6da962ece 100644 --- a/src/js/tracing/reactnavigation.ts +++ b/src/js/tracing/reactnavigation.ts @@ -242,11 +242,11 @@ export class ReactNavigationInstrumentation extends InternalRoutingInstrumentati this._pushRecentRouteKey(route.key); this._latestRoute = route; + + // Clear the latest transaction as it has been handled. + this._latestTransaction = undefined; } } - - // Clear the latest transaction as it has been handled. - this._latestTransaction = undefined; } /** Creates final transaction context before confirmation */ diff --git a/test/tracing/reactnavigation.test.ts b/test/tracing/reactnavigation.test.ts index 66d327588..bf3fc9ffa 100644 --- a/test/tracing/reactnavigation.test.ts +++ b/test/tracing/reactnavigation.test.ts @@ -15,14 +15,14 @@ const dummyRoute = { }; class MockNavigationContainer { - currentRoute: NavigationRoute = dummyRoute; + currentRoute: NavigationRoute | undefined = dummyRoute; listeners: Record void> = {}; addListener: any = jest.fn( (eventType: string, listener: (e: any) => void): void => { this.listeners[eventType] = listener; } ); - getCurrentRoute(): NavigationRoute { + getCurrentRoute(): NavigationRoute | undefined { return this.currentRoute; } } @@ -120,6 +120,10 @@ describe('ReactNavigationInstrumentation', () => { someParam: 42, }, }; + // If .getCurrentRoute() is undefined, ignore state change + mockNavigationContainerRef.current.currentRoute = undefined; + mockNavigationContainerRef.current.listeners['state']({}); + mockNavigationContainerRef.current.currentRoute = route; mockNavigationContainerRef.current.listeners['state']({}); From 6ab84d3415f611f70a8aeadb47211c1565db7a70 Mon Sep 17 00:00:00 2001 From: getsentry-bot Date: Mon, 3 Oct 2022 09:10:25 +0000 Subject: [PATCH 03/10] release: 4.6.0 --- CHANGELOG.md | 2 +- package.json | 2 +- src/js/version.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c9d2ad1a..9dacb6cd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 4.6.0 ### Fixes diff --git a/package.json b/package.json index 33818879c..d9e837b47 100644 --- a/package.json +++ b/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": "4.5.0", + "version": "4.6.0", "description": "Official Sentry SDK for react-native", "typings": "dist/js/index.d.ts", "types": "dist/js/index.d.ts", diff --git a/src/js/version.ts b/src/js/version.ts index 56bb17270..785843a54 100644 --- a/src/js/version.ts +++ b/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 = '4.5.0'; +export const SDK_VERSION = '4.6.0'; From cdd980c0a924dd1bcdc0b09b68bcf8af4f144931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Wold=C5=99ich?= <31292499+krystofwoldrich@users.noreply.github.com> Date: Mon, 3 Oct 2022 16:25:05 +0200 Subject: [PATCH 04/10] fix(callbacks): Fix configureScope is safe (#2510) --- CHANGELOG.md | 6 ++++++ src/js/index.ts | 2 +- src/js/sdk.tsx | 15 +++++++++++++++ test/client.test.ts | 1 - test/sdk.test.ts | 18 +++++++++++++++++- test/testutils.ts | 2 -- 6 files changed, 39 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dacb6cd1..da3a1fd36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixes + +- Make `configureScope` callback safe [#2510](https://github.com/getsentry/sentry-react-native/pull/2510) + ## 4.6.0 ### Fixes diff --git a/src/js/index.ts b/src/js/index.ts index 31e3ca61f..3ac0c4db0 100644 --- a/src/js/index.ts +++ b/src/js/index.ts @@ -17,7 +17,6 @@ export { captureException, captureEvent, captureMessage, - configureScope, getHubFromCarrier, getCurrentHub, Hub, @@ -66,6 +65,7 @@ export { close, captureUserFeedback, withScope, + configureScope, } from './sdk'; export { TouchEventBoundary, withTouchEventBoundary } from './touchevents'; diff --git a/src/js/sdk.tsx b/src/js/sdk.tsx index 98ee7e5b0..b3e0eafea 100644 --- a/src/js/sdk.tsx +++ b/src/js/sdk.tsx @@ -262,3 +262,18 @@ export function withScope(callback: (scope: Scope) => void): ReturnType void): ReturnType { + const safeCallback = (scope: Scope): void => { + try { + callback(scope); + } catch (e) { + logger.error('Error while running configureScope callback', e); + } + }; + getCurrentHub().configureScope(safeCallback); +} diff --git a/test/client.test.ts b/test/client.test.ts index 694887d08..b744fbf44 100644 --- a/test/client.test.ts +++ b/test/client.test.ts @@ -13,7 +13,6 @@ import { envelopeItemPayload, envelopeItems, firstArg, - flushPromises, getMockSession, getMockUserFeedback, getSyncPromiseRejectOnFirstCall, diff --git a/test/sdk.test.ts b/test/sdk.test.ts index 6b3e49f6b..e788f1f8d 100644 --- a/test/sdk.test.ts +++ b/test/sdk.test.ts @@ -5,6 +5,7 @@ interface MockedClient { } let mockedGetCurrentHubWithScope: jest.Mock; +let mockedGetCurrentHubConfigureScope: jest.Mock; jest.mock('@sentry/react', () => { const actualModule = jest.requireActual('@sentry/react'); @@ -17,10 +18,12 @@ jest.mock('@sentry/react', () => { ...actualModule, getCurrentHub: jest.fn(() => { mockedGetCurrentHubWithScope = jest.fn(); + mockedGetCurrentHubConfigureScope = jest.fn(); return { getClient: jest.fn(() => mockClient), setTag: jest.fn(), withScope: mockedGetCurrentHubWithScope, + configureScope: mockedGetCurrentHubConfigureScope, }; }), defaultIntegrations: [ { name: 'MockedDefaultReactIntegration', setupOnce: jest.fn() } ], @@ -62,7 +65,7 @@ import { getCurrentHub } from '@sentry/react'; import { Integration, Scope } from '@sentry/types'; import { ReactNativeClientOptions } from '../src/js/options'; -import { flush, init, withScope } from '../src/js/sdk'; +import { configureScope,flush, init, withScope } from '../src/js/sdk'; import { ReactNativeTracing, ReactNavigationInstrumentation } from '../src/js/tracing'; import { firstArg, secondArg } from './testutils'; @@ -234,6 +237,19 @@ describe('Tests the SDK functionality', () => { }); }); + describe('configureScope', () => { + test('configureScope callback does not throw', () => { + const mockScopeCallback = jest.fn(() => { throw 'Test error' }); + + configureScope(mockScopeCallback); + + expect(() => { + (mockedGetCurrentHubConfigureScope.mock.calls[0][firstArg] as (scope: Scope) => void)({} as any); + }).not.toThrow(); + expect(mockScopeCallback).toBeCalledTimes(1); + }); + }); + describe('integrations', () => { it('replaces default integrations', () => { const mockDefaultIntegration = getMockedIntegration(); diff --git a/test/testutils.ts b/test/testutils.ts index b987f9486..51962daa0 100644 --- a/test/testutils.ts +++ b/test/testutils.ts @@ -64,5 +64,3 @@ export const getSyncPromiseRejectOnFirstCall = (reason: unknown } }); }; - -export const flushPromises = (): Promise => new Promise(setImmediate); From 642126f3828fdd25a5c024ba82e68eddb886065b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 4 Oct 2022 08:57:43 +0200 Subject: [PATCH 05/10] chore(deps): update JavaScript SDK to v7.14.1 (#2511) Co-authored-by: GitHub --- CHANGELOG.md | 6 +++ package.json | 20 ++++---- yarn.lock | 126 +++++++++++++++++++++++++-------------------------- 3 files changed, 79 insertions(+), 73 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da3a1fd36..2c3e36e3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ - Make `configureScope` callback safe [#2510](https://github.com/getsentry/sentry-react-native/pull/2510) +### Dependencies + +- Bump JavaScript SDK from v7.14.0 to v7.14.1 ([#2511](https://github.com/getsentry/sentry-react-native/pull/2511)) + - [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7141) + - [diff](https://github.com/getsentry/sentry-javascript/compare/7.14.0...7.14.1) + ## 4.6.0 ### Fixes diff --git a/package.json b/package.json index d9e837b47..723d888e8 100644 --- a/package.json +++ b/package.json @@ -40,20 +40,20 @@ "react-native": ">=0.56.0" }, "dependencies": { - "@sentry/browser": "7.14.0", + "@sentry/browser": "7.14.1", "@sentry/cli": "1.74.4", - "@sentry/core": "7.14.0", - "@sentry/hub": "7.14.0", - "@sentry/integrations": "7.14.0", - "@sentry/react": "7.14.0", - "@sentry/tracing": "7.14.0", - "@sentry/types": "7.14.0", - "@sentry/utils": "7.14.0", + "@sentry/core": "7.14.1", + "@sentry/hub": "7.14.1", + "@sentry/integrations": "7.14.1", + "@sentry/react": "7.14.1", + "@sentry/tracing": "7.14.1", + "@sentry/types": "7.14.1", + "@sentry/utils": "7.14.1", "@sentry/wizard": "1.2.17" }, "devDependencies": { - "@sentry-internal/eslint-config-sdk": "7.14.0", - "@sentry-internal/eslint-plugin-sdk": "7.14.0", + "@sentry-internal/eslint-config-sdk": "7.14.1", + "@sentry-internal/eslint-plugin-sdk": "7.14.1", "@sentry/typescript": "^5.20.1", "@types/jest": "^26.0.15", "@types/react": "^16.9.49", diff --git a/yarn.lock b/yarn.lock index 1a3b3468e..b9a3e25ea 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.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-7.14.0.tgz#35a9fe39bcd073053792c4b736f5ff0db661509e" - integrity sha512-14dowWlfQBsEma8bQPetG4HFTApXMxLaFhA5x2Z6kmyZCCJ+NtsPXYAxvOI2h8W6lfxhaXgamhiFlPv48OeRvg== +"@sentry-internal/eslint-config-sdk@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-7.14.1.tgz#ce4b95c6862757dd7321f5d0e3fd0fc756910a31" + integrity sha512-n/AXRNirikXS4+eODAmVb2C7r6qno8Ylcnr65+es5B0LiKHiNqhRCRSkoKA0BdFdgMxswXBdENHb/cx2AHOBjg== dependencies: - "@sentry-internal/eslint-plugin-sdk" "7.14.0" - "@sentry-internal/typescript" "7.14.0" + "@sentry-internal/eslint-plugin-sdk" "7.14.1" + "@sentry-internal/typescript" "7.14.1" "@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.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-7.14.0.tgz#867b8773a29251ed2a4ae2b0842c674011de0d79" - integrity sha512-SCAmXZCa5Y1cG0a1rq95aB/GxSfnoQyzGtCWQ7jcvBI+WVLHLxRzYS3v42upNz8T9x5UDtUXI6ELwiLRNXo/SQ== +"@sentry-internal/eslint-plugin-sdk@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-7.14.1.tgz#001a7b4a66dbeac28a7fdfb30652b4446a6127f3" + integrity sha512-NLqEWUbsKEFiemE1TEBf/sAY0spDIVSFBWeXQhECzZPTlsjKoI6Zhitb+Ie0wvJIR0k5qKJaMH600PyT9OFOBg== dependencies: requireindex "~1.1.0" -"@sentry-internal/typescript@7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-7.14.0.tgz#50e10ea97d97bcc92e31675db6401d276c23c462" - integrity sha512-BQyxbQ4ZbdUTL7GRAoPAY3kEqjCkSQi34NA/NKU9ZBygt99LL0iHRRYFqZUNTBgq2tdxvMKMAJUafCc+65ADLA== +"@sentry-internal/typescript@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-7.14.1.tgz#669a59bae8418c5eb6f87939bfaec2632324c60d" + integrity sha512-zvfwAALSzZgi7Y5pGj8wPlFyZ7UH0gsZW5xm567SumC8wuxRdY2TknsMzQLNmqsAtCX6Chydg6HhIa7QILbMJg== -"@sentry/browser@7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.14.0.tgz#bc2c6934f9270e1287ae1437b63e4b0edd67a9f0" - integrity sha512-AdLmqeOXvCVYgJAgMUUby+TRh+yIeZO16NPpZWQPGggXIjnhSzoN4liyXJvQ7Mhm326GboFUKjQwqpCEviQcyg== +"@sentry/browser@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.14.1.tgz#1327742f8b62c41bd1c1e8b23827aae08aa90dde" + integrity sha512-b9nW2+kT9Jl/tfzJmvzpnS6F8ziC62TDx04a7kZDtuaVA5rKKTTlLDg8ZamCRFjjnuwuFhLnzxO34N0KfeTqHg== dependencies: - "@sentry/core" "7.14.0" - "@sentry/types" "7.14.0" - "@sentry/utils" "7.14.0" + "@sentry/core" "7.14.1" + "@sentry/types" "7.14.1" + "@sentry/utils" "7.14.1" 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.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.14.0.tgz#89178822de75c6023e1718c29bee8d588687cedd" - integrity sha512-Hgn7De6CiCFnz868/Lrtei+9rj7/TIwhbDe3J+NeH+2ffXYn4VI8FxrlR/p2XfIq9iCfmG80EQXDtSh+Kh7mOw== +"@sentry/core@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.14.1.tgz#6b046181a1c13ed0fbc90d88d9c18ab1d70d98da" + integrity sha512-sjk60Gf5o9zynhWe1e0ro9uQO4OrKZ3H9xfgBf2ExgKXeMfKzYp5r2v2OKNevEde36Sr/DzlpiPj8EK67xrWPA== dependencies: - "@sentry/hub" "7.14.0" - "@sentry/types" "7.14.0" - "@sentry/utils" "7.14.0" + "@sentry/hub" "7.14.1" + "@sentry/types" "7.14.1" + "@sentry/utils" "7.14.1" tslib "^1.9.3" -"@sentry/hub@7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.14.0.tgz#cf8e8a345c63a75ea1f3a2d7169a47ab73ff9603" - integrity sha512-O+pxsipeiURC6Mxuivz1pX3yHlkQCI2yjP38bISxUZv1NIijHuxiDmgqrrcCJltiIfyY2+f9LAezKVCAXnPFuw== +"@sentry/hub@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.14.1.tgz#f24d8ac65ff39dab6dbaa859c06a0651359f20d2" + integrity sha512-BWh5jUvGmzCsJtYy6EX3qA6gTOxwGhA64IEXHbzwIAnBoG+VWao3addaL77AGR9pIgAqn6ssfkX665OZa+GPGw== dependencies: - "@sentry/types" "7.14.0" - "@sentry/utils" "7.14.0" + "@sentry/types" "7.14.1" + "@sentry/utils" "7.14.1" tslib "^1.9.3" -"@sentry/integrations@7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.14.0.tgz#e48845949478301da7d0a4ee752b9c6befd78554" - integrity sha512-ZZwTurYD7+9nRHS92T6ZUGuLq/AtHPb0arw0eHn7Q6u+PNkt8RpMj+fwuBntaAsabHdf1a0XZrdqAw6XJmZz0w== +"@sentry/integrations@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.14.1.tgz#8fc656373c55d124400e26c33dd3ef4676d2dba4" + integrity sha512-viQkOOLa6YkXV8OV98BGqFY80emEDmfxOsLKc+AJe87nrb9j5ruobovFPwlJi0DlIMHdTtsoldBb/05bbVDKwg== dependencies: - "@sentry/types" "7.14.0" - "@sentry/utils" "7.14.0" + "@sentry/types" "7.14.1" + "@sentry/utils" "7.14.1" localforage "^1.8.1" tslib "^1.9.3" -"@sentry/react@7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.14.0.tgz#cd7db3b7040f6535871e536f811c8eed29852a90" - integrity sha512-PEHqqr6o0ZfrNhFYe1lLTNY1+vV5bEuZaG0i8s+Jo4OHozh689CeH+lGZSjvFxCpaexC+FskpiGAzcXTeurpaA== +"@sentry/react@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.14.1.tgz#0b65796094977fcec8102a847b0e1c869508a1e1" + integrity sha512-KPfreZ9O63RDlryh1YjYmycDlteulqcXqeRv/OzQCZb08RcSybdho1QyhKU4LeyTc3rCQx4TNo4rSSwgWxKvdg== dependencies: - "@sentry/browser" "7.14.0" - "@sentry/types" "7.14.0" - "@sentry/utils" "7.14.0" + "@sentry/browser" "7.14.1" + "@sentry/types" "7.14.1" + "@sentry/utils" "7.14.1" hoist-non-react-statics "^3.3.2" tslib "^1.9.3" -"@sentry/tracing@7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.14.0.tgz#083dadb7736f62cf5b4e168a649d8728260fb60b" - integrity sha512-AtSitQukvU52PsLlYZJ2g2Lhj3VMmy4EwF/OMp8UHCtbJYwTNDF5N4Co0GUwFIs8zdXkIoJD+GMKfsSX1L3NXA== +"@sentry/tracing@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.14.1.tgz#f8d8d8d770e19d5ecc0584b7db18d9a9369beeae" + integrity sha512-vs/GXOu3RRT9ethdRXdiXmYF11PFViIo70Nt6RWb/vKEykHTQ0Y5IYc3GtU7aC6DKqpJ1xZkNUfgvV/q3he/Eg== dependencies: - "@sentry/hub" "7.14.0" - "@sentry/types" "7.14.0" - "@sentry/utils" "7.14.0" + "@sentry/hub" "7.14.1" + "@sentry/types" "7.14.1" + "@sentry/utils" "7.14.1" tslib "^1.9.3" -"@sentry/types@7.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.14.0.tgz#8069e58a0104190e328647963036c7597e2e5fa8" - integrity sha512-9iFZS9Hr5hAoL+M9oUH2dY9burOaQh+CHGH66fortuTp++YDWKdbPEeKcz8hRJaUyBBn53rdxiBmAyHsrlE6KA== +"@sentry/types@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.14.1.tgz#8d46c41595b2730f3426d54d1d0a9376b8739e33" + integrity sha512-PxAfrIwBci6ouHOuRsfVq1B16i92nQNV5IvlqfJIYciazVhDWJvbF52caJAPOFS1WnuQZ4zqBDMYvtnwld3JCA== "@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.14.0": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.14.0.tgz#58dab9e53ad662231c3289842edbc7f885ebc7cb" - integrity sha512-q9em4ZBcaUk7J1WULiltZVEcbyCE0wwAIjqRaoNmHVe4FeK++uAPo2ULZM1kQgN8syZnQ1jcfLktIKkWfnE2cg== +"@sentry/utils@7.14.1": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.14.1.tgz#95f408853129197fce5841ed0c9b2ed87400e183" + integrity sha512-CErQFbJMuhnHFKGkfIazQj5ETKoS7hG8PkoQEBt19F5QMh4+sbrJgnpIrIW8fVGtp0qKWKuIxQwD3b+1cFBozA== dependencies: - "@sentry/types" "7.14.0" + "@sentry/types" "7.14.1" tslib "^1.9.3" "@sentry/wizard@1.2.17": From c313e9d4388bb589dec72a4099f10819b49e2889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Wold=C5=99ich?= <31292499+krystofwoldrich@users.noreply.github.com> Date: Tue, 4 Oct 2022 12:11:51 +0200 Subject: [PATCH 06/10] fix(contributing) Change node version to 14 (#2514) --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7d82d66ce..c6e4855f0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ This repository contains a sample project. It can be used to test the SDK as you You need: -- nodejs 8 or higher +- nodejs 14 or higher - yarn 1 or higher ## Building From 642d9332359ed8bfdced1920216c761888c71496 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos <6349682+vaind@users.noreply.github.com> Date: Tue, 4 Oct 2022 17:13:54 +0200 Subject: [PATCH 07/10] ci: ping GHA to a commit hash (#2515) --- .github/workflows/add-platform-label.yml | 4 ++-- .github/workflows/buildandtest.yml | 4 ++-- .github/workflows/codeql-analysis.yml | 15 ++++++--------- .github/workflows/e2e.yml | 4 ++-- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/add-platform-label.yml b/.github/workflows/add-platform-label.yml index e510ae934..91e2cf7c4 100644 --- a/.github/workflows/add-platform-label.yml +++ b/.github/workflows/add-platform-label.yml @@ -11,7 +11,7 @@ jobs: permissions: issues: write steps: - - uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 + - uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 # pin@1.0.4 with: - add-labels: "Platform: React-Native" + add-labels: 'Platform: React-Native' repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index c377b8e66..a26bbce71 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -75,13 +75,13 @@ jobs: # we want that the matrix keeps running, default is to cancel them if it fails. fail-fast: false matrix: - platform: ["ios", "android"] + platform: ['ios', 'android'] dev: [true, false] steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: "14" + node-version: '14' - name: Cache Dependencies uses: actions/cache@v3 id: cache diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b8868fc17..a0eb41ebe 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,7 +9,7 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL" +name: 'CodeQL' on: push: @@ -18,7 +18,7 @@ on: # The branches below must be a subset of the branches above branches: [main] schedule: - - cron: "27 16 * * 5" + - cron: '27 16 * * 5' jobs: analyze: @@ -28,7 +28,7 @@ jobs: strategy: fail-fast: false matrix: - language: ["javascript"] + language: ['javascript'] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed @@ -39,7 +39,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # pin@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -50,18 +50,15 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # pin@v2 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines # and modify them (or add more) to build your code if your project # uses a compiled language - #- run: | # make bootstrap # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # pin@v2 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 1dfb88e49..11b828a50 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -107,7 +107,7 @@ jobs: # Wait until the Appium server starts. - name: Check Appium Server - uses: nick-fields/retry@b4fa57557dda8c2f30bcb2d19372cc3237190f7f # v2.8.1 + uses: nick-fields/retry@b4fa57557dda8c2f30bcb2d19372cc3237190f7f # pin@v2 with: timeout_seconds: 60 max_attempts: 10 @@ -115,7 +115,7 @@ jobs: - name: Run tests on Android if: ${{ matrix.platform == 'android' }} - uses: reactivecircus/android-emulator-runner@d7b53ddc6e44254e1f4cf4a6ad67345837027a66 # v2.26.0 + uses: reactivecircus/android-emulator-runner@d7b53ddc6e44254e1f4cf4a6ad67345837027a66 # pin@v2 with: api-level: 29 emulator-options: -accel on -no-snapshot -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none -timezone US/Pacific From e99d97badabb31ec095bfd33f9379cc8a52bae97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Wold=C5=99ich?= <31292499+krystofwoldrich@users.noreply.github.com> Date: Wed, 5 Oct 2022 18:00:51 +0200 Subject: [PATCH 08/10] fix(sample): Metro-config renamed backlist to exclusionList (#2518) --- sample/metro.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/metro.config.js b/sample/metro.config.js index 81bc32287..712f042cd 100644 --- a/sample/metro.config.js +++ b/sample/metro.config.js @@ -6,7 +6,7 @@ */ const path = require('path'); -const blacklist = require('metro-config/src/defaults/blacklist'); +const blacklist = require('metro-config/src/defaults/exclusionList'); const resolve = require('metro-resolver/src/resolve'); const parentDir = path.resolve(__dirname, '..'); From 56b3a62491cf12e664f8de15942979514236a70c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 6 Oct 2022 09:41:36 +0200 Subject: [PATCH 09/10] chore(deps): update Cocoa SDK to v7.27.1 (#2521) Co-authored-by: GitHub --- CHANGELOG.md | 3 +++ RNSentry.podspec | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c3e36e3a..f2c0eb59f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ - Bump JavaScript SDK from v7.14.0 to v7.14.1 ([#2511](https://github.com/getsentry/sentry-react-native/pull/2511)) - [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7141) - [diff](https://github.com/getsentry/sentry-javascript/compare/7.14.0...7.14.1) +- Bump Cocoa SDK from v7.27.0 to v7.27.1 ([#2521](https://github.com/getsentry/sentry-react-native/pull/2521)) + - [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7271) + - [diff](https://github.com/getsentry/sentry-cocoa/compare/7.27.0...7.27.1) ## 4.6.0 diff --git a/RNSentry.podspec b/RNSentry.podspec index f154f6c99..24bb67a8d 100644 --- a/RNSentry.podspec +++ b/RNSentry.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.preserve_paths = '*.js' s.dependency 'React-Core' - s.dependency 'Sentry', '7.27.0' + s.dependency 'Sentry', '7.27.1' s.source_files = 'ios/RNSentry.{h,m}' s.public_header_files = 'ios/RNSentry.h' From 5636309c195edc6218c18012ee86851d50695c06 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 6 Oct 2022 07:43:52 +0000 Subject: [PATCH 10/10] chore(deps): update Android SDK to v6.4.3 (#2520) Co-authored-by: GitHub --- CHANGELOG.md | 3 +++ android/build.gradle | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c0eb59f..9fc44e3ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ - Bump Cocoa SDK from v7.27.0 to v7.27.1 ([#2521](https://github.com/getsentry/sentry-react-native/pull/2521)) - [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7271) - [diff](https://github.com/getsentry/sentry-cocoa/compare/7.27.0...7.27.1) +- Bump Android SDK from v6.4.2 to v6.4.3 ([#2520](https://github.com/getsentry/sentry-react-native/pull/2520)) + - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#643) + - [diff](https://github.com/getsentry/sentry-java/compare/6.4.2...6.4.3) ## 4.6.0 diff --git a/android/build.gradle b/android/build.gradle index f4cbdbe28..c7e916a7b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -24,5 +24,5 @@ android { dependencies { implementation 'com.facebook.react:react-native:+' - api 'io.sentry:sentry-android:6.4.2' + api 'io.sentry:sentry-android:6.4.3' }