From 90ec16a1e24ad43f290f480c1ca1b6d28b865ecf Mon Sep 17 00:00:00 2001 From: Catherine Lee <55311782+c298lee@users.noreply.github.com> Date: Tue, 28 Jan 2025 11:49:58 -0800 Subject: [PATCH] replace @sentry/utils with @sentry/core --- static/app/components/assigneeBadge.stories.tsx | 2 +- static/app/components/modals/widgetViewerModal.tsx | 2 +- static/app/utils/metrics/dashboard.tsx | 2 +- static/app/utils/performanceForSentry/index.tsx | 4 ++-- static/app/utils/profiling/routes.tsx | 2 +- static/app/utils/profiling/spanTree.tsx | 2 +- static/app/views/alerts/rules/uptime/httpSnippet.spec.tsx | 6 +++--- static/app/views/alerts/rules/uptime/httpSnippet.tsx | 2 +- .../views/dashboards/widgetBuilder/widgetBuilder.spec.tsx | 2 +- .../dashboards/widgetBuilder/widgetBuilderDataset.spec.tsx | 2 +- .../dashboards/widgetBuilder/widgetBuilderSortBy.spec.tsx | 2 +- static/app/views/discover/utils.tsx | 2 +- static/app/views/integrationOrganizationLink/index.tsx | 2 +- .../newTraceDetails/traceModels/traceTreeTestUtils.tsx | 2 +- .../app/views/performance/transactionSummary/pageLayout.tsx | 2 +- .../transactionSummary/transactionTags/tagsHeatMap.tsx | 2 +- .../app/views/profiling/continuousProfileProvider.spec.tsx | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/static/app/components/assigneeBadge.stories.tsx b/static/app/components/assigneeBadge.stories.tsx index d087d6e37455f4..2eb832a03acbb1 100644 --- a/static/app/components/assigneeBadge.stories.tsx +++ b/static/app/components/assigneeBadge.stories.tsx @@ -1,5 +1,5 @@ import {Fragment, useState} from 'react'; -import {uuid4} from '@sentry/utils'; +import {uuid4} from '@sentry/core'; import {AssigneeBadge} from 'sentry/components/assigneeBadge'; import storyBook from 'sentry/stories/storyBook'; diff --git a/static/app/components/modals/widgetViewerModal.tsx b/static/app/components/modals/widgetViewerModal.tsx index 311e8a27c1e455..19e2fa7aff28b4 100644 --- a/static/app/components/modals/widgetViewerModal.tsx +++ b/static/app/components/modals/widgetViewerModal.tsx @@ -2,8 +2,8 @@ import {Fragment, memo, useEffect, useMemo, useState} from 'react'; import {components} from 'react-select'; import {css} from '@emotion/react'; import styled from '@emotion/styled'; +import {truncate} from '@sentry/core'; import * as Sentry from '@sentry/react'; -import {truncate} from '@sentry/utils'; import type {Location} from 'history'; import cloneDeep from 'lodash/cloneDeep'; import isEqual from 'lodash/isEqual'; diff --git a/static/app/utils/metrics/dashboard.tsx b/static/app/utils/metrics/dashboard.tsx index 8e86bcef955d78..cc356c823099ed 100644 --- a/static/app/utils/metrics/dashboard.tsx +++ b/static/app/utils/metrics/dashboard.tsx @@ -1,4 +1,4 @@ -import {urlEncode} from '@sentry/utils'; +import {urlEncode} from '@sentry/core'; import type {PageFilters} from 'sentry/types/core'; import {defined} from 'sentry/utils'; diff --git a/static/app/utils/performanceForSentry/index.tsx b/static/app/utils/performanceForSentry/index.tsx index c7808b41fc0d3b..6e43f1200b76f8 100644 --- a/static/app/utils/performanceForSentry/index.tsx +++ b/static/app/utils/performanceForSentry/index.tsx @@ -1,12 +1,12 @@ import type {ProfilerOnRenderCallback, ReactNode} from 'react'; import {Fragment, Profiler, useEffect, useRef} from 'react'; import type {MeasurementUnit, Span, TransactionEvent} from '@sentry/core'; -import * as Sentry from '@sentry/react'; import { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, timestampInSeconds, -} from '@sentry/utils'; +} from '@sentry/core'; +import * as Sentry from '@sentry/react'; import {useLocation} from 'sentry/utils/useLocation'; import usePrevious from 'sentry/utils/usePrevious'; diff --git a/static/app/utils/profiling/routes.tsx b/static/app/utils/profiling/routes.tsx index 61556e6835c1a3..57f7d1a4ec21fc 100644 --- a/static/app/utils/profiling/routes.tsx +++ b/static/app/utils/profiling/routes.tsx @@ -1,4 +1,4 @@ -import {dropUndefinedKeys} from '@sentry/utils'; +import {dropUndefinedKeys} from '@sentry/core'; import type {Location, LocationDescriptor, Path} from 'history'; import type {Organization} from 'sentry/types/organization'; diff --git a/static/app/utils/profiling/spanTree.tsx b/static/app/utils/profiling/spanTree.tsx index 779ec4ca8eea91..c51d84fea17481 100644 --- a/static/app/utils/profiling/spanTree.tsx +++ b/static/app/utils/profiling/spanTree.tsx @@ -1,4 +1,4 @@ -import {uuid4} from '@sentry/utils'; +import {uuid4} from '@sentry/core'; import type {RawSpanType} from 'sentry/components/events/interfaces/spans/types'; import {isEventFromBrowserJavaScriptSDK} from 'sentry/components/events/interfaces/spans/utils'; diff --git a/static/app/views/alerts/rules/uptime/httpSnippet.spec.tsx b/static/app/views/alerts/rules/uptime/httpSnippet.spec.tsx index ede335fe518e19..15985a6bba5faf 100644 --- a/static/app/views/alerts/rules/uptime/httpSnippet.spec.tsx +++ b/static/app/views/alerts/rules/uptime/httpSnippet.spec.tsx @@ -1,11 +1,11 @@ -import {generateSentryTraceHeader} from '@sentry/utils'; +import {generateSentryTraceHeader} from '@sentry/core'; import {render, screen} from 'sentry-test/reactTestingLibrary'; import {HTTPSnippet} from './httpSnippet'; -jest.mock('@sentry/utils', () => ({ - ...jest.requireActual('@sentry/utils'), +jest.mock('@sentry/core', () => ({ + ...jest.requireActual('@sentry/core'), generateSentryTraceHeader: jest.fn(() => 'sentry-trace-value'), })); diff --git a/static/app/views/alerts/rules/uptime/httpSnippet.tsx b/static/app/views/alerts/rules/uptime/httpSnippet.tsx index 68e938c1498095..98026f63160ab5 100644 --- a/static/app/views/alerts/rules/uptime/httpSnippet.tsx +++ b/static/app/views/alerts/rules/uptime/httpSnippet.tsx @@ -1,6 +1,6 @@ import {useMemo} from 'react'; import styled from '@emotion/styled'; -import {generateSentryTraceHeader} from '@sentry/utils'; +import {generateSentryTraceHeader} from '@sentry/core'; import {CodeSnippet} from 'sentry/components/codeSnippet'; import {t} from 'sentry/locale'; diff --git a/static/app/views/dashboards/widgetBuilder/widgetBuilder.spec.tsx b/static/app/views/dashboards/widgetBuilder/widgetBuilder.spec.tsx index 9d559828391007..e1b74a54b2ad43 100644 --- a/static/app/views/dashboards/widgetBuilder/widgetBuilder.spec.tsx +++ b/static/app/views/dashboards/widgetBuilder/widgetBuilder.spec.tsx @@ -1,4 +1,4 @@ -import {urlEncode} from '@sentry/utils'; +import {urlEncode} from '@sentry/core'; import {DashboardFixture} from 'sentry-fixture/dashboard'; import {LocationFixture} from 'sentry-fixture/locationFixture'; import {MetricsFieldFixture} from 'sentry-fixture/metrics'; diff --git a/static/app/views/dashboards/widgetBuilder/widgetBuilderDataset.spec.tsx b/static/app/views/dashboards/widgetBuilder/widgetBuilderDataset.spec.tsx index 6a70e896736f2b..18e8e48525f869 100644 --- a/static/app/views/dashboards/widgetBuilder/widgetBuilderDataset.spec.tsx +++ b/static/app/views/dashboards/widgetBuilder/widgetBuilderDataset.spec.tsx @@ -1,4 +1,4 @@ -import {urlEncode} from '@sentry/utils'; +import {urlEncode} from '@sentry/core'; import {DashboardFixture} from 'sentry-fixture/dashboard'; import {LocationFixture} from 'sentry-fixture/locationFixture'; import {MetricsFieldFixture} from 'sentry-fixture/metrics'; diff --git a/static/app/views/dashboards/widgetBuilder/widgetBuilderSortBy.spec.tsx b/static/app/views/dashboards/widgetBuilder/widgetBuilderSortBy.spec.tsx index fbaa58f8976105..c14afb36af4208 100644 --- a/static/app/views/dashboards/widgetBuilder/widgetBuilderSortBy.spec.tsx +++ b/static/app/views/dashboards/widgetBuilder/widgetBuilderSortBy.spec.tsx @@ -1,4 +1,4 @@ -import {urlEncode} from '@sentry/utils'; +import {urlEncode} from '@sentry/core'; import {DashboardFixture} from 'sentry-fixture/dashboard'; import {LocationFixture} from 'sentry-fixture/locationFixture'; import {MetricsFieldFixture} from 'sentry-fixture/metrics'; diff --git a/static/app/views/discover/utils.tsx b/static/app/views/discover/utils.tsx index 50f7f69749e59b..2b6d619c4012e6 100644 --- a/static/app/views/discover/utils.tsx +++ b/static/app/views/discover/utils.tsx @@ -1,4 +1,4 @@ -import {urlEncode} from '@sentry/utils'; +import {urlEncode} from '@sentry/core'; import type {Location, Query} from 'history'; import * as Papa from 'papaparse'; diff --git a/static/app/views/integrationOrganizationLink/index.tsx b/static/app/views/integrationOrganizationLink/index.tsx index 1bb828d97ee399..3e20d45f0c4920 100644 --- a/static/app/views/integrationOrganizationLink/index.tsx +++ b/static/app/views/integrationOrganizationLink/index.tsx @@ -1,6 +1,6 @@ import {Fragment} from 'react'; import styled from '@emotion/styled'; -import {urlEncode} from '@sentry/utils'; +import {urlEncode} from '@sentry/core'; import {addErrorMessage} from 'sentry/actionCreators/indicator'; import {Alert} from 'sentry/components/alert'; diff --git a/static/app/views/performance/newTraceDetails/traceModels/traceTreeTestUtils.tsx b/static/app/views/performance/newTraceDetails/traceModels/traceTreeTestUtils.tsx index de2e53c86c96dc..cd930da5cc8be6 100644 --- a/static/app/views/performance/newTraceDetails/traceModels/traceTreeTestUtils.tsx +++ b/static/app/views/performance/newTraceDetails/traceModels/traceTreeTestUtils.tsx @@ -1,4 +1,4 @@ -import {uuid4} from '@sentry/utils'; +import {uuid4} from '@sentry/core'; import {EntryType, type Event, type EventTransaction} from 'sentry/types/event'; import type { diff --git a/static/app/views/performance/transactionSummary/pageLayout.tsx b/static/app/views/performance/transactionSummary/pageLayout.tsx index 6365c831439645..c34147c14c0b85 100644 --- a/static/app/views/performance/transactionSummary/pageLayout.tsx +++ b/static/app/views/performance/transactionSummary/pageLayout.tsx @@ -1,6 +1,6 @@ import {useCallback, useState} from 'react'; import styled from '@emotion/styled'; -import {isString} from '@sentry/utils'; +import {isString} from '@sentry/core'; import type {Location} from 'history'; import {addErrorMessage} from 'sentry/actionCreators/indicator'; diff --git a/static/app/views/performance/transactionSummary/transactionTags/tagsHeatMap.tsx b/static/app/views/performance/transactionSummary/transactionTags/tagsHeatMap.tsx index 975682a1469cb2..4bb6e837c00945 100644 --- a/static/app/views/performance/transactionSummary/transactionTags/tagsHeatMap.tsx +++ b/static/app/views/performance/transactionSummary/transactionTags/tagsHeatMap.tsx @@ -5,7 +5,7 @@ import {useTheme} from '@emotion/react'; import styled from '@emotion/styled'; import {useOverlay} from '@react-aria/overlays'; import {useOverlayTriggerState} from '@react-stately/overlays'; -import {truncate} from '@sentry/utils'; +import {truncate} from '@sentry/core'; import type {VisualMapComponentOption} from 'echarts'; import type {Location} from 'history'; import memoize from 'lodash/memoize'; diff --git a/static/app/views/profiling/continuousProfileProvider.spec.tsx b/static/app/views/profiling/continuousProfileProvider.spec.tsx index 1f6add35907354..cd9168325a6d9e 100644 --- a/static/app/views/profiling/continuousProfileProvider.spec.tsx +++ b/static/app/views/profiling/continuousProfileProvider.spec.tsx @@ -1,5 +1,5 @@ +import {uuid4} from '@sentry/core'; import * as Sentry from '@sentry/react'; -import {uuid4} from '@sentry/utils'; import {initializeOrg} from 'sentry-test/initializeOrg'; import {render, waitFor} from 'sentry-test/reactTestingLibrary';