8000 fix(browser): Avoid importing from `./exports` (#9775) · adam187/sentry-javascript@1eb2ded · GitHub
[go: up one dir, main page]

Skip to content

Commit 1eb2ded

Browse files
authored
fix(browser): Avoid importing from ./exports (getsentry#9775)
This has a side effect in `@sentry/browser`, so importing from there is not safe. Instead just directly import this from core.
1 parent d69fb25 commit 1eb2ded

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/browser/src/integrations/breadcrumbs.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable max-lines */
2-
import { getCurrentHub } from '@sentry/core';
2+
import { getClient, getCurrentHub } from '@sentry/core';
33
import type {
44
Event as SentryEvent,
55
HandlerDataConsole,
@@ -31,7 +31,6 @@ import {
3131
} from '@sentry/utils';
3232

3333
import { DEBUG_BUILD } from '../debug-build';
34-
import { getClient } from '../exports';
3534
import { WINDOW } from '../helpers';
3635

3736
/** JSDoc */

packages/browser/src/profiling/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/* eslint-disable max-lines */
22

3-
import { DEFAULT_ENVIRONMENT, getCurrentHub } from '@sentry/core';
3+
import { DEFAULT_ENVIRONMENT, getClient, getCurrentHub } from '@sentry/core';
44
import type { DebugImage, Envelope, Event, StackFrame, StackParser, Transaction } from '@sentry/types';
55
import type { Profile, ThreadCpuProfile } from '@sentry/types/src/profiling';
66
import { GLOBAL_OBJ, browserPerformanceTimeOrigin, forEachEnvelopeItem, logger, uuid4 } from '@sentry/utils';
77

88
import { DEBUG_BUILD } from '../debug-build';
9-
import { getClient } from '../exports';
109
import { WINDOW } from '../helpers';
1110
import type { JSSelfProfile, JSSelfProfileStack, JSSelfProfiler, JSSelfProfilerConstructor } from './jsSelfProfiling';
1211

0 commit comments

Comments
 (0)
0