Skip to content

Commit

Permalink
Merge 82e7d35 into fd7919f
Browse files Browse the repository at this point in the history
  • Loading branch information
antonis authored Dec 13, 2024
2 parents fd7919f + 82e7d35 commit 79586c5
Show file tree
Hide file tree
Showing 106 changed files with 113 additions and 125 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/js/NativeRNSentry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Package } from '@sentry/types';
import type { Package } from '@sentry/core';
import type { TurboModule } from 'react-native';
import { TurboModuleRegistry } from 'react-native';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/breadcrumb.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Breadcrumb, SeverityLevel } from '@sentry/core';
import { severityLevelFromString } from '@sentry/core';
import type { Breadcrumb, SeverityLevel } from '@sentry/types';

export const DEFAULT_BREADCRUMB_LEVEL: SeverityLevel = 'info';

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/js/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { eventFromException, eventFromMessage } from '@sentry/browser';
import { BaseClient, dateTimestampInSeconds, logger, SentryError } from '@sentry/core';
import type {
ClientReportEnvelope,
ClientReportItem,
Expand All @@ -10,7 +9,8 @@ import type {
SeverityLevel,
TransportMakeRequestResponse,
UserFeedback,
} from '@sentry/types';
} from '@sentry/core';
import { BaseClient, dateTimestampInSeconds, logger, SentryError } from '@sentry/core';
import { Alert } from 'react-native';

import { getDevServer } from './integrations/debugsymbolicatorutils';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type {
Thread,
User,
UserFeedback,
} from '@sentry/types';
} from '@sentry/core';

export {
addBreadcrumb,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/debugsymbolicator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Event, EventHint, Exception, Integration, StackFrame as SentryStackFrame } from '@sentry/core';
import { logger } from '@sentry/core';
import type { Event, EventHint, Exception, Integration, StackFrame as SentryStackFrame } from '@sentry/types';

import type { ExtendedError } from '../utils/error';
import { getFramesToPop, isErrorLike } from '../utils/error';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { StackFrame as SentryStackFrame } from '@sentry/core';
import { logger } from '@sentry/core';
import type { StackFrame as SentryStackFrame } from '@sentry/types';

import { ReactNativeLibraries } from '../utils/rnlibraries';
import { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/default.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable complexity */
import type { Integration } from '@sentry/core';
import type { BrowserOptions } from '@sentry/react';
import type { Integration } from '@sentry/types';

import type { ReactNativeClientOptions } from '../options';
import { reactNativeTracingIntegration } from '../tracing';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/devicecontext.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable complexity */
import type { Client, Event, EventHint, Integration } from '@sentry/core';
import { logger, severityLevelFromString } from '@sentry/core';
import type { Client, Event, EventHint, Integration } from '@sentry/types';
import { AppState } from 'react-native';

import { breadcrumbFromObject } from '../breadcrumb';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/eventorigin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Event, Integration } from '@sentry/types';
import type { Event, Integration } from '@sentry/core';

const INTEGRATION_NAME = 'EventOrigin';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/expocontext.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DeviceContext, Event, Integration, OsContext } from '@sentry/types';
import type { DeviceContext, Event, Integration, OsContext } from '@sentry/core';

import { getExpoDevice } from '../utils/expomodules';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/factory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Integration } from '@sentry/types';
import type { Integration } from '@sentry/core';

/**
* Creates an integration out of the provided name and setup function.
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/modulesloader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Event, Integration } from '@sentry/core';
import { logger } from '@sentry/core';
import type { Event, Integration } from '@sentry/types';

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

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/js/integrations/nativelinkederrors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { exceptionFromError } from '@sentry/browser';
import { isInstanceOf, isPlainObject, isString } from '@sentry/core';
import type {
Client,
DebugImage,
Expand All @@ -10,7 +9,8 @@ import type {
Integration,
StackFrame,
StackParser,
} from '@sentry/types';
} from '@sentry/core';
import { isInstanceOf, isPlainObject, isString } from '@sentry/core';

import type { NativeStackFrames } from '../NativeRNSentry';
import { NATIVE } from '../wrapper';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { EventHint, Integration, SeverityLevel } from '@sentry/core';
import { addExceptionMechanism, captureException, getClient, getCurrentScope, logger } from '@sentry/core';
import type { EventHint, Integration, SeverityLevel } from '@sentry/types';

import { createSyntheticError, isErrorLike } from '../utils/error';
import { RN_GLOBAL_OBJ } from '../utils/worldwide';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/reactnativeinfo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Context, Event, EventHint, Integration } from '@sentry/types';
import type { Context, Event, EventHint, Integration } from '@sentry/core';

import {
getExpoGoVersion,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/release.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BaseTransportOptions, Client, ClientOptions, Event, EventHint, Integration } from '@sentry/types';
import type { BaseTransportOptions, Client, ClientOptions, Event, EventHint, Integration } from '@sentry/core';

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

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/rewriteframes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Integration, StackFrame } from '@sentry/core';
import { rewriteFramesIntegration } from '@sentry/core';
import type { Integration, StackFrame } from '@sentry/types';
import { Platform } from 'react-native';

import { isExpo, isHermesEnabled } from '../utils/environment';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/screenshot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Event, EventHint, Integration } from '@sentry/types';
import type { Event, EventHint, Integration } from '@sentry/core';

import type { ReactNativeClient } from '../client';
import type { Screenshot as ScreenshotAttachment } from '../wrapper';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/sdkinfo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Event, Integration, Package, SdkInfo as SdkInfoType } from '@sentry/core';
import { logger } from '@sentry/core';
import type { Event, Integration, Package, SdkInfo as SdkInfoType } from '@sentry/types';

import { isExpoGo, notWeb } from '../utils/environment';
import { SDK_NAME, SDK_PACKAGE_NAME, SDK_VERSION } from '../version';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/spotlight.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { BaseTransportOptions, Client, ClientOptions, Envelope, Integration } from '@sentry/core';
import { logger, serializeEnvelope } from '@sentry/core';
import type { BaseTransportOptions, Client, ClientOptions, Envelope, Integration } from '@sentry/types';

import { ReactNativeLibraries } from '../utils/rnlibraries';
import { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/viewhierarchy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Attachment, Event, EventHint, Integration } from '@sentry/core';
import { logger } from '@sentry/core';
import type { Attachment, Event, EventHint, Integration } from '@sentry/types';

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

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/misc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { EnvelopeItem, Exception } from '@sentry/types';
import type { EnvelopeItem, Exception } from '@sentry/core';

type EnvelopeItemPayload = EnvelopeItem[1];

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/options.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { makeFetchTransport } from '@sentry/browser';
import type { CaptureContext, ClientOptions, Event, EventHint, Options } from '@sentry/core';
import type { Profiler } from '@sentry/react';
import type { CaptureContext, ClientOptions, Event, EventHint, Options } from '@sentry/types';
import type * as React from 'react';
import { Platform } from 'react-native';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/profiling/convertHermesProfile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FrameId, StackId, ThreadCpuFrame, ThreadCpuSample, ThreadCpuStack, ThreadId } from '@sentry/core';
import { logger } from '@sentry/core';
import type { FrameId, StackId, ThreadCpuFrame, ThreadCpuSample, ThreadCpuStack, ThreadId } from '@sentry/types';

import { MAX_PROFILE_DURATION_MS } from './constants';
import type * as Hermes from './hermes';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/profiling/debugid.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DebugImage } from '@sentry/core';
import { GLOBAL_OBJ, logger } from '@sentry/core';
import type { DebugImage } from '@sentry/types';

import { DEFAULT_BUNDLE_NAME } from './hermes';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/profiling/integration.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable complexity */
import type { Envelope, Event, Integration, Span, ThreadCpuProfile } from '@sentry/core';
import { getActiveSpan, getClient, logger, spanIsSampled, uuid4 } from '@sentry/core';
import type { Envelope, Event, Integration, Span, ThreadCpuProfile } from '@sentry/types';
import { Platform } from 'react-native';

import type { ReactNativeClient } from '../client';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/profiling/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DebugImage, MeasurementUnit, Profile, ThreadCpuFrame, ThreadCpuProfile } from '@sentry/types';
import type { DebugImage, MeasurementUnit, Profile, ThreadCpuFrame, ThreadCpuProfile } from '@sentry/core';

import type { NativeProfileEvent } from './nativeTypes';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/profiling/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable complexity */
import type { Envelope, Event, ThreadCpuProfile } from '@sentry/core';
import { forEachEnvelopeItem, logger } from '@sentry/core';
import type { Envelope, Event, ThreadCpuProfile } from '@sentry/types';

import { getDefaultEnvironment } from '../utils/environment';
import { getDebugMetadata } from './debugid';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/replay/mobilereplay.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Client, DynamicSamplingContext, Event, Integration } from '@sentry/core';
import { logger } from '@sentry/core';
import type { Client, DynamicSamplingContext, Event, Integration } from '@sentry/types';

import { isHardCrash } from '../misc';
import { hasHooks } from '../utils/clientutils';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/replay/xhrUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Breadcrumb, BreadcrumbHint, SentryWrappedXMLHttpRequest, XhrBreadcrumbHint } from '@sentry/core';
import { dropUndefinedKeys } from '@sentry/core';
import type { Breadcrumb, BreadcrumbHint, SentryWrappedXMLHttpRequest, XhrBreadcrumbHint } from '@sentry/types';

import type { RequestBody } from './networkUtils';
import { getBodySize, parseContentLengthHeader } from './networkUtils';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/scopeSync.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Breadcrumb, Scope } from '@sentry/types';
import type { Breadcrumb, Scope } from '@sentry/core';

import { DEFAULT_BREADCRUMB_LEVEL } from './breadcrumb';
import { fillTyped } from './utils/fill';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/sdk.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable complexity */
import type { Breadcrumb, BreadcrumbHint, Integration, Scope, SendFeedbackParams, UserFeedback } from '@sentry/core';
import { captureFeedback, getClient, getGlobalScope, getIntegrationsToSetup, getIsolationScope, initAndBind, logger, stackParserFromStackParserOptions, withScope as coreWithScope } from '@sentry/core';
import {
defaultStackParser,
makeFetchTransport,
} from '@sentry/react';
import type { Breadcrumb, BreadcrumbHint, Integration, Scope, SendFeedbackParams, UserFeedback } from '@sentry/types';
import * as React from 'react';

import { ReactNativeClient } from './client';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tools/metroMiddleware.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { StackFrame } from '@sentry/core';
import { addContextToFrame, logger } from '@sentry/core';
import type { StackFrame } from '@sentry/types';
import { readFile } from 'fs';
import type { IncomingMessage, ServerResponse } from 'http';
import type { InputConfigT, Middleware } from 'metro-config';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/touchevents.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SeverityLevel } from '@sentry/core';
import { addBreadcrumb, dropUndefinedKeys, getClient, logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
import type { SeverityLevel } from '@sentry/types';
import * as React from 'react';
import type { GestureResponderEvent } from 'react-native';
import { StyleSheet, View } from 'react-native';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/gesturetracing.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Breadcrumb } from '@sentry/core';
import { addBreadcrumb, logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
import type { Breadcrumb } from '@sentry/types';

import { startUserInteractionSpan } from './integrations/userInteraction';
import { UI_ACTION } from './ops';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/integrations/appStart.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable complexity */
import type { Client, Event, Integration, SpanJSON, TransactionEvent } from '@sentry/core';
import {
getCapturedScopesOnSpan,
getClient,
Expand All @@ -9,7 +10,6 @@ import {
startInactiveSpan,
timestampInSeconds,
} from '@sentry/core';
import type { Client, Event, Integration, SpanJSON, TransactionEvent } from '@sentry/types';

import {
APP_START_COLD as APP_START_COLD_MEASUREMENT,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/integrations/nativeFrames.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Client, Event, Integration, Measurements, MeasurementUnit, Span } from '@sentry/core';
import { logger, timestampInSeconds } from '@sentry/core';
import type { Client, Event, Integration, Measurements, MeasurementUnit, Span } from '@sentry/types';

import type { NativeFramesResponse } from '../../NativeRNSentry';
import { AsyncExpiringMap } from '../../utils/AsyncExpiringMap';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/integrations/stalltracking.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable max-lines */
import type { Client, Integration, Measurements, MeasurementUnit, Span } from '@sentry/core';
import { getRootSpan, logger, spanToJSON, timestampInSeconds } from '@sentry/core';
import type { Client, Integration, Measurements, MeasurementUnit, Span } from '@sentry/types';
import type { AppStateStatus } from 'react-native';
import { AppState } from 'react-native';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Integration, Span, StartSpanOptions } from '@sentry/core';
import {
getActiveSpan,
getClient,
Expand All @@ -6,7 +7,6 @@ import {
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
spanToJSON,
} from '@sentry/core';
import type { Integration, Span, StartSpanOptions } from '@sentry/types';

import type { ReactNativeClientOptions } from '../../options';
import { onlySampleIfChildSpans } from '../onSpanEndUtils';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/onSpanEndUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Client, Span } from '@sentry/core';
import { getSpanDescendants, logger, SPAN_STATUS_ERROR, spanToJSON } from '@sentry/core';
import type { Client, Span } from '@sentry/types';
import type { AppStateStatus } from 'react-native';
import { AppState } from 'react-native';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/reactnativenavigation.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Client, Integration, Span } from '@sentry/core';
import {
addBreadcrumb,
getClient,
Expand All @@ -6,7 +7,6 @@ import {
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
spanToJSON,
} from '@sentry/core';
import type { Client, Integration, Span } from '@sentry/types';

import type { EmitterSubscription } from '../utils/rnlibrariesinterface';
import { isSentrySpan } from '../utils/span';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/reactnativetracing.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable max-lines */
import { instrumentOutgoingRequests } from '@sentry/browser';
import type { Client, Event, Integration, StartSpanOptions } from '@sentry/core';
import { getClient } from '@sentry/core';
import type { Client, Event, Integration, StartSpanOptions } from '@sentry/types';

import { isWeb } from '../utils/environment';
import { getDevServer } from './../integrations/debugsymbolicatorutils';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/reactnavigation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable max-lines */
import type { Client, Integration, Span } from '@sentry/core';
import {
addBreadcrumb,
getActiveSpan,
Expand All @@ -12,7 +13,6 @@ import {
startInactiveSpan,
timestampInSeconds,
} from '@sentry/core';
import type { Client, Integration, Span } from '@sentry/types';

import type { NewFrameEvent } from '../utils/sentryeventemitter';
import type { SentryEventEmitterFallback } from '../utils/sentryeventemitterfallback';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/span.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Client, Scope, Span, StartSpanOptions } from '@sentry/core';
import {
generatePropagationContext,
getActiveSpan,
Expand All @@ -11,7 +12,6 @@ import {
spanToJSON,
startIdleSpan as coreStartIdleSpan,
} from '@sentry/core';
import type { Client, Scope, Span, StartSpanOptions } from '@sentry/types';

import { isRootSpan } from '../utils/span';
import { adjustTransactionDuration, cancelInBackground } from './onSpanEndUtils';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/timetodisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Span,StartSpanOptions } from '@sentry/core';
import { fill, getActiveSpan, getSpanDescendants, logger, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_STATUS_ERROR, SPAN_STATUS_OK, spanToJSON, startInactiveSpan } from '@sentry/core';
import type { Span,StartSpanOptions } from '@sentry/types';
import * as React from 'react';

import { isTurboModuleEnabled } from '../utils/environment';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Span } from '@sentry/types';
import type { Span } from '@sentry/core';

export interface ReactNavigationRoute {
name: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/tracing/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { MeasurementUnit, Span, SpanJSON, TransactionSource } from '@sentry/core';
import {
dropUndefinedKeys,
getSpanDescendants,
Expand All @@ -11,7 +12,6 @@ import {
timestampInSeconds,
uuid4,
} from '@sentry/core';
import type { MeasurementUnit, Span, SpanJSON, TransactionSource } from '@sentry/types';

import { RN_GLOBAL_OBJ } from '../utils/worldwide';

Expand Down
Loading

0 comments on commit 79586c5

Please sign in to comment.