Skip to content

Commit 14d27a7

Browse files
github-actions[bot]web-flowkrystofwoldrich
authored
chore(deps): update JavaScript SDK to v7.31.1 (#2738)
Co-authored-by: GitHub <noreply@github.com> Co-authored-by: Krystof Woldrich <krystofwoldrich@gmail.com>
1 parent bfa818c commit 14d27a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+467
-228
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = {
1414
},
1515
ignorePatterns: [
1616
'test/react-native/versions/*',
17+
'coverage/**/*',
1718
],
1819
overrides: [
1920
{
@@ -58,5 +59,7 @@ module.exports = {
5859
rules: {
5960
// Bundle size isn't too much of an issue for React Native.
6061
'@sentry-internal/sdk/no-async-await': 'off',
62+
'@sentry-internal/sdk/no-optional-chaining': 'off',
63+
'@sentry-internal/sdk/no-nullish-coalescing': 'off',
6164
},
6265
};

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
- Bump Android SDK from v6.11.0 to v6.12.1 ([#2755](https://github.com/getsentry/sentry-react-native/pull/2755))
88
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6121)
99
- [diff](https://github.com/getsentry/sentry-java/compare/6.11.0...6.12.1)
10+
- Bump JavaScript SDK from v7.29.0 to v7.31.1 ([#2738](https://github.com/getsentry/sentry-react-native/pull/2738))
11+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md#7311)
12+
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.29.0...7.31.1)
1013

1114
## 4.13.0
1215

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,20 @@
4242
"react-native": ">=0.56.0"
4343
},
4444
"dependencies": {
45-
"@sentry/browser": "7.29.0",
45+
"@sentry/browser": "7.31.1",
4646
"@sentry/cli": "1.74.4",
47-
"@sentry/core": "7.29.0",
48-
"@sentry/hub": "7.29.0",
49-
"@sentry/integrations": "7.29.0",
50-
"@sentry/react": "7.29.0",
51-
"@sentry/tracing": "7.29.0",
52-
"@sentry/types": "7.29.0",
53-
"@sentry/utils": "7.29.0",
47+
"@sentry/core": "7.31.1",
48+
"@sentry/hub": "7.31.1",
49+
"@sentry/integrations": "7.31.1",
50+
"@sentry/react": "7.31.1",
51+
"@sentry/tracing": "7.31.1",
52+
"@sentry/types": "7.31.1",
53+
"@sentry/utils": "7.31.1",
5454
"@sentry/wizard": "1.4.0"
5555
},
5656
"devDependencies": {
57-
"@sentry-internal/eslint-config-sdk": "7.29.0",
58-
"@sentry-internal/eslint-plugin-sdk": "7.29.0",
57+
"@sentry-internal/eslint-config-sdk": "7.31.1",
58+
"@sentry-internal/eslint-plugin-sdk": "7.31.1",
5959
"@sentry/typescript": "^5.20.1",
6060
"@types/jest": "^26.0.15",
6161
"@types/react": "^18.0.25",

src/js/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { BrowserClient, defaultStackParser, makeFetchTransport } from '@sentry/browser';
2-
import { FetchImpl } from '@sentry/browser/types/transports/utils';
2+
import type { FetchImpl } from '@sentry/browser/types/transports/utils';
33
import { BaseClient } from '@sentry/core';
4-
import {
4+
import type {
55
ClientReportEnvelope,
66
ClientReportItem,
77
Envelope,
@@ -18,7 +18,7 @@ import { Alert, LogBox, YellowBox } from 'react-native';
1818

1919
import { Screenshot } from './integrations/screenshot';
2020
import { defaultSdkInfo } from './integrations/sdkinfo';
21-
import { ReactNativeClientOptions, ReactNativeTransportOptions } from './options';
21+
import type { ReactNativeClientOptions, ReactNativeTransportOptions } from './options';
2222
import { makeReactNativeTransport } from './transports/native';
2323
import { createUserFeedbackEnvelope, items } from './utils/envelope';
2424
import { mergeOutcomes } from './utils/outcome';

src/js/definitions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Breadcrumb, Package } from '@sentry/types';
1+
import type { Breadcrumb, Package } from '@sentry/types';
22

3-
import { ReactNativeOptions } from './options';
3+
import type { ReactNativeOptions } from './options';
44

55
export type NativeAppStartResponse = {
66
isColdStart: boolean;

src/js/integrations/debugsymbolicator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
2-
import { Event, EventHint, Integration, StackFrame } from '@sentry/types';
2+
import type { Event, EventHint, Integration, StackFrame } from '@sentry/types';
33
import { addContextToFrame, logger } from '@sentry/utils';
44

55
const INTERNAL_CALLSITES_REGEX = new RegExp(

src/js/integrations/devicecontext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
2-
import { Contexts, Event, Integration } from '@sentry/types';
2+
import type { Contexts, Event, Integration } from '@sentry/types';
33
import { logger } from '@sentry/utils';
44

55
import { NATIVE } from '../wrapper';

src/js/integrations/eventorigin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EventProcessor, Integration } from '@sentry/types';
1+
import type { EventProcessor, Integration } from '@sentry/types';
22

33
/** Default EventOrigin instrumentation */
44
export class EventOrigin implements Integration {

src/js/integrations/modulesloader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Event,EventProcessor, Integration } from '@sentry/types';
1+
import type { Event,EventProcessor, Integration } from '@sentry/types';
22
import { logger } from '@sentry/utils';
33

44
import { NATIVE } from '../wrapper';

src/js/integrations/reactnativeerrorhandlers.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { getCurrentHub } from '@sentry/core';
2-
import { EventHint, Integration, SeverityLevel } from '@sentry/types';
2+
import type { EventHint, Integration, SeverityLevel } from '@sentry/types';
33
import { addExceptionMechanism, logger } from '@sentry/utils';
44

5-
import { ReactNativeClient } from '../client';
5+
import type { ReactNativeClient } from '../client';
66
import { RN_GLOBAL_OBJ } from '../utils/worldwide';
77

88
/** ReactNativeErrorHandlers Options */
@@ -17,9 +17,6 @@ interface PromiseRejectionTrackingOptions {
1717
onHandled: (id: string) => void;
1818
}
1919

20-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
21-
declare const global: any;
22-
2320
/** ReactNativeErrorHandlers Integration */
2421
export class ReactNativeErrorHandlers implements Integration {
2522
/**

src/js/integrations/release.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
2-
import { Event, Integration } from '@sentry/types';
2+
import type { Event, Integration } from '@sentry/types';
33

44
import { NATIVE } from '../wrapper';
55

src/js/integrations/screenshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EventHint, Integration } from '@sentry/types';
1+
import type { EventHint, Integration } from '@sentry/types';
22
import { resolvedSyncPromise } from '@sentry/utils';
33

44
import { NATIVE } from '../wrapper';

src/js/integrations/sdkinfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EventProcessor, Integration, Package, SdkInfo as SdkInfoType } from '@sentry/types';
1+
import type { EventProcessor, Integration, Package, SdkInfo as SdkInfoType } from '@sentry/types';
22
import { logger } from '@sentry/utils';
33

44
import { SDK_NAME, SDK_PACKAGE_NAME,SDK_VERSION } from '../version';

src/js/measurements.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { getCurrentHub, getMainCarrier, Hub } from '@sentry/core';
2-
import { Transaction } from '@sentry/tracing';
3-
import { CustomSamplingContext, Span, SpanContext, TransactionContext } from '@sentry/types';
1+
import type { Hub } from '@sentry/core';
2+
import { getCurrentHub, getMainCarrier } from '@sentry/core';
3+
import type { Transaction } from '@sentry/tracing';
4+
import type { CustomSamplingContext, Span, SpanContext, TransactionContext } from '@sentry/types';
45

56
import { ReactNativeTracing } from './tracing';
67

src/js/misc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {
1+
import type {
22
EnvelopeItem,
33
Exception,
44
} from '@sentry/types';

src/js/options.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { BrowserTransportOptions } from '@sentry/browser/types/transports/types';
2-
import { ProfilerProps } from '@sentry/react/types/profiler';
3-
import { ClientOptions, Options } from '@sentry/types';
4-
import { CaptureContext } from '@sentry/types/types/scope';
1+
import type { BrowserTransportOptions } from '@sentry/browser/types/transports/types';
2+
import type { ProfilerProps } from '@sentry/react/types/profiler';
3+
import type { ClientOptions, Options } from '@sentry/types';
4+
import type { CaptureContext } from '@sentry/types/types/scope';
55

6-
import { TouchEventBoundaryProps } from './touchevents';
6+
import type { TouchEventBoundaryProps } from './touchevents';
77

88
export interface BaseReactNativeOptions {
99
/**

src/js/scope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Scope } from '@sentry/core';
2-
import { Attachment, Breadcrumb, User } from '@sentry/types';
2+
import type { Attachment, Breadcrumb, User } from '@sentry/types';
33

44
import { NATIVE } from './wrapper';
55

src/js/sdk.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import { getIntegrationsToSetup, Hub, initAndBind, makeMain, Scope, setExtra } from '@sentry/core';
1+
import type { Scope} from '@sentry/core';
2+
import { getIntegrationsToSetup, Hub, initAndBind, makeMain, setExtra } from '@sentry/core';
23
import { RewriteFrames } from '@sentry/integrations';
34
import {
45
defaultIntegrations as reactDefaultIntegrations,
56
defaultStackParser,
67
getCurrentHub,
78
} from '@sentry/react';
8-
import { Integration, StackFrame, UserFeedback } from '@sentry/types';
9+
import type { Integration, StackFrame, UserFeedback } from '@sentry/types';
910
import { logger, stackParserFromStackParserOptions } from '@sentry/utils';
1011
import * as React from 'react';
1112

@@ -20,7 +21,7 @@ import {
2021
SdkInfo,
2122
} from './integrations';
2223
import { Screenshot } from './integrations/screenshot';
23-
import { ReactNativeClientOptions, ReactNativeOptions, ReactNativeWrapperOptions } from './options';
24+
import type { ReactNativeClientOptions, ReactNativeOptions, ReactNativeWrapperOptions } from './options';
2425
import { ReactNativeScope } from './scope';
2526
import { TouchEventBoundary } from './touchevents';
2627
import { ReactNativeProfiler, ReactNativeTracing } from './tracing';

src/js/touchevents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { addBreadcrumb } from '@sentry/core';
2-
import { SeverityLevel } from '@sentry/types';
2+
import type { SeverityLevel } from '@sentry/types';
33
import { logger } from '@sentry/utils';
44
import * as React from 'react';
55
import { StyleSheet, View } from 'react-native';

src/js/tracing/nativeframes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Span, Transaction } from '@sentry/tracing';
2-
import { Event, EventProcessor, Measurements, MeasurementUnit } from '@sentry/types';
1+
import type { Span, Transaction } from '@sentry/tracing';
2+
import type { Event, EventProcessor, Measurements, MeasurementUnit } from '@sentry/types';
33
import { logger, timestampInSeconds } from '@sentry/utils';
44

5-
import { NativeFramesResponse } from '../definitions';
5+
import type { NativeFramesResponse } from '../definitions';
66
import { NATIVE } from '../wrapper';
77
import { instrumentChildSpanFinish } from './utils';
88

src/js/tracing/reactnativenavigation.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
import { Transaction as TransactionType, TransactionContext } from '@sentry/types';
1+
import type { Transaction as TransactionType, TransactionContext } from '@sentry/types';
22
import { logger } from '@sentry/utils';
3-
import { EmitterSubscription } from 'react-native';
3+
import type { EmitterSubscription } from 'react-native';
44

5-
import {
6-
InternalRoutingInstrumentation,
5+
import type {
76
OnConfirmRoute,
8-
TransactionCreator,
7+
TransactionCreator} from './routingInstrumentation';
8+
import {
9+
InternalRoutingInstrumentation
910
} from './routingInstrumentation';
10-
import { BeforeNavigate, RouteChangeContextData } from './types';
11+
import type { BeforeNavigate, RouteChangeContextData } from './types';
1112
import { customTransactionSource, defaultTransactionSource, getBlankTransactionContext } from './utils';
1213

1314
interface ReactNativeNavigationOptions {

src/js/tracing/reactnativetracing.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
/* eslint-disable max-lines */
2-
import { Hub } from '@sentry/core';
2+
import type { Hub } from '@sentry/core';
3+
import type {
4+
IdleTransaction,
5+
RequestInstrumentationOptions,
6+
Transaction} from '@sentry/tracing';
37
import {
48
defaultRequestInstrumentationOptions,
5-
IdleTransaction,
69
instrumentOutgoingRequests,
7-
RequestInstrumentationOptions,
8-
startIdleTransaction,
9-
Transaction,
10+
startIdleTransaction
1011
} from '@sentry/tracing';
11-
import {
12+
import type {
1213
EventProcessor,
1314
Integration,
1415
Transaction as TransactionType,
1516
TransactionContext,
1617
} from '@sentry/types';
1718
import { logger } from '@sentry/utils';
1819

19-
import { NativeAppStartResponse } from '../definitions';
20-
import { RoutingInstrumentationInstance } from '../tracing/routingInstrumentation';
20+
import type { NativeAppStartResponse } from '../definitions';
21+
import type { RoutingInstrumentationInstance } from '../tracing/routingInstrumentation';
2122
import { NATIVE } from '../wrapper';
2223
import { NativeFramesInstrumentation } from './nativeframes';
2324
import { StallTrackingInstrumentation } from './stalltracking';
24-
import { BeforeNavigate, RouteChangeContextData } from './types';
25+
import type { BeforeNavigate, RouteChangeContextData } from './types';
2526
import {
2627
adjustTransactionDuration,
2728
getTimeOriginMilliseconds,

src/js/tracing/reactnavigation.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
/* eslint-disable max-lines */
2-
import { Transaction as TransactionType, TransactionContext } from '@sentry/types';
2+
import type { Transaction as TransactionType, TransactionContext } from '@sentry/types';
33
import { logger } from '@sentry/utils';
44

55
import { RN_GLOBAL_OBJ } from '../utils/worldwide';
6-
import {
7-
InternalRoutingInstrumentation,
6+
import type {
87
OnConfirmRoute,
9-
TransactionCreator,
10-
} from './routingInstrumentation';
8+
TransactionCreator} from './routingInstrumentation';
119
import {
10+
InternalRoutingInstrumentation
11+
} from './routingInstrumentation';
12+
import type {
1213
BeforeNavigate,
1314
ReactNavigationTransactionContext,
1415
RouteChangeContextData,

src/js/tracing/reactnavigationv4.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
/* eslint-disable max-lines */
2-
import { Transaction, TransactionContext } from '@sentry/types';
2+
import type { Transaction, TransactionContext } from '@sentry/types';
33
import { logger } from '@sentry/utils';
44

55
import { RN_GLOBAL_OBJ } from '../utils/worldwide';
6-
import {
7-
InternalRoutingInstrumentation,
6+
import type {
87
OnConfirmRoute,
9-
TransactionCreator,
10-
} from './routingInstrumentation';
8+
TransactionCreator} from './routingInstrumentation';
119
import {
10+
InternalRoutingInstrumentation
11+
} from './routingInstrumentation';
12+
import type {
1213
BeforeNavigate,
1314
ReactNavigationTransactionContext,
1415
RouteChangeContextData,

src/js/tracing/routingInstrumentation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Hub } from '@sentry/core';
2-
import { Transaction, TransactionContext } from '@sentry/types';
1+
import type { Hub } from '@sentry/core';
2+
import type { Transaction, TransactionContext } from '@sentry/types';
33

4-
import { BeforeNavigate } from './types';
4+
import type { BeforeNavigate } from './types';
55

66
export type TransactionCreator = (
77
context: TransactionContext

src/js/tracing/stalltracking.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable max-lines */
2-
import { IdleTransaction, Span, Transaction } from '@sentry/tracing';
3-
import { Measurements, MeasurementUnit } from '@sentry/types';
2+
import type { IdleTransaction, Span, Transaction } from '@sentry/tracing';
3+
import type { Measurements, MeasurementUnit } from '@sentry/types';
44
import { logger, timestampInSeconds } from '@sentry/utils';
55

66
export interface StallMeasurements extends Measurements {

src/js/tracing/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TransactionContext } from '@sentry/types';
1+
import type { TransactionContext } from '@sentry/types';
22

33
export interface ReactNavigationRoute {
44
name: string;

src/js/tracing/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { IdleTransaction, Span, Transaction } from '@sentry/tracing';
2-
import { TransactionContext, TransactionSource } from '@sentry/types';
1+
import type { IdleTransaction, Span, Transaction } from '@sentry/tracing';
2+
import type { TransactionContext, TransactionSource } from '@sentry/types';
33
import { timestampInSeconds } from '@sentry/utils';
44

55
export const defaultTransactionSource: TransactionSource = 'component';

src/js/transports/TextEncoder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TextEncoderInternal } from '@sentry/types';
1+
import type { TextEncoderInternal } from '@sentry/types';
22

33
import { utf8ToBytes } from '../vendor';
44

src/js/transports/native.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { BaseTransportOptions, Envelope, Transport } from '@sentry/types';
2-
import { makePromiseBuffer, PromiseBuffer } from '@sentry/utils';
1+
import type { BaseTransportOptions, Envelope, Transport } from '@sentry/types';
2+
import type { PromiseBuffer } from '@sentry/utils';
3+
import { makePromiseBuffer } from '@sentry/utils';
34

45
import { NATIVE } from '../wrapper';
56

src/js/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { User } from '@sentry/types';
1+
import type { User } from '@sentry/types';
22

33
/** Requires all the keys defined on User interface to be present on an object */
44
export type RequiredKeysUser = { [P in keyof Required<User>]: User[P] | undefined; };

src/js/utils/envelope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {
1+
import type {
22
DsnComponents,
33
EventEnvelope,
44
SdkMetadata,

0 commit comments

Comments
 (0)