Skip to content

Commit d1ddb53

Browse files
authored
ref(core): Remove internal types-hoist re-export (#16116)
We can get rid of this barrel file.
1 parent 2e5f6b6 commit d1ddb53

File tree

129 files changed

+552
-537
lines changed

Some content is hidden

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

129 files changed

+552
-537
lines changed

packages/core/src/api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { ReportDialogOptions } from './report-dialog';
2-
import type { DsnComponents, DsnLike, SdkInfo } from './types-hoist';
2+
import type { DsnComponents, DsnLike } from './types-hoist/dsn';
3+
import type { SdkInfo } from './types-hoist/sdkinfo';
34
import { dsnToString, makeDsn } from './utils-hoist/dsn';
45

56
const SENTRY_API_VERSION = '7';

packages/core/src/breadcrumbs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getClient, getIsolationScope } from './currentScopes';
2-
import type { Breadcrumb, BreadcrumbHint } from './types-hoist';
2+
import type { Breadcrumb, BreadcrumbHint } from './types-hoist/breadcrumb';
33
import { consoleSandbox } from './utils-hoist/logger';
44
import { dateTimestampInSeconds } from './utils-hoist/time';
55

packages/core/src/checkin.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import type {
2-
CheckInEnvelope,
3-
CheckInItem,
4-
DsnComponents,
5-
DynamicSamplingContext,
6-
SdkMetadata,
7-
SerializedCheckIn,
8-
} from './types-hoist';
1+
import type { CheckInEnvelope, CheckInItem, DynamicSamplingContext } from './types-hoist/envelope';
2+
import type { DsnComponents } from './types-hoist/dsn';
3+
import type { SdkMetadata } from './types-hoist/sdkmetadata';
4+
import type { SerializedCheckIn } from './types-hoist/checkin';
95
import { dsnToString } from './utils-hoist/dsn';
106
import { createEnvelope } from './utils-hoist/envelope';
117

packages/core/src/client.ts

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,24 @@
11
/* eslint-disable max-lines */
2-
import type {
3-
Breadcrumb,
4-
BreadcrumbHint,
5-
CheckIn,
6-
ClientOptions,
7-
DataCategory,
8-
DsnComponents,
9-
DynamicSamplingContext,
10-
Envelope,
11-
ErrorEvent,
12-
Event,
13-
EventDropReason,
14-
EventHint,
15-
EventProcessor,
16-
FeedbackEvent,
17-
FetchBreadcrumbHint,
18-
Integration,
19-
Log,
20-
MonitorConfig,
21-
Outcome,
22-
ParameterizedString,
23-
SdkMetadata,
24-
Session,
25-
SessionAggregates,
26-
SeverityLevel,
27-
Span,
28-
SpanAttributes,
29-
SpanContextData,
30-
SpanJSON,
31-
StartSpanOptions,
32-
TraceContext,
33-
TransactionEvent,
34-
Transport,
35-
TransportMakeRequestResponse,
36-
XhrBreadcrumbHint,
37-
} from './types-hoist';
2+
import type { Breadcrumb, BreadcrumbHint, FetchBreadcrumbHint, XhrBreadcrumbHint } from './types-hoist/breadcrumb';
3+
import type { CheckIn, MonitorConfig } from './types-hoist/checkin';
4+
import type { ClientOptions } from './types-hoist/options';
5+
import type { DataCategory } from './types-hoist/datacategory';
6+
import type { EventDropReason, Outcome } from './types-hoist/clientreport';
7+
import type { DsnComponents } from './types-hoist/dsn';
8+
import type { DynamicSamplingContext, Envelope } from './types-hoist/envelope';
9+
import type { ErrorEvent, Event, EventHint, TransactionEvent } from './types-hoist/event';
10+
import type { EventProcessor } from './types-hoist/eventprocessor';
11+
import type { FeedbackEvent } from './types-hoist/feedback';
12+
import type { Integration } from './types-hoist/integration';
13+
import type { Log } from './types-hoist/log';
14+
import type { ParameterizedString } from './types-hoist/parameterize';
15+
import type { SdkMetadata } from './types-hoist/sdkmetadata';
16+
import type { Session, SessionAggregates } from './types-hoist/session';
17+
import type { SeverityLevel } from './types-hoist/severity';
18+
import type { Span, SpanAttributes, SpanContextData, SpanJSON } from './types-hoist/span';
19+
import type { StartSpanOptions } from './types-hoist/startSpanOptions';
20+
import type { TraceContext } from './types-hoist/context';
21+
import type { Transport, TransportMakeRequestResponse } from './types-hoist/transport';
3822

3923
import { getEnvelopeEndpointWithUrlEncodedAuth } from './api';
4024
import { DEFAULT_ENVIRONMENT } from './constants';

packages/core/src/currentScopes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getAsyncContextStrategy } from './asyncContext';
22
import { getGlobalSingleton, getMainCarrier } from './carrier';
33
import type { Client } from './client';
44
import { Scope } from './scope';
5-
import type { TraceContext } from './types-hoist';
5+
import type { TraceContext } from './types-hoist/context';
66
import { generateSpanId } from './utils-hoist/propagationContext';
77

88
/**

packages/core/src/envelope.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
import type { Client } from './client';
22
import { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext';
33
import type { SentrySpan } from './tracing/sentrySpan';
4+
import type { DsnComponents } from './types-hoist/dsn';
45
import type {
5-
DsnComponents,
66
DynamicSamplingContext,
7-
Event,
87
EventEnvelope,
98
EventItem,
10-
LegacyCSPReport,
9+
SpanEnvelope,
10+
SpanItem,
1111
RawSecurityEnvelope,
1212
RawSecurityItem,
13-
SdkInfo,
14-
SdkMetadata,
15-
Session,
16-
SessionAggregates,
1713
SessionEnvelope,
1814
SessionItem,
19-
SpanEnvelope,
20-
SpanItem,
21-
} from './types-hoist';
15+
} from './types-hoist/envelope';
16+
import type { Event } from './types-hoist/event';
17+
import type { LegacyCSPReport } from './types-hoist/csp';
18+
import type { SdkInfo } from './types-hoist/sdkinfo';
19+
import type { SdkMetadata } from './types-hoist/sdkmetadata';
20+
import type { Session, SessionAggregates } from './types-hoist/session';
2221
import { dsnToString } from './utils-hoist/dsn';
2322
import {
2423
createEnvelope,

packages/core/src/eventProcessors.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { DEBUG_BUILD } from './debug-build';
2-
import type { Event, EventHint, EventProcessor } from './types-hoist';
2+
import type { Event } from './types-hoist/event';
3+
import type { EventHint } from './types-hoist/event';
4+
import type { EventProcessor } from './types-hoist/eventprocessor';
35
import { isThenable } from './utils-hoist/is';
46
import { logger } from './utils-hoist/logger';
57
import { SyncPromise } from './utils-hoist/syncpromise';

packages/core/src/exports.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,14 @@ import { getClient, getCurrentScope, getIsolationScope, withIsolationScope } fro
22
import { DEBUG_BUILD } from './debug-build';
33
import type { CaptureContext } from './scope';
44
import { closeSession, makeSession, updateSession } from './session';
5-
import type {
6-
CheckIn,
7-
Event,
8-
EventHint,
9-
EventProcessor,
10-
Extra,
11-
Extras,
12-
FinishedCheckIn,
13-
MonitorConfig,
14-
Primitive,
15-
Session,
16-
SessionContext,
17-
SeverityLevel,
18-
User,
19-
} from './types-hoist';
5+
import type { CheckIn, FinishedCheckIn, MonitorConfig } from './types-hoist/checkin';
6+
import type { Event, EventHint } from './types-hoist/event';
7+
import type { EventProcessor } from './types-hoist/eventprocessor';
8+
import type { Extra, Extras } from './types-hoist/extra';
9+
import type { Primitive } from './types-hoist/misc';
10+
import type { Session, SessionContext } from './types-hoist/session';
11+
import type { SeverityLevel } from './types-hoist/severity';
12+
import type { User } from './types-hoist/user';
2013
import { isThenable } from './utils-hoist/is';
2114
import { logger } from './utils-hoist/logger';
2215
import { uuid4 } from './utils-hoist/misc';

packages/core/src/feedback.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { getClient, getCurrentScope } from './currentScopes';
2-
import type { EventHint, FeedbackEvent, SendFeedbackParams } from './types-hoist';
2+
import type { EventHint } from './types-hoist/event';
3+
import type { FeedbackEvent, SendFeedbackParams } from './types-hoist/feedback';
34

45
/**
56
* Send user feedback to Sentry.

packages/core/src/fetch.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { getClient } from './currentScopes';
22
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from './semanticAttributes';
33
import { SPAN_STATUS_ERROR, setHttpStatus, startInactiveSpan } from './tracing';
44
import { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan';
5-
import type { FetchBreadcrumbHint, HandlerDataFetch, Span, SpanAttributes, SpanOrigin } from './types-hoist';
5+
import type { FetchBreadcrumbHint } from './types-hoist/breadcrumb';
6+
import type { HandlerDataFetch } from './types-hoist/instrument';
7+
import type { Span, SpanAttributes, SpanOrigin } from './types-hoist/span';
68
import { SENTRY_BAGGAGE_KEY_PREFIX } from './utils-hoist/baggage';
79
import { isInstanceOf, isRequest } from './utils-hoist/is';
810
import { getSanitizedUrlStringFromUrlObject, isURLObjectRelative, parseStringToURLObject } from './utils-hoist/url';

0 commit comments

Comments
 (0)