Skip to content

Commit 5145cbc

Browse files
c298leeandrewshie-sentry
authored andcommitted
chore: Replace @sentry/utils with @sentry/core (#84196)
In preparation for upgrading to Sentry SDK v9, we need to replace `@sentry/utils` with `@sentry/core` since `@sentry/utils` will be deprecated and the packages exports and APIs have been moved into `@sentry/core`.
1 parent 719e4f8 commit 5145cbc

File tree

16 files changed

+18
-18
lines changed

16 files changed

+18
-18
lines changed

static/app/components/assigneeBadge.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Fragment, useState} from 'react';
2-
import {uuid4} from '@sentry/utils';
2+
import {uuid4} from '@sentry/core';
33

44
import {AssigneeBadge} from 'sentry/components/assigneeBadge';
55
import storyBook from 'sentry/stories/storyBook';

static/app/components/modals/widgetViewerModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import {Fragment, memo, useEffect, useMemo, useState} from 'react';
22
import {components} from 'react-select';
33
import {css} from '@emotion/react';
44
import styled from '@emotion/styled';
5+
import {truncate} from '@sentry/core';
56
import * as Sentry from '@sentry/react';
6-
import {truncate} from '@sentry/utils';
77
import type {Location} from 'history';
88
import cloneDeep from 'lodash/cloneDeep';
99
import isEqual from 'lodash/isEqual';

static/app/utils/metrics/dashboard.tsx

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

33
import type {PageFilters} from 'sentry/types/core';
44
import {defined} from 'sentry/utils';

static/app/utils/profiling/routes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {dropUndefinedKeys} from '@sentry/utils';
1+
import {dropUndefinedKeys} from '@sentry/core';
22
import type {Location, LocationDescriptor, Path} from 'history';
33

44
import type {Organization} from 'sentry/types/organization';

static/app/utils/profiling/spanTree.tsx

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

33
import type {RawSpanType} from 'sentry/components/events/interfaces/spans/types';
44
import {isEventFromBrowserJavaScriptSDK} from 'sentry/components/events/interfaces/spans/utils';

static/app/views/alerts/rules/uptime/httpSnippet.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import {generateSentryTraceHeader} from '@sentry/utils';
1+
import {generateSentryTraceHeader} from '@sentry/core';
22

33
import {render, screen} from 'sentry-test/reactTestingLibrary';
44

55
import {HTTPSnippet} from './httpSnippet';
66

7-
jest.mock('@sentry/utils', () => ({
8-
...jest.requireActual('@sentry/utils'),
7+
jest.mock('@sentry/core', () => ({
8+
...jest.requireActual('@sentry/core'),
99
generateSentryTraceHeader: jest.fn(() => 'sentry-trace-value'),
1010
}));
1111

static/app/views/alerts/rules/uptime/httpSnippet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {useMemo} from 'react';
22
import styled from '@emotion/styled';
3-
import {generateSentryTraceHeader} from '@sentry/utils';
3+
import {generateSentryTraceHeader} from '@sentry/core';
44

55
import {CodeSnippet} from 'sentry/components/codeSnippet';
66
import {t} from 'sentry/locale';

static/app/views/dashboards/widgetBuilder/widgetBuilder.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {urlEncode} from '@sentry/utils';
1+
import {urlEncode} from '@sentry/core';
22
import {DashboardFixture} from 'sentry-fixture/dashboard';
33
import {LocationFixture} from 'sentry-fixture/locationFixture';
44
import {MetricsFieldFixture} from 'sentry-fixture/metrics';

static/app/views/dashboards/widgetBuilder/widgetBuilderDataset.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {urlEncode} from '@sentry/utils';
1+
import {urlEncode} from '@sentry/core';
22
import {DashboardFixture} from 'sentry-fixture/dashboard';
33
import {LocationFixture} from 'sentry-fixture/locationFixture';
44
import {MetricsFieldFixture} from 'sentry-fixture/metrics';

static/app/views/dashboards/widgetBuilder/widgetBuilderSortBy.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {urlEncode} from '@sentry/utils';
1+
import {urlEncode} from '@sentry/core';
22
import {DashboardFixture} from 'sentry-fixture/dashboard';
33
import {LocationFixture} from 'sentry-fixture/locationFixture';
44
import {MetricsFieldFixture} from 'sentry-fixture/metrics';

0 commit comments

Comments
 (0)