Skip to content

Commit

Permalink
fix(browser): Avoid importing from ./exports (#9775)
Browse files Browse the repository at this point in the history
This has a side effect in `@sentry/browser`, so importing from there is
not safe. Instead just directly import this from core.
  • Loading branch information
mydea committed Dec 7, 2023
1 parent d69fb25 commit 1eb2ded
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/browser/src/integrations/breadcrumbs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable max-lines */
import { getCurrentHub } from '@sentry/core';
import { getClient, getCurrentHub } from '@sentry/core';
import type {
Event as SentryEvent,
HandlerDataConsole,
Expand Down Expand Up @@ -31,7 +31,6 @@ import {
} from '@sentry/utils';

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

/** JSDoc */
Expand Down
3 changes: 1 addition & 2 deletions packages/browser/src/profiling/utils.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* eslint-disable max-lines */

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

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

Expand Down

0 comments on commit 1eb2ded

Please sign in to comment.