diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9fe9f98394..cd5a22b069 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,7 +44,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # pin@v3.27.4 + uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # pin@v3.27.5 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -55,7 +55,7 @@ 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@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # pin@v3.27.4 + uses: github/codeql-action/autobuild@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # pin@v3.27.5 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions @@ -66,4 +66,4 @@ jobs: # make bootstrap # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # pin@v3.27.4 + uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # pin@v3.27.5 diff --git a/CHANGELOG.md b/CHANGELOG.md index ba596b7d23..776ede802e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,9 +15,9 @@ ### Dependencies -- Bump JavaScript SDK from v8.38.0 to v8.39.0 ([#4293](https://github.com/getsentry/sentry-react-native/pull/4293)) - - [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8390) - - [diff](https://github.com/getsentry/sentry-javascript/compare/8.38.0...8.39.0) +- Bump JavaScript SDK from v8.38.0 to v8.40.0 ([#4293](https://github.com/getsentry/sentry-react-native/pull/4293), [#4304](https://github.com/getsentry/sentry-react-native/pull/4304)) + - [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8400) + - [diff](https://github.com/getsentry/sentry-javascript/compare/8.38.0...8.40.0) ## 6.3.0-beta.2 diff --git a/dev-packages/e2e-tests/package.json b/dev-packages/e2e-tests/package.json index 21008a90ad..bd657cc092 100644 --- a/dev-packages/e2e-tests/package.json +++ b/dev-packages/e2e-tests/package.json @@ -14,7 +14,7 @@ "@babel/preset-env": "^7.20.2", "@babel/preset-typescript": "^7.18.6", "@sentry/react-native": "6.3.0-beta.2", - "@sentry/utils": "8.39.0", + "@sentry/utils": "8.40.0", "@types/node": "^20.9.3", "@types/react": "^18.2.64", "appium": "2.4.1", diff --git a/packages/core/package.json b/packages/core/package.json index 85be58d526..416559a45b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -66,21 +66,21 @@ }, "dependencies": { "@sentry/babel-plugin-component-annotate": "2.20.1", - "@sentry/browser": "8.39.0", + "@sentry/browser": "8.40.0", "@sentry/cli": "2.38.2", - "@sentry/core": "8.39.0", - "@sentry/react": "8.39.0", - "@sentry/types": "8.39.0", - "@sentry/utils": "8.39.0" + "@sentry/core": "8.40.0", + "@sentry/react": "8.40.0", + "@sentry/types": "8.40.0", + "@sentry/utils": "8.40.0" }, "devDependencies": { "@babel/core": "^7.23.5", "@expo/metro-config": "0.17.5", "@mswjs/interceptors": "^0.25.15", "@react-native/babel-preset": "0.75.4", - "@sentry-internal/eslint-config-sdk": "8.39.0", - "@sentry-internal/eslint-plugin-sdk": "8.39.0", - "@sentry-internal/typescript": "8.39.0", + "@sentry-internal/eslint-config-sdk": "8.40.0", + "@sentry-internal/eslint-plugin-sdk": "8.40.0", + "@sentry-internal/typescript": "8.40.0", "@sentry/wizard": "3.34.4", "@testing-library/react-native": "^12.7.2", "@types/jest": "^29.5.3", diff --git a/packages/core/test/tracing/integrations/appStart.test.ts b/packages/core/test/tracing/integrations/appStart.test.ts index 36055a62c2..3c0e983a48 100644 --- a/packages/core/test/tracing/integrations/appStart.test.ts +++ b/packages/core/test/tracing/integrations/appStart.test.ts @@ -33,6 +33,8 @@ import { NATIVE } from '../../../src/js/wrapper'; import { getDefaultTestClientOptions, TestClient } from '../../mocks/client'; import { mockFunction } from '../../testutils'; +let dateNowSpy: jest.SpyInstance; + jest.mock('../../../src/js/wrapper', () => { return { NATIVE: { @@ -1057,6 +1059,9 @@ function mockTooOldAppStart() { function mockReactNativeBundleExecutionStartTimestamp() { RN_GLOBAL_OBJ.nativePerformanceNow = () => 100; // monotonic clock like `performance.now()` RN_GLOBAL_OBJ.__BUNDLE_START_TIME__ = 50; // 50ms after time origin + + const currentTimeMilliseconds = Date.now(); + dateNowSpy = jest.spyOn(Date, 'now').mockImplementation(() => currentTimeMilliseconds); } /** @@ -1065,6 +1070,10 @@ function mockReactNativeBundleExecutionStartTimestamp() { function clearReactNativeBundleExecutionStartTimestamp() { delete RN_GLOBAL_OBJ.nativePerformanceNow; delete RN_GLOBAL_OBJ.__BUNDLE_START_TIME__; + + if (dateNowSpy) { + dateNowSpy.mockRestore(); + } } function set__DEV__(value: boolean) { diff --git a/samples/expo/app/(tabs)/index.tsx b/samples/expo/app/(tabs)/index.tsx index b7150393b5..952f21ca44 100644 --- a/samples/expo/app/(tabs)/index.tsx +++ b/samples/expo/app/(tabs)/index.tsx @@ -1,6 +1,7 @@ import { Button, StyleSheet } from 'react-native'; import Constants from 'expo-constants'; import * as Sentry from '@sentry/react-native'; +import { reloadAppAsync } from 'expo'; import { Text, View } from '@/components/Themed'; import { setScopeProperties } from '@/utils/setScopeProperties'; @@ -82,6 +83,7 @@ export default function TabOneScreen() { console.log('Sentry.close() completed.'); }} /> +