Skip to content

Commit 3a6735d

Browse files
committed
fixup! fixup! feat(core): split exports by browser/server for bundle size
1 parent b21e5ee commit 3a6735d

100 files changed

Lines changed: 172 additions & 170 deletions

File tree

Some content is hidden

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

packages/browser/src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import type {
88
ParameterizedString,
99
Scope,
1010
SeverityLevel,
11-
} from '@sentry/core';
11+
} from '@sentry/core/browser';
1212
import {
1313
_INTERNAL_flushLogsBuffer,
1414
_INTERNAL_flushMetricsBuffer,
1515
addAutoIpAddressToSession,
1616
applySdkMetadata,
1717
Client,
1818
getSDKSource,
19-
} from '@sentry/core';
19+
} from '@sentry/core/browser';
2020
import { eventFromException, eventFromMessage } from './eventbuilder';
2121
import { WINDOW } from './helpers';
2222
import type { BrowserTransportOptions } from './transports/types';

packages/browser/src/diagnose-sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getClient, suppressTracing } from '@sentry/core';
1+
import { getClient, suppressTracing } from '@sentry/core/browser';
22

33
/**
44
* A function to diagnose why the SDK might not be successfully sending data.

packages/browser/src/eventbuilder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
SeverityLevel,
77
StackFrame,
88
StackParser,
9-
} from '@sentry/core';
9+
} from '@sentry/core/browser';
1010
import {
1111
_INTERNAL_enhanceErrorWithSentryInfo,
1212
addExceptionMechanism,
@@ -22,7 +22,7 @@ import {
2222
isPlainObject,
2323
normalizeToSize,
2424
resolvedSyncPromise,
25-
} from '@sentry/core';
25+
} from '@sentry/core/browser';
2626

2727
type Prototype = { constructor: (...args: unknown[]) => unknown };
2828

packages/browser/src/exports.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export type {
2020
ExclusiveEventHintOrCaptureContext,
2121
Log,
2222
LogSeverityLevel,
23-
} from '@sentry/core';
23+
} from '@sentry/core/browser';
2424

2525
export type { BrowserOptions } from './client';
2626

@@ -72,14 +72,14 @@ export {
7272
updateSpanName,
7373
withStreamedSpan,
7474
metrics,
75-
} from '@sentry/core';
75+
} from '@sentry/core/browser';
7676

7777
export {
7878
SEMANTIC_ATTRIBUTE_SENTRY_OP,
7979
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
8080
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
8181
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
82-
} from '@sentry/core';
82+
} from '@sentry/core/browser';
8383

8484
export { WINDOW } from './helpers';
8585
export { BrowserClient } from './client';

packages/browser/src/feedbackAsync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import { lazyLoadIntegration } from './utils/lazyLoadIntegration';
55
* An integration to add user feedback to your application,
66
* while loading most of the code lazily only when it's needed.
77
*/
8-
export const feedbackAsyncIntegration = buildFeedbackIntegration({
8+
export const feedbackAsyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({
99
lazyLoadIntegration,
1010
});

packages/browser/src/feedbackSync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
} from '@sentry-internal/feedback';
66

77
/** Add a widget to capture user feedback to your application. */
8-
export const feedbackSyncIntegration = buildFeedbackIntegration({
8+
export const feedbackSyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({
99
getModalIntegration: () => feedbackModalIntegration,
1010
getScreenshotIntegration: () => feedbackScreenshotIntegration,
1111
});

packages/browser/src/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Mechanism, WrappedFunction } from '@sentry/core';
1+
import type { Mechanism, WrappedFunction } from '@sentry/core/browser';
22
import {
33
addExceptionMechanism,
44
addExceptionTypeValue,
@@ -9,7 +9,7 @@ import {
99
GLOBAL_OBJ,
1010
markFunctionWrapped,
1111
withScope,
12-
} from '@sentry/core';
12+
} from '@sentry/core/browser';
1313

1414
export const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;
1515

packages/browser/src/index.bundle.logs.metrics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
export * from './index.bundle.base';
99

1010
// TODO(v11): Export metrics here once we remove it from the base bundle.
11-
export { logger, consoleLoggingIntegration } from '@sentry/core';
11+
export { logger, consoleLoggingIntegration } from '@sentry/core/browser';
1212

1313
export { elementTimingIntegration } from '@sentry-internal/browser-utils';
1414

packages/browser/src/index.bundle.replay.logs.metrics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
export * from './index.bundle.base';
88

99
// TODO(v11): Export metrics here once we remove it from the base bundle.
10-
export { logger, consoleLoggingIntegration } from '@sentry/core';
10+
export { logger, consoleLoggingIntegration } from '@sentry/core/browser';
1111

1212
export { replayIntegration, getReplay } from '@sentry-internal/replay';
1313

packages/browser/src/index.bundle.tracing.logs.metrics.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { registerSpanErrorInstrumentation } from '@sentry/core';
1+
import { registerSpanErrorInstrumentation } from '@sentry/core/browser';
22
import { feedbackIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims';
33

44
registerSpanErrorInstrumentation();
55

66
export * from './index.bundle.base';
77

88
// TODO(v11): Export metrics here once we remove it from the base bundle.
9-
export { logger, consoleLoggingIntegration } from '@sentry/core';
9+
export { logger, consoleLoggingIntegration } from '@sentry/core/browser';
1010

1111
export {
1212
getActiveSpan,
@@ -18,7 +18,7 @@ export {
1818
startSpan,
1919
startSpanManual,
2020
withActiveSpan,
21-
} from '@sentry/core';
21+
} from '@sentry/core/browser';
2222

2323
export {
2424
browserTracingIntegration,

0 commit comments

Comments
 (0)