From 6ed64e472691adc8779ffc3a8e927b9f390e48ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Wed, 3 Jun 2026 16:05:12 -0400 Subject: [PATCH 1/4] ref(overlay): import NODE_ENV/defined from leaves to break import cycle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `overlay` and `useHoverOverlay` were pulled into the frontend type-import strongly-connected component (SCC) solely by value-imports from the `sentry/constants` and `sentry/utils` god-barrels: - `NODE_ENV` now comes from the `sentry/constants/env` leaf - `defined` is extracted to a `sentry/utils/defined` leaf (the `sentry/utils` barrel re-exports it, so existing consumers are untouched) With those two modules out of the cycle, `core/tooltip` — one of the most widely-imported core components — and its dependents leave the SCC too. Largest SCC drops 1867 -> 1770. Co-Authored-By: Claude Opus 4.8 --- static/app/components/overlay.tsx | 4 ++-- static/app/utils.tsx | 6 ++---- static/app/utils/defined.tsx | 3 +++ static/app/utils/useHoverOverlay.tsx | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 static/app/utils/defined.tsx diff --git a/static/app/components/overlay.tsx b/static/app/components/overlay.tsx index 78f37090867db8..94dbb523018b73 100644 --- a/static/app/components/overlay.tsx +++ b/static/app/components/overlay.tsx @@ -6,8 +6,8 @@ import {motion, useIsPresent} from 'framer-motion'; import type {OverlayArrowProps} from 'sentry/components/overlayArrow'; import {OverlayArrow} from 'sentry/components/overlayArrow'; -import {NODE_ENV} from 'sentry/constants'; -import {defined} from 'sentry/utils'; +import {NODE_ENV} from 'sentry/constants/env'; +import {defined} from 'sentry/utils/defined'; import {PanelProvider} from 'sentry/utils/panelProvider'; type OriginPoint = Partial<{x: number; y: number}>; diff --git a/static/app/utils.tsx b/static/app/utils.tsx index 7ef5fb24d8b3df..d67da57276aac2 100644 --- a/static/app/utils.tsx +++ b/static/app/utils.tsx @@ -7,6 +7,8 @@ import { } from 'sentry/utils/fields'; import {appendTagCondition} from 'sentry/utils/queryString'; +export {defined} from 'sentry/utils/defined'; + /** * Replaces slug special chars with a space */ @@ -14,10 +16,6 @@ export function explodeSlug(slug: string): string { return slug.replace(/[-_]+/g, ' ').trim(); } -export function defined(item: T): item is Exclude { - return item !== undefined && item !== null; -} - export function escape(str: string): string { return str .replace(/&/g, '&') diff --git a/static/app/utils/defined.tsx b/static/app/utils/defined.tsx new file mode 100644 index 00000000000000..fffcd14dad6689 --- /dev/null +++ b/static/app/utils/defined.tsx @@ -0,0 +1,3 @@ +export function defined(item: T): item is Exclude { + return item !== undefined && item !== null; +} diff --git a/static/app/utils/useHoverOverlay.tsx b/static/app/utils/useHoverOverlay.tsx index 2e2b74369690dc..072f1574c8c292 100644 --- a/static/app/utils/useHoverOverlay.tsx +++ b/static/app/utils/useHoverOverlay.tsx @@ -16,7 +16,7 @@ import {usePopper} from 'react-popper'; import {useTheme} from '@emotion/react'; import {mergeProps, mergeRefs} from '@react-aria/utils'; -import {NODE_ENV} from 'sentry/constants'; +import {NODE_ENV} from 'sentry/constants/env'; import type {Theme} from 'sentry/utils/theme'; function makeDefaultPopperModifiers(arrowElement: HTMLElement | null, offset: number) { From 31be7662abe194f41eb3a3956f1da0337ffbc957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Thu, 4 Jun 2026 11:19:55 -0400 Subject: [PATCH 2/4] test(overlay): mock NODE_ENV from constants/env leaf --- static/app/utils/useHoverOverlay.timing.spec.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app/utils/useHoverOverlay.timing.spec.tsx b/static/app/utils/useHoverOverlay.timing.spec.tsx index 54d2c9f662bcb9..77fb17bdc6d354 100644 --- a/static/app/utils/useHoverOverlay.timing.spec.tsx +++ b/static/app/utils/useHoverOverlay.timing.spec.tsx @@ -5,8 +5,8 @@ import {act, fireEvent, render, screen} from 'sentry-test/reactTestingLibrary'; // Disable the NODE_ENV === 'test' instant-open bypass for this file so we can // drive the real state machine with fake timers. The rest of the tooltip test // suite keeps the bypass and does not need to be rewritten. -jest.mock('sentry/constants', () => ({ - ...jest.requireActual('sentry/constants'), +jest.mock('sentry/constants/env', () => ({ + ...jest.requireActual('sentry/constants/env'), NODE_ENV: 'production', })); From 29e0a91e22757cb8a53a1294b584bacdacead786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Thu, 4 Jun 2026 12:11:23 -0400 Subject: [PATCH 3/4] ref(utils): import defined directly from its leaf module The barrel re-export (export {defined} from 'sentry/utils/defined') let consumers keep importing defined from the sentry/utils barrel. That does not shrink the import cycle and risks re-coupling the barrel to the leaf, so drop it and point every consumer at sentry/utils/defined directly. --- static/app/actionCreators/dashboards.tsx | 2 +- static/app/actionCreators/metrics.tsx | 2 +- static/app/actionCreators/prompts.tsx | 2 +- static/app/actionCreators/savedSearches.tsx | 2 +- static/app/actionCreators/sessions.tsx | 2 +- static/app/chartcuterie/dashboardsWidget.tsx | 2 +- static/app/components/arithmeticBuilder/action.tsx | 2 +- .../app/components/arithmeticBuilder/token/deletableToken.tsx | 2 +- static/app/components/arithmeticBuilder/token/deleteButton.tsx | 2 +- static/app/components/arithmeticBuilder/token/freeText.tsx | 2 +- static/app/components/arithmeticBuilder/token/function.tsx | 2 +- static/app/components/arithmeticBuilder/token/grid.tsx | 2 +- static/app/components/arithmeticBuilder/token/index.tsx | 2 +- static/app/components/arithmeticBuilder/token/literal.tsx | 2 +- static/app/components/arithmeticBuilder/token/reference.tsx | 2 +- static/app/components/arithmeticBuilder/tokenizer.tsx | 2 +- static/app/components/arithmeticBuilder/validator.tsx | 2 +- static/app/components/badge/groupPriority.tsx | 2 +- static/app/components/charts/baseChart.tsx | 2 +- static/app/components/charts/eventsChart.tsx | 2 +- static/app/components/charts/eventsRequest.tsx | 2 +- static/app/components/charts/optionSelector.tsx | 2 +- static/app/components/charts/utils.tsx | 3 ++- static/app/components/core/alert/alert.tsx | 2 +- static/app/components/core/compactSelect/list.tsx | 2 +- static/app/components/core/compactSelect/utils.tsx | 2 +- static/app/components/core/drawer/index.tsx | 2 +- .../core/interactionStateLayer/interactionStateLayer.tsx | 2 +- static/app/components/core/pagination/pagination.tsx | 2 +- static/app/components/core/select/option.tsx | 2 +- static/app/components/core/select/select.tsx | 2 +- static/app/components/deprecatedforms/booleanField.tsx | 2 +- static/app/components/deprecatedforms/formField.tsx | 2 +- static/app/components/deprecatedforms/genericField.tsx | 2 +- static/app/components/deprecatedforms/selectCreatableField.tsx | 2 +- static/app/components/deprecatedforms/selectField.tsx | 2 +- static/app/components/events/autofix/useExplorerAutofix.tsx | 2 +- static/app/components/events/autofix/v3/autofixEvidence.tsx | 2 +- static/app/components/events/autofix/v3/drawer.tsx | 2 +- static/app/components/events/autofix/v3/nextStep.tsx | 2 +- .../components/events/autofix/v3/useAutofixSectionEvidence.tsx | 2 +- static/app/components/events/autofix/v3/utils.ts | 2 +- .../components/events/breadcrumbs/breadcrumbItemContent.tsx | 2 +- .../app/components/events/breadcrumbs/breadcrumbsTimeline.tsx | 2 +- static/app/components/events/contexts/knownContext/device.tsx | 2 +- static/app/components/events/contexts/knownContext/os.tsx | 2 +- static/app/components/events/contexts/knownContext/profile.tsx | 2 +- static/app/components/events/contexts/knownContext/trace.tsx | 2 +- static/app/components/events/contexts/knownContext/user.tsx | 2 +- static/app/components/events/contexts/utils.tsx | 2 +- static/app/components/events/eventExtraData/index.tsx | 2 +- .../eventStatisticalDetector/eventComparison/eventDisplay.tsx | 2 +- .../eventStatisticalDetector/eventDifferentialFlamegraph.tsx | 2 +- .../events/eventStatisticalDetector/eventRegressionSummary.tsx | 2 +- .../events/eventStatisticalDetector/eventRegressionTable.tsx | 2 +- .../eventStatisticalDetector/functionBreakpointChart.tsx | 2 +- static/app/components/events/eventTags/eventTagsTree.tsx | 2 +- static/app/components/events/eventTags/eventTagsValue.tsx | 2 +- static/app/components/events/eventTags/index.tsx | 2 +- .../events/eventTagsAndScreenshot/screenshot/modal.tsx | 2 +- static/app/components/events/eventViewHierarchy.tsx | 2 +- static/app/components/events/highlights/util.tsx | 2 +- static/app/components/events/interfaces/analyzeFrames.tsx | 2 +- static/app/components/events/interfaces/breadcrumbs/index.tsx | 2 +- static/app/components/events/interfaces/breadcrumbs/utils.tsx | 2 +- .../interfaces/crashContent/exception/actionableItemsUtils.tsx | 2 +- .../events/interfaces/crashContent/exception/content.tsx | 2 +- .../interfaces/crashContent/exception/relatedExceptions.tsx | 2 +- .../events/interfaces/crashContent/exception/stackTrace.tsx | 2 +- .../interfaces/crashContent/exception/useActionableItems.tsx | 2 +- .../events/interfaces/crashContent/stackTrace/content.tsx | 2 +- .../interfaces/crashContent/stackTrace/nativeContent.tsx | 2 +- .../events/interfaces/crashContent/stackTrace/rawContent.tsx | 2 +- .../interfaces/debugMeta/debugImageDetails/candidates.tsx | 2 +- static/app/components/events/interfaces/debugMeta/index.tsx | 2 +- static/app/components/events/interfaces/frame/context.tsx | 2 +- .../components/events/interfaces/frame/defaultTitle/index.tsx | 2 +- .../events/interfaces/frame/frameRegisters/index.tsx | 2 +- static/app/components/events/interfaces/frame/leadHint.tsx | 2 +- static/app/components/events/interfaces/frame/utils.tsx | 2 +- static/app/components/events/interfaces/keyValueList/index.tsx | 2 +- static/app/components/events/interfaces/nativeFrame.tsx | 2 +- .../components/events/interfaces/performance/anrRootCause.tsx | 2 +- .../events/interfaces/request/getTransformedData.tsx | 2 +- .../events/interfaces/request/graphQlRequestBody.tsx | 2 +- static/app/components/events/interfaces/request/index.tsx | 2 +- .../components/events/interfaces/sourceMapsDebuggerModal.tsx | 2 +- .../components/events/interfaces/spans/spanProfileDetails.tsx | 2 +- static/app/components/events/interfaces/stackTraceContext.tsx | 2 +- static/app/components/events/interfaces/threads.tsx | 2 +- .../interfaces/threads/threadSelector/getThreadException.tsx | 2 +- .../events/interfaces/threads/threadSelector/index.tsx | 2 +- .../events/interfaces/threads/threadSelector/lockReason.tsx | 2 +- .../events/interfaces/threads/threadSelector/threadStates.tsx | 2 +- static/app/components/events/interfaces/utils.tsx | 2 +- static/app/components/events/viewHierarchy/detailsPanel.tsx | 2 +- static/app/components/events/viewHierarchy/index.tsx | 2 +- static/app/components/events/viewHierarchy/utils.spec.tsx | 2 +- static/app/components/events/viewHierarchy/utils.tsx | 2 +- static/app/components/externalIssues/ticketRuleModal.tsx | 2 +- static/app/components/featureFeedback/feedbackModal.tsx | 2 +- .../components/featureFlags/hooks/useFetchGroupAndEvent.tsx | 2 +- static/app/components/featureFlags/hooks/useFlagsInEvent.tsx | 2 +- static/app/components/feedback/useFeedbackCache.tsx | 2 +- static/app/components/forms/controls/rangeSlider/index.tsx | 2 +- static/app/components/forms/fields/choiceMapperField.tsx | 2 +- static/app/components/forms/fields/tableField.tsx | 2 +- static/app/components/forms/formField/index.tsx | 2 +- static/app/components/forms/jsonForm.tsx | 2 +- static/app/components/forms/model.tsx | 2 +- static/app/components/group/seenInfo.tsx | 2 +- .../app/components/groupPreviewTooltip/stackTracePreview.tsx | 2 +- static/app/components/groupPreviewTooltip/utils.tsx | 2 +- static/app/components/guidedSteps/guidedSteps.tsx | 2 +- .../components/issues/suspect/useLegacyEventSuspectFlags.tsx | 2 +- static/app/components/keyValueData/index.tsx | 2 +- static/app/components/modals/dataWidgetViewerModal.tsx | 2 +- static/app/components/modals/explore/saveQueryModal.tsx | 2 +- static/app/components/onboarding/useCreateProjectAndRules.ts | 2 +- static/app/components/pageFilters/actions.tsx | 2 +- static/app/components/pageFilters/parse.tsx | 2 +- .../components/performance/transactionSearchQueryBuilder.tsx | 2 +- static/app/components/performanceDuration.tsx | 2 +- .../components/profiling/flamegraph/aggregateFlamegraph.tsx | 2 +- .../profiling/flamegraph/aggregateFlamegraphSidePanel.tsx | 2 +- .../profiling/flamegraph/aggregateFlamegraphTreeTable.tsx | 2 +- static/app/components/profiling/flamegraph/callTreeTable.tsx | 2 +- .../components/profiling/flamegraph/continuousFlamegraph.tsx | 2 +- static/app/components/profiling/flamegraph/flamegraph.tsx | 2 +- .../components/profiling/flamegraph/flamegraphContextMenu.tsx | 2 +- .../profiling/flamegraph/flamegraphDrawer/flamegraphDrawer.tsx | 2 +- .../app/components/profiling/flamegraph/flamegraphPreview.tsx | 2 +- .../flamegraph/flamegraphToolbar/flamegraphThreadSelector.tsx | 2 +- .../app/components/profiling/flamegraph/flamegraphTooltip.tsx | 2 +- static/app/components/profiling/profileEventsTable.tsx | 2 +- static/app/components/profiling/profilingBreadcrumbs.tsx | 2 +- .../profiling/suspectFunctions/suspectFunctionsTable.tsx | 2 +- static/app/components/queryCount.tsx | 2 +- static/app/components/scoreCard.tsx | 2 +- static/app/components/searchQueryBuilder/context.tsx | 2 +- .../app/components/searchQueryBuilder/hooks/useUndoStack.tsx | 2 +- static/app/components/searchQueryBuilder/index.tsx | 2 +- .../app/components/searchQueryBuilder/selectionKeyHandler.tsx | 2 +- static/app/components/searchQueryBuilder/tokens/boolean.tsx | 2 +- static/app/components/searchQueryBuilder/tokens/combobox.tsx | 2 +- .../app/components/searchQueryBuilder/tokens/filter/filter.tsx | 2 +- .../searchQueryBuilder/tokens/filter/parametersCombobox.tsx | 2 +- .../searchQueryBuilder/tokens/filterKeyListBox/utils.tsx | 2 +- .../searchQueryBuilder/tokens/invalidTokenTooltip.tsx | 2 +- .../searchQueryBuilder/tokens/useSortedFilterKeyItems.tsx | 2 +- static/app/components/searchQueryBuilder/tokens/utils.tsx | 2 +- static/app/components/stackTrace/exceptionGroup.tsx | 2 +- static/app/components/stackTrace/frame/frameHeader.tsx | 2 +- static/app/components/stackTrace/issueStackTrace/index.tsx | 2 +- .../stackTrace/issueStackTrace/issueStackTraceFrameContext.tsx | 2 +- .../stackTrace/issueStackTrace/sharedIssueStackTrace.tsx | 2 +- static/app/components/stream/group.tsx | 3 ++- static/app/components/structuredEventData/linkHint.tsx | 2 +- static/app/components/tables/simpleTable/index.tsx | 2 +- static/app/components/tokenizedInput/token/comboBox.tsx | 2 +- static/app/components/tours/components.tsx | 2 +- static/app/components/userMisery.tsx | 2 +- static/app/components/versionHoverCard.tsx | 2 +- static/app/components/workflowEngine/gridCell/titleCell.tsx | 2 +- static/app/plugins/registry.tsx | 2 +- static/app/stores/teamStore.tsx | 2 +- static/app/utils.tsx | 2 -- static/app/utils/api/useAggregatedQueryKeys.tsx | 2 +- static/app/utils/crashReports.tsx | 2 +- static/app/utils/cursorPoller.tsx | 2 +- static/app/utils/discover/charts.tsx | 2 +- static/app/utils/discover/fieldRenderers.tsx | 2 +- static/app/utils/discover/teamKeyTransactionField.tsx | 2 +- static/app/utils/eventExceptionGroup.tsx | 2 +- static/app/utils/events.tsx | 2 +- static/app/utils/number/formatMetricUsingUnit.tsx | 2 +- static/app/utils/profiling/frame.tsx | 2 +- static/app/utils/profiling/hooks/useProfileTopEventsStats.tsx | 2 +- static/app/utils/profiling/hooks/utils.tsx | 2 +- static/app/utils/profiling/profile/continuousProfile.tsx | 2 +- static/app/utils/profiling/profile/importProfile.tsx | 2 +- static/app/utils/profiling/profile/utils.tsx | 2 +- static/app/utils/projects.tsx | 2 +- static/app/utils/replays/hooks/useActiveReplayTab.tsx | 2 +- static/app/utils/replays/hooks/useReplayData.tsx | 2 +- static/app/utils/replays/hydrateErrors.tsx | 2 +- static/app/utils/replays/replayReader.tsx | 2 +- static/app/utils/sessions.tsx | 3 ++- static/app/utils/timeSeries/markDelayedData.tsx | 2 +- static/app/utils/timeSeries/useFetchEventsTimeSeries.tsx | 2 +- static/app/utils/url/updateNullableLocation.ts | 2 +- static/app/utils/url/useQueryParamState.tsx | 2 +- static/app/utils/useAutoScroll.tsx | 2 +- static/app/views/alerts/list/rules/alertRulesList.tsx | 2 +- static/app/views/alerts/rules/metric/eapField.tsx | 2 +- static/app/views/alerts/rules/metric/ruleConditionsForm.tsx | 2 +- static/app/views/alerts/rules/metric/ruleForm.tsx | 2 +- .../alerts/rules/metric/triggers/chart/thresholdsChart.tsx | 2 +- .../alerts/rules/metric/utils/determineSeriesSampleCount.tsx | 2 +- .../app/views/alerts/rules/metric/utils/hasThresholdValue.tsx | 2 +- static/app/views/alerts/rules/utils.tsx | 2 +- static/app/views/alerts/utils/index.tsx | 2 +- .../app/views/automations/components/connectedMonitorsList.tsx | 2 +- static/app/views/automations/detail.tsx | 2 +- static/app/views/automations/hooks/utils.tsx | 2 +- .../utils/fetchIssueStreamDetectorIdsForProjects.ts | 2 +- static/app/views/dashboards/controls.tsx | 2 +- static/app/views/dashboards/dashboard.tsx | 2 +- static/app/views/dashboards/dashboardRevisions.tsx | 2 +- static/app/views/dashboards/datasetConfig/traceMetrics.tsx | 2 +- static/app/views/dashboards/detail.tsx | 2 +- static/app/views/dashboards/editAccessSelector.tsx | 2 +- static/app/views/dashboards/filtersBar.tsx | 2 +- static/app/views/dashboards/layoutUtils.tsx | 2 +- static/app/views/dashboards/manage/dashboardGrid.tsx | 2 +- static/app/views/dashboards/manage/dashboardTable.tsx | 2 +- static/app/views/dashboards/manage/gridPreview/index.tsx | 2 +- static/app/views/dashboards/releasesSelectControl.tsx | 2 +- static/app/views/dashboards/utils.tsx | 2 +- static/app/views/dashboards/utils/getWidgetExploreUrl.tsx | 2 +- static/app/views/dashboards/utils/getWidgetMetricsUrl.tsx | 2 +- .../dashboards/utils/transformSessionsResponseToSeries.tsx | 2 +- .../app/views/dashboards/utils/usePopulateLinkedDashboards.tsx | 2 +- .../widgetBuilder/buildSteps/groupByStep/groupBySelector.tsx | 2 +- .../views/dashboards/widgetBuilder/components/saveButton.tsx | 2 +- .../views/dashboards/widgetBuilder/components/thresholds.tsx | 2 +- .../dashboards/widgetBuilder/components/visualize/index.tsx | 2 +- .../visualize/traceMetrics/metricsEquationVisualize/index.tsx | 2 +- .../traceMetrics/metricsEquationVisualize/metricQueryRows.tsx | 2 +- .../widgetBuilder/hooks/useDashboardWidgetSource.tsx | 2 +- .../dashboards/widgetBuilder/hooks/useWidgetBuilderState.tsx | 2 +- .../widgetBuilder/hooks/useWidgetBuilderTraceItemConfig.ts | 2 +- .../views/dashboards/widgetBuilder/releaseWidget/fields.tsx | 2 +- .../widgetBuilder/utils/buildTraceMetricAggregate.ts | 2 +- .../widgetBuilder/utils/convertBuilderStateToWidget.ts | 2 +- .../widgetBuilder/utils/convertWidgetToBuilderStateParams.ts | 2 +- static/app/views/dashboards/widgetCard/chart.tsx | 2 +- static/app/views/dashboards/widgetCard/confidenceFooter.tsx | 2 +- .../widgetCard/hooks/useErrorsAndTransactionsWidgetQuery.tsx | 2 +- .../dashboards/widgetCard/hooks/useTransactionsWidgetQuery.tsx | 2 +- .../views/dashboards/widgetCard/hooks/useWidgetRawCounts.tsx | 2 +- .../views/dashboards/widgetCard/hooks/utils/getStaleTime.ts | 2 +- static/app/views/dashboards/widgetCard/logsWidgetQueries.tsx | 2 +- static/app/views/dashboards/widgetCard/spansWidgetQueries.tsx | 2 +- static/app/views/dashboards/widgetCard/visualizationWidget.tsx | 2 +- .../widgets/bigNumberWidget/bigNumberWidgetVisualization.tsx | 2 +- .../categoricalSeriesWidgetVisualization.tsx | 2 +- static/app/views/dashboards/widgets/common/typePredicates.tsx | 2 +- .../widgets/heatMapWidget/heatMapWidgetVisualization.tsx | 2 +- .../widgets/tableWidget/tableWidgetVisualization.tsx | 2 +- .../widgets/timeSeriesWidget/timeSeriesWidgetVisualization.tsx | 3 ++- .../widgets/wheelWidget/wheelWidgetVisualization.tsx | 2 +- static/app/views/dashboards/widgets/widget/widget.tsx | 2 +- .../components/details/metric/getDetectorOpenInDestination.tsx | 2 +- static/app/views/detectors/components/detectorLink.tsx | 2 +- .../detectors/components/detectorListTable/detectorListRow.tsx | 2 +- .../app/views/detectors/components/detectorListTable/index.tsx | 2 +- static/app/views/detectors/components/forms/cron/fields.tsx | 2 +- .../views/detectors/components/forms/metric/metricFormData.tsx | 2 +- .../forms/uptime/connectedAssertionSuggestionsButton.tsx | 2 +- .../forms/uptime/connectedTestUptimeMonitorButton.tsx | 2 +- static/app/views/detectors/components/forms/uptime/fields.tsx | 2 +- static/app/views/detectors/detail.tsx | 2 +- static/app/views/detectors/hooks/useOpenPeriods.tsx | 2 +- static/app/views/detectors/list/common/detectorListHeader.tsx | 2 +- static/app/views/discover/breadcrumb.tsx | 2 +- static/app/views/discover/results.tsx | 2 +- .../app/views/discover/results/resultsSearchQueryBuilder.tsx | 2 +- static/app/views/discover/savedQuery/index.tsx | 2 +- static/app/views/discover/table/cellAction.tsx | 2 +- static/app/views/discover/utils.tsx | 2 +- static/app/views/explore/components/table.tsx | 2 +- .../explore/components/traceItemAttributes/attributesTree.tsx | 2 +- static/app/views/explore/components/typeBadge.tsx | 2 +- static/app/views/explore/contexts/logs/sortBys.tsx | 2 +- .../explore/contexts/pageParamsContext/aggregateFields.tsx | 2 +- .../views/explore/contexts/pageParamsContext/visualizes.tsx | 2 +- static/app/views/explore/exploreStateQueryParamsProvider.tsx | 2 +- static/app/views/explore/hooks/useAnalytics.tsx | 2 +- static/app/views/explore/hooks/useCrossEventQueries.tsx | 2 +- static/app/views/explore/hooks/useExploreAggregatesTable.tsx | 2 +- static/app/views/explore/hooks/useExploreSpansTable.tsx | 2 +- static/app/views/explore/hooks/useExploreTimeseries.tsx | 2 +- static/app/views/explore/hooks/useGetSavedQueries.tsx | 2 +- .../app/views/explore/hooks/useGetTraceItemAttributeValues.tsx | 2 +- static/app/views/explore/hooks/useMetricOptions.tsx | 2 +- static/app/views/explore/hooks/useProgressiveQuery.spec.tsx | 2 +- static/app/views/explore/hooks/useTraceItemDetails.tsx | 2 +- static/app/views/explore/hooks/useVisualizeFields.tsx | 2 +- static/app/views/explore/logs/confidenceFooter.tsx | 2 +- static/app/views/explore/logs/content.tsx | 2 +- .../explore/logs/exports/useLogsExportEstimatedRowCount.tsx | 2 +- static/app/views/explore/logs/logsDownsamplingAlert.tsx | 2 +- static/app/views/explore/logs/logsGraph.tsx | 2 +- .../app/views/explore/logs/logsLocationQueryParamsProvider.tsx | 2 +- static/app/views/explore/logs/logsQueryParams.tsx | 2 +- static/app/views/explore/logs/logsToolbar.tsx | 2 +- static/app/views/explore/logs/tables/logsAggregateTable.tsx | 2 +- static/app/views/explore/logs/tables/logsInfiniteTable.tsx | 2 +- static/app/views/explore/logs/tables/logsTableRow.tsx | 3 ++- static/app/views/explore/logs/useLogsAggregatesTable.tsx | 2 +- static/app/views/explore/logs/useLogsQuery.tsx | 2 +- static/app/views/explore/logs/useLogsTimeseries.tsx | 2 +- static/app/views/explore/logs/useSaveAsItems.tsx | 2 +- static/app/views/explore/logs/useStreamingTimeseriesResult.tsx | 2 +- static/app/views/explore/logs/utils.tsx | 2 +- static/app/views/explore/metrics/confidenceFooter.tsx | 2 +- static/app/views/explore/metrics/content.tsx | 2 +- .../views/explore/metrics/hooks/metricHeatmapApiOptions.tsx | 2 +- .../views/explore/metrics/hooks/useMetricAggregatesTable.tsx | 2 +- .../app/views/explore/metrics/hooks/useMetricSamplesTable.tsx | 2 +- .../views/explore/metrics/hooks/useSaveMetricsMultiQuery.tsx | 2 +- static/app/views/explore/metrics/metricGraph/index.tsx | 2 +- .../app/views/explore/metrics/metricInfoTabs/metricDetails.tsx | 2 +- static/app/views/explore/metrics/metricQuery.tsx | 2 +- static/app/views/explore/metrics/metricsQueryParams.tsx | 2 +- static/app/views/explore/metrics/multiMetricsQueryParams.tsx | 2 +- static/app/views/explore/metrics/useSaveAsMetricItems.tsx | 2 +- static/app/views/explore/metrics/utils.tsx | 2 +- static/app/views/explore/multiQueryMode/content.tsx | 2 +- .../views/explore/multiQueryMode/hooks/useMultiQueryTable.tsx | 2 +- static/app/views/explore/multiQueryMode/index.tsx | 2 +- static/app/views/explore/multiQueryMode/locationUtils.tsx | 2 +- .../explore/multiQueryMode/queryConstructors/visualize.tsx | 2 +- .../views/explore/multiQueryMode/queryVisualizations/chart.tsx | 2 +- .../views/explore/multiQueryMode/queryVisualizations/table.tsx | 2 +- .../views/explore/profiling/landing/slowestFunctionsWidget.tsx | 2 +- static/app/views/explore/profiling/landing/styles.tsx | 2 +- static/app/views/explore/queryParams/context.tsx | 2 +- static/app/views/explore/queryParams/crossEvent.ts | 2 +- static/app/views/explore/queryParams/groupBy.ts | 2 +- static/app/views/explore/queryParams/managedFields.tsx | 2 +- static/app/views/explore/queryParams/visualize.ts | 2 +- .../releases/detail/overview/releaseComparisonChart/index.tsx | 2 +- .../releaseComparisonChart/releaseComparisonChartRow.tsx | 2 +- .../overview/releaseComparisonChart/releaseSessionsChart.tsx | 2 +- .../releases/detail/overview/sidebar/totalCrashFreeUsers.tsx | 2 +- .../releases/list/releaseCard/releaseCardProjectRow.tsx | 2 +- static/app/views/explore/releases/list/releasesRequest.tsx | 3 ++- .../explore/releases/releaseBubbles/useReleaseBubbles.tsx | 2 +- static/app/views/explore/releases/utils/index.tsx | 2 +- .../views/explore/replays/detail/console/messageFormatter.tsx | 2 +- .../views/explore/replays/detail/console/useConsoleFilters.tsx | 2 +- .../replays/detail/header/replayDetailsPageBreadcrumbs.tsx | 2 +- .../views/explore/replays/detail/header/replayItemDropdown.tsx | 2 +- static/app/views/explore/replays/detail/ourlogs/index.tsx | 2 +- static/app/views/explore/replays/list.tsx | 2 +- static/app/views/explore/savedQueries/exploreParams.tsx | 2 +- static/app/views/explore/spans/charts/confidenceFooter.tsx | 2 +- static/app/views/explore/spans/charts/index.tsx | 2 +- static/app/views/explore/spans/content.tsx | 2 +- .../explore/spans/crossEvents/crossEventQueryingDropdown.tsx | 2 +- static/app/views/explore/spans/spansQueryParams.tsx | 2 +- static/app/views/explore/spans/spansTab.tsx | 2 +- static/app/views/explore/spans/spansTabSearchSection.tsx | 2 +- static/app/views/explore/tables/aggregatesTable.tsx | 2 +- static/app/views/explore/tables/columnEditorModal.tsx | 2 +- static/app/views/explore/tables/fieldRenderer.tsx | 2 +- static/app/views/explore/tables/spansTable.tsx | 2 +- static/app/views/explore/tables/tracesTable/fieldRenderers.tsx | 2 +- static/app/views/explore/tables/tracesTable/index.tsx | 2 +- static/app/views/explore/toolbar/toolbarSaveAs.tsx | 2 +- static/app/views/explore/utils.tsx | 3 ++- .../app/views/explore/utils/traceItemAttributeKeysOptions.tsx | 2 +- .../webVitals/components/pageOverviewWebVitalsDetailPanel.tsx | 2 +- .../webVitals/queries/useSpanSamplesCategorizedQuery.tsx | 2 +- .../insights/common/components/tableCells/timeSpentCell.tsx | 2 +- .../app/views/insights/common/queries/useSortedTimeSeries.tsx | 2 +- static/app/views/insights/common/queries/useSpansQuery.tsx | 2 +- static/app/views/insights/common/utils/releaseComparison.tsx | 2 +- static/app/views/insights/common/utils/useEap.tsx | 2 +- static/app/views/insights/crons/components/checkInCell.tsx | 2 +- .../insights/pages/platform/shared/table/ErrorRateCell.tsx | 2 +- .../views/issueDetails/actions/seerCommandPaletteActions.tsx | 2 +- static/app/views/issueDetails/eventListTable.tsx | 2 +- .../eventNavigation/issueDetailsEventNavigation.tsx | 2 +- static/app/views/issueDetails/groupDetails.tsx | 2 +- .../views/issueDetails/groupEventDetails/groupEventDetails.tsx | 2 +- .../groupEventDetails/groupEventDetailsContent.tsx | 2 +- .../groupFeatureFlags/hooks/useGroupFeatureFlags.tsx | 2 +- static/app/views/issueDetails/groupTags/useGroupTags.tsx | 2 +- static/app/views/issueDetails/sidebar/detectorSection.tsx | 2 +- .../issueDetails/sidebar/metricDetectorTriggeredSection.tsx | 2 +- .../issueDetails/sidebar/sizeAnalysisTriggeredSection.tsx | 2 +- static/app/views/issueDetails/utils.tsx | 2 +- static/app/views/issueList/actions/utils.tsx | 2 +- .../views/issueList/issueViews/useSelectedGroupSeachView.tsx | 2 +- .../mutations/useUpdateGroupSearchViewStarredOrder.tsx | 2 +- static/app/views/issueList/overview.tsx | 2 +- static/app/views/issueList/overviewWrapper.tsx | 2 +- .../sections/dashboards/dashboardsSecondaryNavigation.tsx | 2 +- .../sections/explore/exploreSavedQueryNavigationItems.tsx | 2 +- .../secondary/sections/issues/issueViews/issueViewItem.tsx | 2 +- .../sections/issues/issueViews/useStarredIssueViews.tsx | 2 +- .../sections/settings/settingsSecondaryNavigation.tsx | 2 +- static/app/views/onboarding/onboarding.tsx | 2 +- static/app/views/onboarding/useBackActions.tsx | 2 +- .../landing/widgets/transforms/transformDiscoverToList.tsx | 2 +- .../landing/widgets/transforms/transformEventsToArea.tsx | 2 +- .../widgets/transforms/transformEventsToStackedBars.tsx | 2 +- .../widgets/widgets/mobileReleaseComparisonListWidget.tsx | 2 +- .../newTraceDetails/issuesTraceWaterfallOverlay.tsx | 2 +- .../views/performance/newTraceDetails/traceContextVitals.tsx | 2 +- .../traceDrawer/details/profiling/profilePreview.tsx | 2 +- .../traceDrawer/details/span/components/profileDetails.tsx | 2 +- .../newTraceDetails/traceDrawer/details/span/index.tsx | 2 +- .../traceDrawer/details/span/sections/ancestry.tsx | 2 +- .../newTraceDetails/traceDrawer/details/span/sections/keys.tsx | 2 +- .../traceDrawer/details/span/sections/measurements.tsx | 2 +- .../details/transaction/sections/additionalData.tsx | 2 +- .../traceDrawer/details/transaction/sections/request.tsx | 2 +- .../performance/newTraceDetails/traceDrawer/details/utils.tsx | 2 +- .../views/performance/newTraceDetails/traceHeader/projects.tsx | 2 +- .../newTraceDetails/traceSearch/traceSearchEvaluator.tsx | 2 +- .../performance/newTraceDetails/useTraceStateAnalytics.tsx | 2 +- static/app/views/performance/transactionSummary/pageLayout.tsx | 2 +- .../transactionSummary/teamKeyTransactionButton.tsx | 2 +- .../transactionSummary/transactionThresholdButton.tsx | 2 +- .../transactionSummary/transactionThresholdModal.tsx | 2 +- .../app/views/projectDetail/charts/projectErrorsBasicChart.tsx | 2 +- .../views/projectDetail/charts/projectSessionsAnrRequest.tsx | 2 +- static/app/views/projectDetail/projectCharts.tsx | 2 +- static/app/views/projectDetail/projectDetail.tsx | 2 +- .../projectDetail/projectScoreCards/projectAnrScoreCard.tsx | 2 +- .../projectDetail/projectScoreCards/projectApdexScoreCard.tsx | 2 +- .../projectScoreCards/projectStabilityScoreCard.tsx | 2 +- .../projectScoreCards/projectVelocityScoreCard.tsx | 2 +- static/app/views/projectsDashboard/projectCard.tsx | 2 +- static/app/views/settings/components/dataScrubbing/index.tsx | 2 +- .../components/dataScrubbing/modals/form/sourceField.tsx | 2 +- .../views/settings/project/projectFilters/groupTombstones.tsx | 2 +- .../settings/project/projectKeys/details/keyRateLimitsForm.tsx | 2 +- .../app/views/settings/project/projectOwnership/ownerInput.tsx | 2 +- .../settings/project/projectOwnership/ownershipRulesTable.tsx | 2 +- .../projectDebugFiles/sources/customRepositories/index.tsx | 2 +- .../views/settings/projectSourceMaps/associatedReleases.tsx | 2 +- static/app/views/settings/projectSourceMaps/sourceMapsList.tsx | 2 +- 437 files changed, 443 insertions(+), 438 deletions(-) diff --git a/static/app/actionCreators/dashboards.tsx b/static/app/actionCreators/dashboards.tsx index 940c96c6a14f81..94eb6d1a8bb049 100644 --- a/static/app/actionCreators/dashboards.tsx +++ b/static/app/actionCreators/dashboards.tsx @@ -8,8 +8,8 @@ import {PageFiltersStore} from 'sentry/components/pageFilters/store'; import {t} from 'sentry/locale'; import type {PageFilters} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {TOP_N} from 'sentry/utils/discover/types'; import {fetchMutation} from 'sentry/utils/queryClient'; import {RequestError} from 'sentry/utils/requestError/requestError'; diff --git a/static/app/actionCreators/metrics.tsx b/static/app/actionCreators/metrics.tsx index f7cffe2dffeabf..e47330ef568d41 100644 --- a/static/app/actionCreators/metrics.tsx +++ b/static/app/actionCreators/metrics.tsx @@ -2,8 +2,8 @@ import {getInterval} from 'sentry/components/charts/utils'; import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; import type {DateString} from 'sentry/types/core'; import type {Organization, SessionApiResponse} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; type DoReleaseHealthRequestOptions = { field: string[]; diff --git a/static/app/actionCreators/prompts.tsx b/static/app/actionCreators/prompts.tsx index aad4d49ebbbdc7..c0d145d6e50a41 100644 --- a/static/app/actionCreators/prompts.tsx +++ b/static/app/actionCreators/prompts.tsx @@ -3,8 +3,8 @@ import {useQueryClient} from '@tanstack/react-query'; import type {Client} from 'sentry/api'; import type {Organization, OrganizationSummary} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {promptIsDismissed} from 'sentry/utils/promptIsDismissed'; import type {ApiQueryKey, UseApiQueryOptions} from 'sentry/utils/queryClient'; import {setApiQueryData, useApiQuery} from 'sentry/utils/queryClient'; diff --git a/static/app/actionCreators/savedSearches.tsx b/static/app/actionCreators/savedSearches.tsx index b26cbe97a9285f..11edbecc394351 100644 --- a/static/app/actionCreators/savedSearches.tsx +++ b/static/app/actionCreators/savedSearches.tsx @@ -1,8 +1,8 @@ import type {Client} from 'sentry/api'; import {MAX_AUTOCOMPLETE_RECENT_SEARCHES} from 'sentry/constants'; import type {RecentSearch, SavedSearch, SavedSearchType} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {handleXhrErrorResponse} from 'sentry/utils/handleXhrErrorResponse'; import { useApiQuery, diff --git a/static/app/actionCreators/sessions.tsx b/static/app/actionCreators/sessions.tsx index 776d35548e6623..004268efa46dfc 100644 --- a/static/app/actionCreators/sessions.tsx +++ b/static/app/actionCreators/sessions.tsx @@ -2,8 +2,8 @@ import {getInterval} from 'sentry/components/charts/utils'; import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; import type {DateString} from 'sentry/types/core'; import type {Organization, SessionApiResponse} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; type DoSessionsRequestOptions = { field: string[]; diff --git a/static/app/chartcuterie/dashboardsWidget.tsx b/static/app/chartcuterie/dashboardsWidget.tsx index 2b03355d06dae5..d1d6e73643ae43 100644 --- a/static/app/chartcuterie/dashboardsWidget.tsx +++ b/static/app/chartcuterie/dashboardsWidget.tsx @@ -1,6 +1,6 @@ import type {Theme} from '@emotion/react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {type Widget} from 'sentry/views/dashboards/types'; import type {TimeSeries} from 'sentry/views/dashboards/widgets/common/types'; import {formatTimeSeriesLabel} from 'sentry/views/dashboards/widgets/timeSeriesWidget/formatters/formatTimeSeriesLabel'; diff --git a/static/app/components/arithmeticBuilder/action.tsx b/static/app/components/arithmeticBuilder/action.tsx index 494fb1dbabc0ab..8abef4a3d49936 100644 --- a/static/app/components/arithmeticBuilder/action.tsx +++ b/static/app/components/arithmeticBuilder/action.tsx @@ -3,7 +3,7 @@ import type {Key} from '@react-types/shared'; import {Expression} from 'sentry/components/arithmeticBuilder/expression'; import type {Token} from 'sentry/components/arithmeticBuilder/token'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type ArithmeticBuilderUpdateResetFocusOverrideAction = { type: 'RESET_FOCUS_OVERRIDE'; diff --git a/static/app/components/arithmeticBuilder/token/deletableToken.tsx b/static/app/components/arithmeticBuilder/token/deletableToken.tsx index 05a34fd6bdddd1..30ddd5b02393a0 100644 --- a/static/app/components/arithmeticBuilder/token/deletableToken.tsx +++ b/static/app/components/arithmeticBuilder/token/deletableToken.tsx @@ -6,7 +6,7 @@ import type {Node} from '@react-types/shared'; import {useArithmeticBuilder} from 'sentry/components/arithmeticBuilder/context'; import type {Token} from 'sentry/components/arithmeticBuilder/token'; import {DeletableToken as GenericDeletableToken} from 'sentry/components/tokenizedInput/token/deletableToken'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface DeletableTokenProps { children: React.ReactNode; diff --git a/static/app/components/arithmeticBuilder/token/deleteButton.tsx b/static/app/components/arithmeticBuilder/token/deleteButton.tsx index fbcd3c22f573db..004c7dae6ffb13 100644 --- a/static/app/components/arithmeticBuilder/token/deleteButton.tsx +++ b/static/app/components/arithmeticBuilder/token/deleteButton.tsx @@ -6,7 +6,7 @@ import InteractionStateLayer from '@sentry/scraps/interactionStateLayer'; import {useArithmeticBuilder} from 'sentry/components/arithmeticBuilder/context'; import type {Token} from 'sentry/components/arithmeticBuilder/token'; import {IconClose} from 'sentry/icons'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface DeleteButtonProps { token: Token; diff --git a/static/app/components/arithmeticBuilder/token/freeText.tsx b/static/app/components/arithmeticBuilder/token/freeText.tsx index 9bbbf6e8827671..9a047df755b384 100644 --- a/static/app/components/arithmeticBuilder/token/freeText.tsx +++ b/static/app/components/arithmeticBuilder/token/freeText.tsx @@ -37,7 +37,7 @@ import {IconDivide} from 'sentry/icons/iconDivide'; import {IconParenthesis} from 'sentry/icons/iconParenthesis'; import {IconSubtract} from 'sentry/icons/iconSubtract'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface ArithmeticTokenFreeTextProps { item: Node; diff --git a/static/app/components/arithmeticBuilder/token/function.tsx b/static/app/components/arithmeticBuilder/token/function.tsx index dc6f2b4333c590..95bbea2cb72c89 100644 --- a/static/app/components/arithmeticBuilder/token/function.tsx +++ b/static/app/components/arithmeticBuilder/token/function.tsx @@ -27,7 +27,7 @@ import {focusTarget} from 'sentry/components/tokenizedInput/grid/utils'; import {ComboBox} from 'sentry/components/tokenizedInput/token/comboBox'; import {InputBox} from 'sentry/components/tokenizedInput/token/inputBox'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {FieldKind, FieldValueType, prettifyTagKey} from 'sentry/utils/fields'; interface ArithmeticTokenFunctionProps { diff --git a/static/app/components/arithmeticBuilder/token/grid.tsx b/static/app/components/arithmeticBuilder/token/grid.tsx index 54e1fdfb3e484e..41da1f8e3c033e 100644 --- a/static/app/components/arithmeticBuilder/token/grid.tsx +++ b/static/app/components/arithmeticBuilder/token/grid.tsx @@ -26,7 +26,7 @@ import {ArithmeticBuilderTokenReference} from 'sentry/components/arithmeticBuild import {computeNextAllowedTokenKinds} from 'sentry/components/arithmeticBuilder/validator'; import {useGridList} from 'sentry/components/tokenizedInput/grid/useGridList'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface TokenGridProps { tokens: Token[]; diff --git a/static/app/components/arithmeticBuilder/token/index.tsx b/static/app/components/arithmeticBuilder/token/index.tsx index adc5722e18902d..4c40305b96e488 100644 --- a/static/app/components/arithmeticBuilder/token/index.tsx +++ b/static/app/components/arithmeticBuilder/token/index.tsx @@ -1,6 +1,6 @@ import type {Location, LocationRange} from 'peggy'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export enum TokenKind { UNKNOWN = 'unknown', diff --git a/static/app/components/arithmeticBuilder/token/literal.tsx b/static/app/components/arithmeticBuilder/token/literal.tsx index 6800fb2f759a31..f6b8665d7feb11 100644 --- a/static/app/components/arithmeticBuilder/token/literal.tsx +++ b/static/app/components/arithmeticBuilder/token/literal.tsx @@ -24,7 +24,7 @@ import {useGridListItem} from 'sentry/components/tokenizedInput/grid/useGridList import {focusTarget} from 'sentry/components/tokenizedInput/grid/utils'; import {InputBox} from 'sentry/components/tokenizedInput/token/inputBox'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface ArithmeticTokenLiteralProps { item: Node; diff --git a/static/app/components/arithmeticBuilder/token/reference.tsx b/static/app/components/arithmeticBuilder/token/reference.tsx index 2f3b183c3bb3aa..6e96f0aed09fb7 100644 --- a/static/app/components/arithmeticBuilder/token/reference.tsx +++ b/static/app/components/arithmeticBuilder/token/reference.tsx @@ -21,7 +21,7 @@ import {useGridListItem} from 'sentry/components/tokenizedInput/grid/useGridList import {focusTarget} from 'sentry/components/tokenizedInput/grid/utils'; import {ComboBox} from 'sentry/components/tokenizedInput/token/comboBox'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface ArithmeticBuilderTokenReferenceProps { item: Node; diff --git a/static/app/components/arithmeticBuilder/tokenizer.tsx b/static/app/components/arithmeticBuilder/tokenizer.tsx index b016dd596f6b66..1f3794a1964a56 100644 --- a/static/app/components/arithmeticBuilder/tokenizer.tsx +++ b/static/app/components/arithmeticBuilder/tokenizer.tsx @@ -19,7 +19,7 @@ import { type Token, type TokenParenthesis, } from 'sentry/components/arithmeticBuilder/token'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {parse} from './grammar.pegjs'; diff --git a/static/app/components/arithmeticBuilder/validator.tsx b/static/app/components/arithmeticBuilder/validator.tsx index 55512495feb6fa..e444fc3c495a6d 100644 --- a/static/app/components/arithmeticBuilder/validator.tsx +++ b/static/app/components/arithmeticBuilder/validator.tsx @@ -9,7 +9,7 @@ import { Parenthesis, TokenKind, } from 'sentry/components/arithmeticBuilder/token'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export function validateTokens(tokens: Token[]): boolean { const validator = new ExpressionValidator(); diff --git a/static/app/components/badge/groupPriority.tsx b/static/app/components/badge/groupPriority.tsx index 6de780191ab263..8ab12be248dee1 100644 --- a/static/app/components/badge/groupPriority.tsx +++ b/static/app/components/badge/groupPriority.tsx @@ -21,8 +21,8 @@ import {t, tct} from 'sentry/locale'; import type {Activity} from 'sentry/types/group'; import {GroupActivityType, PriorityLevel} from 'sentry/types/group'; import type {AvatarUser} from 'sentry/types/user'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {useApiQuery} from 'sentry/utils/queryClient'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/charts/baseChart.tsx b/static/app/components/charts/baseChart.tsx index 9d41ca139851f8..2a17317306af92 100644 --- a/static/app/components/charts/baseChart.tsx +++ b/static/app/components/charts/baseChart.tsx @@ -47,7 +47,7 @@ import type { EChartRestoreHandler, Series, } from 'sentry/types/echarts'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {Grid} from './components/grid'; import {Legend} from './components/legend'; diff --git a/static/app/components/charts/eventsChart.tsx b/static/app/components/charts/eventsChart.tsx index 22aa54a5b3973c..cf16a3c0189232 100644 --- a/static/app/components/charts/eventsChart.tsx +++ b/static/app/components/charts/eventsChart.tsx @@ -30,7 +30,7 @@ import {t} from 'sentry/locale'; import type {DateString} from 'sentry/types/core'; import type {Series} from 'sentry/types/echarts'; import type {OrganizationSummary} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { axisLabelFormatter, axisLabelFormatterUsingAggregateOutputType, diff --git a/static/app/components/charts/eventsRequest.tsx b/static/app/components/charts/eventsRequest.tsx index 52d5bbb856e365..cde99b773da595 100644 --- a/static/app/components/charts/eventsRequest.tsx +++ b/static/app/components/charts/eventsRequest.tsx @@ -20,7 +20,7 @@ import type { MultiSeriesEventsStats, OrganizationSummary, } from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {DURATION_UNITS, SIZE_UNITS} from 'sentry/utils/discover/fieldRenderers'; import type {AggregationOutputType, DataUnit} from 'sentry/utils/discover/fields'; import {getAggregateAlias, stripEquationPrefix} from 'sentry/utils/discover/fields'; diff --git a/static/app/components/charts/optionSelector.tsx b/static/app/components/charts/optionSelector.tsx index ef760364c0ebea..5d2febc674d7da 100644 --- a/static/app/components/charts/optionSelector.tsx +++ b/static/app/components/charts/optionSelector.tsx @@ -13,7 +13,7 @@ import {CompactSelect} from '@sentry/scraps/compactSelect'; import {OverlayTrigger} from '@sentry/scraps/overlayTrigger'; import {Truncate} from 'sentry/components/truncate'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type BaseProps = { title: string; diff --git a/static/app/components/charts/utils.tsx b/static/app/components/charts/utils.tsx index ae5adb4453c59b..442479ab1881c5 100644 --- a/static/app/components/charts/utils.tsx +++ b/static/app/components/charts/utils.tsx @@ -12,8 +12,9 @@ import type { GroupedMultiSeriesEventsStats, MultiSeriesEventsStats, } from 'sentry/types/organization'; -import {defined, escape} from 'sentry/utils'; +import {escape} from 'sentry/utils'; import {getFormat, getFormattedDate} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import {parsePeriodToHours} from 'sentry/utils/duration/parsePeriodToHours'; import {oxfordizeArray} from 'sentry/utils/oxfordizeArray'; import {decodeList} from 'sentry/utils/queryString'; diff --git a/static/app/components/core/alert/alert.tsx b/static/app/components/core/alert/alert.tsx index b8a4b27c950992..0be288ae27d9d3 100644 --- a/static/app/components/core/alert/alert.tsx +++ b/static/app/components/core/alert/alert.tsx @@ -10,7 +10,7 @@ import {Flex} from '@sentry/scraps/layout'; import {IconCheckmark, IconChevron, IconInfo, IconNot, IconWarning} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {PanelProvider} from 'sentry/utils/panelProvider'; import type {AlertVariant} from 'sentry/utils/theme'; import {unreachable} from 'sentry/utils/unreachable'; diff --git a/static/app/components/core/compactSelect/list.tsx b/static/app/components/core/compactSelect/list.tsx index f15f844f0cf2b9..c544e80bbe6cb6 100644 --- a/static/app/components/core/compactSelect/list.tsx +++ b/static/app/components/core/compactSelect/list.tsx @@ -5,7 +5,7 @@ import type {AriaListBoxOptions} from '@react-aria/listbox'; import type {ListProps} from '@react-stately/list'; import {useListState} from '@react-stately/list'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {FormSize} from 'sentry/utils/theme'; import {ControlContext} from './control'; diff --git a/static/app/components/core/compactSelect/utils.tsx b/static/app/components/core/compactSelect/utils.tsx index ec1a3cbf194af1..aaafd22a4b173a 100644 --- a/static/app/components/core/compactSelect/utils.tsx +++ b/static/app/components/core/compactSelect/utils.tsx @@ -6,7 +6,7 @@ import type {ListState} from '@react-stately/list'; import type {Node, Selection} from '@react-types/shared'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {fzf} from 'sentry/utils/search/fzf'; import type {SelectProps} from './compactSelect'; diff --git a/static/app/components/core/drawer/index.tsx b/static/app/components/core/drawer/index.tsx index b10ebd8a16d499..12190091ad5435 100644 --- a/static/app/components/core/drawer/index.tsx +++ b/static/app/components/core/drawer/index.tsx @@ -17,7 +17,7 @@ import {useScrollLock} from '@sentry/scraps/useScrollLock'; import {ErrorBoundary} from 'sentry/components/errorBoundary'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {useOnClickOutside} from 'sentry/utils/useOnClickOutside'; diff --git a/static/app/components/core/interactionStateLayer/interactionStateLayer.tsx b/static/app/components/core/interactionStateLayer/interactionStateLayer.tsx index 45397ca8a5c226..e5885eddbc1785 100644 --- a/static/app/components/core/interactionStateLayer/interactionStateLayer.tsx +++ b/static/app/components/core/interactionStateLayer/interactionStateLayer.tsx @@ -2,7 +2,7 @@ import isPropValid from '@emotion/is-prop-valid'; import {css} from '@emotion/react'; import styled from '@emotion/styled'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface StateLayerProps extends React.HTMLAttributes { as?: React.ElementType; diff --git a/static/app/components/core/pagination/pagination.tsx b/static/app/components/core/pagination/pagination.tsx index 0b6353174c4571..4b5ea308e28596 100644 --- a/static/app/components/core/pagination/pagination.tsx +++ b/static/app/components/core/pagination/pagination.tsx @@ -8,8 +8,8 @@ import {Flex} from '@sentry/scraps/layout'; import {IconChevron} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {parseCursor} from 'sentry/utils/cursor'; +import {defined} from 'sentry/utils/defined'; import {parseLinkHeader} from 'sentry/utils/parseLinkHeader'; import {useLocation} from 'sentry/utils/useLocation'; import {useNavigate} from 'sentry/utils/useNavigate'; diff --git a/static/app/components/core/select/option.tsx b/static/app/components/core/select/option.tsx index 3428d94b1c3054..6bdfd6985c55aa 100644 --- a/static/app/components/core/select/option.tsx +++ b/static/app/components/core/select/option.tsx @@ -7,7 +7,7 @@ import {CheckWrap} from '@sentry/scraps/select'; import type {components as selectComponents} from 'sentry/components/forms/controls/reactSelectWrapper'; import {IconAdd, IconCheckmark} from 'sentry/icons'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type Props = React.ComponentProps; diff --git a/static/app/components/core/select/select.tsx b/static/app/components/core/select/select.tsx index 7b603a3b365067..880abd35ce0b0c 100644 --- a/static/app/components/core/select/select.tsx +++ b/static/app/components/core/select/select.tsx @@ -27,8 +27,8 @@ import {LoadingIndicator} from 'sentry/components/loadingIndicator'; import {IconChevron, IconClose} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Choices, SelectValue} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import {convertFromSelect2Choices} from 'sentry/utils/convertFromSelect2Choices'; +import {defined} from 'sentry/utils/defined'; import {PanelProvider} from 'sentry/utils/panelProvider'; import type {FormSize, Theme} from 'sentry/utils/theme'; diff --git a/static/app/components/deprecatedforms/booleanField.tsx b/static/app/components/deprecatedforms/booleanField.tsx index 05bda70075b576..83ceb818f0ff0a 100644 --- a/static/app/components/deprecatedforms/booleanField.tsx +++ b/static/app/components/deprecatedforms/booleanField.tsx @@ -4,7 +4,7 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {InputField} from 'sentry/components/deprecatedforms/inputField'; import {withFormContext} from 'sentry/components/deprecatedforms/withFormContext'; import {IconQuestion} from 'sentry/icons'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type Props = InputField['props']; diff --git a/static/app/components/deprecatedforms/formField.tsx b/static/app/components/deprecatedforms/formField.tsx index b897611c9f2f62..7c8c4013f1cb36 100644 --- a/static/app/components/deprecatedforms/formField.tsx +++ b/static/app/components/deprecatedforms/formField.tsx @@ -5,7 +5,7 @@ import classNames from 'classnames'; import type {FormContextData} from 'sentry/components/deprecatedforms/formContext'; import {QuestionTooltip} from 'sentry/components/questionTooltip'; import type {Meta} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type Value = string | number | boolean; diff --git a/static/app/components/deprecatedforms/genericField.tsx b/static/app/components/deprecatedforms/genericField.tsx index a07a91bef57c1a..d414f2c0ce6697 100644 --- a/static/app/components/deprecatedforms/genericField.tsx +++ b/static/app/components/deprecatedforms/genericField.tsx @@ -9,7 +9,7 @@ import SelectField from 'sentry/components/deprecatedforms/selectField'; import TextareaField from 'sentry/components/deprecatedforms/textareaField'; import TextField from 'sentry/components/deprecatedforms/textField'; import type {FormState} from 'sentry/components/forms/state'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type FieldType = | 'secret' diff --git a/static/app/components/deprecatedforms/selectCreatableField.tsx b/static/app/components/deprecatedforms/selectCreatableField.tsx index f007d475b03ca2..09fa2b98b959fb 100644 --- a/static/app/components/deprecatedforms/selectCreatableField.tsx +++ b/static/app/components/deprecatedforms/selectCreatableField.tsx @@ -6,8 +6,8 @@ import {StyledForm} from 'sentry/components/deprecatedforms/form'; import {SelectField} from 'sentry/components/deprecatedforms/selectField'; import {withFormContext} from 'sentry/components/deprecatedforms/withFormContext'; import type {SelectValue} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import {convertFromSelect2Choices} from 'sentry/utils/convertFromSelect2Choices'; +import {defined} from 'sentry/utils/defined'; // XXX: This is ONLY used in GenericField. If we can delete that this can go. diff --git a/static/app/components/deprecatedforms/selectField.tsx b/static/app/components/deprecatedforms/selectField.tsx index 7c728eb2603807..a23b13b1d93a55 100644 --- a/static/app/components/deprecatedforms/selectField.tsx +++ b/static/app/components/deprecatedforms/selectField.tsx @@ -3,7 +3,7 @@ import styled from '@emotion/styled'; import {Select} from '@sentry/scraps/select'; import {withFormContext} from 'sentry/components/deprecatedforms/withFormContext'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {StyledForm} from './form'; import {FormField, type FormFieldProps} from './formField'; diff --git a/static/app/components/events/autofix/useExplorerAutofix.tsx b/static/app/components/events/autofix/useExplorerAutofix.tsx index 73c94332d7d6fe..83e67fe6bda981 100644 --- a/static/app/components/events/autofix/useExplorerAutofix.tsx +++ b/static/app/components/events/autofix/useExplorerAutofix.tsx @@ -17,10 +17,10 @@ import { type CodingAgentIntegration, } from 'sentry/components/events/autofix/useAutofix'; import {isArrayOf, isString} from 'sentry/types/utils'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {apiOptions} from 'sentry/utils/api/apiOptions'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {useApi} from 'sentry/utils/useApi'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useUser} from 'sentry/utils/useUser'; diff --git a/static/app/components/events/autofix/v3/autofixEvidence.tsx b/static/app/components/events/autofix/v3/autofixEvidence.tsx index 90e09ab187ea79..c8097718622c97 100644 --- a/static/app/components/events/autofix/v3/autofixEvidence.tsx +++ b/static/app/components/events/autofix/v3/autofixEvidence.tsx @@ -13,8 +13,8 @@ import {IconSpan} from 'sentry/icons/iconSpan'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {getShortEventId} from 'sentry/utils/events'; import {getShortCommitHash} from 'sentry/utils/git/getShortCommitHash'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/events/autofix/v3/drawer.tsx b/static/app/components/events/autofix/v3/drawer.tsx index 8823a9d0b20ecb..f400d0e05c902f 100644 --- a/static/app/components/events/autofix/v3/drawer.tsx +++ b/static/app/components/events/autofix/v3/drawer.tsx @@ -16,7 +16,7 @@ import {Placeholder} from 'sentry/components/placeholder'; import {t} from 'sentry/locale'; import type {Group} from 'sentry/types/group'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useAutoScroll} from 'sentry/utils/useAutoScroll'; import {useCopyToClipboard} from 'sentry/utils/useCopyToClipboard'; import {useAiConfig} from 'sentry/views/issueDetails/hooks/useAiConfig'; diff --git a/static/app/components/events/autofix/v3/nextStep.tsx b/static/app/components/events/autofix/v3/nextStep.tsx index bc42093750ec64..45c9664819bd47 100644 --- a/static/app/components/events/autofix/v3/nextStep.tsx +++ b/static/app/components/events/autofix/v3/nextStep.tsx @@ -26,8 +26,8 @@ import {IconChevron} from 'sentry/icons/iconChevron'; import {t} from 'sentry/locale'; import {PluginIcon} from 'sentry/plugins/components/pluginIcon'; import type {Group} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; interface SeerDrawerNextStepProps { diff --git a/static/app/components/events/autofix/v3/useAutofixSectionEvidence.tsx b/static/app/components/events/autofix/v3/useAutofixSectionEvidence.tsx index e34854b5957da2..91e20afe8543f5 100644 --- a/static/app/components/events/autofix/v3/useAutofixSectionEvidence.tsx +++ b/static/app/components/events/autofix/v3/useAutofixSectionEvidence.tsx @@ -5,7 +5,7 @@ import { AUTOFIX_EVIDENCE_PROPS_RESOLVER, type EvidenceButtonProps, } from 'sentry/components/events/autofix/v3/autofixEvidence'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useProjects} from 'sentry/utils/useProjects'; import type {ToolCall, ToolLink, ToolResult} from 'sentry/views/seerExplorer/types'; diff --git a/static/app/components/events/autofix/v3/utils.ts b/static/app/components/events/autofix/v3/utils.ts index d1256664d5071a..3d8cb93682e7b7 100644 --- a/static/app/components/events/autofix/v3/utils.ts +++ b/static/app/components/events/autofix/v3/utils.ts @@ -9,7 +9,7 @@ import { type RootCauseArtifact, type SolutionArtifact, } from 'sentry/components/events/autofix/useExplorerAutofix'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { type Artifact, type ExplorerCodingAgentState, diff --git a/static/app/components/events/breadcrumbs/breadcrumbItemContent.tsx b/static/app/components/events/breadcrumbs/breadcrumbItemContent.tsx index 93ec63d790dfe7..b8b4193626a116 100644 --- a/static/app/components/events/breadcrumbs/breadcrumbItemContent.tsx +++ b/static/app/components/events/breadcrumbs/breadcrumbItemContent.tsx @@ -13,7 +13,7 @@ import { type BreadcrumbTypeNavigation, type RawCrumb, } from 'sentry/types/breadcrumbs'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isValidUrl} from 'sentry/utils/string/isValidUrl'; import {usePrismTokens} from 'sentry/utils/usePrismTokens'; diff --git a/static/app/components/events/breadcrumbs/breadcrumbsTimeline.tsx b/static/app/components/events/breadcrumbs/breadcrumbsTimeline.tsx index a7ccb4a2a7b7fc..38169c3c9efcf5 100644 --- a/static/app/components/events/breadcrumbs/breadcrumbsTimeline.tsx +++ b/static/app/components/events/breadcrumbs/breadcrumbsTimeline.tsx @@ -15,8 +15,8 @@ import type {EnhancedCrumb} from 'sentry/components/events/breadcrumbs/utils'; import {Timeline} from 'sentry/components/timeline'; import {useTimezone} from 'sentry/components/timezoneProvider'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {isValidDate} from 'sentry/utils/date/isValidDate'; +import {defined} from 'sentry/utils/defined'; function BreadcrumbTimestampTooltipBody({timestamp}: {timestamp: Date}) { const currentTimezone = useTimezone(); diff --git a/static/app/components/events/contexts/knownContext/device.tsx b/static/app/components/events/contexts/knownContext/device.tsx index ac6dd0b9069c62..c28d2cc040b0ea 100644 --- a/static/app/components/events/contexts/knownContext/device.tsx +++ b/static/app/components/events/contexts/knownContext/device.tsx @@ -7,8 +7,8 @@ import {FileSize} from 'sentry/components/fileSize'; import {t} from 'sentry/locale'; import {DeviceContextKey, type DeviceContext, type Event} from 'sentry/types/event'; import type {KeyValueListData} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import {formatBytesBase2} from 'sentry/utils/bytes/formatBytesBase2'; +import {defined} from 'sentry/utils/defined'; function formatMemory(memory_size: number, free_memory: number, usable_memory: number) { if ( diff --git a/static/app/components/events/contexts/knownContext/os.tsx b/static/app/components/events/contexts/knownContext/os.tsx index 3fb18d6cc977a6..192082d245a297 100644 --- a/static/app/components/events/contexts/knownContext/os.tsx +++ b/static/app/components/events/contexts/knownContext/os.tsx @@ -1,7 +1,7 @@ import {getContextKeys} from 'sentry/components/events/contexts/utils'; import {t} from 'sentry/locale'; import type {KeyValueListData} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; // https://develop.sentry.dev/sdk/data-model/event-payloads/contexts/#os-context enum OperatingSystemContextKeys { diff --git a/static/app/components/events/contexts/knownContext/profile.tsx b/static/app/components/events/contexts/knownContext/profile.tsx index f9983cfd7ecfae..578340664ee5ca 100644 --- a/static/app/components/events/contexts/knownContext/profile.tsx +++ b/static/app/components/events/contexts/knownContext/profile.tsx @@ -5,8 +5,8 @@ import {EventOrGroupType, ProfileContextKey} from 'sentry/types/event'; import type {KeyValueListData} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {getDateFromTimestamp} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import { generateContinuousProfileFlamechartRouteWithQuery, generateProfileFlamechartRoute, diff --git a/static/app/components/events/contexts/knownContext/trace.tsx b/static/app/components/events/contexts/knownContext/trace.tsx index 46723cd59e596e..095987937e2a9c 100644 --- a/static/app/components/events/contexts/knownContext/trace.tsx +++ b/static/app/components/events/contexts/knownContext/trace.tsx @@ -8,7 +8,7 @@ import {t} from 'sentry/locale'; import type {Event} from 'sentry/types/event'; import type {KeyValueListData} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {transactionSummaryRouteWithQuery} from 'sentry/views/performance/transactionSummary/utils'; enum TraceContextKeys { diff --git a/static/app/components/events/contexts/knownContext/user.tsx b/static/app/components/events/contexts/knownContext/user.tsx index 261000f7ed2d39..d5fb27ff78fab3 100644 --- a/static/app/components/events/contexts/knownContext/user.tsx +++ b/static/app/components/events/contexts/knownContext/user.tsx @@ -1,7 +1,7 @@ import {getContextKeys} from 'sentry/components/events/contexts/utils'; import {t} from 'sentry/locale'; import type {KeyValueListData} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; enum UserContextKeys { ID = 'id', diff --git a/static/app/components/events/contexts/utils.tsx b/static/app/components/events/contexts/utils.tsx index 6b592e84d896aa..ee8ca16fd2ac06 100644 --- a/static/app/components/events/contexts/utils.tsx +++ b/static/app/components/events/contexts/utils.tsx @@ -47,7 +47,7 @@ import type {Event} from 'sentry/types/event'; import type {KeyValueListData, KeyValueListDataItem} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; /** * Generates the class name used for contexts diff --git a/static/app/components/events/eventExtraData/index.tsx b/static/app/components/events/eventExtraData/index.tsx index 284bdb2d877de9..62885b7da23bb2 100644 --- a/static/app/components/events/eventExtraData/index.tsx +++ b/static/app/components/events/eventExtraData/index.tsx @@ -9,7 +9,7 @@ import { } from 'sentry/components/events/contexts/utils'; import {t} from 'sentry/locale'; import type {Event} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isEmptyObject} from 'sentry/utils/object/isEmptyObject'; import {SectionKey} from 'sentry/views/issueDetails/context'; import {FoldSection} from 'sentry/views/issueDetails/foldSection'; diff --git a/static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.tsx b/static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.tsx index 7b99f5c7597984..324d99e6e9e74d 100644 --- a/static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.tsx +++ b/static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.tsx @@ -26,8 +26,8 @@ import {IconChevron, IconOpen} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {EventTransaction} from 'sentry/types/event'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {useDiscoverQuery} from 'sentry/utils/discover/discoverQuery'; import {EventView} from 'sentry/utils/discover/eventView'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; diff --git a/static/app/components/events/eventStatisticalDetector/eventDifferentialFlamegraph.tsx b/static/app/components/events/eventStatisticalDetector/eventDifferentialFlamegraph.tsx index 73eaf779fce39f..e0d726a538ecce 100644 --- a/static/app/components/events/eventStatisticalDetector/eventDifferentialFlamegraph.tsx +++ b/static/app/components/events/eventStatisticalDetector/eventDifferentialFlamegraph.tsx @@ -18,7 +18,7 @@ import {t} from 'sentry/locale'; import {ProjectsStore} from 'sentry/stores/projectsStore'; import type {Event} from 'sentry/types/event'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {formatAbbreviatedNumber} from 'sentry/utils/formatters'; import {formatPercentage} from 'sentry/utils/number/formatPercentage'; import { diff --git a/static/app/components/events/eventStatisticalDetector/eventRegressionSummary.tsx b/static/app/components/events/eventStatisticalDetector/eventRegressionSummary.tsx index 138caa6474a6b4..a77820c6d1a911 100644 --- a/static/app/components/events/eventStatisticalDetector/eventRegressionSummary.tsx +++ b/static/app/components/events/eventStatisticalDetector/eventRegressionSummary.tsx @@ -9,8 +9,8 @@ import type {Event} from 'sentry/types/event'; import type {Group, KeyValueListData} from 'sentry/types/group'; import {IssueType} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {getFormat, getFormattedDate} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import {getDuration} from 'sentry/utils/duration/getDuration'; import {formatPercentage} from 'sentry/utils/number/formatPercentage'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/events/eventStatisticalDetector/eventRegressionTable.tsx b/static/app/components/events/eventStatisticalDetector/eventRegressionTable.tsx index f9f57301ff4871..0a849f07f438ac 100644 --- a/static/app/components/events/eventStatisticalDetector/eventRegressionTable.tsx +++ b/static/app/components/events/eventStatisticalDetector/eventRegressionTable.tsx @@ -11,7 +11,7 @@ import {Placeholder} from 'sentry/components/placeholder'; import {SimpleTable} from 'sentry/components/tables/simpleTable'; import {IconWarning} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {RateUnit} from 'sentry/utils/discover/fields'; import {formatRate} from 'sentry/utils/formatters'; import {formatPercentage} from 'sentry/utils/number/formatPercentage'; diff --git a/static/app/components/events/eventStatisticalDetector/functionBreakpointChart.tsx b/static/app/components/events/eventStatisticalDetector/functionBreakpointChart.tsx index 71e6db983bcd20..bf69532df1d5f6 100644 --- a/static/app/components/events/eventStatisticalDetector/functionBreakpointChart.tsx +++ b/static/app/components/events/eventStatisticalDetector/functionBreakpointChart.tsx @@ -6,7 +6,7 @@ import {type BreakpointEvidenceData} from 'sentry/components/events/eventStatist import {LineChart as Chart} from 'sentry/components/events/eventStatisticalDetector/lineChart'; import {t} from 'sentry/locale'; import type {Event} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useProfileEventsStats} from 'sentry/utils/profiling/hooks/useProfileEventsStats'; import {useRelativeDateTime} from 'sentry/utils/profiling/hooks/useRelativeDateTime'; import {SectionKey} from 'sentry/views/issueDetails/context'; diff --git a/static/app/components/events/eventTags/eventTagsTree.tsx b/static/app/components/events/eventTags/eventTagsTree.tsx index f328b7c0b2558b..0b72ab05e368a2 100644 --- a/static/app/components/events/eventTags/eventTagsTree.tsx +++ b/static/app/components/events/eventTags/eventTagsTree.tsx @@ -11,7 +11,7 @@ import {LoadingIndicator} from 'sentry/components/loadingIndicator'; import {t} from 'sentry/locale'; import type {Event, EventTagWithMeta} from 'sentry/types/event'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useDetailedProject} from 'sentry/utils/project/useDetailedProject'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/events/eventTags/eventTagsValue.tsx b/static/app/components/events/eventTags/eventTagsValue.tsx index fb3b6ac7cfc960..365355fcbb59e4 100644 --- a/static/app/components/events/eventTags/eventTagsValue.tsx +++ b/static/app/components/events/eventTags/eventTagsValue.tsx @@ -4,7 +4,7 @@ import {DeviceName} from 'sentry/components/deviceName'; import {AnnotatedText} from 'sentry/components/events/meta/annotatedText'; import type {EventTag} from 'sentry/types/event'; import type {Meta} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type Props = { tag: EventTag; diff --git a/static/app/components/events/eventTags/index.tsx b/static/app/components/events/eventTags/index.tsx index d9325fb91610af..12016be2f01978 100644 --- a/static/app/components/events/eventTags/index.tsx +++ b/static/app/components/events/eventTags/index.tsx @@ -7,8 +7,8 @@ import {associateTagsWithMeta, TagFilter} from 'sentry/components/events/eventTa import {AnnotatedText} from 'sentry/components/events/meta/annotatedText'; import type {Event, EventTagWithMeta} from 'sentry/types/event'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {isMobilePlatform} from 'sentry/utils/platform'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/events/eventTagsAndScreenshot/screenshot/modal.tsx b/static/app/components/events/eventTagsAndScreenshot/screenshot/modal.tsx index b1c37eaffac9b7..6ae07383cefac5 100644 --- a/static/app/components/events/eventTagsAndScreenshot/screenshot/modal.tsx +++ b/static/app/components/events/eventTagsAndScreenshot/screenshot/modal.tsx @@ -16,8 +16,8 @@ import {KeyValueData} from 'sentry/components/keyValueData'; import {t, tct} from 'sentry/locale'; import type {EventAttachment} from 'sentry/types/group'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {formatBytesBase2} from 'sentry/utils/bytes/formatBytesBase2'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {ScreenshotPagination} from './screenshotPagination'; diff --git a/static/app/components/events/eventViewHierarchy.tsx b/static/app/components/events/eventViewHierarchy.tsx index 190f32972aac18..f83e9903c6cc91 100644 --- a/static/app/components/events/eventViewHierarchy.tsx +++ b/static/app/components/events/eventViewHierarchy.tsx @@ -11,8 +11,8 @@ import { import {LoadingIndicator} from 'sentry/components/loadingIndicator'; import type {Event} from 'sentry/types/event'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import type {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {useApiQuery} from 'sentry/utils/queryClient'; import {useOrganization} from 'sentry/utils/useOrganization'; import {SectionKey} from 'sentry/views/issueDetails/context'; diff --git a/static/app/components/events/highlights/util.tsx b/static/app/components/events/highlights/util.tsx index 96aa71d144cc0b..a208bf8cd98a1c 100644 --- a/static/app/components/events/highlights/util.tsx +++ b/static/app/components/events/highlights/util.tsx @@ -15,7 +15,7 @@ import type {Event, EventTagWithMeta} from 'sentry/types/event'; import type {KeyValueListData} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; import type {DetailedProject, Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export type HighlightTags = Required['highlightTags']; export type HighlightContext = Required['highlightContext']; diff --git a/static/app/components/events/interfaces/analyzeFrames.tsx b/static/app/components/events/interfaces/analyzeFrames.tsx index 7b4005ae65aad6..4045b6c00ac442 100644 --- a/static/app/components/events/interfaces/analyzeFrames.tsx +++ b/static/app/components/events/interfaces/analyzeFrames.tsx @@ -10,7 +10,7 @@ import {getCurrentThread} from 'sentry/components/events/interfaces/utils'; import {t, tct} from 'sentry/locale'; import type {EntryException, Event, Frame, Lock, Thread} from 'sentry/types/event'; import {EntryType} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type SuspectFrame = { module: string | RegExp; diff --git a/static/app/components/events/interfaces/breadcrumbs/index.tsx b/static/app/components/events/interfaces/breadcrumbs/index.tsx index e3e7bd32e0a43c..ce6370ba4d314f 100644 --- a/static/app/components/events/interfaces/breadcrumbs/index.tsx +++ b/static/app/components/events/interfaces/breadcrumbs/index.tsx @@ -2,7 +2,7 @@ import pick from 'lodash/pick'; import type {EnhancedCrumb} from 'sentry/components/events/breadcrumbs/utils'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {BreadcrumbWithMeta} from './types'; diff --git a/static/app/components/events/interfaces/breadcrumbs/utils.tsx b/static/app/components/events/interfaces/breadcrumbs/utils.tsx index 11ec5c888cc3ea..cabda5487036ba 100644 --- a/static/app/components/events/interfaces/breadcrumbs/utils.tsx +++ b/static/app/components/events/interfaces/breadcrumbs/utils.tsx @@ -2,7 +2,7 @@ import type {RawCrumb} from 'sentry/types/breadcrumbs'; import {BreadcrumbLevelType, BreadcrumbType} from 'sentry/types/breadcrumbs'; import type {Event} from 'sentry/types/event'; import {EntryType} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; /** * RawCrumb.type is used for filtering, icons and color. This function converts crumbs diff --git a/static/app/components/events/interfaces/crashContent/exception/actionableItemsUtils.tsx b/static/app/components/events/interfaces/crashContent/exception/actionableItemsUtils.tsx index ab12355c4ef7ee..67ce50dd8ab5f6 100644 --- a/static/app/components/events/interfaces/crashContent/exception/actionableItemsUtils.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/actionableItemsUtils.tsx @@ -19,9 +19,9 @@ import type {Image} from 'sentry/types/debugImage'; import type {Event, ExceptionValue, Thread} from 'sentry/types/event'; import {EntryType} from 'sentry/types/event'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {semverCompare} from 'sentry/utils/versions/semverCompare'; diff --git a/static/app/components/events/interfaces/crashContent/exception/content.tsx b/static/app/components/events/interfaces/crashContent/exception/content.tsx index 5de7c18201e33b..5e5fe89e130985 100644 --- a/static/app/components/events/interfaces/crashContent/exception/content.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/content.tsx @@ -19,7 +19,7 @@ import {tct, tn} from 'sentry/locale'; import type {Event, ExceptionType, ExceptionValue} from 'sentry/types/event'; import type {Project} from 'sentry/types/project'; import {StackType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useRouteAnalyticsParams} from 'sentry/utils/routeAnalytics/useRouteAnalyticsParams'; import {useProjects} from 'sentry/utils/useProjects'; import {SectionKey} from 'sentry/views/issueDetails/context'; diff --git a/static/app/components/events/interfaces/crashContent/exception/relatedExceptions.tsx b/static/app/components/events/interfaces/crashContent/exception/relatedExceptions.tsx index 33d013336b9f0a..fbbaf4bad3eec8 100644 --- a/static/app/components/events/interfaces/crashContent/exception/relatedExceptions.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/relatedExceptions.tsx @@ -6,7 +6,7 @@ import {Button} from '@sentry/scraps/button'; import {t} from 'sentry/locale'; import type {ExceptionValue} from 'sentry/types/event'; import type {StackTraceMechanism} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type ExceptionGroupContextProps = { allExceptions: ExceptionValue[]; diff --git a/static/app/components/events/interfaces/crashContent/exception/stackTrace.tsx b/static/app/components/events/interfaces/crashContent/exception/stackTrace.tsx index 904f1658553a66..380e011c06084c 100644 --- a/static/app/components/events/interfaces/crashContent/exception/stackTrace.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/stackTrace.tsx @@ -9,7 +9,7 @@ import type {Event, ExceptionValue} from 'sentry/types/event'; import type {Group} from 'sentry/types/group'; import type {PlatformKey} from 'sentry/types/platform'; import {StackType, StackView} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isNativePlatform} from 'sentry/utils/platform'; type Props = { diff --git a/static/app/components/events/interfaces/crashContent/exception/useActionableItems.tsx b/static/app/components/events/interfaces/crashContent/exception/useActionableItems.tsx index 737a9c8a1bf9fe..848ab77072d089 100644 --- a/static/app/components/events/interfaces/crashContent/exception/useActionableItems.tsx +++ b/static/app/components/events/interfaces/crashContent/exception/useActionableItems.tsx @@ -8,8 +8,8 @@ import { } from 'sentry/components/events/interfaces/crashContent/exception/actionableItemsUtils'; import type {Event} from 'sentry/types/event'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import type {ApiQueryKey} from 'sentry/utils/queryClient'; import {useApiQuery} from 'sentry/utils/queryClient'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/events/interfaces/crashContent/stackTrace/content.tsx b/static/app/components/events/interfaces/crashContent/stackTrace/content.tsx index 4ac03793d8f0c7..3d5105c36a0202 100644 --- a/static/app/components/events/interfaces/crashContent/stackTrace/content.tsx +++ b/static/app/components/events/interfaces/crashContent/stackTrace/content.tsx @@ -15,7 +15,7 @@ import {Panel} from 'sentry/components/panels/panel'; import type {Event, Frame} from 'sentry/types/event'; import type {PlatformKey} from 'sentry/types/platform'; import type {StackTraceMechanism, StacktraceType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {OmittedFrames} from './omittedFrames'; diff --git a/static/app/components/events/interfaces/crashContent/stackTrace/nativeContent.tsx b/static/app/components/events/interfaces/crashContent/stackTrace/nativeContent.tsx index 3dd9104a1d0fab..62ec0548be4a1c 100644 --- a/static/app/components/events/interfaces/crashContent/stackTrace/nativeContent.tsx +++ b/static/app/components/events/interfaces/crashContent/stackTrace/nativeContent.tsx @@ -14,7 +14,7 @@ import type {Event, Frame} from 'sentry/types/event'; import type {Group} from 'sentry/types/group'; import type {PlatformKey} from 'sentry/types/platform'; import type {StacktraceType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {OmittedFrames} from './omittedFrames'; diff --git a/static/app/components/events/interfaces/crashContent/stackTrace/rawContent.tsx b/static/app/components/events/interfaces/crashContent/stackTrace/rawContent.tsx index b8bc13e81c2381..481ce019828086 100644 --- a/static/app/components/events/interfaces/crashContent/stackTrace/rawContent.tsx +++ b/static/app/components/events/interfaces/crashContent/stackTrace/rawContent.tsx @@ -1,7 +1,7 @@ import {trimPackage} from 'sentry/components/events/interfaces/frame/utils'; import type {ExceptionValue, Frame} from 'sentry/types/event'; import type {StacktraceType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; function getJavaScriptFrame( frame: Frame, diff --git a/static/app/components/events/interfaces/debugMeta/debugImageDetails/candidates.tsx b/static/app/components/events/interfaces/debugMeta/debugImageDetails/candidates.tsx index b1c166a8cfe423..875ca9fca845c7 100644 --- a/static/app/components/events/interfaces/debugMeta/debugImageDetails/candidates.tsx +++ b/static/app/components/events/interfaces/debugMeta/debugImageDetails/candidates.tsx @@ -16,7 +16,7 @@ import type {Image} from 'sentry/types/debugImage'; import {CandidateDownloadStatus, ImageStatus} from 'sentry/types/debugImage'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {Status} from './candidate/status'; import {Candidate} from './candidate'; diff --git a/static/app/components/events/interfaces/debugMeta/index.tsx b/static/app/components/events/interfaces/debugMeta/index.tsx index 6791cc7ae63ad2..520767a1016f82 100644 --- a/static/app/components/events/interfaces/debugMeta/index.tsx +++ b/static/app/components/events/interfaces/debugMeta/index.tsx @@ -30,7 +30,7 @@ import {ImageStatus} from 'sentry/types/debugImage'; import type {EntryDebugMeta, Event} from 'sentry/types/event'; import type {Group} from 'sentry/types/group'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {SectionKey} from 'sentry/views/issueDetails/context'; import {FoldSection} from 'sentry/views/issueDetails/foldSection'; diff --git a/static/app/components/events/interfaces/frame/context.tsx b/static/app/components/events/interfaces/frame/context.tsx index c4df6a9285f90b..6aa7981008836a 100644 --- a/static/app/components/events/interfaces/frame/context.tsx +++ b/static/app/components/events/interfaces/frame/context.tsx @@ -13,7 +13,7 @@ import type { } from 'sentry/types/integrations'; import type {PlatformKey} from 'sentry/types/platform'; import type {StacktraceType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getFileExtension} from 'sentry/utils/fileExtension'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useProjects} from 'sentry/utils/useProjects'; diff --git a/static/app/components/events/interfaces/frame/defaultTitle/index.tsx b/static/app/components/events/interfaces/frame/defaultTitle/index.tsx index 7965dc9248c1d2..282a70c8387976 100644 --- a/static/app/components/events/interfaces/frame/defaultTitle/index.tsx +++ b/static/app/components/events/interfaces/frame/defaultTitle/index.tsx @@ -21,7 +21,7 @@ import {t} from 'sentry/locale'; import type {Frame} from 'sentry/types/event'; import type {Meta} from 'sentry/types/group'; import type {PlatformKey} from 'sentry/types/platform'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isValidUrl} from 'sentry/utils/string/isValidUrl'; /** diff --git a/static/app/components/events/interfaces/frame/frameRegisters/index.tsx b/static/app/components/events/interfaces/frame/frameRegisters/index.tsx index 997bac34087499..a145e08a41b09a 100644 --- a/static/app/components/events/interfaces/frame/frameRegisters/index.tsx +++ b/static/app/components/events/interfaces/frame/frameRegisters/index.tsx @@ -4,7 +4,7 @@ import styled from '@emotion/styled'; import {ClippedBox} from 'sentry/components/clippedBox'; import {t} from 'sentry/locale'; import type {StacktraceType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getSortedRegisters} from './utils'; import {FrameRegisterValue} from './value'; diff --git a/static/app/components/events/interfaces/frame/leadHint.tsx b/static/app/components/events/interfaces/frame/leadHint.tsx index 0c2eb1ee244fef..333af47b77f6f3 100644 --- a/static/app/components/events/interfaces/frame/leadHint.tsx +++ b/static/app/components/events/interfaces/frame/leadHint.tsx @@ -1,6 +1,6 @@ import {getLeadHint} from 'sentry/components/events/interfaces/frame/utils'; import type {Event, Frame} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type Props = { event: Event; diff --git a/static/app/components/events/interfaces/frame/utils.tsx b/static/app/components/events/interfaces/frame/utils.tsx index 5433fae8e430b3..03bbb941d3ffcb 100644 --- a/static/app/components/events/interfaces/frame/utils.tsx +++ b/static/app/components/events/interfaces/frame/utils.tsx @@ -3,7 +3,7 @@ import type {Event, Frame} from 'sentry/types/event'; import {EventOrGroupType} from 'sentry/types/event'; import type {PlatformKey} from 'sentry/types/platform'; import type {StacktraceType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isEmptyObject} from 'sentry/utils/object/isEmptyObject'; import {isValidUrl} from 'sentry/utils/string/isValidUrl'; import {safeURL} from 'sentry/utils/url/safeURL'; diff --git a/static/app/components/events/interfaces/keyValueList/index.tsx b/static/app/components/events/interfaces/keyValueList/index.tsx index e0b6f8c7383093..e5c4481f5daaac 100644 --- a/static/app/components/events/interfaces/keyValueList/index.tsx +++ b/static/app/components/events/interfaces/keyValueList/index.tsx @@ -7,7 +7,7 @@ import {Flex} from '@sentry/scraps/layout'; import {ValueLink} from 'sentry/components/keyValueData'; import type {KeyValueListData} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {ValueProps} from './value'; import {Value} from './value'; diff --git a/static/app/components/events/interfaces/nativeFrame.tsx b/static/app/components/events/interfaces/nativeFrame.tsx index 8e342c07dda287..afd90471ce39cf 100644 --- a/static/app/components/events/interfaces/nativeFrame.tsx +++ b/static/app/components/events/interfaces/nativeFrame.tsx @@ -37,7 +37,7 @@ import type {Event, Frame} from 'sentry/types/event'; import type {SentryAppSchemaStacktraceLink} from 'sentry/types/integrations'; import type {PlatformKey} from 'sentry/types/platform'; import {StackView, type StacktraceType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useSentryAppComponentsStore} from 'sentry/utils/useSentryAppComponentsStore'; import {useSyncedLocalStorageState} from 'sentry/utils/useSyncedLocalStorageState'; import {SectionKey, useIssueDetails} from 'sentry/views/issueDetails/context'; diff --git a/static/app/components/events/interfaces/performance/anrRootCause.tsx b/static/app/components/events/interfaces/performance/anrRootCause.tsx index 4000ee3d4bea46..081db8145b02a6 100644 --- a/static/app/components/events/interfaces/performance/anrRootCause.tsx +++ b/static/app/components/events/interfaces/performance/anrRootCause.tsx @@ -19,8 +19,8 @@ import {t} from 'sentry/locale'; import type {Event} from 'sentry/types/event'; import type {Organization} from 'sentry/types/organization'; import {StackView} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {useProjects} from 'sentry/utils/useProjects'; import {SectionKey} from 'sentry/views/issueDetails/context'; diff --git a/static/app/components/events/interfaces/request/getTransformedData.tsx b/static/app/components/events/interfaces/request/getTransformedData.tsx index ea0c4d094c38f8..0f7f48997d30b3 100644 --- a/static/app/components/events/interfaces/request/getTransformedData.tsx +++ b/static/app/components/events/interfaces/request/getTransformedData.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export function getTransformedData(data: any, meta: Record | undefined) { if (Array.isArray(data)) { diff --git a/static/app/components/events/interfaces/request/graphQlRequestBody.tsx b/static/app/components/events/interfaces/request/graphQlRequestBody.tsx index 57f33f7e413bfe..22ee13a4445748 100644 --- a/static/app/components/events/interfaces/request/graphQlRequestBody.tsx +++ b/static/app/components/events/interfaces/request/graphQlRequestBody.tsx @@ -9,8 +9,8 @@ import {KeyValueList} from 'sentry/components/events/interfaces/keyValueList'; import {List} from 'sentry/components/list'; import {t, tn} from 'sentry/locale'; import type {EntryRequestDataGraphQl, Event} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; import {uniq} from 'sentry/utils/array/uniq'; +import {defined} from 'sentry/utils/defined'; import {loadPrismLanguage} from 'sentry/utils/prism'; type GraphQlBodyProps = {data: EntryRequestDataGraphQl['data']; event: Event}; diff --git a/static/app/components/events/interfaces/request/index.tsx b/static/app/components/events/interfaces/request/index.tsx index 1c4e918703f01d..8f82d1757c4eda 100644 --- a/static/app/components/events/interfaces/request/index.tsx +++ b/static/app/components/events/interfaces/request/index.tsx @@ -22,7 +22,7 @@ import {IconOpen} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import type {EntryRequest, Event} from 'sentry/types/event'; import {EntryType} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isValidUrl} from 'sentry/utils/string/isValidUrl'; import {SectionKey} from 'sentry/views/issueDetails/context'; import {FoldSection} from 'sentry/views/issueDetails/foldSection'; diff --git a/static/app/components/events/interfaces/sourceMapsDebuggerModal.tsx b/static/app/components/events/interfaces/sourceMapsDebuggerModal.tsx index c5a69b3a14c4d8..8c41ec4652e0a0 100644 --- a/static/app/components/events/interfaces/sourceMapsDebuggerModal.tsx +++ b/static/app/components/events/interfaces/sourceMapsDebuggerModal.tsx @@ -34,9 +34,9 @@ import {ConfigStore} from 'sentry/stores/configStore'; import type {Organization} from 'sentry/types/organization'; import type {PlatformKey} from 'sentry/types/platform'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import type {SourceMapWizardBlueThunderAnalyticsParams} from 'sentry/utils/analytics/stackTraceAnalyticsEvents'; +import {defined} from 'sentry/utils/defined'; import {getSourceMapsWizardSnippet} from 'sentry/utils/getSourceMapsWizardSnippet'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useProjects} from 'sentry/utils/useProjects'; diff --git a/static/app/components/events/interfaces/spans/spanProfileDetails.tsx b/static/app/components/events/interfaces/spans/spanProfileDetails.tsx index 37586a4f72f275..bae1b4fab8c6e6 100644 --- a/static/app/components/events/interfaces/spans/spanProfileDetails.tsx +++ b/static/app/components/events/interfaces/spans/spanProfileDetails.tsx @@ -16,8 +16,8 @@ import {EntryType, type EventTransaction, type Frame} from 'sentry/types/event'; import type {Organization} from 'sentry/types/organization'; import type {PlatformKey} from 'sentry/types/platform'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {formatPercentage} from 'sentry/utils/number/formatPercentage'; import {CallTreeNode} from 'sentry/utils/profiling/callTreeNode'; import {Frame as ProfilingFrame} from 'sentry/utils/profiling/frame'; diff --git a/static/app/components/events/interfaces/stackTraceContext.tsx b/static/app/components/events/interfaces/stackTraceContext.tsx index 133cc33a75b43f..c0f3e75b6641b1 100644 --- a/static/app/components/events/interfaces/stackTraceContext.tsx +++ b/static/app/components/events/interfaces/stackTraceContext.tsx @@ -1,7 +1,7 @@ import {createContext, useContext, useMemo, useState} from 'react'; import {StackType, StackView} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useDetailedProject} from 'sentry/utils/project/useDetailedProject'; import {useLocalStorageState} from 'sentry/utils/useLocalStorageState'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/events/interfaces/threads.tsx b/static/app/components/events/interfaces/threads.tsx index 8b166ec39d1e0a..5429e3404e080a 100644 --- a/static/app/components/events/interfaces/threads.tsx +++ b/static/app/components/events/interfaces/threads.tsx @@ -36,7 +36,7 @@ import type {Group} from 'sentry/types/group'; import type {PlatformKey} from 'sentry/types/platform'; import type {Project} from 'sentry/types/project'; import {StackType, StackView} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {SectionKey} from 'sentry/views/issueDetails/context'; import {FoldSection} from 'sentry/views/issueDetails/foldSection'; import {setActiveThreadId} from 'sentry/views/issueDetails/hooks/useCopyIssueDetails'; diff --git a/static/app/components/events/interfaces/threads/threadSelector/getThreadException.tsx b/static/app/components/events/interfaces/threads/threadSelector/getThreadException.tsx index 3296e778dc4458..926bb1229506ab 100644 --- a/static/app/components/events/interfaces/threads/threadSelector/getThreadException.tsx +++ b/static/app/components/events/interfaces/threads/threadSelector/getThreadException.tsx @@ -1,5 +1,5 @@ import type {Event, ExceptionType, ExceptionValue, Thread} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; function getException( exceptionData: ExceptionType, diff --git a/static/app/components/events/interfaces/threads/threadSelector/index.tsx b/static/app/components/events/interfaces/threads/threadSelector/index.tsx index 85f678a9eec94a..eee7051bab3f9c 100644 --- a/static/app/components/events/interfaces/threads/threadSelector/index.tsx +++ b/static/app/components/events/interfaces/threads/threadSelector/index.tsx @@ -8,8 +8,8 @@ import {OverlayTrigger} from '@sentry/scraps/overlayTrigger'; import {IconArrow} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Event, ExceptionType, Frame, Thread} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {unreachable} from 'sentry/utils/unreachable'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/events/interfaces/threads/threadSelector/lockReason.tsx b/static/app/components/events/interfaces/threads/threadSelector/lockReason.tsx index 0e530ac0f7ac36..066acc727663a6 100644 --- a/static/app/components/events/interfaces/threads/threadSelector/lockReason.tsx +++ b/static/app/components/events/interfaces/threads/threadSelector/lockReason.tsx @@ -1,6 +1,6 @@ import type {Lock} from 'sentry/types/event'; import {LockType} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export function getLockReason( heldLocks?: Record | null diff --git a/static/app/components/events/interfaces/threads/threadSelector/threadStates.tsx b/static/app/components/events/interfaces/threads/threadSelector/threadStates.tsx index f9c8d2f4eb255b..2d570cdf651eef 100644 --- a/static/app/components/events/interfaces/threads/threadSelector/threadStates.tsx +++ b/static/app/components/events/interfaces/threads/threadSelector/threadStates.tsx @@ -1,5 +1,5 @@ import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export enum ThreadStates { RUNNABLE = 'Runnable', diff --git a/static/app/components/events/interfaces/utils.tsx b/static/app/components/events/interfaces/utils.tsx index e66d83bc13f447..d9a88503a088ad 100644 --- a/static/app/components/events/interfaces/utils.tsx +++ b/static/app/components/events/interfaces/utils.tsx @@ -9,7 +9,7 @@ import {EntryType} from 'sentry/types/event'; import type {PlatformKey} from 'sentry/types/platform'; import type {StacktraceType} from 'sentry/types/stacktrace'; import {StacktraceOrder, type AvatarUser} from 'sentry/types/user'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; /** * Attempts to escape a string from any bash double quote special characters. diff --git a/static/app/components/events/viewHierarchy/detailsPanel.tsx b/static/app/components/events/viewHierarchy/detailsPanel.tsx index d60eeaafe88685..cedcc48b4e89d2 100644 --- a/static/app/components/events/viewHierarchy/detailsPanel.tsx +++ b/static/app/components/events/viewHierarchy/detailsPanel.tsx @@ -2,7 +2,7 @@ import styled from '@emotion/styled'; import omit from 'lodash/omit'; import {KeyValueList} from 'sentry/components/events/interfaces/keyValueList'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {ViewHierarchyWindow} from '.'; diff --git a/static/app/components/events/viewHierarchy/index.tsx b/static/app/components/events/viewHierarchy/index.tsx index d71c687f248e9c..93a80913ba3283 100644 --- a/static/app/components/events/viewHierarchy/index.tsx +++ b/static/app/components/events/viewHierarchy/index.tsx @@ -6,8 +6,8 @@ import {Flex} from '@sentry/scraps/layout'; import {EmptyStateWarning} from 'sentry/components/emptyStateWarning'; import {Node} from 'sentry/components/events/viewHierarchy/node'; import {Wireframe} from 'sentry/components/events/viewHierarchy/wireframe'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import type {UseVirtualizedTreeProps} from 'sentry/utils/profiling/hooks/useVirtualizedTree/useVirtualizedTree'; import {useVirtualizedTree} from 'sentry/utils/profiling/hooks/useVirtualizedTree/useVirtualizedTree'; import type {VirtualizedTreeRenderedRow} from 'sentry/utils/profiling/hooks/useVirtualizedTree/virtualizedTreeUtils'; diff --git a/static/app/components/events/viewHierarchy/utils.spec.tsx b/static/app/components/events/viewHierarchy/utils.spec.tsx index 0e37363a90304c..f0fe3713a3bbf1 100644 --- a/static/app/components/events/viewHierarchy/utils.spec.tsx +++ b/static/app/components/events/viewHierarchy/utils.spec.tsx @@ -6,7 +6,7 @@ import { getDeepestNodeAtPoint, getHierarchyDimensions, } from 'sentry/components/events/viewHierarchy/utils'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {Rect} from 'sentry/utils/profiling/speedscope'; const LEAF_NODE = { diff --git a/static/app/components/events/viewHierarchy/utils.tsx b/static/app/components/events/viewHierarchy/utils.tsx index 8e97be4a5790b3..74f00e7f0a162d 100644 --- a/static/app/components/events/viewHierarchy/utils.tsx +++ b/static/app/components/events/viewHierarchy/utils.tsx @@ -10,7 +10,7 @@ import {t} from 'sentry/locale'; import type {Event} from 'sentry/types/event'; import type {PlatformKey} from 'sentry/types/platform'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {watchForResize} from 'sentry/utils/profiling/gl/utils'; import {Rect} from 'sentry/utils/profiling/speedscope'; diff --git a/static/app/components/externalIssues/ticketRuleModal.tsx b/static/app/components/externalIssues/ticketRuleModal.tsx index c8e9ab439e5e8a..fe7877b91957e4 100644 --- a/static/app/components/externalIssues/ticketRuleModal.tsx +++ b/static/app/components/externalIssues/ticketRuleModal.tsx @@ -21,9 +21,9 @@ import {t, tct} from 'sentry/locale'; import type {TicketActionData} from 'sentry/types/alerts'; import type {Choices, SelectValue} from 'sentry/types/core'; import type {IntegrationIssueConfig, IssueConfigField} from 'sentry/types/integrations'; -import {defined} from 'sentry/utils'; import {parseQueryKey} from 'sentry/utils/api/apiQueryKey'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {setApiQueryData, useApiQuery, type ApiQueryKey} from 'sentry/utils/queryClient'; import {useApi} from 'sentry/utils/useApi'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/featureFeedback/feedbackModal.tsx b/static/app/components/featureFeedback/feedbackModal.tsx index 0af60572057f0a..93e2963f327ddc 100644 --- a/static/app/components/featureFeedback/feedbackModal.tsx +++ b/static/app/components/featureFeedback/feedbackModal.tsx @@ -25,7 +25,7 @@ import {t, tct} from 'sentry/locale'; import {ConfigStore} from 'sentry/stores/configStore'; import {OrganizationStore} from 'sentry/stores/organizationStore'; import {useLegacyStore} from 'sentry/stores/useLegacyStore'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {useMedia} from 'sentry/utils/useMedia'; import {useProjects} from 'sentry/utils/useProjects'; diff --git a/static/app/components/featureFlags/hooks/useFetchGroupAndEvent.tsx b/static/app/components/featureFlags/hooks/useFetchGroupAndEvent.tsx index 23bd3feaf4dd00..e8251c684916d5 100644 --- a/static/app/components/featureFlags/hooks/useFetchGroupAndEvent.tsx +++ b/static/app/components/featureFlags/hooks/useFetchGroupAndEvent.tsx @@ -1,6 +1,6 @@ import type {Event} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {useApiQuery} from 'sentry/utils/queryClient'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useGroup} from 'sentry/views/issueDetails/useGroup'; diff --git a/static/app/components/featureFlags/hooks/useFlagsInEvent.tsx b/static/app/components/featureFlags/hooks/useFlagsInEvent.tsx index e5f0ba66415907..00710c76a5dec9 100644 --- a/static/app/components/featureFlags/hooks/useFlagsInEvent.tsx +++ b/static/app/components/featureFlags/hooks/useFlagsInEvent.tsx @@ -7,8 +7,8 @@ import { } from 'sentry/components/featureFlags/hooks/useOrganizationFlagLog'; import type {Event} from 'sentry/types/event'; import type {Group} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useGroup} from 'sentry/views/issueDetails/useGroup'; diff --git a/static/app/components/feedback/useFeedbackCache.tsx b/static/app/components/feedback/useFeedbackCache.tsx index 5222e2a965a5b4..87fd5265ca6aa8 100644 --- a/static/app/components/feedback/useFeedbackCache.tsx +++ b/static/app/components/feedback/useFeedbackCache.tsx @@ -2,9 +2,9 @@ import {useCallback} from 'react'; import {useQueryClient} from '@tanstack/react-query'; import {useFeedbackApiOptions} from 'sentry/components/feedback/useFeedbackApiOptions'; -import {defined} from 'sentry/utils'; import type {ApiResponse} from 'sentry/utils/api/apiFetch'; import {safeParseQueryKey} from 'sentry/utils/api/apiQueryKey'; +import {defined} from 'sentry/utils/defined'; import type {FeedbackIssue, FeedbackIssueListItem} from 'sentry/utils/feedback/types'; type TFeedbackIds = 'all' | string[]; diff --git a/static/app/components/forms/controls/rangeSlider/index.tsx b/static/app/components/forms/controls/rangeSlider/index.tsx index 1329be916f3524..140833168ca8f8 100644 --- a/static/app/components/forms/controls/rangeSlider/index.tsx +++ b/static/app/components/forms/controls/rangeSlider/index.tsx @@ -6,7 +6,7 @@ import {Slider} from '@sentry/scraps/slider'; import {Tooltip} from '@sentry/scraps/tooltip'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {SliderAndInputWrapper} from './sliderAndInputWrapper'; import {SliderLabel} from './sliderLabel'; diff --git a/static/app/components/forms/fields/choiceMapperField.tsx b/static/app/components/forms/fields/choiceMapperField.tsx index 2936ce26bda157..2a91a11081fe1c 100644 --- a/static/app/components/forms/fields/choiceMapperField.tsx +++ b/static/app/components/forms/fields/choiceMapperField.tsx @@ -19,7 +19,7 @@ import {Client} from 'sentry/api'; import {FormField} from 'sentry/components/forms/formField'; import {IconAdd, IconDelete} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isEmptyObject} from 'sentry/utils/object/isEmptyObject'; import {useDebouncedValue} from 'sentry/utils/useDebouncedValue'; diff --git a/static/app/components/forms/fields/tableField.tsx b/static/app/components/forms/fields/tableField.tsx index 9130ea3ec5c817..32b51279f82e9c 100644 --- a/static/app/components/forms/fields/tableField.tsx +++ b/static/app/components/forms/fields/tableField.tsx @@ -11,7 +11,7 @@ import {FormField} from 'sentry/components/forms/formField'; import type {TableType} from 'sentry/components/forms/types'; import {IconAdd, IconDelete} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {singleLineRenderer} from 'sentry/utils/marked/marked'; import {isEmptyObject} from 'sentry/utils/object/isEmptyObject'; diff --git a/static/app/components/forms/formField/index.tsx b/static/app/components/forms/formField/index.tsx index 9497f6af522aee..04691ef261c16d 100644 --- a/static/app/components/forms/formField/index.tsx +++ b/static/app/components/forms/formField/index.tsx @@ -21,7 +21,7 @@ import {FormState} from 'sentry/components/forms/state'; import type {FieldValue} from 'sentry/components/forms/types'; import {PanelAlert} from 'sentry/components/panels/panelAlert'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {sanitizeQuerySelector} from 'sentry/utils/sanitizeQuerySelector'; import {FormFieldControlState} from './controlState'; diff --git a/static/app/components/forms/jsonForm.tsx b/static/app/components/forms/jsonForm.tsx index 0f87eb381aa466..cebd1fee888ba9 100644 --- a/static/app/components/forms/jsonForm.tsx +++ b/static/app/components/forms/jsonForm.tsx @@ -2,7 +2,7 @@ import {Fragment, useEffect} from 'react'; import * as Sentry from '@sentry/react'; import scrollToElement from 'scroll-to-element'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {sanitizeQuerySelector} from 'sentry/utils/sanitizeQuerySelector'; import {useLocation} from 'sentry/utils/useLocation'; diff --git a/static/app/components/forms/model.tsx b/static/app/components/forms/model.tsx index 8d709146fc7c77..b62de1ac140aaf 100644 --- a/static/app/components/forms/model.tsx +++ b/static/app/components/forms/model.tsx @@ -8,8 +8,8 @@ import {addUndoableFormChangeMessage} from 'sentry/components/forms/formIndicato import {FormState} from 'sentry/components/forms/state'; import {t} from 'sentry/locale'; import type {Choice} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import type {RequestMethod} from 'sentry/utils/api/apiQueryKey'; +import {defined} from 'sentry/utils/defined'; import {isDemoModeActive} from 'sentry/utils/demoMode'; export const fieldIsRequiredMessage = t('Field is required'); diff --git a/static/app/components/group/seenInfo.tsx b/static/app/components/group/seenInfo.tsx index a1c2d1c48f63ad..7da436e4144e4e 100644 --- a/static/app/components/group/seenInfo.tsx +++ b/static/app/components/group/seenInfo.tsx @@ -12,7 +12,7 @@ import {VersionHoverCard} from 'sentry/components/versionHoverCard'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Release} from 'sentry/types/release'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {toTitleCase} from 'sentry/utils/string/toTitleCase'; type RelaxedDateType = React.ComponentProps['date']; diff --git a/static/app/components/groupPreviewTooltip/stackTracePreview.tsx b/static/app/components/groupPreviewTooltip/stackTracePreview.tsx index a2fc7e2ebd12fb..a58e6c722088fc 100644 --- a/static/app/components/groupPreviewTooltip/stackTracePreview.tsx +++ b/static/app/components/groupPreviewTooltip/stackTracePreview.tsx @@ -17,7 +17,7 @@ import {t} from 'sentry/locale'; import type {Event} from 'sentry/types/event'; import {EntryType} from 'sentry/types/event'; import type {StacktraceType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isNativePlatform} from 'sentry/utils/platform'; export function getStacktrace(event: Event): StacktraceType | null { diff --git a/static/app/components/groupPreviewTooltip/utils.tsx b/static/app/components/groupPreviewTooltip/utils.tsx index 3c223445815475..82389e18b66917 100644 --- a/static/app/components/groupPreviewTooltip/utils.tsx +++ b/static/app/components/groupPreviewTooltip/utils.tsx @@ -2,7 +2,7 @@ import {useCallback, useState} from 'react'; import {useQuery} from '@tanstack/react-query'; import type {Event} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useTimeout} from 'sentry/utils/useTimeout'; import {getEventSearchFromIssueQuery} from 'sentry/views/issueDetails/hooks/useEventQuery'; diff --git a/static/app/components/guidedSteps/guidedSteps.tsx b/static/app/components/guidedSteps/guidedSteps.tsx index 9bdef18a7dfaa1..3abe6f351aa80b 100644 --- a/static/app/components/guidedSteps/guidedSteps.tsx +++ b/static/app/components/guidedSteps/guidedSteps.tsx @@ -17,7 +17,7 @@ import {Flex, Stack, Container} from '@sentry/scraps/layout'; import {IconCheckmark} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {usePrevious} from 'sentry/utils/usePrevious'; type GuidedStepsProps = { diff --git a/static/app/components/issues/suspect/useLegacyEventSuspectFlags.tsx b/static/app/components/issues/suspect/useLegacyEventSuspectFlags.tsx index 701c7b0e4fd352..7775e0e5d986a0 100644 --- a/static/app/components/issues/suspect/useLegacyEventSuspectFlags.tsx +++ b/static/app/components/issues/suspect/useLegacyEventSuspectFlags.tsx @@ -11,8 +11,8 @@ import { } from 'sentry/components/featureFlags/utils'; import type {Event} from 'sentry/types/event'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; /** * Legacy suspect flags implementation. diff --git a/static/app/components/keyValueData/index.tsx b/static/app/components/keyValueData/index.tsx index 23bb9f0cba81b1..419eca3e9a243f 100644 --- a/static/app/components/keyValueData/index.tsx +++ b/static/app/components/keyValueData/index.tsx @@ -12,7 +12,7 @@ import {Panel} from 'sentry/components/panels/panel'; import {StructuredData} from 'sentry/components/structuredEventData'; import {t} from 'sentry/locale'; import type {KeyValueListDataItem, MetaError} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export interface KeyValueDataContentProps { /** diff --git a/static/app/components/modals/dataWidgetViewerModal.tsx b/static/app/components/modals/dataWidgetViewerModal.tsx index 520f6ab2681198..d5aa1c56ca9bf6 100644 --- a/static/app/components/modals/dataWidgetViewerModal.tsx +++ b/static/app/components/modals/dataWidgetViewerModal.tsx @@ -27,9 +27,9 @@ import type {PageFilters, SelectValue} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; import type {User} from 'sentry/types/user'; -import {defined} from 'sentry/utils'; import {CAN_MARK, trackAnalytics} from 'sentry/utils/analytics'; import {getUtcDateString} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import type {TableDataWithTitle} from 'sentry/utils/discover/discoverQuery'; import type {EventView, MetaType} from 'sentry/utils/discover/eventView'; import type {RenderFunctionBaggage} from 'sentry/utils/discover/fieldRenderers'; diff --git a/static/app/components/modals/explore/saveQueryModal.tsx b/static/app/components/modals/explore/saveQueryModal.tsx index aa41550498d4ed..4dcb7c44b46cc8 100644 --- a/static/app/components/modals/explore/saveQueryModal.tsx +++ b/static/app/components/modals/explore/saveQueryModal.tsx @@ -15,8 +15,8 @@ import { import type {ModalRenderProps} from 'sentry/actionCreators/modal'; import {t} from 'sentry/locale'; import type {Organization, SavedQuery} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useSetQueryParamsSavedQuery} from 'sentry/views/explore/queryParams/context'; import {TraceItemDataset} from 'sentry/views/explore/types'; diff --git a/static/app/components/onboarding/useCreateProjectAndRules.ts b/static/app/components/onboarding/useCreateProjectAndRules.ts index 369c8e5c8e3a07..370343a6669b48 100644 --- a/static/app/components/onboarding/useCreateProjectAndRules.ts +++ b/static/app/components/onboarding/useCreateProjectAndRules.ts @@ -8,7 +8,7 @@ import {useCreateProjectRules} from 'sentry/components/onboarding/useCreateProje import type {IssueAlertRule} from 'sentry/types/alerts'; import type {OnboardingSelectedSDK} from 'sentry/types/onboarding'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {RequestError} from 'sentry/utils/requestError/requestError'; import {useApi} from 'sentry/utils/useApi'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/pageFilters/actions.tsx b/static/app/components/pageFilters/actions.tsx index efb3d77fdc482c..a390c061805341 100644 --- a/static/app/components/pageFilters/actions.tsx +++ b/static/app/components/pageFilters/actions.tsx @@ -25,8 +25,8 @@ import {OrganizationStore} from 'sentry/stores/organizationStore'; import type {DateString, PageFilters, PinnedPageFilter} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; import type {Environment, MinimalProject, Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {getUtcDateString} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import {isActiveSuperuser} from 'sentry/utils/isActiveSuperuser'; import type {ReactRouter3Navigate} from 'sentry/utils/useNavigate'; diff --git a/static/app/components/pageFilters/parse.tsx b/static/app/components/pageFilters/parse.tsx index 4d61cff530d723..a090f8f2177589 100644 --- a/static/app/components/pageFilters/parse.tsx +++ b/static/app/components/pageFilters/parse.tsx @@ -7,9 +7,9 @@ import moment from 'moment-timezone'; import {DATE_TIME_KEYS, URL_PARAM} from 'sentry/components/pageFilters/constants'; import {DEFAULT_STATS_PERIOD} from 'sentry/constants'; import type {PageFilters} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import {toArray} from 'sentry/utils/array/toArray'; import {getUtcToLocalDateObject} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import type {PageFiltersState} from './types'; diff --git a/static/app/components/performance/transactionSearchQueryBuilder.tsx b/static/app/components/performance/transactionSearchQueryBuilder.tsx index b3ec2c1be9f6db..12ea78f7ef9f76 100644 --- a/static/app/components/performance/transactionSearchQueryBuilder.tsx +++ b/static/app/components/performance/transactionSearchQueryBuilder.tsx @@ -14,7 +14,7 @@ import type {CallbackSearchState} from 'sentry/components/searchQueryBuilder/typ import {t} from 'sentry/locale'; import type {PageFilters} from 'sentry/types/core'; import {SavedSearchType, type TagCollection} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { ALL_INSIGHTS_FILTER_KEY_SECTIONS, isAggregateField, diff --git a/static/app/components/performanceDuration.tsx b/static/app/components/performanceDuration.tsx index 14e477822fa224..c78b2a598a0935 100644 --- a/static/app/components/performanceDuration.tsx +++ b/static/app/components/performanceDuration.tsx @@ -1,5 +1,5 @@ import {Duration} from 'sentry/components/duration'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface DurationProps { abbreviation?: boolean; diff --git a/static/app/components/profiling/flamegraph/aggregateFlamegraph.tsx b/static/app/components/profiling/flamegraph/aggregateFlamegraph.tsx index 4ff8ff370deef8..95b25e1be31120 100644 --- a/static/app/components/profiling/flamegraph/aggregateFlamegraph.tsx +++ b/static/app/components/profiling/flamegraph/aggregateFlamegraph.tsx @@ -10,11 +10,11 @@ import {ContinuousFlamegraphContextMenu} from 'sentry/components/profiling/flame import {FlamegraphWarnings} from 'sentry/components/profiling/flamegraph/flamegraphOverlays/FlamegraphWarnings'; import {FlamegraphZoomView} from 'sentry/components/profiling/flamegraph/flamegraphZoomView'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import type { AggregateProfileSource, ProfileSource, } from 'sentry/utils/analytics/profilingAnalyticsEvents'; +import {defined} from 'sentry/utils/defined'; import type { CanvasPoolManager, CanvasScheduler, diff --git a/static/app/components/profiling/flamegraph/aggregateFlamegraphSidePanel.tsx b/static/app/components/profiling/flamegraph/aggregateFlamegraphSidePanel.tsx index 9244bda9c24b81..1953fa3af652a3 100644 --- a/static/app/components/profiling/flamegraph/aggregateFlamegraphSidePanel.tsx +++ b/static/app/components/profiling/flamegraph/aggregateFlamegraphSidePanel.tsx @@ -9,7 +9,7 @@ import {EmptyStateWarning} from 'sentry/components/emptyStateWarning'; import {t, tct} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getShortEventId} from 'sentry/utils/events'; import type {CanvasScheduler} from 'sentry/utils/profiling/canvasScheduler'; import type {FlamegraphFrame} from 'sentry/utils/profiling/flamegraphFrame'; diff --git a/static/app/components/profiling/flamegraph/aggregateFlamegraphTreeTable.tsx b/static/app/components/profiling/flamegraph/aggregateFlamegraphTreeTable.tsx index 492026a35800fe..d86f7517c32b14 100644 --- a/static/app/components/profiling/flamegraph/aggregateFlamegraphTreeTable.tsx +++ b/static/app/components/profiling/flamegraph/aggregateFlamegraphTreeTable.tsx @@ -8,9 +8,9 @@ import {PerformanceDuration} from 'sentry/components/performanceDuration'; import {QuestionTooltip} from 'sentry/components/questionTooltip'; import {IconArrow} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import type {AggregateProfileSource} from 'sentry/utils/analytics/profilingAnalyticsEvents'; +import {defined} from 'sentry/utils/defined'; import type {CanvasPoolManager} from 'sentry/utils/profiling/canvasScheduler'; import {filterFlamegraphTree} from 'sentry/utils/profiling/filterFlamegraphTree'; import {useFlamegraphProfiles} from 'sentry/utils/profiling/flamegraph/hooks/useFlamegraphProfiles'; diff --git a/static/app/components/profiling/flamegraph/callTreeTable.tsx b/static/app/components/profiling/flamegraph/callTreeTable.tsx index e8531688072087..786bff9b737efa 100644 --- a/static/app/components/profiling/flamegraph/callTreeTable.tsx +++ b/static/app/components/profiling/flamegraph/callTreeTable.tsx @@ -4,7 +4,7 @@ import styled from '@emotion/styled'; import {IconSettings} from 'sentry/icons/iconSettings'; import {IconUser} from 'sentry/icons/iconUser'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {FlamegraphFrame} from 'sentry/utils/profiling/flamegraphFrame'; import type {VirtualizedTreeNode} from 'sentry/utils/profiling/hooks/useVirtualizedTree/VirtualizedTreeNode'; import type {VirtualizedTreeRenderedRow} from 'sentry/utils/profiling/hooks/useVirtualizedTree/virtualizedTreeUtils'; diff --git a/static/app/components/profiling/flamegraph/continuousFlamegraph.tsx b/static/app/components/profiling/flamegraph/continuousFlamegraph.tsx index 7c7464986a22e1..302394ff0dc597 100644 --- a/static/app/components/profiling/flamegraph/continuousFlamegraph.tsx +++ b/static/app/components/profiling/flamegraph/continuousFlamegraph.tsx @@ -22,7 +22,7 @@ import {FlamegraphViewSelectMenu} from 'sentry/components/profiling/flamegraph/f import {FlamegraphZoomView} from 'sentry/components/profiling/flamegraph/flamegraphZoomView'; import {FlamegraphZoomViewMinimap} from 'sentry/components/profiling/flamegraph/flamegraphZoomViewMinimap'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { CanvasPoolManager, useCanvasScheduler, diff --git a/static/app/components/profiling/flamegraph/flamegraph.tsx b/static/app/components/profiling/flamegraph/flamegraph.tsx index 1aa6b6e08cc7f3..1e9ca8bf95a42a 100644 --- a/static/app/components/profiling/flamegraph/flamegraph.tsx +++ b/static/app/components/profiling/flamegraph/flamegraph.tsx @@ -22,7 +22,7 @@ import {FlamegraphViewSelectMenu} from 'sentry/components/profiling/flamegraph/f import {FlamegraphZoomView} from 'sentry/components/profiling/flamegraph/flamegraphZoomView'; import {FlamegraphZoomViewMinimap} from 'sentry/components/profiling/flamegraph/flamegraphZoomViewMinimap'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { CanvasPoolManager, useCanvasScheduler, diff --git a/static/app/components/profiling/flamegraph/flamegraphContextMenu.tsx b/static/app/components/profiling/flamegraph/flamegraphContextMenu.tsx index 3a8a55e2436dc3..9606b8b24ce2da 100644 --- a/static/app/components/profiling/flamegraph/flamegraphContextMenu.tsx +++ b/static/app/components/profiling/flamegraph/flamegraphContextMenu.tsx @@ -20,12 +20,12 @@ import {IconChevron, IconCopy, IconGithub, IconProfiling} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import type { AggregateProfileSource, ProfileSource, } from 'sentry/utils/analytics/profilingAnalyticsEvents'; +import {defined} from 'sentry/utils/defined'; import {getShortEventId} from 'sentry/utils/events'; import type { FlamegraphColorCodings, diff --git a/static/app/components/profiling/flamegraph/flamegraphDrawer/flamegraphDrawer.tsx b/static/app/components/profiling/flamegraph/flamegraphDrawer/flamegraphDrawer.tsx index 473467fdc75fcc..dd5cd2f99768ef 100644 --- a/static/app/components/profiling/flamegraph/flamegraphDrawer/flamegraphDrawer.tsx +++ b/static/app/components/profiling/flamegraph/flamegraphDrawer/flamegraphDrawer.tsx @@ -10,7 +10,7 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {ExportProfileButton} from 'sentry/components/profiling/exportProfileButton'; import {IconPanel} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type { CanvasPoolManager, CanvasScheduler, diff --git a/static/app/components/profiling/flamegraph/flamegraphPreview.tsx b/static/app/components/profiling/flamegraph/flamegraphPreview.tsx index 5a01fae93eae84..7e677e56d865a2 100644 --- a/static/app/components/profiling/flamegraph/flamegraphPreview.tsx +++ b/static/app/components/profiling/flamegraph/flamegraphPreview.tsx @@ -8,7 +8,7 @@ import {Stack} from '@sentry/scraps/layout'; import {FlamegraphTooltip} from 'sentry/components/profiling/flamegraph/flamegraphTooltip'; import {useCanvasScroll} from 'sentry/components/profiling/flamegraph/interactions/useCanvasScroll'; import {useCanvasZoomOrScroll} from 'sentry/components/profiling/flamegraph/interactions/useCanvasZoomOrScroll'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { CanvasPoolManager, useCanvasScheduler, diff --git a/static/app/components/profiling/flamegraph/flamegraphToolbar/flamegraphThreadSelector.tsx b/static/app/components/profiling/flamegraph/flamegraphToolbar/flamegraphThreadSelector.tsx index c5a792f5d5649f..13caf617b9aaff 100644 --- a/static/app/components/profiling/flamegraph/flamegraphToolbar/flamegraphThreadSelector.tsx +++ b/static/app/components/profiling/flamegraph/flamegraphToolbar/flamegraphThreadSelector.tsx @@ -9,8 +9,8 @@ import {OverlayTrigger} from '@sentry/scraps/overlayTrigger'; import {IconList} from 'sentry/icons'; import {t, tn} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import type {FlamegraphState} from 'sentry/utils/profiling/flamegraph/flamegraphStateProvider/flamegraphContext'; import type {ProfileGroup} from 'sentry/utils/profiling/profile/importProfile'; import type {Profile} from 'sentry/utils/profiling/profile/profile'; diff --git a/static/app/components/profiling/flamegraph/flamegraphTooltip.tsx b/static/app/components/profiling/flamegraph/flamegraphTooltip.tsx index 5c00fc50c19ac2..9cd06c8e24bb07 100644 --- a/static/app/components/profiling/flamegraph/flamegraphTooltip.tsx +++ b/static/app/components/profiling/flamegraph/flamegraphTooltip.tsx @@ -5,7 +5,7 @@ import type {vec2} from 'gl-matrix'; import {BoundTooltip} from 'sentry/components/profiling/boundTooltip'; import {IconLightning} from 'sentry/icons'; import {t, tn} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {formatPercentage} from 'sentry/utils/number/formatPercentage'; import type {CallTreeNode} from 'sentry/utils/profiling/callTreeNode'; import type {CanvasView} from 'sentry/utils/profiling/canvasView'; diff --git a/static/app/components/profiling/profileEventsTable.tsx b/static/app/components/profiling/profileEventsTable.tsx index f0c46a677121da..7c281f3e5ec64f 100644 --- a/static/app/components/profiling/profileEventsTable.tsx +++ b/static/app/components/profiling/profileEventsTable.tsx @@ -17,9 +17,9 @@ import {Version} from 'sentry/components/version'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {getTimeStampFromTableDateField} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {DURATION_UNITS} from 'sentry/utils/discover/fieldRenderers'; import {Container, NumberContainer} from 'sentry/utils/discover/styles'; diff --git a/static/app/components/profiling/profilingBreadcrumbs.tsx b/static/app/components/profiling/profilingBreadcrumbs.tsx index 98f55840f46470..b0ea6e2a4649c9 100644 --- a/static/app/components/profiling/profilingBreadcrumbs.tsx +++ b/static/app/components/profiling/profilingBreadcrumbs.tsx @@ -7,7 +7,7 @@ import {Breadcrumbs} from 'sentry/components/breadcrumbs'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { generateProfileFlamechartRouteWithQuery, generateProfilingRouteWithQuery, diff --git a/static/app/components/profiling/suspectFunctions/suspectFunctionsTable.tsx b/static/app/components/profiling/suspectFunctions/suspectFunctionsTable.tsx index 5aff0b28107f2c..ee58dceb8bbb8f 100644 --- a/static/app/components/profiling/suspectFunctions/suspectFunctionsTable.tsx +++ b/static/app/components/profiling/suspectFunctions/suspectFunctionsTable.tsx @@ -14,8 +14,8 @@ import {IconWarning} from 'sentry/icons/iconWarning'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import type {EventView} from 'sentry/utils/discover/eventView'; import type {RenderFunctionBaggage} from 'sentry/utils/discover/fieldRenderers'; import {FIELD_FORMATTERS} from 'sentry/utils/discover/fieldRenderers'; diff --git a/static/app/components/queryCount.tsx b/static/app/components/queryCount.tsx index ed65262bf51b08..b2dd4567354519 100644 --- a/static/app/components/queryCount.tsx +++ b/static/app/components/queryCount.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type Props = { count?: number | null; diff --git a/static/app/components/scoreCard.tsx b/static/app/components/scoreCard.tsx index 096172f61435e9..8f8d05298d1358 100644 --- a/static/app/components/scoreCard.tsx +++ b/static/app/components/scoreCard.tsx @@ -6,7 +6,7 @@ import {Flex, type FlexProps} from '@sentry/scraps/layout'; import {Panel} from 'sentry/components/panels/panel'; import {QuestionTooltip} from 'sentry/components/questionTooltip'; import {TextOverflow} from 'sentry/components/textOverflow'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type ScoreCardProps = { title: React.ReactNode; diff --git a/static/app/components/searchQueryBuilder/context.tsx b/static/app/components/searchQueryBuilder/context.tsx index 7a5c88e6bc4fda..a0d624745e580e 100644 --- a/static/app/components/searchQueryBuilder/context.tsx +++ b/static/app/components/searchQueryBuilder/context.tsx @@ -28,7 +28,7 @@ import type { import {parseQueryBuilderValue} from 'sentry/components/searchQueryBuilder/utils'; import type {ParseResult} from 'sentry/components/searchSyntax/parser'; import type {SavedSearchType, TagCollection} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {FieldDefinition, FieldKind} from 'sentry/utils/fields'; import {getFieldDefinition} from 'sentry/utils/fields'; import {useDimensions} from 'sentry/utils/useDimensions'; diff --git a/static/app/components/searchQueryBuilder/hooks/useUndoStack.tsx b/static/app/components/searchQueryBuilder/hooks/useUndoStack.tsx index 2c7db1f1a95e0b..e261b16f14611a 100644 --- a/static/app/components/searchQueryBuilder/hooks/useUndoStack.tsx +++ b/static/app/components/searchQueryBuilder/hooks/useUndoStack.tsx @@ -5,7 +5,7 @@ import type {Key} from '@react-types/shared'; import {useSearchQueryBuilderState} from 'sentry/components/searchQueryBuilder/context'; import type {FocusOverride} from 'sentry/components/searchQueryBuilder/types'; import type {ParseResultToken} from 'sentry/components/searchSyntax/parser'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type UndoItem = { /** diff --git a/static/app/components/searchQueryBuilder/index.tsx b/static/app/components/searchQueryBuilder/index.tsx index 2b0f300490cbc8..8e08beab509b6e 100644 --- a/static/app/components/searchQueryBuilder/index.tsx +++ b/static/app/components/searchQueryBuilder/index.tsx @@ -28,7 +28,7 @@ import type {SearchConfig} from 'sentry/components/searchSyntax/parser'; import {IconCase, IconClose, IconSearch} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {SavedSearchType, Tag, TagCollection} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {FieldKind} from 'sentry/utils/fields'; import {PanelProvider} from 'sentry/utils/panelProvider'; import {useDimensions} from 'sentry/utils/useDimensions'; diff --git a/static/app/components/searchQueryBuilder/selectionKeyHandler.tsx b/static/app/components/searchQueryBuilder/selectionKeyHandler.tsx index 0fd75ea93e90f3..9ef8e6adaccf2a 100644 --- a/static/app/components/searchQueryBuilder/selectionKeyHandler.tsx +++ b/static/app/components/searchQueryBuilder/selectionKeyHandler.tsx @@ -9,7 +9,7 @@ import { import {useKeyboardSelection} from 'sentry/components/searchQueryBuilder/hooks/useKeyboardSelection'; import {findNearestFreeTextKey} from 'sentry/components/searchQueryBuilder/utils'; import type {ParseResultToken} from 'sentry/components/searchSyntax/parser'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isCtrlKeyPressed} from 'sentry/utils/isCtrlKeyPressed'; type SelectionKeyHandlerProps = { diff --git a/static/app/components/searchQueryBuilder/tokens/boolean.tsx b/static/app/components/searchQueryBuilder/tokens/boolean.tsx index 9de3c11b9378ec..debcebac37db0f 100644 --- a/static/app/components/searchQueryBuilder/tokens/boolean.tsx +++ b/static/app/components/searchQueryBuilder/tokens/boolean.tsx @@ -28,7 +28,7 @@ import type { } from 'sentry/components/searchSyntax/parser'; import {IconClose} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type SearchQueryBuilderBooleanProps = { item: Node; diff --git a/static/app/components/searchQueryBuilder/tokens/combobox.tsx b/static/app/components/searchQueryBuilder/tokens/combobox.tsx index 18ba6f4a63ad1b..41e07281ab2dde 100644 --- a/static/app/components/searchQueryBuilder/tokens/combobox.tsx +++ b/static/app/components/searchQueryBuilder/tokens/combobox.tsx @@ -42,7 +42,7 @@ import { itemIsSection, } from 'sentry/components/searchQueryBuilder/tokens/utils'; import type {Token, TokenResult} from 'sentry/components/searchSyntax/parser'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isCtrlKeyPressed} from 'sentry/utils/isCtrlKeyPressed'; import {useOverlay} from 'sentry/utils/useOverlay'; diff --git a/static/app/components/searchQueryBuilder/tokens/filter/filter.tsx b/static/app/components/searchQueryBuilder/tokens/filter/filter.tsx index 44319a016fd38a..d4e0867a174e5b 100644 --- a/static/app/components/searchQueryBuilder/tokens/filter/filter.tsx +++ b/static/app/components/searchQueryBuilder/tokens/filter/filter.tsx @@ -40,7 +40,7 @@ import { import {getKeyName} from 'sentry/components/searchSyntax/utils'; import {IconClose} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {prettifyTagKey} from 'sentry/utils/fields'; interface SearchQueryTokenProps { diff --git a/static/app/components/searchQueryBuilder/tokens/filter/parametersCombobox.tsx b/static/app/components/searchQueryBuilder/tokens/filter/parametersCombobox.tsx index 3e4963dfd7ac1b..026ed7a8060921 100644 --- a/static/app/components/searchQueryBuilder/tokens/filter/parametersCombobox.tsx +++ b/static/app/components/searchQueryBuilder/tokens/filter/parametersCombobox.tsx @@ -22,7 +22,7 @@ import type { ParseResultToken, } from 'sentry/components/searchSyntax/parser'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {FieldDefinition} from 'sentry/utils/fields'; import {FieldKind, FieldValueType} from 'sentry/utils/fields'; diff --git a/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/utils.tsx b/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/utils.tsx index b0c5bee22bf7e9..d6ad07e1559f8b 100644 --- a/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/utils.tsx +++ b/static/app/components/searchQueryBuilder/tokens/filterKeyListBox/utils.tsx @@ -31,7 +31,7 @@ import { } from 'sentry/components/searchSyntax/utils'; import {t} from 'sentry/locale'; import type {RecentSearch, Tag, TagCollection} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {FieldKind, prettifyTagKey, type FieldDefinition} from 'sentry/utils/fields'; import {escapeFilterValue} from 'sentry/utils/tokenizeSearch'; import {TypeBadge} from 'sentry/views/explore/components/typeBadge'; diff --git a/static/app/components/searchQueryBuilder/tokens/invalidTokenTooltip.tsx b/static/app/components/searchQueryBuilder/tokens/invalidTokenTooltip.tsx index a0728bfde2ee45..1ed41d506cb526 100644 --- a/static/app/components/searchQueryBuilder/tokens/invalidTokenTooltip.tsx +++ b/static/app/components/searchQueryBuilder/tokens/invalidTokenTooltip.tsx @@ -7,7 +7,7 @@ import {Tooltip, type TooltipProps} from '@sentry/scraps/tooltip'; import type {ParseResultToken} from 'sentry/components/searchSyntax/parser'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface InvalidTokenTooltipProps extends Omit { children: ReactNode; diff --git a/static/app/components/searchQueryBuilder/tokens/useSortedFilterKeyItems.tsx b/static/app/components/searchQueryBuilder/tokens/useSortedFilterKeyItems.tsx index 3847cb86dd2c50..33e0639922427c 100644 --- a/static/app/components/searchQueryBuilder/tokens/useSortedFilterKeyItems.tsx +++ b/static/app/components/searchQueryBuilder/tokens/useSortedFilterKeyItems.tsx @@ -22,7 +22,7 @@ import { } from 'sentry/components/searchQueryBuilder/tokens/filterKeyListBox/utils'; import type {FieldDefinitionGetter} from 'sentry/components/searchQueryBuilder/types'; import type {Tag} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {FieldKey, FieldKind} from 'sentry/utils/fields'; import {useFuzzySearch} from 'sentry/utils/fuzzySearch'; import {useDebouncedValue} from 'sentry/utils/useDebouncedValue'; diff --git a/static/app/components/searchQueryBuilder/tokens/utils.tsx b/static/app/components/searchQueryBuilder/tokens/utils.tsx index e6c2359a7ae242..b09a60bba46e6c 100644 --- a/static/app/components/searchQueryBuilder/tokens/utils.tsx +++ b/static/app/components/searchQueryBuilder/tokens/utils.tsx @@ -13,7 +13,7 @@ import { WildcardOperators, type ParseResultToken, } from 'sentry/components/searchSyntax/parser'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {FieldKind, FieldValueType, type FieldDefinition} from 'sentry/utils/fields'; export function shiftFocusToChild( diff --git a/static/app/components/stackTrace/exceptionGroup.tsx b/static/app/components/stackTrace/exceptionGroup.tsx index 465d084f85bac6..c9f15d96f290f2 100644 --- a/static/app/components/stackTrace/exceptionGroup.tsx +++ b/static/app/components/stackTrace/exceptionGroup.tsx @@ -7,7 +7,7 @@ import {Text} from '@sentry/scraps/text'; import {t, tn} from 'sentry/locale'; import type {ExceptionValue} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type HiddenExceptionsState = Record; diff --git a/static/app/components/stackTrace/frame/frameHeader.tsx b/static/app/components/stackTrace/frame/frameHeader.tsx index b145a41277313d..495ae3bf268e7d 100644 --- a/static/app/components/stackTrace/frame/frameHeader.tsx +++ b/static/app/components/stackTrace/frame/frameHeader.tsx @@ -15,7 +15,7 @@ import {useStackTraceFrameContext} from 'sentry/components/stackTrace/stackTrace import {t} from 'sentry/locale'; import type {Event, Frame} from 'sentry/types/event'; import type {PlatformKey} from 'sentry/types/platform'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isValidUrl} from 'sentry/utils/string/isValidUrl'; function getFrameDisplayPath(frame: Frame, platform: PlatformKey, event: Event) { diff --git a/static/app/components/stackTrace/issueStackTrace/index.tsx b/static/app/components/stackTrace/issueStackTrace/index.tsx index edd0fdc44a144d..c1ff8218513153 100644 --- a/static/app/components/stackTrace/issueStackTrace/index.tsx +++ b/static/app/components/stackTrace/issueStackTrace/index.tsx @@ -34,7 +34,7 @@ import {EntryType} from 'sentry/types/event'; import type {Group} from 'sentry/types/group'; import type {Project} from 'sentry/types/project'; import type {StacktraceType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useDetailedProject} from 'sentry/utils/project/useDetailedProject'; import {useLocalStorageState} from 'sentry/utils/useLocalStorageState'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/stackTrace/issueStackTrace/issueStackTraceFrameContext.tsx b/static/app/components/stackTrace/issueStackTrace/issueStackTraceFrameContext.tsx index b3c6daf068afd0..6fb3c5e18aad20 100644 --- a/static/app/components/stackTrace/issueStackTrace/issueStackTraceFrameContext.tsx +++ b/static/app/components/stackTrace/issueStackTrace/issueStackTraceFrameContext.tsx @@ -10,7 +10,7 @@ import { useStackTraceContext, useStackTraceFrameContext, } from 'sentry/components/stackTrace/stackTraceContext'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; export function IssueStackTraceFrameContext() { diff --git a/static/app/components/stackTrace/issueStackTrace/sharedIssueStackTrace.tsx b/static/app/components/stackTrace/issueStackTrace/sharedIssueStackTrace.tsx index 9b2489684cb6f3..1adcc2a18556dd 100644 --- a/static/app/components/stackTrace/issueStackTrace/sharedIssueStackTrace.tsx +++ b/static/app/components/stackTrace/issueStackTrace/sharedIssueStackTrace.tsx @@ -29,7 +29,7 @@ import {tn} from 'sentry/locale'; import type {Event, ExceptionValue} from 'sentry/types/event'; import {EntryType} from 'sentry/types/event'; import type {StacktraceType} from 'sentry/types/stacktrace'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {SectionKey} from 'sentry/views/issueDetails/context'; import {FoldSection} from 'sentry/views/issueDetails/foldSection'; diff --git a/static/app/components/stream/group.tsx b/static/app/components/stream/group.tsx index 2ef3a57a9ce8ef..5bb2f6e37e8fc1 100644 --- a/static/app/components/stream/group.tsx +++ b/static/app/components/stream/group.tsx @@ -37,8 +37,9 @@ import type { } from 'sentry/types/group'; import type {NewQuery} from 'sentry/types/organization'; import type {User} from 'sentry/types/user'; -import {defined, percent} from 'sentry/utils'; +import {percent} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {SavedQueryDatasets} from 'sentry/utils/discover/types'; import {isCtrlKeyPressed} from 'sentry/utils/isCtrlKeyPressed'; diff --git a/static/app/components/structuredEventData/linkHint.tsx b/static/app/components/structuredEventData/linkHint.tsx index 83c7766b81a59e..d61a2db97b6a4c 100644 --- a/static/app/components/structuredEventData/linkHint.tsx +++ b/static/app/components/structuredEventData/linkHint.tsx @@ -5,7 +5,7 @@ import {ExternalLink} from '@sentry/scraps/link'; import {openNavigateToExternalLinkModal} from 'sentry/actionCreators/modal'; import {IconOpen} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isValidUrl} from 'sentry/utils/string/isValidUrl'; interface Props { diff --git a/static/app/components/tables/simpleTable/index.tsx b/static/app/components/tables/simpleTable/index.tsx index 96a4f9e1d2d9b2..2c8eef2d9d0f8a 100644 --- a/static/app/components/tables/simpleTable/index.tsx +++ b/static/app/components/tables/simpleTable/index.tsx @@ -8,7 +8,7 @@ import {Flex} from '@sentry/scraps/layout'; import {Panel} from 'sentry/components/panels/panel'; import {IconArrow} from 'sentry/icons'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface TableProps extends HTMLAttributes { ref?: RefObject; diff --git a/static/app/components/tokenizedInput/token/comboBox.tsx b/static/app/components/tokenizedInput/token/comboBox.tsx index 30f8fc7fde60dc..f065f43a86ba38 100644 --- a/static/app/components/tokenizedInput/token/comboBox.tsx +++ b/static/app/components/tokenizedInput/token/comboBox.tsx @@ -28,7 +28,7 @@ import {Flex} from '@sentry/scraps/layout'; import {Overlay} from 'sentry/components/overlay'; import {useSearchTokenCombobox} from 'sentry/components/searchQueryBuilder/tokens/useSearchTokenCombobox'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOverlay} from 'sentry/utils/useOverlay'; interface ComboBoxProps { diff --git a/static/app/components/tours/components.tsx b/static/app/components/tours/components.tsx index 5f159e0fa675f2..b488b4fe3c0283 100644 --- a/static/app/components/tours/components.tsx +++ b/static/app/components/tours/components.tsx @@ -19,8 +19,8 @@ import { import {useMutateAssistant} from 'sentry/components/tours/useAssistant'; import {IconClose} from 'sentry/icons/iconClose'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {useInvertedTheme} from 'sentry/utils/theme/useInvertedTheme'; import {useEffectAfterFirstRender} from 'sentry/utils/useEffectAfterFirstRender'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/components/userMisery.tsx b/static/app/components/userMisery.tsx index 55aaf7ce389cd6..36d558fbd4b333 100644 --- a/static/app/components/userMisery.tsx +++ b/static/app/components/userMisery.tsx @@ -4,7 +4,7 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {ScoreBar} from 'sentry/components/scoreBar'; import {tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type Props = { barHeight: number; diff --git a/static/app/components/versionHoverCard.tsx b/static/app/components/versionHoverCard.tsx index 2729f6e90d7db3..3294e49d986c19 100644 --- a/static/app/components/versionHoverCard.tsx +++ b/static/app/components/versionHoverCard.tsx @@ -19,7 +19,7 @@ import {t} from 'sentry/locale'; import type {Actor} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; import type {User} from 'sentry/types/user'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {deploysApiOptions} from 'sentry/utils/deploysApiOptions'; import {uniqueId} from 'sentry/utils/guid'; import {releaseApiOptions} from 'sentry/utils/releaseApiOptions'; diff --git a/static/app/components/workflowEngine/gridCell/titleCell.tsx b/static/app/components/workflowEngine/gridCell/titleCell.tsx index a6702a6932f1a6..4a97cde2557b09 100644 --- a/static/app/components/workflowEngine/gridCell/titleCell.tsx +++ b/static/app/components/workflowEngine/gridCell/titleCell.tsx @@ -11,7 +11,7 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {IconSentry, IconWarning} from 'sentry/icons'; import type {StatusWarning} from 'sentry/types/workflowEngine/automations'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export type TitleCellProps = { link: LocationDescriptor | null; diff --git a/static/app/plugins/registry.tsx b/static/app/plugins/registry.tsx index 04babb83442033..204390264ee24a 100644 --- a/static/app/plugins/registry.tsx +++ b/static/app/plugins/registry.tsx @@ -3,7 +3,7 @@ import {DefaultIssuePlugin} from 'sentry/plugins/defaultIssuePlugin'; import {DefaultPlugin} from 'sentry/plugins/defaultPlugin'; import type {SessionStackPlugin} from 'sentry/plugins/sessionstack'; import type {Plugin} from 'sentry/types/integrations'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type PluginComponent = | typeof DefaultIssuePlugin diff --git a/static/app/stores/teamStore.tsx b/static/app/stores/teamStore.tsx index ac6fcb293f2d11..1942875fb2f11f 100644 --- a/static/app/stores/teamStore.tsx +++ b/static/app/stores/teamStore.tsx @@ -1,7 +1,7 @@ import {createStore} from 'reflux'; import type {Team} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {ProjectsStore} from './projectsStore'; import type {StrictStoreDefinition} from './types'; diff --git a/static/app/utils.tsx b/static/app/utils.tsx index a1a42c3b5546a9..1b2b375f0da691 100644 --- a/static/app/utils.tsx +++ b/static/app/utils.tsx @@ -1,5 +1,3 @@ -export {defined} from 'sentry/utils/defined'; - /** * Replaces slug special chars with a space */ diff --git a/static/app/utils/api/useAggregatedQueryKeys.tsx b/static/app/utils/api/useAggregatedQueryKeys.tsx index d497880229b592..b0f29381def4d1 100644 --- a/static/app/utils/api/useAggregatedQueryKeys.tsx +++ b/static/app/utils/api/useAggregatedQueryKeys.tsx @@ -1,7 +1,6 @@ import {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {useQueryClient, type UseQueryOptions} from '@tanstack/react-query'; -import {defined} from 'sentry/utils'; import {type ApiResponse} from 'sentry/utils/api/apiFetch'; import { type ApiQueryKey, @@ -9,6 +8,7 @@ import { safeParseQueryKey, } from 'sentry/utils/api/apiQueryKey'; import {uniq} from 'sentry/utils/array/uniq'; +import {defined} from 'sentry/utils/defined'; const BUFFER_WAIT_MS = 20; diff --git a/static/app/utils/crashReports.tsx b/static/app/utils/crashReports.tsx index 685d7d984059e3..c9744406608870 100644 --- a/static/app/utils/crashReports.tsx +++ b/static/app/utils/crashReports.tsx @@ -1,5 +1,5 @@ import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export function formatStoreCrashReports( value: number | null | '', diff --git a/static/app/utils/cursorPoller.tsx b/static/app/utils/cursorPoller.tsx index 98289cfd3c5668..92b15d6b367c76 100644 --- a/static/app/utils/cursorPoller.tsx +++ b/static/app/utils/cursorPoller.tsx @@ -1,6 +1,6 @@ import type {Request} from 'sentry/api'; import {Client} from 'sentry/api'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {parseLinkHeader} from 'sentry/utils/parseLinkHeader'; type Options = { diff --git a/static/app/utils/discover/charts.tsx b/static/app/utils/discover/charts.tsx index bad4ec48f2c51c..228e0f736cd3b2 100644 --- a/static/app/utils/discover/charts.tsx +++ b/static/app/utils/discover/charts.tsx @@ -2,9 +2,9 @@ import * as Sentry from '@sentry/react'; import type {LegendComponentOption} from 'echarts'; import type {Series} from 'sentry/types/echarts'; -import {defined} from 'sentry/utils'; import {formatBytesBase2} from 'sentry/utils/bytes/formatBytesBase2'; import {formatBytesBase10} from 'sentry/utils/bytes/formatBytesBase10'; +import {defined} from 'sentry/utils/defined'; import type { AggregationOutputType, DataUnit, diff --git a/static/app/utils/discover/fieldRenderers.tsx b/static/app/utils/discover/fieldRenderers.tsx index e95d016ba0a06f..6b7b323b3e9b8b 100644 --- a/static/app/utils/discover/fieldRenderers.tsx +++ b/static/app/utils/discover/fieldRenderers.tsx @@ -29,9 +29,9 @@ import {t, tct} from 'sentry/locale'; import type {IssueAttachment} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; import type {AvatarProject, Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {toArray} from 'sentry/utils/array/toArray'; +import {defined} from 'sentry/utils/defined'; import type {EventData, EventView, MetaType} from 'sentry/utils/discover/eventView'; import type {RateUnit} from 'sentry/utils/discover/fields'; import { diff --git a/static/app/utils/discover/teamKeyTransactionField.tsx b/static/app/utils/discover/teamKeyTransactionField.tsx index 1c0f9a4c16b5e4..a13232dbebaa44 100644 --- a/static/app/utils/discover/teamKeyTransactionField.tsx +++ b/static/app/utils/discover/teamKeyTransactionField.tsx @@ -8,7 +8,7 @@ import {IconStar} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useProjects} from 'sentry/utils/useProjects'; type BaseProps = { diff --git a/static/app/utils/eventExceptionGroup.tsx b/static/app/utils/eventExceptionGroup.tsx index b7dd852aed96f1..defeaec94ba008 100644 --- a/static/app/utils/eventExceptionGroup.tsx +++ b/static/app/utils/eventExceptionGroup.tsx @@ -1,5 +1,5 @@ import type {EntryException, ExceptionValue} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; type ExceptionGroupTreeItem = { children: ExceptionGroupTreeItem[]; diff --git a/static/app/utils/events.tsx b/static/app/utils/events.tsx index da22426f190959..23d3c518d13151 100644 --- a/static/app/utils/events.tsx +++ b/static/app/utils/events.tsx @@ -19,9 +19,9 @@ import type { SimpleGroup, } from 'sentry/types/group'; import {GroupActivityType, IssueCategory, IssueType} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import type {BaseEventAnalyticsParams} from 'sentry/utils/analytics/workflowAnalyticsEvents'; import {uniq} from 'sentry/utils/array/uniq'; +import {defined} from 'sentry/utils/defined'; import { getExceptionGroupHeight, getExceptionGroupWidth, diff --git a/static/app/utils/number/formatMetricUsingUnit.tsx b/static/app/utils/number/formatMetricUsingUnit.tsx index 53d152169ed887..1ad21b83a4cc5c 100644 --- a/static/app/utils/number/formatMetricUsingUnit.tsx +++ b/static/app/utils/number/formatMetricUsingUnit.tsx @@ -1,6 +1,6 @@ -import {defined} from 'sentry/utils'; import {formatBytesBase2} from 'sentry/utils/bytes/formatBytesBase2'; import {formatBytesBase10} from 'sentry/utils/bytes/formatBytesBase10'; +import {defined} from 'sentry/utils/defined'; import { DAY, formatAbbreviatedNumberWithDynamicPrecision, diff --git a/static/app/utils/profiling/frame.tsx b/static/app/utils/profiling/frame.tsx index ef6795548d3953..d49717dc8aed52 100644 --- a/static/app/utils/profiling/frame.tsx +++ b/static/app/utils/profiling/frame.tsx @@ -1,7 +1,7 @@ import {trimPackage} from 'sentry/components/events/interfaces/frame/utils'; import type {SymbolicatorStatus} from 'sentry/components/events/interfaces/types'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; const ROOT_KEY = 'sentry root'; const BROWSER_EXTENSION_REGEXP = /^(@moz-extension:\/\/|chrome-extension:\/\/)/; diff --git a/static/app/utils/profiling/hooks/useProfileTopEventsStats.tsx b/static/app/utils/profiling/hooks/useProfileTopEventsStats.tsx index dcd3907e04176b..c868cb6bf7842b 100644 --- a/static/app/utils/profiling/hooks/useProfileTopEventsStats.tsx +++ b/static/app/utils/profiling/hooks/useProfileTopEventsStats.tsx @@ -5,8 +5,8 @@ import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {PageFilters} from 'sentry/types/core'; import type {EventsStatsSeries} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {transformSingleSeries} from 'sentry/utils/profiling/hooks/utils'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/utils/profiling/hooks/utils.tsx b/static/app/utils/profiling/hooks/utils.tsx index f4d4fd92a5b876..6a9d2a42575106 100644 --- a/static/app/utils/profiling/hooks/utils.tsx +++ b/static/app/utils/profiling/hooks/utils.tsx @@ -1,6 +1,6 @@ import {t} from 'sentry/locale'; import type {EventsStatsSeries} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getAggregateAlias} from 'sentry/utils/discover/fields'; import {makeFormatTo} from 'sentry/utils/profiling/units/units'; diff --git a/static/app/utils/profiling/profile/continuousProfile.tsx b/static/app/utils/profiling/profile/continuousProfile.tsx index cc5da01e9083c1..8ddb4012f723e2 100644 --- a/static/app/utils/profiling/profile/continuousProfile.tsx +++ b/static/app/utils/profiling/profile/continuousProfile.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {CallTreeNode} from 'sentry/utils/profiling/callTreeNode'; import type {Frame} from 'sentry/utils/profiling/frame'; import type {createContinuousProfileFrameIndex} from 'sentry/utils/profiling/profile/utils'; diff --git a/static/app/utils/profiling/profile/importProfile.tsx b/static/app/utils/profiling/profile/importProfile.tsx index 0d01cbc8e75f4c..97ecf42e6ace13 100644 --- a/static/app/utils/profiling/profile/importProfile.tsx +++ b/static/app/utils/profiling/profile/importProfile.tsx @@ -2,7 +2,7 @@ import type {Span} from '@sentry/core'; import * as Sentry from '@sentry/react'; import type {Image} from 'sentry/types/debugImage'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {Frame} from 'sentry/utils/profiling/frame'; import { isEventedProfile, diff --git a/static/app/utils/profiling/profile/utils.tsx b/static/app/utils/profiling/profile/utils.tsx index 63c3fb82ca19b0..2bef7de0c9bf99 100644 --- a/static/app/utils/profiling/profile/utils.tsx +++ b/static/app/utils/profiling/profile/utils.tsx @@ -1,7 +1,7 @@ import type {Span} from '@sentry/core'; import * as Sentry from '@sentry/react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {FlamegraphFrame} from 'sentry/utils/profiling/flamegraphFrame'; import {Frame} from 'sentry/utils/profiling/frame'; diff --git a/static/app/utils/projects.tsx b/static/app/utils/projects.tsx index e9422a2eedf7c4..f2f66b3fee5487 100644 --- a/static/app/utils/projects.tsx +++ b/static/app/utils/projects.tsx @@ -6,7 +6,7 @@ import uniqBy from 'lodash/uniqBy'; import type {Client} from 'sentry/api'; import {ProjectsStore} from 'sentry/stores/projectsStore'; import type {AvatarProject, Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getDaysSinceDate} from 'sentry/utils/getDaysSinceDate'; import {parseLinkHeader} from 'sentry/utils/parseLinkHeader'; import type {RequestError} from 'sentry/utils/requestError/requestError'; diff --git a/static/app/utils/replays/hooks/useActiveReplayTab.tsx b/static/app/utils/replays/hooks/useActiveReplayTab.tsx index 56e8cddacc2c50..3ad4a5d8293334 100644 --- a/static/app/utils/replays/hooks/useActiveReplayTab.tsx +++ b/static/app/utils/replays/hooks/useActiveReplayTab.tsx @@ -2,7 +2,7 @@ import {useCallback} from 'react'; import {createParser, parseAsStringLiteral, useQueryState, useQueryStates} from 'nuqs'; import {useOrganizationSeerSetup} from 'sentry/components/events/autofix/useOrganizationSeerSetup'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {replayDetailFilterParsers} from 'sentry/utils/replays/hooks/useFiltersInLocationQuery'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/utils/replays/hooks/useReplayData.tsx b/static/app/utils/replays/hooks/useReplayData.tsx index cdf37ee03709cc..da9f8fc87aa661 100644 --- a/static/app/utils/replays/hooks/useReplayData.tsx +++ b/static/app/utils/replays/hooks/useReplayData.tsx @@ -9,11 +9,11 @@ import { } from '@tanstack/react-query'; import {ALL_ACCESS_PROJECTS} from 'sentry/components/pageFilters/constants'; -import {defined} from 'sentry/utils'; import {useFetchAllPages} from 'sentry/utils/api/apiFetch'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; import {safeParseQueryKey} from 'sentry/utils/api/apiQueryKey'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import type {FeedbackEvent} from 'sentry/utils/feedback/types'; import {parseLinkHeader} from 'sentry/utils/parseLinkHeader'; diff --git a/static/app/utils/replays/hydrateErrors.tsx b/static/app/utils/replays/hydrateErrors.tsx index 1c2d93d49851f9..a653c79bc823f6 100644 --- a/static/app/utils/replays/hydrateErrors.tsx +++ b/static/app/utils/replays/hydrateErrors.tsx @@ -1,10 +1,10 @@ import * as Sentry from '@sentry/react'; import invariant from 'invariant'; -import {defined} from 'sentry/utils'; import {toArray} from 'sentry/utils/array/toArray'; import {parseEventTimestampMs} from 'sentry/utils/date/eventTimestampMs'; import {isValidDate} from 'sentry/utils/date/isValidDate'; +import {defined} from 'sentry/utils/defined'; import type {FeedbackEvent} from 'sentry/utils/feedback/types'; import type { BreadcrumbFrame, diff --git a/static/app/utils/replays/replayReader.tsx b/static/app/utils/replays/replayReader.tsx index ab2a9c30c9dae0..86e470e52995ca 100644 --- a/static/app/utils/replays/replayReader.tsx +++ b/static/app/utils/replays/replayReader.tsx @@ -3,7 +3,7 @@ import * as Sentry from '@sentry/react'; import memoize from 'lodash/memoize'; import {duration, type Duration} from 'moment-timezone'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {FeedbackEvent} from 'sentry/utils/feedback/types'; import {localStorageWrapper} from 'sentry/utils/localStorage'; import {clamp} from 'sentry/utils/number/clamp'; diff --git a/static/app/utils/sessions.tsx b/static/app/utils/sessions.tsx index 4b6794cfe46db4..f845c2992c8483 100644 --- a/static/app/utils/sessions.tsx +++ b/static/app/utils/sessions.tsx @@ -16,7 +16,8 @@ import type { SessionFieldWithOperation, } from 'sentry/types/organization'; import {SessionStatus} from 'sentry/types/organization'; -import {defined, percent} from 'sentry/utils'; +import {percent} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { getCrashFreePercent, getSessionStatusPercent, diff --git a/static/app/utils/timeSeries/markDelayedData.tsx b/static/app/utils/timeSeries/markDelayedData.tsx index ca8724f94e0973..86a8342aa7c9fd 100644 --- a/static/app/utils/timeSeries/markDelayedData.tsx +++ b/static/app/utils/timeSeries/markDelayedData.tsx @@ -2,7 +2,7 @@ * Given a timeseries and a delay in seconds, goes through the timeseries data, and marks each point as either delayed (data bucket ended before the delay threshold) or not */ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {TimeSeries} from 'sentry/views/dashboards/widgets/common/types'; export function markDelayedData(timeSeries: TimeSeries, delay: number): TimeSeries { diff --git a/static/app/utils/timeSeries/useFetchEventsTimeSeries.tsx b/static/app/utils/timeSeries/useFetchEventsTimeSeries.tsx index ea69e56f2af243..ed81deb6d02858 100644 --- a/static/app/utils/timeSeries/useFetchEventsTimeSeries.tsx +++ b/static/app/utils/timeSeries/useFetchEventsTimeSeries.tsx @@ -3,8 +3,8 @@ import {useQuery} from '@tanstack/react-query'; import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {PageFilters} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {encodeSort} from 'sentry/utils/discover/eventView'; import type {Sort} from 'sentry/utils/discover/fields'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; diff --git a/static/app/utils/url/updateNullableLocation.ts b/static/app/utils/url/updateNullableLocation.ts index 131b230cdca103..0161b54a313015 100644 --- a/static/app/utils/url/updateNullableLocation.ts +++ b/static/app/utils/url/updateNullableLocation.ts @@ -1,6 +1,6 @@ import type {Location} from 'history'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; /** * @deprecated Use nuqs to manage query params instead. diff --git a/static/app/utils/url/useQueryParamState.tsx b/static/app/utils/url/useQueryParamState.tsx index 7b7e536285a987..0f1579c262b1e5 100644 --- a/static/app/utils/url/useQueryParamState.tsx +++ b/static/app/utils/url/useQueryParamState.tsx @@ -1,7 +1,7 @@ import {useCallback, useEffect, useState} from 'react'; import * as Sentry from '@sentry/react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeScalar, type decodeList, type decodeSorts} from 'sentry/utils/queryString'; import {useUrlBatchContext} from 'sentry/utils/url/urlParamBatchContext'; import {useLocationQuery} from 'sentry/utils/url/useLocationQuery'; diff --git a/static/app/utils/useAutoScroll.tsx b/static/app/utils/useAutoScroll.tsx index 77b53401eb0d50..5df1550d5e231d 100644 --- a/static/app/utils/useAutoScroll.tsx +++ b/static/app/utils/useAutoScroll.tsx @@ -1,6 +1,6 @@ import {useCallback, useEffect, useRef, type UIEventHandler} from 'react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; interface UseAutoScrollOptions { enabled: boolean; diff --git a/static/app/views/alerts/list/rules/alertRulesList.tsx b/static/app/views/alerts/list/rules/alertRulesList.tsx index ed2f41858e3953..4a11bb123da5ed 100644 --- a/static/app/views/alerts/list/rules/alertRulesList.tsx +++ b/static/app/views/alerts/list/rules/alertRulesList.tsx @@ -23,9 +23,9 @@ import {SentryDocumentTitle} from 'sentry/components/sentryDocumentTitle'; import {IconArrow} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; import {uniq} from 'sentry/utils/array/uniq'; +import {defined} from 'sentry/utils/defined'; import {VisuallyCompleteWithData} from 'sentry/utils/performanceForSentry'; import {Projects} from 'sentry/utils/projects'; import {useRouteAnalyticsEventNames} from 'sentry/utils/routeAnalytics/useRouteAnalyticsEventNames'; diff --git a/static/app/views/alerts/rules/metric/eapField.tsx b/static/app/views/alerts/rules/metric/eapField.tsx index e200278b8b2d0d..b37dc093254562 100644 --- a/static/app/views/alerts/rules/metric/eapField.tsx +++ b/static/app/views/alerts/rules/metric/eapField.tsx @@ -7,7 +7,7 @@ import {Select} from '@sentry/scraps/select'; import {t} from 'sentry/locale'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {parseFunction} from 'sentry/utils/discover/fields'; import { AggregationKey, diff --git a/static/app/views/alerts/rules/metric/ruleConditionsForm.tsx b/static/app/views/alerts/rules/metric/ruleConditionsForm.tsx index 361d27c243fae7..2977ea45fad7d1 100644 --- a/static/app/views/alerts/rules/metric/ruleConditionsForm.tsx +++ b/static/app/views/alerts/rules/metric/ruleConditionsForm.tsx @@ -43,7 +43,7 @@ import type {Tag, TagCollection} from 'sentry/types/group'; import type {InjectedRouter} from 'sentry/types/legacyReactRouter'; import type {Organization} from 'sentry/types/organization'; import type {Environment, Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isAggregateField, isMeasurement} from 'sentry/utils/discover/fields'; import {getDisplayName} from 'sentry/utils/environment'; import {DEVICE_CLASS_TAG_VALUES, FieldKind, isDeviceClass} from 'sentry/utils/fields'; diff --git a/static/app/views/alerts/rules/metric/ruleForm.tsx b/static/app/views/alerts/rules/metric/ruleForm.tsx index cb056dc74e8d3d..4d4e2011855fa4 100644 --- a/static/app/views/alerts/rules/metric/ruleForm.tsx +++ b/static/app/views/alerts/rules/metric/ruleForm.tsx @@ -40,8 +40,8 @@ import type { Organization, } from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {metric, trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import type {EventView} from 'sentry/utils/discover/eventView'; import { parseFunction, diff --git a/static/app/views/alerts/rules/metric/triggers/chart/thresholdsChart.tsx b/static/app/views/alerts/rules/metric/triggers/chart/thresholdsChart.tsx index d8d5803044fc2f..7927169bc0b78a 100644 --- a/static/app/views/alerts/rules/metric/triggers/chart/thresholdsChart.tsx +++ b/static/app/views/alerts/rules/metric/triggers/chart/thresholdsChart.tsx @@ -14,7 +14,7 @@ import {LineSeries} from 'sentry/components/charts/series/lineSeries'; import {DEFAULT_STATS_PERIOD} from 'sentry/constants'; import type {PageFilters} from 'sentry/types/core'; import type {Series} from 'sentry/types/echarts'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { axisLabelFormatterUsingAggregateOutputType, getDurationUnit, diff --git a/static/app/views/alerts/rules/metric/utils/determineSeriesSampleCount.tsx b/static/app/views/alerts/rules/metric/utils/determineSeriesSampleCount.tsx index 56480596ff838e..40d532a6e74a16 100644 --- a/static/app/views/alerts/rules/metric/utils/determineSeriesSampleCount.tsx +++ b/static/app/views/alerts/rules/metric/utils/determineSeriesSampleCount.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {TimeSeries} from 'sentry/views/dashboards/widgets/common/types'; export type SeriesSamplingInfo = { diff --git a/static/app/views/alerts/rules/metric/utils/hasThresholdValue.tsx b/static/app/views/alerts/rules/metric/utils/hasThresholdValue.tsx index efc95dbfbccaf8..e60765cdb10b70 100644 --- a/static/app/views/alerts/rules/metric/utils/hasThresholdValue.tsx +++ b/static/app/views/alerts/rules/metric/utils/hasThresholdValue.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; /** * A threshold has a value if it is not one of the following: diff --git a/static/app/views/alerts/rules/utils.tsx b/static/app/views/alerts/rules/utils.tsx index 0820e5a52bb29d..5ff9b49bd5b9a2 100644 --- a/static/app/views/alerts/rules/utils.tsx +++ b/static/app/views/alerts/rules/utils.tsx @@ -4,7 +4,7 @@ import {IdBadge} from 'sentry/components/idBadge'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {parseFunction} from 'sentry/utils/discover/fields'; import {isActiveSuperuser} from 'sentry/utils/isActiveSuperuser'; import {normalizeUrl} from 'sentry/utils/url/normalizeUrl'; diff --git a/static/app/views/alerts/utils/index.tsx b/static/app/views/alerts/utils/index.tsx index ea39d853cc77a2..8d2217990dead9 100644 --- a/static/app/views/alerts/utils/index.tsx +++ b/static/app/views/alerts/utils/index.tsx @@ -3,8 +3,8 @@ import round from 'lodash/round'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import {SessionFieldWithOperation} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {toArray} from 'sentry/utils/array/toArray'; +import {defined} from 'sentry/utils/defined'; import {axisLabelFormatter, tooltipFormatter} from 'sentry/utils/discover/charts'; import {aggregateOutputType} from 'sentry/utils/discover/fields'; import {formatMetricUsingUnit} from 'sentry/utils/number/formatMetricUsingUnit'; diff --git a/static/app/views/automations/components/connectedMonitorsList.tsx b/static/app/views/automations/components/connectedMonitorsList.tsx index f21aca18ef4e7a..90c4d897864b52 100644 --- a/static/app/views/automations/components/connectedMonitorsList.tsx +++ b/static/app/views/automations/components/connectedMonitorsList.tsx @@ -13,8 +13,8 @@ import {IssueCell} from 'sentry/components/workflowEngine/gridCell/issueCell'; import {t} from 'sentry/locale'; import type {Automation} from 'sentry/types/workflowEngine/automations'; import type {Detector} from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; import {selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; import {useOrganization} from 'sentry/utils/useOrganization'; import {DetectorLink} from 'sentry/views/detectors/components/detectorLink'; diff --git a/static/app/views/automations/detail.tsx b/static/app/views/automations/detail.tsx index 2bde170607bd69..2ba1b1bc086cfb 100644 --- a/static/app/views/automations/detail.tsx +++ b/static/app/views/automations/detail.tsx @@ -22,8 +22,8 @@ import {DetailSection} from 'sentry/components/workflowEngine/ui/detailSection'; import {IconEdit} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Automation} from 'sentry/types/workflowEngine/automations'; -import {defined} from 'sentry/utils'; import {getUtcDateString} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import {getDuration} from 'sentry/utils/duration/getDuration'; import {VisuallyCompleteWithData} from 'sentry/utils/performanceForSentry'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/automations/hooks/utils.tsx b/static/app/views/automations/hooks/utils.tsx index 47198c8a2e0c03..5c8f2f23268fe6 100644 --- a/static/app/views/automations/hooks/utils.tsx +++ b/static/app/views/automations/hooks/utils.tsx @@ -9,7 +9,7 @@ import { DataConditionGroupLogicType, DataConditionType, } from 'sentry/types/workflowEngine/dataConditions'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {AgeComparison} from 'sentry/views/automations/components/actionFilters/constants'; import type {ConflictingConditions} from 'sentry/views/automations/components/automationBuilderConflictContext'; diff --git a/static/app/views/automations/utils/fetchIssueStreamDetectorIdsForProjects.ts b/static/app/views/automations/utils/fetchIssueStreamDetectorIdsForProjects.ts index d1376f2cadc498..3728c57bbc2caa 100644 --- a/static/app/views/automations/utils/fetchIssueStreamDetectorIdsForProjects.ts +++ b/static/app/views/automations/utils/fetchIssueStreamDetectorIdsForProjects.ts @@ -1,7 +1,7 @@ import type {QueryClient} from '@tanstack/react-query'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {detectorListApiOptions} from 'sentry/views/detectors/hooks'; export async function fetchIssueStreamDetectorIdsForProjects({ diff --git a/static/app/views/dashboards/controls.tsx b/static/app/views/dashboards/controls.tsx index 5fd707d7085ddb..36c69b64351bd0 100644 --- a/static/app/views/dashboards/controls.tsx +++ b/static/app/views/dashboards/controls.tsx @@ -16,8 +16,8 @@ import {LoadingIndicator} from 'sentry/components/loadingIndicator'; import {IconAdd, IconCopy, IconDownload, IconEdit, IconStar} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {normalizeUrl} from 'sentry/utils/url/normalizeUrl'; import {useApi} from 'sentry/utils/useApi'; import {useNavigate} from 'sentry/utils/useNavigate'; diff --git a/static/app/views/dashboards/dashboard.tsx b/static/app/views/dashboards/dashboard.tsx index cb86a27c79aa4d..bd311376382253 100644 --- a/static/app/views/dashboards/dashboard.tsx +++ b/static/app/views/dashboards/dashboard.tsx @@ -18,8 +18,8 @@ import {loadOrganizationTags} from 'sentry/actionCreators/tags'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {IconResize} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {DatasetSource} from 'sentry/utils/discover/types'; import {scheduleMicroTask} from 'sentry/utils/scheduleMicroTask'; import {useApi} from 'sentry/utils/useApi'; diff --git a/static/app/views/dashboards/dashboardRevisions.tsx b/static/app/views/dashboards/dashboardRevisions.tsx index 917c3aff9a2ec6..cd1a3dec376f5d 100644 --- a/static/app/views/dashboards/dashboardRevisions.tsx +++ b/static/app/views/dashboards/dashboardRevisions.tsx @@ -13,7 +13,7 @@ import type {ModalRenderProps} from 'sentry/actionCreators/modal'; import {LoadingIndicator} from 'sentry/components/loadingIndicator'; import {IconClock} from 'sentry/icons/iconClock'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {testableWindowLocation} from 'sentry/utils/testableWindowLocation'; import {useApi} from 'sentry/utils/useApi'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/dashboards/datasetConfig/traceMetrics.tsx b/static/app/views/dashboards/datasetConfig/traceMetrics.tsx index 328e8e82f44e93..64246f9ac45f03 100644 --- a/static/app/views/dashboards/datasetConfig/traceMetrics.tsx +++ b/static/app/views/dashboards/datasetConfig/traceMetrics.tsx @@ -3,8 +3,8 @@ import pickBy from 'lodash/pickBy'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {TagCollection} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import type {CustomMeasurementCollection} from 'sentry/utils/customMeasurements/customMeasurements'; +import {defined} from 'sentry/utils/defined'; import type {EventsTableData} from 'sentry/utils/discover/discoverQuery'; import {getFieldRenderer} from 'sentry/utils/discover/fieldRenderers'; import { diff --git a/static/app/views/dashboards/detail.tsx b/static/app/views/dashboards/detail.tsx index aec57c8eee296e..529afee98409bf 100644 --- a/static/app/views/dashboards/detail.tsx +++ b/static/app/views/dashboards/detail.tsx @@ -39,8 +39,8 @@ import {USING_CUSTOMER_DOMAIN} from 'sentry/constants'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {MetricsCardinalityProvider} from 'sentry/utils/performance/contexts/metricsCardinality'; import {MetricsResultsMetaProvider} from 'sentry/utils/performance/contexts/metricsEnhancedPerformanceDataContext'; diff --git a/static/app/views/dashboards/editAccessSelector.tsx b/static/app/views/dashboards/editAccessSelector.tsx index 44695afbb6f4be..8ea4892b355d58 100644 --- a/static/app/views/dashboards/editAccessSelector.tsx +++ b/static/app/views/dashboards/editAccessSelector.tsx @@ -19,8 +19,8 @@ import {DEFAULT_DEBOUNCE_DURATION} from 'sentry/constants'; import {t, tct} from 'sentry/locale'; import type {Team} from 'sentry/types/organization'; import type {User} from 'sentry/types/user'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useTeams} from 'sentry/utils/useTeams'; import {useTeamsById} from 'sentry/utils/useTeamsById'; diff --git a/static/app/views/dashboards/filtersBar.tsx b/static/app/views/dashboards/filtersBar.tsx index d1a21e48594e3f..419194342bb7b6 100644 --- a/static/app/views/dashboards/filtersBar.tsx +++ b/static/app/views/dashboards/filtersBar.tsx @@ -25,8 +25,8 @@ import {IconAdd, IconClock} from 'sentry/icons'; import {t} from 'sentry/locale'; import {DataCategory} from 'sentry/types/core'; import type {User} from 'sentry/types/user'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {useMaxPickableDays} from 'sentry/utils/useMaxPickableDays'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useUser} from 'sentry/utils/useUser'; diff --git a/static/app/views/dashboards/layoutUtils.tsx b/static/app/views/dashboards/layoutUtils.tsx index 2cdc3ba307f896..09b5591757e932 100644 --- a/static/app/views/dashboards/layoutUtils.tsx +++ b/static/app/views/dashboards/layoutUtils.tsx @@ -6,7 +6,7 @@ import pickBy from 'lodash/pickBy'; import sortBy from 'lodash/sortBy'; import zip from 'lodash/zip'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {uniqueId} from 'sentry/utils/guid'; import {NUM_DESKTOP_COLS} from 'sentry/views/dashboards/constants'; diff --git a/static/app/views/dashboards/manage/dashboardGrid.tsx b/static/app/views/dashboards/manage/dashboardGrid.tsx index fe3ea6d6da61db..7046937d9a70f8 100644 --- a/static/app/views/dashboards/manage/dashboardGrid.tsx +++ b/static/app/views/dashboards/manage/dashboardGrid.tsx @@ -16,8 +16,8 @@ import {TimeSince} from 'sentry/components/timeSince'; import {IconEllipsis} from 'sentry/icons'; import {t, tn} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {withApi} from 'sentry/utils/withApi'; import {DashboardCreateLimitWrapper} from 'sentry/views/dashboards/createLimitWrapper'; import {useDeleteDashboard} from 'sentry/views/dashboards/hooks/useDeleteDashboard'; diff --git a/static/app/views/dashboards/manage/dashboardTable.tsx b/static/app/views/dashboards/manage/dashboardTable.tsx index 97c20d5e7223ae..313ef7743fd47a 100644 --- a/static/app/views/dashboards/manage/dashboardTable.tsx +++ b/static/app/views/dashboards/manage/dashboardTable.tsx @@ -30,8 +30,8 @@ import {TimeSince} from 'sentry/components/timeSince'; import {IconCopy, IconDelete, IconStar} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {decodeScalar} from 'sentry/utils/queryString'; import {withApi} from 'sentry/utils/withApi'; import {DashboardCreateLimitWrapper} from 'sentry/views/dashboards/createLimitWrapper'; diff --git a/static/app/views/dashboards/manage/gridPreview/index.tsx b/static/app/views/dashboards/manage/gridPreview/index.tsx index 2f7fc9632072e0..d0f6376aa7f947 100644 --- a/static/app/views/dashboards/manage/gridPreview/index.tsx +++ b/static/app/views/dashboards/manage/gridPreview/index.tsx @@ -4,7 +4,7 @@ import GridLayout, {WidthProvider} from 'react-grid-layout'; import {useTheme} from '@emotion/react'; import styled from '@emotion/styled'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { assignDefaultLayout, calculateColumnDepths, diff --git a/static/app/views/dashboards/releasesSelectControl.tsx b/static/app/views/dashboards/releasesSelectControl.tsx index fdd29fbe31d76c..12b794ad2ea471 100644 --- a/static/app/views/dashboards/releasesSelectControl.tsx +++ b/static/app/views/dashboards/releasesSelectControl.tsx @@ -14,7 +14,7 @@ import {DEFAULT_DEBOUNCE_DURATION} from 'sentry/constants'; import {RELEASES_SORT_OPTIONS, ReleasesSortOption} from 'sentry/constants/releases'; import {IconReleases} from 'sentry/icons'; import {t, tct, tn} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useReleases} from './hooks/useReleases'; import type {DashboardFilters} from './types'; diff --git a/static/app/views/dashboards/utils.tsx b/static/app/views/dashboards/utils.tsx index 49f3d37079cdc5..e62dc6a33e74b8 100644 --- a/static/app/views/dashboards/utils.tsx +++ b/static/app/views/dashboards/utils.tsx @@ -18,8 +18,8 @@ import {normalizeDateTimeString} from 'sentry/components/pageFilters/parse'; import {t} from 'sentry/locale'; import type {PageFilters} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {getUtcDateString} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {DURATION_UNITS} from 'sentry/utils/discover/fieldRenderers'; import { diff --git a/static/app/views/dashboards/utils/getWidgetExploreUrl.tsx b/static/app/views/dashboards/utils/getWidgetExploreUrl.tsx index 37ef8a8cec0597..6b1bc6c25d4fd5 100644 --- a/static/app/views/dashboards/utils/getWidgetExploreUrl.tsx +++ b/static/app/views/dashboards/utils/getWidgetExploreUrl.tsx @@ -2,7 +2,7 @@ import trimStart from 'lodash/trimStart'; import type {PageFilters} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { getAggregateAlias, getEquationAliasIndex, diff --git a/static/app/views/dashboards/utils/getWidgetMetricsUrl.tsx b/static/app/views/dashboards/utils/getWidgetMetricsUrl.tsx index cab94c1d388655..419647798b2793 100644 --- a/static/app/views/dashboards/utils/getWidgetMetricsUrl.tsx +++ b/static/app/views/dashboards/utils/getWidgetMetricsUrl.tsx @@ -1,6 +1,6 @@ import type {PageFilters} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {explodeFieldString, isEquation} from 'sentry/utils/discover/fields'; import {decodeSorts} from 'sentry/utils/queryString'; import type {DashboardFilters, Widget} from 'sentry/views/dashboards/types'; diff --git a/static/app/views/dashboards/utils/transformSessionsResponseToSeries.tsx b/static/app/views/dashboards/utils/transformSessionsResponseToSeries.tsx index 439aef2ec0de9e..b71353826053e0 100644 --- a/static/app/views/dashboards/utils/transformSessionsResponseToSeries.tsx +++ b/static/app/views/dashboards/utils/transformSessionsResponseToSeries.tsx @@ -1,7 +1,7 @@ import {t} from 'sentry/locale'; import type {Series} from 'sentry/types/echarts'; import type {SessionApiResponse} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {WidgetQuery} from 'sentry/views/dashboards/types'; import {DERIVED_STATUS_METRICS_PATTERN} from 'sentry/views/dashboards/widgetBuilder/releaseWidget/fields'; import { diff --git a/static/app/views/dashboards/utils/usePopulateLinkedDashboards.tsx b/static/app/views/dashboards/utils/usePopulateLinkedDashboards.tsx index ab49aa41162b97..98f3db07643c88 100644 --- a/static/app/views/dashboards/utils/usePopulateLinkedDashboards.tsx +++ b/static/app/views/dashboards/utils/usePopulateLinkedDashboards.tsx @@ -2,8 +2,8 @@ import {useMemo} from 'react'; import type {QueryClient} from '@tanstack/react-query'; import {useQuery} from '@tanstack/react-query'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import { DashboardFilter, diff --git a/static/app/views/dashboards/widgetBuilder/buildSteps/groupByStep/groupBySelector.tsx b/static/app/views/dashboards/widgetBuilder/buildSteps/groupByStep/groupBySelector.tsx index 6e729bcff9a100..b7324b38607c6c 100644 --- a/static/app/views/dashboards/widgetBuilder/buildSteps/groupByStep/groupBySelector.tsx +++ b/static/app/views/dashboards/widgetBuilder/buildSteps/groupByStep/groupBySelector.tsx @@ -9,9 +9,9 @@ import {Button} from '@sentry/scraps/button'; import {OnDemandWarningIcon} from 'sentry/components/alerts/onDemandMetricAlert'; import {FieldGroup} from 'sentry/components/forms/fieldGroup'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {WidgetBuilderVersion} from 'sentry/utils/analytics/dashboardsAnalyticsEvents'; +import {defined} from 'sentry/utils/defined'; import type {QueryFieldValue} from 'sentry/utils/discover/fields'; import {generateFieldAsString} from 'sentry/utils/discover/fields'; import type {FieldValueType} from 'sentry/utils/fields'; diff --git a/static/app/views/dashboards/widgetBuilder/components/saveButton.tsx b/static/app/views/dashboards/widgetBuilder/components/saveButton.tsx index 4df39f7fcbece8..fd17be13519590 100644 --- a/static/app/views/dashboards/widgetBuilder/components/saveButton.tsx +++ b/static/app/views/dashboards/widgetBuilder/components/saveButton.tsx @@ -5,9 +5,9 @@ import {Button} from '@sentry/scraps/button'; import {validateWidget} from 'sentry/actionCreators/dashboards'; import {addErrorMessage} from 'sentry/actionCreators/indicator'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {WidgetBuilderVersion} from 'sentry/utils/analytics/dashboardsAnalyticsEvents'; +import {defined} from 'sentry/utils/defined'; import {DatasetSource} from 'sentry/utils/discover/types'; import {useApi} from 'sentry/utils/useApi'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/dashboards/widgetBuilder/components/thresholds.tsx b/static/app/views/dashboards/widgetBuilder/components/thresholds.tsx index c83a4920846444..9b7ad166b3a568 100644 --- a/static/app/views/dashboards/widgetBuilder/components/thresholds.tsx +++ b/static/app/views/dashboards/widgetBuilder/components/thresholds.tsx @@ -2,7 +2,7 @@ import {Fragment, useEffect, useRef} from 'react'; import cloneDeep from 'lodash/cloneDeep'; import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { HighlightedText, Thresholds, diff --git a/static/app/views/dashboards/widgetBuilder/components/visualize/index.tsx b/static/app/views/dashboards/widgetBuilder/components/visualize/index.tsx index 8cc291c4c73e06..8dc72d649d2be0 100644 --- a/static/app/views/dashboards/widgetBuilder/components/visualize/index.tsx +++ b/static/app/views/dashboards/widgetBuilder/components/visualize/index.tsx @@ -17,9 +17,9 @@ import {FieldGroup} from 'sentry/components/forms/fieldGroup'; import {IconDelete} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import type {SelectValue} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {WidgetBuilderVersion} from 'sentry/utils/analytics/dashboardsAnalyticsEvents'; +import {defined} from 'sentry/utils/defined'; import { DEPRECATED_FIELDS, generateFieldAsString, diff --git a/static/app/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/index.tsx b/static/app/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/index.tsx index 3184627498a9c6..7662509487ee2f 100644 --- a/static/app/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/index.tsx +++ b/static/app/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/index.tsx @@ -1,6 +1,6 @@ import {type RefObject, useMemo, useState} from 'react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {generateFieldAsString} from 'sentry/utils/discover/fields'; import {useOrganization} from 'sentry/utils/useOrganization'; import {MetricQueryRows} from 'sentry/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/metricQueryRows'; diff --git a/static/app/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/metricQueryRows.tsx b/static/app/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/metricQueryRows.tsx index 5ea28690f39c57..2211c2730a7c4c 100644 --- a/static/app/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/metricQueryRows.tsx +++ b/static/app/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/metricQueryRows.tsx @@ -6,7 +6,7 @@ import {Flex, Stack} from '@sentry/scraps/layout'; import {Expression} from 'sentry/components/arithmeticBuilder/expression'; import {IconAdd} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {generateFieldAsString} from 'sentry/utils/discover/fields'; import {BuilderStateMetricsQueryParamsProvider} from 'sentry/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/builderStateMetricsQueryParamsProvider'; import {MetricToolbar} from 'sentry/views/dashboards/widgetBuilder/components/visualize/traceMetrics/metricsEquationVisualize/metricToolbar'; diff --git a/static/app/views/dashboards/widgetBuilder/hooks/useDashboardWidgetSource.tsx b/static/app/views/dashboards/widgetBuilder/hooks/useDashboardWidgetSource.tsx index b547eb386211e5..0db0bdd59802b9 100644 --- a/static/app/views/dashboards/widgetBuilder/hooks/useDashboardWidgetSource.tsx +++ b/static/app/views/dashboards/widgetBuilder/hooks/useDashboardWidgetSource.tsx @@ -1,6 +1,6 @@ import {parseAsString, useQueryState} from 'nuqs'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {DashboardWidgetSource} from 'sentry/views/dashboards/types'; export function useDashboardWidgetSource(): DashboardWidgetSource | '' { diff --git a/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderState.tsx b/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderState.tsx index a4fe6dd0f260fd..41789701e0b807 100644 --- a/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderState.tsx +++ b/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderState.tsx @@ -1,7 +1,7 @@ import {useCallback, useMemo} from 'react'; import partition from 'lodash/partition'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { explodeField, generateFieldAsString, diff --git a/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderTraceItemConfig.ts b/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderTraceItemConfig.ts index c7f7a2bfe3cc95..4beaa55bbdd447 100644 --- a/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderTraceItemConfig.ts +++ b/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderTraceItemConfig.ts @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {WidgetType} from 'sentry/views/dashboards/types'; import {useWidgetBuilderContext} from 'sentry/views/dashboards/widgetBuilder/contexts/widgetBuilderContext'; diff --git a/static/app/views/dashboards/widgetBuilder/releaseWidget/fields.tsx b/static/app/views/dashboards/widgetBuilder/releaseWidget/fields.tsx index db448623b85a63..98e16e11988155 100644 --- a/static/app/views/dashboards/widgetBuilder/releaseWidget/fields.tsx +++ b/static/app/views/dashboards/widgetBuilder/releaseWidget/fields.tsx @@ -8,7 +8,7 @@ import type { SessionsOperation, } from 'sentry/types/sessions'; import {SessionField} from 'sentry/types/sessions'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {FieldValue} from 'sentry/views/discover/table/types'; import {FieldValueKind} from 'sentry/views/discover/table/types'; diff --git a/static/app/views/dashboards/widgetBuilder/utils/buildTraceMetricAggregate.ts b/static/app/views/dashboards/widgetBuilder/utils/buildTraceMetricAggregate.ts index 617830e1400fde..3a1926d60f439a 100644 --- a/static/app/views/dashboards/widgetBuilder/utils/buildTraceMetricAggregate.ts +++ b/static/app/views/dashboards/widgetBuilder/utils/buildTraceMetricAggregate.ts @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type { AggregationKeyWithAlias, Column, diff --git a/static/app/views/dashboards/widgetBuilder/utils/convertBuilderStateToWidget.ts b/static/app/views/dashboards/widgetBuilder/utils/convertBuilderStateToWidget.ts index c43393f77c1a09..8f728f16f54326 100644 --- a/static/app/views/dashboards/widgetBuilder/utils/convertBuilderStateToWidget.ts +++ b/static/app/views/dashboards/widgetBuilder/utils/convertBuilderStateToWidget.ts @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { generateFieldAsString, getEquation, diff --git a/static/app/views/dashboards/widgetBuilder/utils/convertWidgetToBuilderStateParams.ts b/static/app/views/dashboards/widgetBuilder/utils/convertWidgetToBuilderStateParams.ts index d409a6052b4b1f..69e65eca5d7d0f 100644 --- a/static/app/views/dashboards/widgetBuilder/utils/convertWidgetToBuilderStateParams.ts +++ b/static/app/views/dashboards/widgetBuilder/utils/convertWidgetToBuilderStateParams.ts @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {explodeField, isEquation} from 'sentry/utils/discover/fields'; import {decodeSorts} from 'sentry/utils/queryString'; import { diff --git a/static/app/views/dashboards/widgetCard/chart.tsx b/static/app/views/dashboards/widgetCard/chart.tsx index 02fa9802828f85..4f7e01b1a04f27 100644 --- a/static/app/views/dashboards/widgetCard/chart.tsx +++ b/static/app/views/dashboards/widgetCard/chart.tsx @@ -16,8 +16,8 @@ import {t} from 'sentry/locale'; import type {PageFilters} from 'sentry/types/core'; import type {EChartDataZoomHandler, EChartEventHandler} from 'sentry/types/echarts'; import type {Confidence} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {transformTableToCategoricalSeries} from 'sentry/utils/categoricalTimeSeries/transformTableToCategoricalSeries'; +import {defined} from 'sentry/utils/defined'; import type {EventsMetaType, MetaType} from 'sentry/utils/discover/eventView'; import type {RenderFunctionBaggage} from 'sentry/utils/discover/fieldRenderers'; import type {AggregationOutputType, DataUnit, Sort} from 'sentry/utils/discover/fields'; diff --git a/static/app/views/dashboards/widgetCard/confidenceFooter.tsx b/static/app/views/dashboards/widgetCard/confidenceFooter.tsx index 5d8aca26f67d9a..d356ad1b9ce47b 100644 --- a/static/app/views/dashboards/widgetCard/confidenceFooter.tsx +++ b/static/app/views/dashboards/widgetCard/confidenceFooter.tsx @@ -2,7 +2,7 @@ import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {PageFilters} from 'sentry/types/core'; import type {Series, SeriesDataUnit} from 'sentry/types/echarts'; import type {Confidence} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {determineSeriesSampleCountAndIsSampled} from 'sentry/views/alerts/rules/metric/utils/determineSeriesSampleCount'; import {DisplayType, WidgetType, type Widget} from 'sentry/views/dashboards/types'; import type {TimeSeries} from 'sentry/views/dashboards/widgets/common/types'; diff --git a/static/app/views/dashboards/widgetCard/hooks/useErrorsAndTransactionsWidgetQuery.tsx b/static/app/views/dashboards/widgetCard/hooks/useErrorsAndTransactionsWidgetQuery.tsx index ddf36b46e5f1f8..44d38bfdec44e1 100644 --- a/static/app/views/dashboards/widgetCard/hooks/useErrorsAndTransactionsWidgetQuery.tsx +++ b/static/app/views/dashboards/widgetCard/hooks/useErrorsAndTransactionsWidgetQuery.tsx @@ -8,10 +8,10 @@ import type { GroupedMultiSeriesEventsStats, MultiSeriesEventsStats, } from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {apiFetch, type ApiResponse} from 'sentry/utils/api/apiFetch'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; import {getUtcDateString} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import type { EventsTableData, TableData, diff --git a/static/app/views/dashboards/widgetCard/hooks/useTransactionsWidgetQuery.tsx b/static/app/views/dashboards/widgetCard/hooks/useTransactionsWidgetQuery.tsx index b7a9061fab9ee7..5775a901f7152e 100644 --- a/static/app/views/dashboards/widgetCard/hooks/useTransactionsWidgetQuery.tsx +++ b/static/app/views/dashboards/widgetCard/hooks/useTransactionsWidgetQuery.tsx @@ -9,10 +9,10 @@ import type { GroupedMultiSeriesEventsStats, MultiSeriesEventsStats, } from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {apiFetch, type ApiResponse} from 'sentry/utils/api/apiFetch'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; import {getUtcDateString} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import type { EventsTableData, TableData, diff --git a/static/app/views/dashboards/widgetCard/hooks/useWidgetRawCounts.tsx b/static/app/views/dashboards/widgetCard/hooks/useWidgetRawCounts.tsx index f8ac6f5ef5e51a..872be5480e7ea0 100644 --- a/static/app/views/dashboards/widgetCard/hooks/useWidgetRawCounts.tsx +++ b/static/app/views/dashboards/widgetCard/hooks/useWidgetRawCounts.tsx @@ -1,7 +1,7 @@ import {useMemo} from 'react'; import type {PageFilters} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {explodeFieldString} from 'sentry/utils/discover/fields'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {DisplayType, WidgetType, type Widget} from 'sentry/views/dashboards/types'; diff --git a/static/app/views/dashboards/widgetCard/hooks/utils/getStaleTime.ts b/static/app/views/dashboards/widgetCard/hooks/utils/getStaleTime.ts index 022c6421db0301..144920e99673ca 100644 --- a/static/app/views/dashboards/widgetCard/hooks/utils/getStaleTime.ts +++ b/static/app/views/dashboards/widgetCard/hooks/utils/getStaleTime.ts @@ -1,6 +1,6 @@ import {getDiffInMinutes} from 'sentry/components/charts/utils'; import type {PageFilters} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {RangeMap} from 'sentry/utils/number/rangeMap'; export function getWidgetStaleTime(pageFilters: PageFilters) { diff --git a/static/app/views/dashboards/widgetCard/logsWidgetQueries.tsx b/static/app/views/dashboards/widgetCard/logsWidgetQueries.tsx index 7be0f462aefd7d..3ceb17ff8dae6b 100644 --- a/static/app/views/dashboards/widgetCard/logsWidgetQueries.tsx +++ b/static/app/views/dashboards/widgetCard/logsWidgetQueries.tsx @@ -7,8 +7,8 @@ import type { GroupedMultiSeriesEventsStats, MultiSeriesEventsStats, } from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {dedupeArray} from 'sentry/utils/dedupeArray'; +import {defined} from 'sentry/utils/defined'; import type {EventsTableData, TableData} from 'sentry/utils/discover/discoverQuery'; import {getDynamicText} from 'sentry/utils/getDynamicText'; import {determineSeriesSampleCountAndIsSampled} from 'sentry/views/alerts/rules/metric/utils/determineSeriesSampleCount'; diff --git a/static/app/views/dashboards/widgetCard/spansWidgetQueries.tsx b/static/app/views/dashboards/widgetCard/spansWidgetQueries.tsx index 3ca44440e74bde..b0b559b25c444e 100644 --- a/static/app/views/dashboards/widgetCard/spansWidgetQueries.tsx +++ b/static/app/views/dashboards/widgetCard/spansWidgetQueries.tsx @@ -7,8 +7,8 @@ import type { GroupedMultiSeriesEventsStats, MultiSeriesEventsStats, } from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {dedupeArray} from 'sentry/utils/dedupeArray'; +import {defined} from 'sentry/utils/defined'; import type {EventsTableData, TableData} from 'sentry/utils/discover/discoverQuery'; import {getDynamicText} from 'sentry/utils/getDynamicText'; import {determineSeriesSampleCountAndIsSampled} from 'sentry/views/alerts/rules/metric/utils/determineSeriesSampleCount'; diff --git a/static/app/views/dashboards/widgetCard/visualizationWidget.tsx b/static/app/views/dashboards/widgetCard/visualizationWidget.tsx index 5d3034d1c8c001..c5703ca3262d7d 100644 --- a/static/app/views/dashboards/widgetCard/visualizationWidget.tsx +++ b/static/app/views/dashboards/widgetCard/visualizationWidget.tsx @@ -10,7 +10,7 @@ import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {PageFilters} from 'sentry/types/core'; import type {EChartDataZoomHandler, Series} from 'sentry/types/echarts'; import type {Confidence} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {TableDataWithTitle} from 'sentry/utils/discover/discoverQuery'; import type {AggregationOutputType, DataUnit, Sort} from 'sentry/utils/discover/fields'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; diff --git a/static/app/views/dashboards/widgets/bigNumberWidget/bigNumberWidgetVisualization.tsx b/static/app/views/dashboards/widgets/bigNumberWidget/bigNumberWidgetVisualization.tsx index b4260622b164ec..1a9117a943ddb0 100644 --- a/static/app/views/dashboards/widgets/bigNumberWidget/bigNumberWidgetVisualization.tsx +++ b/static/app/views/dashboards/widgets/bigNumberWidget/bigNumberWidgetVisualization.tsx @@ -4,7 +4,7 @@ import styled from '@emotion/styled'; import {Tooltip} from '@sentry/scraps/tooltip'; import type {Polarity} from 'sentry/components/percentChange'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {MetaType} from 'sentry/utils/discover/eventView'; import {getFieldRenderer} from 'sentry/utils/discover/fieldRenderers'; import {useLocation} from 'sentry/utils/useLocation'; diff --git a/static/app/views/dashboards/widgets/categoricalSeriesWidget/categoricalSeriesWidgetVisualization.tsx b/static/app/views/dashboards/widgets/categoricalSeriesWidget/categoricalSeriesWidgetVisualization.tsx index ebd0f8ae4c8b7b..29ee951b0a7a6e 100644 --- a/static/app/views/dashboards/widgets/categoricalSeriesWidget/categoricalSeriesWidgetVisualization.tsx +++ b/static/app/views/dashboards/widgets/categoricalSeriesWidget/categoricalSeriesWidgetVisualization.tsx @@ -18,8 +18,8 @@ import type { EChartHighlightHandler, ReactEchartsRef, } from 'sentry/types/echarts'; -import {defined} from 'sentry/utils'; import {uniq} from 'sentry/utils/array/uniq'; +import {defined} from 'sentry/utils/defined'; import type {AggregationOutputType} from 'sentry/utils/discover/fields'; import {RangeMap, type Range} from 'sentry/utils/number/rangeMap'; import {trimCommonAffixes} from 'sentry/utils/string/trimCommonAffixes'; diff --git a/static/app/views/dashboards/widgets/common/typePredicates.tsx b/static/app/views/dashboards/widgets/common/typePredicates.tsx index ce29ae45e54c1b..8d5bf4dfb10c3a 100644 --- a/static/app/views/dashboards/widgets/common/typePredicates.tsx +++ b/static/app/views/dashboards/widgets/common/typePredicates.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {DurationUnit, RateUnit, SizeUnit} from 'sentry/utils/discover/fields'; import type {PlottableTimeSeriesValueType} from 'sentry/views/dashboards/widgets/timeSeriesWidget/plottables/plottable'; diff --git a/static/app/views/dashboards/widgets/heatMapWidget/heatMapWidgetVisualization.tsx b/static/app/views/dashboards/widgets/heatMapWidget/heatMapWidgetVisualization.tsx index c0fd17641c765b..c74a3daa71ee3a 100644 --- a/static/app/views/dashboards/widgets/heatMapWidget/heatMapWidgetVisualization.tsx +++ b/static/app/views/dashboards/widgets/heatMapWidget/heatMapWidgetVisualization.tsx @@ -17,7 +17,7 @@ import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {t} from 'sentry/locale'; import type {PageFilters} from 'sentry/types/core'; import type {ReactEchartsRef} from 'sentry/types/echarts'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {formatAbbreviatedNumber} from 'sentry/utils/formatters'; import {ECHARTS_MISSING_DATA_VALUE} from 'sentry/utils/timeSeries/timeSeriesItemToEChartsDataPoint'; import {useNavigate} from 'sentry/utils/useNavigate'; diff --git a/static/app/views/dashboards/widgets/tableWidget/tableWidgetVisualization.tsx b/static/app/views/dashboards/widgets/tableWidget/tableWidgetVisualization.tsx index d77b67f4bcef59..19d7da27b81ee7 100644 --- a/static/app/views/dashboards/widgets/tableWidget/tableWidgetVisualization.tsx +++ b/static/app/views/dashboards/widgets/tableWidget/tableWidgetVisualization.tsx @@ -6,8 +6,8 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {COL_WIDTH_UNDEFINED, GridEditable} from 'sentry/components/tables/gridEditable'; import {SortLink} from 'sentry/components/tables/gridEditable/sortLink'; import {IconStar} from 'sentry/icons'; -import {defined} from 'sentry/utils'; import {getSortField} from 'sentry/utils/dashboards/issueFieldRenderers'; +import {defined} from 'sentry/utils/defined'; import type {TableDataRow} from 'sentry/utils/discover/discoverQuery'; import type {MetaType} from 'sentry/utils/discover/eventView'; import type {RenderFunctionBaggage} from 'sentry/utils/discover/fieldRenderers'; diff --git a/static/app/views/dashboards/widgets/timeSeriesWidget/timeSeriesWidgetVisualization.tsx b/static/app/views/dashboards/widgets/timeSeriesWidget/timeSeriesWidgetVisualization.tsx index 80dcf0355c5f71..5369486b7d0463 100644 --- a/static/app/views/dashboards/widgets/timeSeriesWidget/timeSeriesWidgetVisualization.tsx +++ b/static/app/views/dashboards/widgets/timeSeriesWidget/timeSeriesWidgetVisualization.tsx @@ -30,7 +30,8 @@ import type { EChartHighlightHandler, ReactEchartsRef, } from 'sentry/types/echarts'; -import {defined, escape} from 'sentry/utils'; +import {escape} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {RangeMap, type Range} from 'sentry/utils/number/rangeMap'; import {useLocation} from 'sentry/utils/useLocation'; import {useNavigate} from 'sentry/utils/useNavigate'; diff --git a/static/app/views/dashboards/widgets/wheelWidget/wheelWidgetVisualization.tsx b/static/app/views/dashboards/widgets/wheelWidget/wheelWidgetVisualization.tsx index 06c83ad40a69b5..df99eb7ec523fb 100644 --- a/static/app/views/dashboards/widgets/wheelWidget/wheelWidgetVisualization.tsx +++ b/static/app/views/dashboards/widgets/wheelWidget/wheelWidgetVisualization.tsx @@ -2,7 +2,7 @@ import {useTheme} from '@emotion/react'; import {Flex} from '@sentry/scraps/layout'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {TableDataWithTitle} from 'sentry/utils/discover/discoverQuery'; import {PerformanceScoreRingWithTooltips} from 'sentry/views/insights/browser/webVitals/components/performanceScoreRingWithTooltips'; import { diff --git a/static/app/views/dashboards/widgets/widget/widget.tsx b/static/app/views/dashboards/widgets/widget/widget.tsx index 393d2f7ad89df1..e739c9cfb23ab5 100644 --- a/static/app/views/dashboards/widgets/widget/widget.tsx +++ b/static/app/views/dashboards/widgets/widget/widget.tsx @@ -5,7 +5,7 @@ import styled from '@emotion/styled'; import {Container, Flex} from '@sentry/scraps/layout'; import {ErrorBoundary} from 'sentry/components/errorBoundary'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {MIN_HEIGHT, MIN_WIDTH} from 'sentry/views/dashboards/widgets/common/settings'; import {WidgetDescription} from './widgetDescription'; diff --git a/static/app/views/detectors/components/details/metric/getDetectorOpenInDestination.tsx b/static/app/views/detectors/components/details/metric/getDetectorOpenInDestination.tsx index 412f029c4ff176..64e406754aa2f1 100644 --- a/static/app/views/detectors/components/details/metric/getDetectorOpenInDestination.tsx +++ b/static/app/views/detectors/components/details/metric/getDetectorOpenInDestination.tsx @@ -3,7 +3,7 @@ import type {LocationDescriptor} from 'history'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {SnubaQuery} from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {getAggregateAlias, parseFunction} from 'sentry/utils/discover/fields'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; diff --git a/static/app/views/detectors/components/detectorLink.tsx b/static/app/views/detectors/components/detectorLink.tsx index c3cdb03a011eb1..6b0cb8e091bc09 100644 --- a/static/app/views/detectors/components/detectorLink.tsx +++ b/static/app/views/detectors/components/detectorLink.tsx @@ -21,7 +21,7 @@ import type { PreprodDetector, UptimeDetector, } from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getDuration} from 'sentry/utils/duration/getDuration'; import {middleEllipsis} from 'sentry/utils/string/middleEllipsis'; import {unreachable} from 'sentry/utils/unreachable'; diff --git a/static/app/views/detectors/components/detectorListTable/detectorListRow.tsx b/static/app/views/detectors/components/detectorListTable/detectorListRow.tsx index 43056f88ff8a63..4350845bdf066d 100644 --- a/static/app/views/detectors/components/detectorListTable/detectorListRow.tsx +++ b/static/app/views/detectors/components/detectorListTable/detectorListRow.tsx @@ -8,7 +8,7 @@ import {Placeholder} from 'sentry/components/placeholder'; import {SimpleTable} from 'sentry/components/tables/simpleTable'; import {IssueCell} from 'sentry/components/workflowEngine/gridCell/issueCell'; import type {Detector} from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {DetectorLink} from 'sentry/views/detectors/components/detectorLink'; import {DetectorListConnectedAutomations} from 'sentry/views/detectors/components/detectorListConnectedAutomations'; import {DetectorAssigneeCell} from 'sentry/views/detectors/components/detectorListTable/detectorAssigneeCell'; diff --git a/static/app/views/detectors/components/detectorListTable/index.tsx b/static/app/views/detectors/components/detectorListTable/index.tsx index 18ed1e3a48654a..5254af5ab632e7 100644 --- a/static/app/views/detectors/components/detectorListTable/index.tsx +++ b/static/app/views/detectors/components/detectorListTable/index.tsx @@ -26,7 +26,7 @@ import {SelectAllHeaderCheckbox} from 'sentry/components/workflowEngine/ui/selec import {IconChevron} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Detector} from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useDebouncedValue} from 'sentry/utils/useDebouncedValue'; import {useDimensions} from 'sentry/utils/useDimensions'; import {DetectorsTableActions} from 'sentry/views/detectors/components/detectorListTable/actions'; diff --git a/static/app/views/detectors/components/forms/cron/fields.tsx b/static/app/views/detectors/components/forms/cron/fields.tsx index 369d5b32c9e590..c19f1e0dbbc18f 100644 --- a/static/app/views/detectors/components/forms/cron/fields.tsx +++ b/static/app/views/detectors/components/forms/cron/fields.tsx @@ -3,7 +3,7 @@ import type { CronDetector, CronDetectorUpdatePayload, } from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { ScheduleType, type MonitorConfig, diff --git a/static/app/views/detectors/components/forms/metric/metricFormData.tsx b/static/app/views/detectors/components/forms/metric/metricFormData.tsx index 9fb74003325432..b1428f45ed6158 100644 --- a/static/app/views/detectors/components/forms/metric/metricFormData.tsx +++ b/static/app/views/detectors/components/forms/metric/metricFormData.tsx @@ -13,7 +13,7 @@ import type { MetricDetectorConfig, MetricDetectorUpdatePayload, } from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isEquation} from 'sentry/utils/discover/fields'; import {unreachable} from 'sentry/utils/unreachable'; import { diff --git a/static/app/views/detectors/components/forms/uptime/connectedAssertionSuggestionsButton.tsx b/static/app/views/detectors/components/forms/uptime/connectedAssertionSuggestionsButton.tsx index 81711d3140816f..707ac2dc3091ee 100644 --- a/static/app/views/detectors/components/forms/uptime/connectedAssertionSuggestionsButton.tsx +++ b/static/app/views/detectors/components/forms/uptime/connectedAssertionSuggestionsButton.tsx @@ -3,7 +3,7 @@ import {useContext, useRef} from 'react'; import type {ButtonProps} from '@sentry/scraps/button'; import {FormContext} from 'sentry/components/forms/formContext'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {AssertionSuggestionsButton} from 'sentry/views/alerts/rules/uptime/assertionSuggestionsButton'; import type {UptimeAssertion} from 'sentry/views/alerts/rules/uptime/types'; import {DEFAULT_UPTIME_DETECTOR_FORM_DATA_MAP} from 'sentry/views/detectors/components/forms/uptime/fields'; diff --git a/static/app/views/detectors/components/forms/uptime/connectedTestUptimeMonitorButton.tsx b/static/app/views/detectors/components/forms/uptime/connectedTestUptimeMonitorButton.tsx index ebfcca3aab4cb1..df753bafa584c8 100644 --- a/static/app/views/detectors/components/forms/uptime/connectedTestUptimeMonitorButton.tsx +++ b/static/app/views/detectors/components/forms/uptime/connectedTestUptimeMonitorButton.tsx @@ -3,7 +3,7 @@ import {useContext} from 'react'; import type {ButtonProps} from '@sentry/scraps/button'; import {FormContext} from 'sentry/components/forms/formContext'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {TestUptimeMonitorButton} from 'sentry/views/alerts/rules/uptime/testUptimeMonitorButton'; import {DEFAULT_UPTIME_DETECTOR_FORM_DATA_MAP} from 'sentry/views/detectors/components/forms/uptime/fields'; diff --git a/static/app/views/detectors/components/forms/uptime/fields.tsx b/static/app/views/detectors/components/forms/uptime/fields.tsx index 96fbe1cb4d0cd5..88a4cca2ce82da 100644 --- a/static/app/views/detectors/components/forms/uptime/fields.tsx +++ b/static/app/views/detectors/components/forms/uptime/fields.tsx @@ -3,7 +3,7 @@ import type { UptimeDetector, UptimeDetectorUpdatePayload, } from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {createEmptyAssertionRoot} from 'sentry/views/alerts/rules/uptime/assertions/field'; import type {UptimeAssertion} from 'sentry/views/alerts/rules/uptime/types'; import {UptimeMonitorMode} from 'sentry/views/alerts/rules/uptime/types'; diff --git a/static/app/views/detectors/detail.tsx b/static/app/views/detectors/detail.tsx index efaaebadcc0009..be5c3014ff9e78 100644 --- a/static/app/views/detectors/detail.tsx +++ b/static/app/views/detectors/detail.tsx @@ -4,7 +4,7 @@ import {SentryDocumentTitle} from 'sentry/components/sentryDocumentTitle'; import {useWorkflowEngineFeatureGate} from 'sentry/components/workflowEngine/useWorkflowEngineFeatureGate'; import {t} from 'sentry/locale'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {VisuallyCompleteWithData} from 'sentry/utils/performanceForSentry'; import {useParams} from 'sentry/utils/useParams'; import {useProjects} from 'sentry/utils/useProjects'; diff --git a/static/app/views/detectors/hooks/useOpenPeriods.tsx b/static/app/views/detectors/hooks/useOpenPeriods.tsx index 14c3c9321e3c58..307e3f07aa0b7d 100644 --- a/static/app/views/detectors/hooks/useOpenPeriods.tsx +++ b/static/app/views/detectors/hooks/useOpenPeriods.tsx @@ -2,8 +2,8 @@ import {queryOptions, useQuery} from '@tanstack/react-query'; import type {GroupOpenPeriod} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import type {QueryParamValue} from 'sentry/utils/useLocation'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/detectors/list/common/detectorListHeader.tsx b/static/app/views/detectors/list/common/detectorListHeader.tsx index 286f36c0e993f2..c584478702da9b 100644 --- a/static/app/views/detectors/list/common/detectorListHeader.tsx +++ b/static/app/views/detectors/list/common/detectorListHeader.tsx @@ -9,7 +9,7 @@ import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {IconAdd} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {DetectorType} from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {useNavigate} from 'sentry/utils/useNavigate'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/discover/breadcrumb.tsx b/static/app/views/discover/breadcrumb.tsx index 6cef42702a68b4..e6c05c0022775e 100644 --- a/static/app/views/discover/breadcrumb.tsx +++ b/static/app/views/discover/breadcrumb.tsx @@ -6,7 +6,7 @@ import {Breadcrumbs} from 'sentry/components/breadcrumbs'; import {t} from 'sentry/locale'; import type {Event} from 'sentry/types/event'; import type {Organization, SavedQuery} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {EventView} from 'sentry/utils/discover/eventView'; import {getDiscoverLandingUrl} from 'sentry/utils/discover/urls'; import {EventInputName} from 'sentry/views/discover/eventInputName'; diff --git a/static/app/views/discover/results.tsx b/static/app/views/discover/results.tsx index 5a8660148e71ec..91319e914a0c47 100644 --- a/static/app/views/discover/results.tsx +++ b/static/app/views/discover/results.tsx @@ -50,12 +50,12 @@ import {t, tct, tctCode} from 'sentry/locale'; import type {PageFilters} from 'sentry/types/core'; import {SavedSearchType} from 'sentry/types/group'; import type {NewQuery, Organization, SavedQuery} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; import type {CustomMeasurementCollection} from 'sentry/utils/customMeasurements/customMeasurements'; import {CustomMeasurementsContext} from 'sentry/utils/customMeasurements/customMeasurementsContext'; import {CustomMeasurementsProvider} from 'sentry/utils/customMeasurements/customMeasurementsProvider'; +import {defined} from 'sentry/utils/defined'; import {EventView, isAPIPayloadSimilar} from 'sentry/utils/discover/eventView'; import {formatTagKey, generateAggregateFields} from 'sentry/utils/discover/fields'; import { diff --git a/static/app/views/discover/results/resultsSearchQueryBuilder.tsx b/static/app/views/discover/results/resultsSearchQueryBuilder.tsx index 689ff76368b8bf..b458cd9c66db7e 100644 --- a/static/app/views/discover/results/resultsSearchQueryBuilder.tsx +++ b/static/app/views/discover/results/resultsSearchQueryBuilder.tsx @@ -28,8 +28,8 @@ import type { } from 'sentry/components/searchQueryBuilder/types'; import {t} from 'sentry/locale'; import {SavedSearchType, type TagCollection} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import type {CustomMeasurementCollection} from 'sentry/utils/customMeasurements/customMeasurements'; +import {defined} from 'sentry/utils/defined'; import type {Field} from 'sentry/utils/discover/fields'; import { ALL_INSIGHTS_FILTER_KEY_SECTIONS, diff --git a/static/app/views/discover/savedQuery/index.tsx b/static/app/views/discover/savedQuery/index.tsx index f90f1d78417873..f50fc464b1ed02 100644 --- a/static/app/views/discover/savedQuery/index.tsx +++ b/static/app/views/discover/savedQuery/index.tsx @@ -25,8 +25,8 @@ import {IconBookmark, IconEllipsis, IconStar} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Organization, SavedQuery} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {getDiscoverQueriesUrl} from 'sentry/utils/discover/urls'; diff --git a/static/app/views/discover/table/cellAction.tsx b/static/app/views/discover/table/cellAction.tsx index 8992d4355966b8..410837e2b42210 100644 --- a/static/app/views/discover/table/cellAction.tsx +++ b/static/app/views/discover/table/cellAction.tsx @@ -8,7 +8,7 @@ import type {MenuItemProps} from 'sentry/components/dropdownMenu'; import {DropdownMenu} from 'sentry/components/dropdownMenu'; import {IconEllipsis} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {TableDataRow} from 'sentry/utils/discover/discoverQuery'; import { fieldAlignment, diff --git a/static/app/views/discover/utils.tsx b/static/app/views/discover/utils.tsx index 8008f463da7e2c..6de6f61c04700a 100644 --- a/static/app/views/discover/utils.tsx +++ b/static/app/views/discover/utils.tsx @@ -9,9 +9,9 @@ import type {PageFilters, SelectValue} from 'sentry/types/core'; import type {Event} from 'sentry/types/event'; import type {NewQuery, Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {toArray} from 'sentry/utils/array/toArray'; import {getUtcDateString} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import type {TableDataRow} from 'sentry/utils/discover/discoverQuery'; import type {EventData, EventView, MetaType} from 'sentry/utils/discover/eventView'; import type { diff --git a/static/app/views/explore/components/table.tsx b/static/app/views/explore/components/table.tsx index b74a8dc649fac9..54cebbc39e90c8 100644 --- a/static/app/views/explore/components/table.tsx +++ b/static/app/views/explore/components/table.tsx @@ -15,7 +15,7 @@ import { GridHeadCell, GridRow, } from 'sentry/components/tables/gridEditable/styles'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {Actions} from 'sentry/views/discover/table/cellAction'; interface TableProps extends React.ComponentProps { diff --git a/static/app/views/explore/components/traceItemAttributes/attributesTree.tsx b/static/app/views/explore/components/traceItemAttributes/attributesTree.tsx index c2ecb13ca52c8b..340c614b7cfabc 100644 --- a/static/app/views/explore/components/traceItemAttributes/attributesTree.tsx +++ b/static/app/views/explore/components/traceItemAttributes/attributesTree.tsx @@ -7,7 +7,7 @@ import {DropdownMenu, type MenuItemProps} from 'sentry/components/dropdownMenu'; import {useIssueDetailsColumnCount} from 'sentry/components/events/eventTags/util'; import {IconEllipsis} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {EventsMetaType} from 'sentry/utils/discover/eventView'; import {type RenderFunctionBaggage} from 'sentry/utils/discover/fieldRenderers'; import {isEmptyObject} from 'sentry/utils/object/isEmptyObject'; diff --git a/static/app/views/explore/components/typeBadge.tsx b/static/app/views/explore/components/typeBadge.tsx index 3ac6166f1d129e..b383e709ff136c 100644 --- a/static/app/views/explore/components/typeBadge.tsx +++ b/static/app/views/explore/components/typeBadge.tsx @@ -3,7 +3,7 @@ import type {ReactNode} from 'react'; import {Text} from '@sentry/scraps/text'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {ParsedFunction} from 'sentry/utils/discover/fields'; import {FieldKind, FieldValueType} from 'sentry/utils/fields'; import {FieldValueKind} from 'sentry/views/discover/table/types'; diff --git a/static/app/views/explore/contexts/logs/sortBys.tsx b/static/app/views/explore/contexts/logs/sortBys.tsx index b761744092c69f..02bc01da42b168 100644 --- a/static/app/views/explore/contexts/logs/sortBys.tsx +++ b/static/app/views/explore/contexts/logs/sortBys.tsx @@ -1,6 +1,6 @@ import type {Location} from 'history'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {Sort} from 'sentry/utils/discover/fields'; import {LOGS_CURSOR_KEY} from 'sentry/views/explore/contexts/logs/logsPageParams'; import {OurLogKnownFieldKey} from 'sentry/views/explore/logs/types'; diff --git a/static/app/views/explore/contexts/pageParamsContext/aggregateFields.tsx b/static/app/views/explore/contexts/pageParamsContext/aggregateFields.tsx index 72f39bf3ca586b..247c2872fe7589 100644 --- a/static/app/views/explore/contexts/pageParamsContext/aggregateFields.tsx +++ b/static/app/views/explore/contexts/pageParamsContext/aggregateFields.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {Visualize} from './visualizes'; diff --git a/static/app/views/explore/contexts/pageParamsContext/visualizes.tsx b/static/app/views/explore/contexts/pageParamsContext/visualizes.tsx index 7a8f3bb099f2b6..9b168ce30c56e3 100644 --- a/static/app/views/explore/contexts/pageParamsContext/visualizes.tsx +++ b/static/app/views/explore/contexts/pageParamsContext/visualizes.tsx @@ -1,5 +1,5 @@ import {Expression} from 'sentry/components/arithmeticBuilder/expression'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { isEquation, parseFunction, diff --git a/static/app/views/explore/exploreStateQueryParamsProvider.tsx b/static/app/views/explore/exploreStateQueryParamsProvider.tsx index 1da6c8366b6d37..b07fe38514a5f8 100644 --- a/static/app/views/explore/exploreStateQueryParamsProvider.tsx +++ b/static/app/views/explore/exploreStateQueryParamsProvider.tsx @@ -1,7 +1,7 @@ import type {ReactNode} from 'react'; import {useCallback, useMemo, useState} from 'react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {Sort} from 'sentry/utils/discover/fields'; import type {AggregateField} from 'sentry/views/explore/queryParams/aggregateField'; import {QueryParamsContextProvider} from 'sentry/views/explore/queryParams/context'; diff --git a/static/app/views/explore/hooks/useAnalytics.tsx b/static/app/views/explore/hooks/useAnalytics.tsx index 8a51fe84e34047..16de32fd400b64 100644 --- a/static/app/views/explore/hooks/useAnalytics.tsx +++ b/static/app/views/explore/hooks/useAnalytics.tsx @@ -5,9 +5,9 @@ import {useOrganizationSeerSetup} from 'sentry/components/events/autofix/useOrga import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {useAiQueryContext} from 'sentry/components/searchQueryBuilder/askSeerCombobox/aiQueryContext'; import {trackAiQueryOutcome} from 'sentry/components/searchQueryBuilder/askSeerCombobox/utils'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import type {LogsAnalyticsPageSource} from 'sentry/utils/analytics/logsAnalyticsEvent'; +import {defined} from 'sentry/utils/defined'; import type {Sort} from 'sentry/utils/discover/fields'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {decodeScalar} from 'sentry/utils/queryString'; diff --git a/static/app/views/explore/hooks/useCrossEventQueries.tsx b/static/app/views/explore/hooks/useCrossEventQueries.tsx index 09d3b72d182278..9675fcac3d6f3e 100644 --- a/static/app/views/explore/hooks/useCrossEventQueries.tsx +++ b/static/app/views/explore/hooks/useCrossEventQueries.tsx @@ -1,6 +1,6 @@ import {useMemo} from 'react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {MAX_CROSS_EVENT_QUERIES} from 'sentry/views/explore/constants'; import { createTraceMetricEventsFilter, diff --git a/static/app/views/explore/hooks/useExploreAggregatesTable.tsx b/static/app/views/explore/hooks/useExploreAggregatesTable.tsx index f27c95c1d63d42..ceba754e9de600 100644 --- a/static/app/views/explore/hooks/useExploreAggregatesTable.tsx +++ b/static/app/views/explore/hooks/useExploreAggregatesTable.tsx @@ -2,7 +2,7 @@ import {useCallback, useMemo} from 'react'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {NewQuery} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {isGroupBy} from 'sentry/views/explore/contexts/pageParamsContext/aggregateFields'; import {formatSort} from 'sentry/views/explore/contexts/pageParamsContext/sortBys'; diff --git a/static/app/views/explore/hooks/useExploreSpansTable.tsx b/static/app/views/explore/hooks/useExploreSpansTable.tsx index f14d6f19311652..ba33598b0b3d2e 100644 --- a/static/app/views/explore/hooks/useExploreSpansTable.tsx +++ b/static/app/views/explore/hooks/useExploreSpansTable.tsx @@ -2,7 +2,7 @@ import {useCallback, useMemo} from 'react'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {NewQuery} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import { useProgressiveQuery, diff --git a/static/app/views/explore/hooks/useExploreTimeseries.tsx b/static/app/views/explore/hooks/useExploreTimeseries.tsx index b2330929269420..17929896725b01 100644 --- a/static/app/views/explore/hooks/useExploreTimeseries.tsx +++ b/static/app/views/explore/hooks/useExploreTimeseries.tsx @@ -1,7 +1,7 @@ import {useCallback, useMemo} from 'react'; -import {defined} from 'sentry/utils'; import {dedupeArray} from 'sentry/utils/dedupeArray'; +import {defined} from 'sentry/utils/defined'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; import {useChartInterval} from 'sentry/utils/useChartInterval'; import {determineSeriesSampleCountAndIsSampled} from 'sentry/views/alerts/rules/metric/utils/determineSeriesSampleCount'; diff --git a/static/app/views/explore/hooks/useGetSavedQueries.tsx b/static/app/views/explore/hooks/useGetSavedQueries.tsx index 6e7995bd4aaf9e..78f5d6d31045c3 100644 --- a/static/app/views/explore/hooks/useGetSavedQueries.tsx +++ b/static/app/views/explore/hooks/useGetSavedQueries.tsx @@ -5,8 +5,8 @@ import type {CaseInsensitive} from 'sentry/components/searchQueryBuilder/hooks'; import type {DateString} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; import type {User} from 'sentry/types/user'; -import {defined} from 'sentry/utils'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import type {Mode} from 'sentry/views/explore/contexts/pageParamsContext/mode'; import type {ExploreQueryChangedReason} from 'sentry/views/explore/hooks/useSaveQuery'; diff --git a/static/app/views/explore/hooks/useGetTraceItemAttributeValues.tsx b/static/app/views/explore/hooks/useGetTraceItemAttributeValues.tsx index d0652c445724d0..92694ef98ff104 100644 --- a/static/app/views/explore/hooks/useGetTraceItemAttributeValues.tsx +++ b/static/app/views/explore/hooks/useGetTraceItemAttributeValues.tsx @@ -9,9 +9,9 @@ import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {GetTagValuesParams} from 'sentry/components/searchQueryBuilder'; import type {PageFilters} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; import type {ApiQueryKey} from 'sentry/utils/api/apiQueryKey'; +import {defined} from 'sentry/utils/defined'; import {FieldKind} from 'sentry/utils/fields'; import {useOrganization} from 'sentry/utils/useOrganization'; import {EXPLORE_FIVE_MIN_STALE_TIME} from 'sentry/views/explore/constants'; diff --git a/static/app/views/explore/hooks/useMetricOptions.tsx b/static/app/views/explore/hooks/useMetricOptions.tsx index da7e5cbfffad02..b21a74f2bd3f59 100644 --- a/static/app/views/explore/hooks/useMetricOptions.tsx +++ b/static/app/views/explore/hooks/useMetricOptions.tsx @@ -4,8 +4,8 @@ import {useQuery} from '@tanstack/react-query'; import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {PageFilters} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/explore/hooks/useProgressiveQuery.spec.tsx b/static/app/views/explore/hooks/useProgressiveQuery.spec.tsx index a2d019454beffe..ef2e5105be05b7 100644 --- a/static/app/views/explore/hooks/useProgressiveQuery.spec.tsx +++ b/static/app/views/explore/hooks/useProgressiveQuery.spec.tsx @@ -4,7 +4,7 @@ import {PageFilterStateFixture} from 'sentry-fixture/pageFilters'; import {renderHookWithProviders, waitFor} from 'sentry-test/reactTestingLibrary'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useApi} from 'sentry/utils/useApi'; import { SAMPLING_MODE, diff --git a/static/app/views/explore/hooks/useTraceItemDetails.tsx b/static/app/views/explore/hooks/useTraceItemDetails.tsx index 0f5b6cf4b09fe9..70c31be8478df4 100644 --- a/static/app/views/explore/hooks/useTraceItemDetails.tsx +++ b/static/app/views/explore/hooks/useTraceItemDetails.tsx @@ -6,9 +6,9 @@ import {skipToken, useQuery, useQueryClient} from '@tanstack/react-query'; import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {Meta} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; import {normalizeTimestampToSeconds} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useProjectFromId} from 'sentry/utils/useProjectFromId'; import {useProjects} from 'sentry/utils/useProjects'; diff --git a/static/app/views/explore/hooks/useVisualizeFields.tsx b/static/app/views/explore/hooks/useVisualizeFields.tsx index 54a197af3e4dbc..7d29b5b0b3653a 100644 --- a/static/app/views/explore/hooks/useVisualizeFields.tsx +++ b/static/app/views/explore/hooks/useVisualizeFields.tsx @@ -4,7 +4,7 @@ import type {SelectOption} from '@sentry/scraps/compactSelect'; import {t} from 'sentry/locale'; import type {TagCollection} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {ParsedFunction} from 'sentry/utils/discover/fields'; import { AggregationKey, diff --git a/static/app/views/explore/logs/confidenceFooter.tsx b/static/app/views/explore/logs/confidenceFooter.tsx index 77aa7209a0d45b..26e077720708e4 100644 --- a/static/app/views/explore/logs/confidenceFooter.tsx +++ b/static/app/views/explore/logs/confidenceFooter.tsx @@ -3,7 +3,7 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {Count} from 'sentry/components/count'; import {t, tct} from 'sentry/locale'; import type {Confidence} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {Container} from 'sentry/views/explore/components/chart/chartFooter'; import { Placeholder, diff --git a/static/app/views/explore/logs/content.tsx b/static/app/views/explore/logs/content.tsx index d99a17054608e8..cd0a0326de7e80 100644 --- a/static/app/views/explore/logs/content.tsx +++ b/static/app/views/explore/logs/content.tsx @@ -11,8 +11,8 @@ import {AiQueryProvider} from 'sentry/components/searchQueryBuilder/askSeerCombo import {SentryDocumentTitle} from 'sentry/components/sentryDocumentTitle'; import {t} from 'sentry/locale'; import {DataCategory} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import {LogsAnalyticsPageSource} from 'sentry/utils/analytics/logsAnalyticsEvent'; +import {defined} from 'sentry/utils/defined'; import {useDatePageFilterProps} from 'sentry/utils/useDatePageFilterProps'; import {SHORT_VIEWPORT_HEIGHT} from 'sentry/utils/useIsShortViewport'; import {useMaxPickableDays} from 'sentry/utils/useMaxPickableDays'; diff --git a/static/app/views/explore/logs/exports/useLogsExportEstimatedRowCount.tsx b/static/app/views/explore/logs/exports/useLogsExportEstimatedRowCount.tsx index 1d50fce3b6325a..f7f10dbd8b4527 100644 --- a/static/app/views/explore/logs/exports/useLogsExportEstimatedRowCount.tsx +++ b/static/app/views/explore/logs/exports/useLogsExportEstimatedRowCount.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {determineSeriesSampleCountAndIsSampled} from 'sentry/views/alerts/rules/metric/utils/determineSeriesSampleCount'; import { diff --git a/static/app/views/explore/logs/logsDownsamplingAlert.tsx b/static/app/views/explore/logs/logsDownsamplingAlert.tsx index 991561a1d7c5e8..ec3d70009d6946 100644 --- a/static/app/views/explore/logs/logsDownsamplingAlert.tsx +++ b/static/app/views/explore/logs/logsDownsamplingAlert.tsx @@ -3,7 +3,7 @@ import {useMemo} from 'react'; import {Alert} from '@sentry/scraps/alert'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {determineSeriesSampleCountAndIsSampled} from 'sentry/views/alerts/rules/metric/utils/determineSeriesSampleCount'; import type {UseInfiniteLogsQueryResult} from 'sentry/views/explore/logs/useLogsQuery'; import {useQueryParamsTopEventsLimit} from 'sentry/views/explore/queryParams/context'; diff --git a/static/app/views/explore/logs/logsGraph.tsx b/static/app/views/explore/logs/logsGraph.tsx index e9418e88dd16d7..dcc3908b724f06 100644 --- a/static/app/views/explore/logs/logsGraph.tsx +++ b/static/app/views/explore/logs/logsGraph.tsx @@ -11,8 +11,8 @@ import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {IconClock, IconEllipsis, IconExpand, IconGraph} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {NewQuery} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {useChartInterval} from 'sentry/utils/useChartInterval'; diff --git a/static/app/views/explore/logs/logsLocationQueryParamsProvider.tsx b/static/app/views/explore/logs/logsLocationQueryParamsProvider.tsx index 53f82ced673f29..e1da479217c08a 100644 --- a/static/app/views/explore/logs/logsLocationQueryParamsProvider.tsx +++ b/static/app/views/explore/logs/logsLocationQueryParamsProvider.tsx @@ -1,7 +1,7 @@ import type {ReactNode} from 'react'; import {useCallback, useMemo} from 'react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isEmptyObject} from 'sentry/utils/object/isEmptyObject'; import {useLocation} from 'sentry/utils/useLocation'; import {useNavigate} from 'sentry/utils/useNavigate'; diff --git a/static/app/views/explore/logs/logsQueryParams.tsx b/static/app/views/explore/logs/logsQueryParams.tsx index 2da8831fd539df..e4220546b03076 100644 --- a/static/app/views/explore/logs/logsQueryParams.tsx +++ b/static/app/views/explore/logs/logsQueryParams.tsx @@ -1,6 +1,6 @@ import type {Location} from 'history'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {Sort} from 'sentry/utils/discover/fields'; import {AggregationKey} from 'sentry/utils/fields'; import {decodeScalar} from 'sentry/utils/queryString'; diff --git a/static/app/views/explore/logs/logsToolbar.tsx b/static/app/views/explore/logs/logsToolbar.tsx index ca2b048c8ac33b..b0fbdb97976923 100644 --- a/static/app/views/explore/logs/logsToolbar.tsx +++ b/static/app/views/explore/logs/logsToolbar.tsx @@ -4,7 +4,7 @@ import styled from '@emotion/styled'; import type {SelectKey, SelectOption} from '@sentry/scraps/compactSelect'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {AggregationKey, FieldKind, prettifyTagKey} from 'sentry/utils/fields'; import {useDebouncedValue} from 'sentry/utils/useDebouncedValue'; import {optionFromTag} from 'sentry/views/explore/components/attributeOption'; diff --git a/static/app/views/explore/logs/tables/logsAggregateTable.tsx b/static/app/views/explore/logs/tables/logsAggregateTable.tsx index 98c8b72b98bd8f..09f11b666cfe04 100644 --- a/static/app/views/explore/logs/tables/logsAggregateTable.tsx +++ b/static/app/views/explore/logs/tables/logsAggregateTable.tsx @@ -11,8 +11,8 @@ import {COL_WIDTH_UNDEFINED, GridEditable} from 'sentry/components/tables/gridEd import {SortLink} from 'sentry/components/tables/gridEditable/sortLink'; import {IconStack} from 'sentry/icons/iconStack'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {parseCursor} from 'sentry/utils/cursor'; +import {defined} from 'sentry/utils/defined'; import type {TableDataRow} from 'sentry/utils/discover/discoverQuery'; import {parseFunction, prettifyParsedFunction} from 'sentry/utils/discover/fields'; import {prettifyTagKey} from 'sentry/utils/fields'; diff --git a/static/app/views/explore/logs/tables/logsInfiniteTable.tsx b/static/app/views/explore/logs/tables/logsInfiniteTable.tsx index dc8a2d33c78749..5f49ff255a1186 100644 --- a/static/app/views/explore/logs/tables/logsInfiniteTable.tsx +++ b/static/app/views/explore/logs/tables/logsInfiniteTable.tsx @@ -27,8 +27,8 @@ import {IconArrow, IconWarning} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import type {Event} from 'sentry/types/event'; import type {TagCollection} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import {LogsAnalyticsPageSource} from 'sentry/utils/analytics/logsAnalyticsEvent'; +import {defined} from 'sentry/utils/defined'; import {useDimensions} from 'sentry/utils/useDimensions'; import { TableBodyCell, diff --git a/static/app/views/explore/logs/tables/logsTableRow.tsx b/static/app/views/explore/logs/tables/logsTableRow.tsx index 07a54462fb0cf8..7f0ffb9331b47e 100644 --- a/static/app/views/explore/logs/tables/logsTableRow.tsx +++ b/static/app/views/explore/logs/tables/logsTableRow.tsx @@ -26,10 +26,11 @@ import {IconChevron} from 'sentry/icons/iconChevron'; import {t} from 'sentry/locale'; import type {PageFilters} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined, escapeDoubleQuotes} from 'sentry/utils'; +import {escapeDoubleQuotes} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; import {normalizeTimestampToSeconds} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import type {TableDataRow} from 'sentry/utils/discover/discoverQuery'; import type {EventsMetaType} from 'sentry/utils/discover/eventView'; import {FieldValueType} from 'sentry/utils/fields'; diff --git a/static/app/views/explore/logs/useLogsAggregatesTable.tsx b/static/app/views/explore/logs/useLogsAggregatesTable.tsx index 608e4c3035bbd5..c808facfc2b25d 100644 --- a/static/app/views/explore/logs/useLogsAggregatesTable.tsx +++ b/static/app/views/explore/logs/useLogsAggregatesTable.tsx @@ -3,8 +3,8 @@ import {useQuery} from '@tanstack/react-query'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {useCaseInsensitivity} from 'sentry/components/searchQueryBuilder/hooks'; -import {defined} from 'sentry/utils'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {useLocation} from 'sentry/utils/useLocation'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/explore/logs/useLogsQuery.tsx b/static/app/views/explore/logs/useLogsQuery.tsx index f1b4b500f2d09d..216494add313f0 100644 --- a/static/app/views/explore/logs/useLogsQuery.tsx +++ b/static/app/views/explore/logs/useLogsQuery.tsx @@ -6,10 +6,10 @@ import {useInfiniteQuery, useQueryClient} from '@tanstack/react-query'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {useCaseInsensitivity} from 'sentry/components/searchQueryBuilder/hooks'; -import {defined} from 'sentry/utils'; import {apiFetch, type ApiResponse} from 'sentry/utils/api/apiFetch'; import {apiOptions} from 'sentry/utils/api/apiOptions'; import {parseQueryKey, type QueryKeyEndpointOptions} from 'sentry/utils/api/apiQueryKey'; +import {defined} from 'sentry/utils/defined'; import {encodeSort, type EventsMetaType} from 'sentry/utils/discover/eventView'; import type {Sort} from 'sentry/utils/discover/fields'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; diff --git a/static/app/views/explore/logs/useLogsTimeseries.tsx b/static/app/views/explore/logs/useLogsTimeseries.tsx index 07a38ba49b4b61..364d158e37ead6 100644 --- a/static/app/views/explore/logs/useLogsTimeseries.tsx +++ b/static/app/views/explore/logs/useLogsTimeseries.tsx @@ -1,6 +1,6 @@ import {useCallback} from 'react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {determineSeriesSampleCountAndIsSampled} from 'sentry/views/alerts/rules/metric/utils/determineSeriesSampleCount'; import { diff --git a/static/app/views/explore/logs/useSaveAsItems.tsx b/static/app/views/explore/logs/useSaveAsItems.tsx index a2e68a62fb7db2..ee4f1f462254f3 100644 --- a/static/app/views/explore/logs/useSaveAsItems.tsx +++ b/static/app/views/explore/logs/useSaveAsItems.tsx @@ -12,8 +12,8 @@ import Feature from 'sentry/components/acl/feature'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {t} from 'sentry/locale'; import type {NewQuery} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import type {Sort} from 'sentry/utils/discover/fields'; import {parseFunction, prettifyParsedFunction} from 'sentry/utils/discover/fields'; diff --git a/static/app/views/explore/logs/useStreamingTimeseriesResult.tsx b/static/app/views/explore/logs/useStreamingTimeseriesResult.tsx index 830d1da2907576..63da382c6c600a 100644 --- a/static/app/views/explore/logs/useStreamingTimeseriesResult.tsx +++ b/static/app/views/explore/logs/useStreamingTimeseriesResult.tsx @@ -4,7 +4,7 @@ import isEqual from 'lodash/isEqual'; import pick from 'lodash/pick'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {usePrevious} from 'sentry/utils/usePrevious'; import type { diff --git a/static/app/views/explore/logs/utils.tsx b/static/app/views/explore/logs/utils.tsx index 2f3d060749edc6..6f3ac41d096111 100644 --- a/static/app/views/explore/logs/utils.tsx +++ b/static/app/views/explore/logs/utils.tsx @@ -9,8 +9,8 @@ import type {Event} from 'sentry/types/event'; import type {TagCollection} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import type {ApiResponse} from 'sentry/utils/api/apiFetch'; +import {defined} from 'sentry/utils/defined'; import type {EventsMetaType} from 'sentry/utils/discover/eventView'; import { CurrencyUnit, diff --git a/static/app/views/explore/metrics/confidenceFooter.tsx b/static/app/views/explore/metrics/confidenceFooter.tsx index 332e5f9ed3c0de..4665ece5693f9f 100644 --- a/static/app/views/explore/metrics/confidenceFooter.tsx +++ b/static/app/views/explore/metrics/confidenceFooter.tsx @@ -3,7 +3,7 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {Count} from 'sentry/components/count'; import {t, tct} from 'sentry/locale'; import type {Confidence} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {Container} from 'sentry/views/explore/components/chart/chartFooter'; import { Placeholder, diff --git a/static/app/views/explore/metrics/content.tsx b/static/app/views/explore/metrics/content.tsx index 1c404cc2878c8f..90c344be089beb 100644 --- a/static/app/views/explore/metrics/content.tsx +++ b/static/app/views/explore/metrics/content.tsx @@ -10,7 +10,7 @@ import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionT import {SentryDocumentTitle} from 'sentry/components/sentryDocumentTitle'; import {t} from 'sentry/locale'; import {DataCategory} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeScalar} from 'sentry/utils/queryString'; import {useDatePageFilterProps} from 'sentry/utils/useDatePageFilterProps'; import {useLocation} from 'sentry/utils/useLocation'; diff --git a/static/app/views/explore/metrics/hooks/metricHeatmapApiOptions.tsx b/static/app/views/explore/metrics/hooks/metricHeatmapApiOptions.tsx index 795f41803ed04b..52e70b3b088fe4 100644 --- a/static/app/views/explore/metrics/hooks/metricHeatmapApiOptions.tsx +++ b/static/app/views/explore/metrics/hooks/metricHeatmapApiOptions.tsx @@ -3,8 +3,8 @@ import {skipToken} from '@tanstack/react-query'; import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; import type {PageFilters} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {intervalToMilliseconds} from 'sentry/utils/duration/intervalToMilliseconds'; import type {HeatMapSeries} from 'sentry/views/dashboards/widgets/common/types'; diff --git a/static/app/views/explore/metrics/hooks/useMetricAggregatesTable.tsx b/static/app/views/explore/metrics/hooks/useMetricAggregatesTable.tsx index 3fbffae6bff4e4..c2e3823b7bf45d 100644 --- a/static/app/views/explore/metrics/hooks/useMetricAggregatesTable.tsx +++ b/static/app/views/explore/metrics/hooks/useMetricAggregatesTable.tsx @@ -2,7 +2,7 @@ import {useCallback, useMemo} from 'react'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {NewQuery} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {formatSort} from 'sentry/views/explore/contexts/pageParamsContext/sortBys'; diff --git a/static/app/views/explore/metrics/hooks/useMetricSamplesTable.tsx b/static/app/views/explore/metrics/hooks/useMetricSamplesTable.tsx index 9397ae7b8af420..343990001a1f2e 100644 --- a/static/app/views/explore/metrics/hooks/useMetricSamplesTable.tsx +++ b/static/app/views/explore/metrics/hooks/useMetricSamplesTable.tsx @@ -1,8 +1,8 @@ import {useCallback, useMemo} from 'react'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import type {EventsMetaType, EventView} from 'sentry/utils/discover/eventView'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {intervalToMilliseconds} from 'sentry/utils/duration/intervalToMilliseconds'; diff --git a/static/app/views/explore/metrics/hooks/useSaveMetricsMultiQuery.tsx b/static/app/views/explore/metrics/hooks/useSaveMetricsMultiQuery.tsx index b0eadd516ca741..62677ea0658bac 100644 --- a/static/app/views/explore/metrics/hooks/useSaveMetricsMultiQuery.tsx +++ b/static/app/views/explore/metrics/hooks/useSaveMetricsMultiQuery.tsx @@ -2,7 +2,7 @@ import {useCallback, useMemo} from 'react'; import * as Sentry from '@sentry/react'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {encodeSort} from 'sentry/utils/discover/eventView'; import {decodeScalar} from 'sentry/utils/queryString'; import {useApi} from 'sentry/utils/useApi'; diff --git a/static/app/views/explore/metrics/metricGraph/index.tsx b/static/app/views/explore/metrics/metricGraph/index.tsx index 22b6814ad68de7..6e4ac999654c2f 100644 --- a/static/app/views/explore/metrics/metricGraph/index.tsx +++ b/static/app/views/explore/metrics/metricGraph/index.tsx @@ -4,7 +4,7 @@ import {ExternalLink} from '@sentry/scraps/link'; import {t, tct} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {parseFunction} from 'sentry/utils/discover/fields'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {determineSeriesSampleCountAndIsSampled} from 'sentry/views/alerts/rules/metric/utils/determineSeriesSampleCount'; diff --git a/static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx b/static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx index a9f068b59f5215..2d6fb8b6a26fe8 100644 --- a/static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx +++ b/static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx @@ -9,8 +9,8 @@ import {EmptyStreamWrapper} from 'sentry/components/emptyStateWarning'; import {LoadingIndicator} from 'sentry/components/loadingIndicator'; import {IconWarning} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {getTimeStampFromTableDateField} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {useNavigate} from 'sentry/utils/useNavigate'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/explore/metrics/metricQuery.tsx b/static/app/views/explore/metrics/metricQuery.tsx index 850cbf725712b5..0a3d4f8e5acad2 100644 --- a/static/app/views/explore/metrics/metricQuery.tsx +++ b/static/app/views/explore/metrics/metricQuery.tsx @@ -1,6 +1,6 @@ import type {Location} from 'history'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {EQUATION_PREFIX, type Sort} from 'sentry/utils/discover/fields'; import {Mode} from 'sentry/views/explore/contexts/pageParamsContext/mode'; import {SORTABLE_SAMPLE_COLUMNS} from 'sentry/views/explore/metrics/types'; diff --git a/static/app/views/explore/metrics/metricsQueryParams.tsx b/static/app/views/explore/metrics/metricsQueryParams.tsx index db0d24491c024c..be1cbb32f4aed3 100644 --- a/static/app/views/explore/metrics/metricsQueryParams.tsx +++ b/static/app/views/explore/metrics/metricsQueryParams.tsx @@ -1,7 +1,7 @@ import type {ReactNode} from 'react'; import {createContext, useCallback, useContext, useMemo} from 'react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {type TraceMetric} from 'sentry/views/explore/metrics/metricQuery'; import {canUseMetricsEquations} from 'sentry/views/explore/metrics/metricsFlags'; diff --git a/static/app/views/explore/metrics/multiMetricsQueryParams.tsx b/static/app/views/explore/metrics/multiMetricsQueryParams.tsx index cf16fbbc6f6e05..fa2f83a49e302e 100644 --- a/static/app/views/explore/metrics/multiMetricsQueryParams.tsx +++ b/static/app/views/explore/metrics/multiMetricsQueryParams.tsx @@ -8,7 +8,7 @@ import { } from 'react'; import type {Location} from 'history'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeList} from 'sentry/utils/queryString'; import {useLocation} from 'sentry/utils/useLocation'; import {useNavigate} from 'sentry/utils/useNavigate'; diff --git a/static/app/views/explore/metrics/useSaveAsMetricItems.tsx b/static/app/views/explore/metrics/useSaveAsMetricItems.tsx index eb878a1e65cb1d..ac4e008b140cc5 100644 --- a/static/app/views/explore/metrics/useSaveAsMetricItems.tsx +++ b/static/app/views/explore/metrics/useSaveAsMetricItems.tsx @@ -9,8 +9,8 @@ import { import {openSaveQueryModal} from 'sentry/actionCreators/modal'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {parseFunction, prettifyParsedFunction} from 'sentry/utils/discover/fields'; import {decodeScalar} from 'sentry/utils/queryString'; import {useLocation} from 'sentry/utils/useLocation'; diff --git a/static/app/views/explore/metrics/utils.tsx b/static/app/views/explore/metrics/utils.tsx index 86ad825b97a8f0..f43f14df9b4811 100644 --- a/static/app/views/explore/metrics/utils.tsx +++ b/static/app/views/explore/metrics/utils.tsx @@ -5,7 +5,7 @@ import {isTokenFunction} from 'sentry/components/arithmeticBuilder/token'; import {MutableSearch} from 'sentry/components/searchSyntax/mutableSearch'; import type {PageFilters} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {EventsMetaType, MetaType} from 'sentry/utils/discover/eventView'; import { DurationUnit, diff --git a/static/app/views/explore/multiQueryMode/content.tsx b/static/app/views/explore/multiQueryMode/content.tsx index 4a52ef15acfb46..bcf27eac0ad537 100644 --- a/static/app/views/explore/multiQueryMode/content.tsx +++ b/static/app/views/explore/multiQueryMode/content.tsx @@ -23,8 +23,8 @@ import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {IconAdd} from 'sentry/icons/iconAdd'; import {t} from 'sentry/locale'; import {DataCategory} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {encodeSort} from 'sentry/utils/discover/eventView'; import {valueIsEqual} from 'sentry/utils/object/valueIsEqual'; import {decodeScalar} from 'sentry/utils/queryString'; diff --git a/static/app/views/explore/multiQueryMode/hooks/useMultiQueryTable.tsx b/static/app/views/explore/multiQueryMode/hooks/useMultiQueryTable.tsx index 60392c662ec081..a4c3fef5ed2fe4 100644 --- a/static/app/views/explore/multiQueryMode/hooks/useMultiQueryTable.tsx +++ b/static/app/views/explore/multiQueryMode/hooks/useMultiQueryTable.tsx @@ -2,7 +2,7 @@ import {useCallback, useMemo} from 'react'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {NewQuery} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import type {Sort} from 'sentry/utils/discover/fields'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; diff --git a/static/app/views/explore/multiQueryMode/index.tsx b/static/app/views/explore/multiQueryMode/index.tsx index a7a43f7c4b2427..7e20af8d0acbe9 100644 --- a/static/app/views/explore/multiQueryMode/index.tsx +++ b/static/app/views/explore/multiQueryMode/index.tsx @@ -6,7 +6,7 @@ import {FeedbackButton} from 'sentry/components/feedbackButton/feedbackButton'; import {NoAccess} from 'sentry/components/noAccess'; import {SentryDocumentTitle} from 'sentry/components/sentryDocumentTitle'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeScalar} from 'sentry/utils/queryString'; import {useLocation} from 'sentry/utils/useLocation'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/explore/multiQueryMode/locationUtils.tsx b/static/app/views/explore/multiQueryMode/locationUtils.tsx index db2d027f1361c6..36f9eb14acc070 100644 --- a/static/app/views/explore/multiQueryMode/locationUtils.tsx +++ b/static/app/views/explore/multiQueryMode/locationUtils.tsx @@ -3,7 +3,7 @@ import type {Location, LocationDescriptorObject} from 'history'; import {URL_PARAM} from 'sentry/components/pageFilters/constants'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {encodeSort} from 'sentry/utils/discover/eventView'; import {parseFunction, type Sort} from 'sentry/utils/discover/fields'; import {decodeList, decodeSorts} from 'sentry/utils/queryString'; diff --git a/static/app/views/explore/multiQueryMode/queryConstructors/visualize.tsx b/static/app/views/explore/multiQueryMode/queryConstructors/visualize.tsx index 1f184e48ef00eb..7a9050b7960544 100644 --- a/static/app/views/explore/multiQueryMode/queryConstructors/visualize.tsx +++ b/static/app/views/explore/multiQueryMode/queryConstructors/visualize.tsx @@ -6,7 +6,7 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {PageFilterBar} from 'sentry/components/pageFilters/pageFilterBar'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {ParsedFunction} from 'sentry/utils/discover/fields'; import {parseFunction} from 'sentry/utils/discover/fields'; import {ALLOWED_EXPLORE_VISUALIZE_AGGREGATES} from 'sentry/utils/fields'; diff --git a/static/app/views/explore/multiQueryMode/queryVisualizations/chart.tsx b/static/app/views/explore/multiQueryMode/queryVisualizations/chart.tsx index edfbc68a0e682f..709550a257ae55 100644 --- a/static/app/views/explore/multiQueryMode/queryVisualizations/chart.tsx +++ b/static/app/views/explore/multiQueryMode/queryVisualizations/chart.tsx @@ -12,8 +12,8 @@ import {IconClock} from 'sentry/icons/iconClock'; import {IconEllipsis} from 'sentry/icons/iconEllipsis'; import {IconGraph} from 'sentry/icons/iconGraph'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {parseFunction, prettifyParsedFunction} from 'sentry/utils/discover/fields'; import {useChartInterval} from 'sentry/utils/useChartInterval'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/explore/multiQueryMode/queryVisualizations/table.tsx b/static/app/views/explore/multiQueryMode/queryVisualizations/table.tsx index 9a7f82ce68ebd1..da7810cb9216d9 100644 --- a/static/app/views/explore/multiQueryMode/queryVisualizations/table.tsx +++ b/static/app/views/explore/multiQueryMode/queryVisualizations/table.tsx @@ -16,7 +16,7 @@ import {IconStack} from 'sentry/icons/iconStack'; import {IconWarning} from 'sentry/icons/iconWarning'; import {t} from 'sentry/locale'; import type {Confidence} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { fieldAlignment, parseFunction, diff --git a/static/app/views/explore/profiling/landing/slowestFunctionsWidget.tsx b/static/app/views/explore/profiling/landing/slowestFunctionsWidget.tsx index 5eb8a556658b3f..86b416e73ad86d 100644 --- a/static/app/views/explore/profiling/landing/slowestFunctionsWidget.tsx +++ b/static/app/views/explore/profiling/landing/slowestFunctionsWidget.tsx @@ -31,9 +31,9 @@ import {IconEllipsis} from 'sentry/icons/iconEllipsis'; import {IconWarning} from 'sentry/icons/iconWarning'; import {t, tct} from 'sentry/locale'; import type {Series} from 'sentry/types/echarts'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {axisLabelFormatter, tooltipFormatter} from 'sentry/utils/discover/charts'; import {getShortEventId} from 'sentry/utils/events'; import {Frame} from 'sentry/utils/profiling/frame'; diff --git a/static/app/views/explore/profiling/landing/styles.tsx b/static/app/views/explore/profiling/landing/styles.tsx index 1e170d1d888b91..ed21dfb65b3888 100644 --- a/static/app/views/explore/profiling/landing/styles.tsx +++ b/static/app/views/explore/profiling/landing/styles.tsx @@ -3,7 +3,7 @@ import styled from '@emotion/styled'; import {HeaderTitleLegend as _HeaderTitleLegend} from 'sentry/components/charts/styles'; import {Panel} from 'sentry/components/panels/panel'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export const WidgetContainer = styled(Panel)<{height?: string}>` ${p => diff --git a/static/app/views/explore/queryParams/context.tsx b/static/app/views/explore/queryParams/context.tsx index 83f2c725fe99dc..6ffa03657cfc07 100644 --- a/static/app/views/explore/queryParams/context.tsx +++ b/static/app/views/explore/queryParams/context.tsx @@ -9,7 +9,7 @@ import { } from 'react'; import {parseAsString, useQueryStates} from 'nuqs'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {Sort} from 'sentry/utils/discover/fields'; import type {MutableSearch} from 'sentry/utils/tokenizeSearch'; import {TOP_EVENTS_LIMIT} from 'sentry/views/explore/hooks/useTopEvents'; diff --git a/static/app/views/explore/queryParams/crossEvent.ts b/static/app/views/explore/queryParams/crossEvent.ts index cdcd5cd8aa06a0..e2b973bc4ebd21 100644 --- a/static/app/views/explore/queryParams/crossEvent.ts +++ b/static/app/views/explore/queryParams/crossEvent.ts @@ -1,6 +1,6 @@ import type {Location} from 'history'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {TraceMetric} from 'sentry/views/explore/metrics/metricQuery'; export type CrossEventType = 'logs' | 'spans' | 'metrics'; diff --git a/static/app/views/explore/queryParams/groupBy.ts b/static/app/views/explore/queryParams/groupBy.ts index 2eba9bc2d9aff7..8020014c4ceb9c 100644 --- a/static/app/views/explore/queryParams/groupBy.ts +++ b/static/app/views/explore/queryParams/groupBy.ts @@ -1,6 +1,6 @@ import type {Location} from 'history'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeList} from 'sentry/utils/queryString'; export interface GroupBy { diff --git a/static/app/views/explore/queryParams/managedFields.tsx b/static/app/views/explore/queryParams/managedFields.tsx index 35bc2fc67ea643..d9433829dc3b52 100644 --- a/static/app/views/explore/queryParams/managedFields.tsx +++ b/static/app/views/explore/queryParams/managedFields.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {parseFunction} from 'sentry/utils/discover/fields'; import {isGroupBy, type GroupBy} from 'sentry/views/explore/queryParams/groupBy'; import type {ReadableQueryParams} from 'sentry/views/explore/queryParams/readableQueryParams'; diff --git a/static/app/views/explore/queryParams/visualize.ts b/static/app/views/explore/queryParams/visualize.ts index 34e59aca85cf19..8c173d72cc3f23 100644 --- a/static/app/views/explore/queryParams/visualize.ts +++ b/static/app/views/explore/queryParams/visualize.ts @@ -1,7 +1,7 @@ import type {Location} from 'history'; import {Expression} from 'sentry/components/arithmeticBuilder/expression'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { isEquation, parseFunction, diff --git a/static/app/views/explore/releases/detail/overview/releaseComparisonChart/index.tsx b/static/app/views/explore/releases/detail/overview/releaseComparisonChart/index.tsx index 9bd4bdbc9e4dec..533ecab3b31455 100644 --- a/static/app/views/explore/releases/detail/overview/releaseComparisonChart/index.tsx +++ b/static/app/views/explore/releases/detail/overview/releaseComparisonChart/index.tsx @@ -30,8 +30,8 @@ import { type ReleaseProject, type ReleaseWithHealth, } from 'sentry/types/release'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {getDynamicText} from 'sentry/utils/getDynamicText'; import {formatPercentage} from 'sentry/utils/number/formatPercentage'; diff --git a/static/app/views/explore/releases/detail/overview/releaseComparisonChart/releaseComparisonChartRow.tsx b/static/app/views/explore/releases/detail/overview/releaseComparisonChart/releaseComparisonChartRow.tsx index df27c09a747dc8..0991dbbd03a751 100644 --- a/static/app/views/explore/releases/detail/overview/releaseComparisonChart/releaseComparisonChartRow.tsx +++ b/static/app/views/explore/releases/detail/overview/releaseComparisonChart/releaseComparisonChartRow.tsx @@ -11,7 +11,7 @@ import {Placeholder} from 'sentry/components/placeholder'; import {IconChevron} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {ReleaseComparisonChartType} from 'sentry/types/release'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {releaseComparisonChartLabels} from 'sentry/views/explore/releases/detail/utils'; import type {ReleaseComparisonRow} from '.'; diff --git a/static/app/views/explore/releases/detail/overview/releaseComparisonChart/releaseSessionsChart.tsx b/static/app/views/explore/releases/detail/overview/releaseComparisonChart/releaseSessionsChart.tsx index f0daf0a53a44c6..51f007794c7156 100644 --- a/static/app/views/explore/releases/detail/overview/releaseComparisonChart/releaseSessionsChart.tsx +++ b/static/app/views/explore/releases/detail/overview/releaseComparisonChart/releaseSessionsChart.tsx @@ -18,7 +18,7 @@ import {SessionFieldWithOperation, SessionStatus} from 'sentry/types/organizatio import type {PlatformKey} from 'sentry/types/platform'; import type {ReleaseProject, ReleaseWithHealth} from 'sentry/types/release'; import {ReleaseComparisonChartType} from 'sentry/types/release'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { getCountSeries, getCrashFreeRateSeries, diff --git a/static/app/views/explore/releases/detail/overview/sidebar/totalCrashFreeUsers.tsx b/static/app/views/explore/releases/detail/overview/sidebar/totalCrashFreeUsers.tsx index 9190e3398fc465..b979e754d933f0 100644 --- a/static/app/views/explore/releases/detail/overview/sidebar/totalCrashFreeUsers.tsx +++ b/static/app/views/explore/releases/detail/overview/sidebar/totalCrashFreeUsers.tsx @@ -12,8 +12,8 @@ import * as SidebarSection from 'sentry/components/sidebarSection'; import {t, tn} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {CrashFreeTimeBreakdown} from 'sentry/types/release'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {useApiQuery} from 'sentry/utils/queryClient'; import {displayCrashFreePercent} from 'sentry/views/explore/releases/utils'; diff --git a/static/app/views/explore/releases/list/releaseCard/releaseCardProjectRow.tsx b/static/app/views/explore/releases/list/releaseCard/releaseCardProjectRow.tsx index ec7e1eb30d6330..210ebe57c76c8d 100644 --- a/static/app/views/explore/releases/list/releaseCard/releaseCardProjectRow.tsx +++ b/static/app/views/explore/releases/list/releaseCard/releaseCardProjectRow.tsx @@ -21,7 +21,7 @@ import type {SVGIconProps} from 'sentry/icons/svgIcon'; import {t, tn} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Release, ReleaseProject} from 'sentry/types/release'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {ReleasesDisplayOption} from 'sentry/views/explore/releases/list/releasesDisplayOptions'; import type {ReleasesRequestRenderProps} from 'sentry/views/explore/releases/list/releasesRequest'; import { diff --git a/static/app/views/explore/releases/list/releasesRequest.tsx b/static/app/views/explore/releases/list/releasesRequest.tsx index cbde424cf5648e..9336bf95af3363 100644 --- a/static/app/views/explore/releases/list/releasesRequest.tsx +++ b/static/app/views/explore/releases/list/releasesRequest.tsx @@ -21,7 +21,8 @@ import type {PageFilters} from 'sentry/types/core'; import type {Organization, SessionApiResponse} from 'sentry/types/organization'; import {SessionFieldWithOperation} from 'sentry/types/organization'; import {HealthStatsPeriodOption} from 'sentry/types/release'; -import {defined, percent} from 'sentry/utils'; +import {percent} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; import {withApi} from 'sentry/utils/withApi'; import {getCrashFreePercent} from 'sentry/views/explore/releases/utils'; diff --git a/static/app/views/explore/releases/releaseBubbles/useReleaseBubbles.tsx b/static/app/views/explore/releases/releaseBubbles/useReleaseBubbles.tsx index a9e39c70e467de..d42f4b45228896 100644 --- a/static/app/views/explore/releases/releaseBubbles/useReleaseBubbles.tsx +++ b/static/app/views/explore/releases/releaseBubbles/useReleaseBubbles.tsx @@ -24,9 +24,9 @@ import type { Series, } from 'sentry/types/echarts'; import type {ReleaseMetaBasic} from 'sentry/types/release'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {getFormat} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {useNavigate} from 'sentry/utils/useNavigate'; import {useUser} from 'sentry/utils/useUser'; diff --git a/static/app/views/explore/releases/utils/index.tsx b/static/app/views/explore/releases/utils/index.tsx index 2d0360a8ee583f..34e9f5f582c34d 100644 --- a/static/app/views/explore/releases/utils/index.tsx +++ b/static/app/views/explore/releases/utils/index.tsx @@ -14,7 +14,7 @@ import {t, tct} from 'sentry/locale'; import type {PlatformKey} from 'sentry/types/platform'; import type {Release, SemverVersion, VersionInfo} from 'sentry/types/release'; import {ReleaseStatus} from 'sentry/types/release'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; import {IssueSortOptions} from 'sentry/views/issueList/utils'; diff --git a/static/app/views/explore/replays/detail/console/messageFormatter.tsx b/static/app/views/explore/replays/detail/console/messageFormatter.tsx index 782e6637ea9e98..046bda82ea029b 100644 --- a/static/app/views/explore/replays/detail/console/messageFormatter.tsx +++ b/static/app/views/explore/replays/detail/console/messageFormatter.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {BreadcrumbFrame, ConsoleFrame} from 'sentry/utils/replays/types'; import {isConsoleFrame} from 'sentry/utils/replays/types'; import {Format} from 'sentry/views/explore/replays/detail/console/format'; diff --git a/static/app/views/explore/replays/detail/console/useConsoleFilters.tsx b/static/app/views/explore/replays/detail/console/useConsoleFilters.tsx index 389b0f85cb5ae9..e9e2115b428e8b 100644 --- a/static/app/views/explore/replays/detail/console/useConsoleFilters.tsx +++ b/static/app/views/explore/replays/detail/console/useConsoleFilters.tsx @@ -1,7 +1,7 @@ import type {RefObject} from 'react'; import {useCallback, useMemo, useRef} from 'react'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeList, decodeScalar} from 'sentry/utils/queryString'; import {useFiltersInLocationQuery} from 'sentry/utils/replays/hooks/useFiltersInLocationQuery'; import { diff --git a/static/app/views/explore/replays/detail/header/replayDetailsPageBreadcrumbs.tsx b/static/app/views/explore/replays/detail/header/replayDetailsPageBreadcrumbs.tsx index eee211f7d5a74c..95a60fb77ceee7 100644 --- a/static/app/views/explore/replays/detail/header/replayDetailsPageBreadcrumbs.tsx +++ b/static/app/views/explore/replays/detail/header/replayDetailsPageBreadcrumbs.tsx @@ -13,8 +13,8 @@ import {useReplayContext} from 'sentry/components/replays/replayContext'; import {useLiveRefresh} from 'sentry/components/replays/replayLiveIndicator'; import {IconChevron, IconCopy, IconRefresh} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {getShortEventId} from 'sentry/utils/events'; import type {useLoadReplayReader} from 'sentry/utils/replays/hooks/useLoadReplayReader'; diff --git a/static/app/views/explore/replays/detail/header/replayItemDropdown.tsx b/static/app/views/explore/replays/detail/header/replayItemDropdown.tsx index 1021817963a88c..ffe1d5df0f441b 100644 --- a/static/app/views/explore/replays/detail/header/replayItemDropdown.tsx +++ b/static/app/views/explore/replays/detail/header/replayItemDropdown.tsx @@ -9,7 +9,7 @@ import {DropdownMenu} from 'sentry/components/dropdownMenu'; import {ExternalLink} from 'sentry/components/links/externalLink'; import {IconBug, IconDelete, IconDownload, IconEllipsis, IconUpload} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {downloadObjectAsJson} from 'sentry/utils/downloadObjectAsJson'; import {isActiveSuperuser} from 'sentry/utils/isActiveSuperuser'; import {useDeleteReplay} from 'sentry/utils/replays/hooks/useDeleteReplay'; diff --git a/static/app/views/explore/replays/detail/ourlogs/index.tsx b/static/app/views/explore/replays/detail/ourlogs/index.tsx index 533c0e35831c37..ae07769299a5da 100644 --- a/static/app/views/explore/replays/detail/ourlogs/index.tsx +++ b/static/app/views/explore/replays/detail/ourlogs/index.tsx @@ -5,8 +5,8 @@ import {Placeholder} from 'sentry/components/placeholder'; import {useReplayContext} from 'sentry/components/replays/replayContext'; import {GridBody} from 'sentry/components/tables/gridEditable/styles'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {LogsAnalyticsPageSource} from 'sentry/utils/analytics/logsAnalyticsEvent'; +import {defined} from 'sentry/utils/defined'; import {useReplayReader} from 'sentry/utils/replays/playback/providers/replayReaderProvider'; import {useCurrentHoverTime} from 'sentry/utils/replays/playback/providers/useCurrentHoverTime'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; diff --git a/static/app/views/explore/replays/list.tsx b/static/app/views/explore/replays/list.tsx index ff5acaaebd4101..58dfa594d18c95 100644 --- a/static/app/views/explore/replays/list.tsx +++ b/static/app/views/explore/replays/list.tsx @@ -16,7 +16,7 @@ import { import {useReplayTableSort} from 'sentry/components/replays/table/useReplayTableSort'; import {SentryDocumentTitle} from 'sentry/components/sentryDocumentTitle'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useHaveSelectedProjectsSentAnyReplayEvents} from 'sentry/utils/replays/hooks/useReplayOnboarding'; import {useReplayPageview} from 'sentry/utils/replays/hooks/useReplayPageview'; import {ReplayPreferencesContextProvider} from 'sentry/utils/replays/playback/providers/replayPreferencesContext'; diff --git a/static/app/views/explore/savedQueries/exploreParams.tsx b/static/app/views/explore/savedQueries/exploreParams.tsx index 70180c9d7de968..7ed6e6b1dbc0e6 100644 --- a/static/app/views/explore/savedQueries/exploreParams.tsx +++ b/static/app/views/explore/savedQueries/exploreParams.tsx @@ -8,7 +8,7 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {ProvidedFormattedQuery} from 'sentry/components/searchQueryBuilder/formattedQuery'; import {parseQueryBuilderValue} from 'sentry/components/searchQueryBuilder/utils'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getFieldDefinition} from 'sentry/utils/fields'; import {useDimensions} from 'sentry/utils/useDimensions'; import type {BaseVisualize} from 'sentry/views/explore/contexts/pageParamsContext/visualizes'; diff --git a/static/app/views/explore/spans/charts/confidenceFooter.tsx b/static/app/views/explore/spans/charts/confidenceFooter.tsx index 047a5082befb57..135f484c70e540 100644 --- a/static/app/views/explore/spans/charts/confidenceFooter.tsx +++ b/static/app/views/explore/spans/charts/confidenceFooter.tsx @@ -6,7 +6,7 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {Count} from 'sentry/components/count'; import {t, tct} from 'sentry/locale'; import type {Confidence} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { Placeholder, WarningIcon, diff --git a/static/app/views/explore/spans/charts/index.tsx b/static/app/views/explore/spans/charts/index.tsx index dbb8968e0e03f4..7f967fff00f37f 100644 --- a/static/app/views/explore/spans/charts/index.tsx +++ b/static/app/views/explore/spans/charts/index.tsx @@ -10,7 +10,7 @@ import {IconClock, IconGraph} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {ReactEchartsRef} from 'sentry/types/echarts'; import type {Confidence} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useChartInterval} from 'sentry/utils/useChartInterval'; import {useDismissAlert} from 'sentry/utils/useDismissAlert'; import {determineSeriesSampleCountAndIsSampled} from 'sentry/views/alerts/rules/metric/utils/determineSeriesSampleCount'; diff --git a/static/app/views/explore/spans/content.tsx b/static/app/views/explore/spans/content.tsx index 721c173ca54df7..144eb7aaeb2e97 100644 --- a/static/app/views/explore/spans/content.tsx +++ b/static/app/views/explore/spans/content.tsx @@ -14,7 +14,7 @@ import {TourContextProvider} from 'sentry/components/tours/components'; import {useAssistant} from 'sentry/components/tours/useAssistant'; import {t} from 'sentry/locale'; import {DataCategory} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useDatePageFilterProps} from 'sentry/utils/useDatePageFilterProps'; import { useMaxPickableDays, diff --git a/static/app/views/explore/spans/crossEvents/crossEventQueryingDropdown.tsx b/static/app/views/explore/spans/crossEvents/crossEventQueryingDropdown.tsx index 60c7b6a9dbcd22..4f23915787fbd5 100644 --- a/static/app/views/explore/spans/crossEvents/crossEventQueryingDropdown.tsx +++ b/static/app/views/explore/spans/crossEvents/crossEventQueryingDropdown.tsx @@ -5,8 +5,8 @@ import {Container} from '@sentry/scraps/layout'; import {DropdownMenu} from 'sentry/components/dropdownMenu'; import {IconAdd} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {MAX_CROSS_EVENT_QUERIES} from 'sentry/views/explore/constants'; import { diff --git a/static/app/views/explore/spans/spansQueryParams.tsx b/static/app/views/explore/spans/spansQueryParams.tsx index 61eacd2cebfc04..79d441025c6494 100644 --- a/static/app/views/explore/spans/spansQueryParams.tsx +++ b/static/app/views/explore/spans/spansQueryParams.tsx @@ -1,6 +1,6 @@ import type {Location} from 'history'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {Sort} from 'sentry/utils/discover/fields'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {decodeScalar} from 'sentry/utils/queryString'; diff --git a/static/app/views/explore/spans/spansTab.tsx b/static/app/views/explore/spans/spansTab.tsx index 97581bdfe780b7..239e370062d5a8 100644 --- a/static/app/views/explore/spans/spansTab.tsx +++ b/static/app/views/explore/spans/spansTab.tsx @@ -20,9 +20,9 @@ import {IconChevron} from 'sentry/icons/iconChevron'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {parseError} from 'sentry/utils/discover/genericDiscoverQuery'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {useChartInterval} from 'sentry/utils/useChartInterval'; diff --git a/static/app/views/explore/spans/spansTabSearchSection.tsx b/static/app/views/explore/spans/spansTabSearchSection.tsx index 4e22661ecbb389..be7d8555a6befb 100644 --- a/static/app/views/explore/spans/spansTabSearchSection.tsx +++ b/static/app/views/explore/spans/spansTabSearchSection.tsx @@ -18,7 +18,7 @@ import { import {useCaseInsensitivity} from 'sentry/components/searchQueryBuilder/hooks'; import {TourElement} from 'sentry/components/tours/components'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { ALLOWED_EXPLORE_VISUALIZE_AGGREGATES, type AggregationKey, diff --git a/static/app/views/explore/tables/aggregatesTable.tsx b/static/app/views/explore/tables/aggregatesTable.tsx index fe2187df9a24b6..87452aeb1309dd 100644 --- a/static/app/views/explore/tables/aggregatesTable.tsx +++ b/static/app/views/explore/tables/aggregatesTable.tsx @@ -14,8 +14,8 @@ import {IconStack} from 'sentry/icons/iconStack'; import {IconWarning} from 'sentry/icons/iconWarning'; import {t} from 'sentry/locale'; import type {TagCollection} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import {parseCursor} from 'sentry/utils/cursor'; +import {defined} from 'sentry/utils/defined'; import {fieldAlignment} from 'sentry/utils/discover/fields'; import {prettifyTagKey} from 'sentry/utils/fields'; import {useLocation} from 'sentry/utils/useLocation'; diff --git a/static/app/views/explore/tables/columnEditorModal.tsx b/static/app/views/explore/tables/columnEditorModal.tsx index 19b5ab51badaeb..a1ee8dcf839da2 100644 --- a/static/app/views/explore/tables/columnEditorModal.tsx +++ b/static/app/views/explore/tables/columnEditorModal.tsx @@ -16,7 +16,7 @@ import {IconAdd} from 'sentry/icons/iconAdd'; import {IconDelete} from 'sentry/icons/iconDelete'; import {t} from 'sentry/locale'; import type {TagCollection} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useDebouncedValue} from 'sentry/utils/useDebouncedValue'; import {buildAttributeOptions} from 'sentry/views/explore/components/attributeOption'; import { diff --git a/static/app/views/explore/tables/fieldRenderer.tsx b/static/app/views/explore/tables/fieldRenderer.tsx index 406fbab91000f4..312f130eafe661 100644 --- a/static/app/views/explore/tables/fieldRenderer.tsx +++ b/static/app/views/explore/tables/fieldRenderer.tsx @@ -13,7 +13,7 @@ import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {TimeSince} from 'sentry/components/timeSince'; import {t, tct} from 'sentry/locale'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {TableDataRow} from 'sentry/utils/discover/discoverQuery'; import type {EventData, MetaType} from 'sentry/utils/discover/eventView'; import {EventView} from 'sentry/utils/discover/eventView'; diff --git a/static/app/views/explore/tables/spansTable.tsx b/static/app/views/explore/tables/spansTable.tsx index 4f83e9d220398d..4602694c78b33c 100644 --- a/static/app/views/explore/tables/spansTable.tsx +++ b/static/app/views/explore/tables/spansTable.tsx @@ -9,7 +9,7 @@ import {GridResizer} from 'sentry/components/tables/gridEditable/styles'; import {IconArrow} from 'sentry/icons/iconArrow'; import {IconWarning} from 'sentry/icons/iconWarning'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {fieldAlignment} from 'sentry/utils/discover/fields'; import {prettifyTagKey} from 'sentry/utils/fields'; import { diff --git a/static/app/views/explore/tables/tracesTable/fieldRenderers.tsx b/static/app/views/explore/tables/tracesTable/fieldRenderers.tsx index 050f23c2788b01..4fb6850a77de48 100644 --- a/static/app/views/explore/tables/tracesTable/fieldRenderers.tsx +++ b/static/app/views/explore/tables/tracesTable/fieldRenderers.tsx @@ -16,7 +16,7 @@ import {pickBarColor} from 'sentry/components/performance/waterfall/utils'; import {PerformanceDuration} from 'sentry/components/performanceDuration'; import {TimeSince} from 'sentry/components/timeSince'; import {t, tct, tn} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {generateLinkToEventInTraceView} from 'sentry/utils/discover/urls'; import {getShortEventId} from 'sentry/utils/events'; import {Projects} from 'sentry/utils/projects'; diff --git a/static/app/views/explore/tables/tracesTable/index.tsx b/static/app/views/explore/tables/tracesTable/index.tsx index b9a27332b2a8a4..400fb5ad761750 100644 --- a/static/app/views/explore/tables/tracesTable/index.tsx +++ b/static/app/views/explore/tables/tracesTable/index.tsx @@ -18,8 +18,8 @@ import {IconArrow} from 'sentry/icons/iconArrow'; import {IconChevron} from 'sentry/icons/iconChevron'; import {IconWarning} from 'sentry/icons/iconWarning'; import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useProjects} from 'sentry/utils/useProjects'; diff --git a/static/app/views/explore/toolbar/toolbarSaveAs.tsx b/static/app/views/explore/toolbar/toolbarSaveAs.tsx index 03b0b9a2d73141..c1c51f22aec916 100644 --- a/static/app/views/explore/toolbar/toolbarSaveAs.tsx +++ b/static/app/views/explore/toolbar/toolbarSaveAs.tsx @@ -16,9 +16,9 @@ import {DropdownMenu, type MenuItemProps} from 'sentry/components/dropdownMenu'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {useCaseInsensitivity} from 'sentry/components/searchQueryBuilder/hooks'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {dedupeArray} from 'sentry/utils/dedupeArray'; +import {defined} from 'sentry/utils/defined'; import {encodeSort} from 'sentry/utils/discover/eventView'; import {parseFunction, prettifyParsedFunction} from 'sentry/utils/discover/fields'; import {valueIsEqual} from 'sentry/utils/object/valueIsEqual'; diff --git a/static/app/views/explore/utils.tsx b/static/app/views/explore/utils.tsx index 65a27a7b0cc315..c9e270b7352b9f 100644 --- a/static/app/views/explore/utils.tsx +++ b/static/app/views/explore/utils.tsx @@ -13,7 +13,8 @@ import type {PageFilters} from 'sentry/types/core'; import type {Tag, TagCollection} from 'sentry/types/group'; import type {Confidence, Organization} from 'sentry/types/organization'; import type {DetailedProject, Project} from 'sentry/types/project'; -import {defined, escapeDoubleQuotes} from 'sentry/utils'; +import {escapeDoubleQuotes} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {encodeSort} from 'sentry/utils/discover/eventView'; import type {Sort} from 'sentry/utils/discover/fields'; import { diff --git a/static/app/views/explore/utils/traceItemAttributeKeysOptions.tsx b/static/app/views/explore/utils/traceItemAttributeKeysOptions.tsx index 308bcc8483fd37..7023db84b5bf94 100644 --- a/static/app/views/explore/utils/traceItemAttributeKeysOptions.tsx +++ b/static/app/views/explore/utils/traceItemAttributeKeysOptions.tsx @@ -5,10 +5,10 @@ import type {PageFilters} from 'sentry/types/core'; import type {Tag, TagCollection} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import type {ApiResponse} from 'sentry/utils/api/apiFetch'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; import type {ApiQueryKey} from 'sentry/utils/api/apiQueryKey'; +import {defined} from 'sentry/utils/defined'; import {FieldKind} from 'sentry/utils/fields'; import type {TraceItemDataset} from 'sentry/views/explore/types'; import {findFreshEmptyPrefixSearchCacheMatch} from 'sentry/views/explore/utils/findFreshEmptyPrefixSearchCacheMatch'; diff --git a/static/app/views/insights/browser/webVitals/components/pageOverviewWebVitalsDetailPanel.tsx b/static/app/views/insights/browser/webVitals/components/pageOverviewWebVitalsDetailPanel.tsx index cfff88e3c58bdb..7cbc1d49a1d026 100644 --- a/static/app/views/insights/browser/webVitals/components/pageOverviewWebVitalsDetailPanel.tsx +++ b/static/app/views/insights/browser/webVitals/components/pageOverviewWebVitalsDetailPanel.tsx @@ -14,7 +14,7 @@ import type { } from 'sentry/components/tables/gridEditable'; import {COL_WIDTH_UNDEFINED, GridEditable} from 'sentry/components/tables/gridEditable'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {generateLinkToEventInTraceView} from 'sentry/utils/discover/urls'; import {getDuration} from 'sentry/utils/duration/getDuration'; import {getShortEventId} from 'sentry/utils/events'; diff --git a/static/app/views/insights/browser/webVitals/queries/useSpanSamplesCategorizedQuery.tsx b/static/app/views/insights/browser/webVitals/queries/useSpanSamplesCategorizedQuery.tsx index e65a589bea8d3b..8230a8ea0b5c69 100644 --- a/static/app/views/insights/browser/webVitals/queries/useSpanSamplesCategorizedQuery.tsx +++ b/static/app/views/insights/browser/webVitals/queries/useSpanSamplesCategorizedQuery.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { CLS_SPANS_FILTER, INTERACTION_SPANS_FILTER, diff --git a/static/app/views/insights/common/components/tableCells/timeSpentCell.tsx b/static/app/views/insights/common/components/tableCells/timeSpentCell.tsx index 135640d11ed8e1..96ac3d74f7061c 100644 --- a/static/app/views/insights/common/components/tableCells/timeSpentCell.tsx +++ b/static/app/views/insights/common/components/tableCells/timeSpentCell.tsx @@ -4,7 +4,7 @@ import {InfoText} from '@sentry/scraps/info'; import {ExternalLink} from '@sentry/scraps/link'; import {tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {NumberContainer} from 'sentry/utils/discover/styles'; import {getDuration} from 'sentry/utils/duration/getDuration'; import {formatSpanOperation} from 'sentry/utils/formatters'; diff --git a/static/app/views/insights/common/queries/useSortedTimeSeries.tsx b/static/app/views/insights/common/queries/useSortedTimeSeries.tsx index 8f05b302489d90..0b60bd913f87ed 100644 --- a/static/app/views/insights/common/queries/useSortedTimeSeries.tsx +++ b/static/app/views/insights/common/queries/useSortedTimeSeries.tsx @@ -7,7 +7,7 @@ import type { GroupedMultiSeriesEventsStats, MultiSeriesEventsStats, } from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {DataUnit} from 'sentry/utils/discover/fields'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {intervalToMilliseconds} from 'sentry/utils/duration/intervalToMilliseconds'; diff --git a/static/app/views/insights/common/queries/useSpansQuery.tsx b/static/app/views/insights/common/queries/useSpansQuery.tsx index 055f407ac609bb..9f00ef271a12ba 100644 --- a/static/app/views/insights/common/queries/useSpansQuery.tsx +++ b/static/app/views/insights/common/queries/useSpansQuery.tsx @@ -3,7 +3,7 @@ import moment from 'moment-timezone'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import type {CaseInsensitive} from 'sentry/components/searchQueryBuilder/hooks'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {TableData} from 'sentry/utils/discover/discoverQuery'; import {useDiscoverQuery} from 'sentry/utils/discover/discoverQuery'; import type {EventsMetaType, EventView, MetaType} from 'sentry/utils/discover/eventView'; diff --git a/static/app/views/insights/common/utils/releaseComparison.tsx b/static/app/views/insights/common/utils/releaseComparison.tsx index aeb26c9f4bcf44..6025c0d1a535b5 100644 --- a/static/app/views/insights/common/utils/releaseComparison.tsx +++ b/static/app/views/insights/common/utils/releaseComparison.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {MutableSearch} from 'sentry/utils/tokenizeSearch'; export function appendReleaseFilters( diff --git a/static/app/views/insights/common/utils/useEap.tsx b/static/app/views/insights/common/utils/useEap.tsx index 9e5721a7bf93b8..6753c0d2269732 100644 --- a/static/app/views/insights/common/utils/useEap.tsx +++ b/static/app/views/insights/common/utils/useEap.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/insights/crons/components/checkInCell.tsx b/static/app/views/insights/crons/components/checkInCell.tsx index f3957e79427abc..dfbbd54a1a93f0 100644 --- a/static/app/views/insights/crons/components/checkInCell.tsx +++ b/static/app/views/insights/crons/components/checkInCell.tsx @@ -18,7 +18,7 @@ import { } from 'sentry/components/statusIndicator'; import {t, tct} from 'sentry/locale'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getShortEventId} from 'sentry/utils/events'; import {useOrganization} from 'sentry/utils/useOrganization'; import {QuickContextHovercard} from 'sentry/views/discover/table/quickContext/quickContextHovercard'; diff --git a/static/app/views/insights/pages/platform/shared/table/ErrorRateCell.tsx b/static/app/views/insights/pages/platform/shared/table/ErrorRateCell.tsx index f811275ed39a56..012c448fbbcca6 100644 --- a/static/app/views/insights/pages/platform/shared/table/ErrorRateCell.tsx +++ b/static/app/views/insights/pages/platform/shared/table/ErrorRateCell.tsx @@ -4,7 +4,7 @@ import type {LocationDescriptor} from 'history'; import {Flex} from '@sentry/scraps/layout'; import {Link} from '@sentry/scraps/link'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {formatAbbreviatedNumber} from 'sentry/utils/formatters'; import {formatPercentage} from 'sentry/utils/number/formatPercentage'; import {ThresholdCell} from 'sentry/views/insights/pages/platform/shared/table/ThresholdCell'; diff --git a/static/app/views/issueDetails/actions/seerCommandPaletteActions.tsx b/static/app/views/issueDetails/actions/seerCommandPaletteActions.tsx index 596398f8559808..c00f8f3a8276ca 100644 --- a/static/app/views/issueDetails/actions/seerCommandPaletteActions.tsx +++ b/static/app/views/issueDetails/actions/seerCommandPaletteActions.tsx @@ -20,7 +20,7 @@ import {PluginIcon} from 'sentry/plugins/components/pluginIcon'; import type {Event} from 'sentry/types/event'; import type {Group} from 'sentry/types/group'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getConfigForIssueType} from 'sentry/utils/issueTypeConfig'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useAiConfig} from 'sentry/views/issueDetails/hooks/useAiConfig'; diff --git a/static/app/views/issueDetails/eventListTable.tsx b/static/app/views/issueDetails/eventListTable.tsx index 255009f7e11d07..3000050cb68def 100644 --- a/static/app/views/issueDetails/eventListTable.tsx +++ b/static/app/views/issueDetails/eventListTable.tsx @@ -14,8 +14,8 @@ import { } from 'sentry/components/tables/gridEditable/styles'; import {IconChevron} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {parseCursor} from 'sentry/utils/cursor'; +import {defined} from 'sentry/utils/defined'; import type {parseLinkHeader} from 'sentry/utils/parseLinkHeader'; import {useLocation} from 'sentry/utils/useLocation'; diff --git a/static/app/views/issueDetails/eventNavigation/issueDetailsEventNavigation.tsx b/static/app/views/issueDetails/eventNavigation/issueDetailsEventNavigation.tsx index d123d60d2318c2..565fc21400a39f 100644 --- a/static/app/views/issueDetails/eventNavigation/issueDetailsEventNavigation.tsx +++ b/static/app/views/issueDetails/eventNavigation/issueDetailsEventNavigation.tsx @@ -10,8 +10,8 @@ import {IconChevron} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Event} from 'sentry/types/event'; import type {Group} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {normalizeUrl} from 'sentry/utils/url/normalizeUrl'; import {useLocation} from 'sentry/utils/useLocation'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/issueDetails/groupDetails.tsx b/static/app/views/issueDetails/groupDetails.tsx index 85dfc61939d9de..84f54a78073057 100644 --- a/static/app/views/issueDetails/groupDetails.tsx +++ b/static/app/views/issueDetails/groupDetails.tsx @@ -25,8 +25,8 @@ import type {Group} from 'sentry/types/group'; import {GroupStatus, IssueType} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {getUtcDateString} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import { getAnalyticsDataForEvent, getAnalyticsDataForGroup, diff --git a/static/app/views/issueDetails/groupEventDetails/groupEventDetails.tsx b/static/app/views/issueDetails/groupEventDetails/groupEventDetails.tsx index f8542c52273ff7..944f4eb48df950 100644 --- a/static/app/views/issueDetails/groupEventDetails/groupEventDetails.tsx +++ b/static/app/views/issueDetails/groupEventDetails/groupEventDetails.tsx @@ -6,7 +6,7 @@ import {withMeta} from 'sentry/components/events/meta/metaProxy'; import {LoadingError} from 'sentry/components/loadingError'; import {useSentryAppComponentsData} from 'sentry/stores/useSentryAppComponentsData'; import type {GroupActivityReprocess, GroupReprocessing} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {VisuallyCompleteWithData} from 'sentry/utils/performanceForSentry'; import {useLocation} from 'sentry/utils/useLocation'; import {useMemoWithPrevious} from 'sentry/utils/useMemoWithPrevious'; diff --git a/static/app/views/issueDetails/groupEventDetails/groupEventDetailsContent.tsx b/static/app/views/issueDetails/groupEventDetails/groupEventDetailsContent.tsx index 120d8a937ec8f6..e6b857cdfb60d2 100644 --- a/static/app/views/issueDetails/groupEventDetails/groupEventDetailsContent.tsx +++ b/static/app/views/issueDetails/groupEventDetails/groupEventDetailsContent.tsx @@ -59,7 +59,7 @@ import {EntryType} from 'sentry/types/event'; import type {Group} from 'sentry/types/group'; import {IssueType} from 'sentry/types/group'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getConfigForIssueType} from 'sentry/utils/issueTypeConfig'; import { isJavascriptPlatform, diff --git a/static/app/views/issueDetails/groupFeatureFlags/hooks/useGroupFeatureFlags.tsx b/static/app/views/issueDetails/groupFeatureFlags/hooks/useGroupFeatureFlags.tsx index 77e085d3f6b991..79f2be9beb816a 100644 --- a/static/app/views/issueDetails/groupFeatureFlags/hooks/useGroupFeatureFlags.tsx +++ b/static/app/views/issueDetails/groupFeatureFlags/hooks/useGroupFeatureFlags.tsx @@ -1,5 +1,5 @@ -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import { useApiQuery, type ApiQueryKey, diff --git a/static/app/views/issueDetails/groupTags/useGroupTags.tsx b/static/app/views/issueDetails/groupTags/useGroupTags.tsx index bfe1ff8678d16a..4d4f7af9248537 100644 --- a/static/app/views/issueDetails/groupTags/useGroupTags.tsx +++ b/static/app/views/issueDetails/groupTags/useGroupTags.tsx @@ -1,5 +1,5 @@ -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import { useApiQuery, type ApiQueryKey, diff --git a/static/app/views/issueDetails/sidebar/detectorSection.tsx b/static/app/views/issueDetails/sidebar/detectorSection.tsx index fa88c3c592a777..e039947b3a5c91 100644 --- a/static/app/views/issueDetails/sidebar/detectorSection.tsx +++ b/static/app/views/issueDetails/sidebar/detectorSection.tsx @@ -9,7 +9,7 @@ import type {Group} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; import type {MetricDetector} from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getConfigForIssueType} from 'sentry/utils/issueTypeConfig'; import {useOrganization} from 'sentry/utils/useOrganization'; import {makeAlertsPathname} from 'sentry/views/alerts/pathnames'; diff --git a/static/app/views/issueDetails/sidebar/metricDetectorTriggeredSection.tsx b/static/app/views/issueDetails/sidebar/metricDetectorTriggeredSection.tsx index 6c03345a38f7e0..d88fe73be0a0d5 100644 --- a/static/app/views/issueDetails/sidebar/metricDetectorTriggeredSection.tsx +++ b/static/app/views/issueDetails/sidebar/metricDetectorTriggeredSection.tsx @@ -27,7 +27,7 @@ import type { SnubaQuery, SnubaQueryDataSource, } from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {SavedQueryDatasets} from 'sentry/utils/discover/types'; import {getExactDuration} from 'sentry/utils/duration/getExactDuration'; import {normalizeUrl} from 'sentry/utils/url/normalizeUrl'; diff --git a/static/app/views/issueDetails/sidebar/sizeAnalysisTriggeredSection.tsx b/static/app/views/issueDetails/sidebar/sizeAnalysisTriggeredSection.tsx index 39faeed60a6917..d7006337075760 100644 --- a/static/app/views/issueDetails/sidebar/sizeAnalysisTriggeredSection.tsx +++ b/static/app/views/issueDetails/sidebar/sizeAnalysisTriggeredSection.tsx @@ -6,7 +6,7 @@ import {t} from 'sentry/locale'; import type {Event, EventOccurrence} from 'sentry/types/event'; import type {Group} from 'sentry/types/group'; import type {MetricCondition} from 'sentry/types/workflowEngine/detectors'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {FoldSection} from 'sentry/views/issueDetails/foldSection'; import {getCompareBuildPath} from 'sentry/views/preprod/utils/buildLinkUtils'; diff --git a/static/app/views/issueDetails/utils.tsx b/static/app/views/issueDetails/utils.tsx index 577c5bee4a9ae2..d5e2e7cba8fb49 100644 --- a/static/app/views/issueDetails/utils.tsx +++ b/static/app/views/issueDetails/utils.tsx @@ -15,8 +15,8 @@ import {IssueListCacheStore} from 'sentry/stores/IssueListCacheStore'; import {useLegacyStore} from 'sentry/stores/useLegacyStore'; import type {Event} from 'sentry/types/event'; import type {Group, GroupActivity, TagValue} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useParams} from 'sentry/utils/useParams'; diff --git a/static/app/views/issueList/actions/utils.tsx b/static/app/views/issueList/actions/utils.tsx index 8f04c0016a861b..745381c5d9c9c3 100644 --- a/static/app/views/issueList/actions/utils.tsx +++ b/static/app/views/issueList/actions/utils.tsx @@ -14,8 +14,8 @@ import type {Client} from 'sentry/api'; import {t, tct, tn} from 'sentry/locale'; import {GroupStore} from 'sentry/stores/groupStore'; import type {PageFilters} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; import {safeParseQueryKey} from 'sentry/utils/api/apiQueryKey'; +import {defined} from 'sentry/utils/defined'; import {capitalize} from 'sentry/utils/string/capitalize'; import type {IssueUpdateData} from 'sentry/views/issueList/types'; diff --git a/static/app/views/issueList/issueViews/useSelectedGroupSeachView.tsx b/static/app/views/issueList/issueViews/useSelectedGroupSeachView.tsx index e473d3c521838d..20985a2ce1e4fa 100644 --- a/static/app/views/issueList/issueViews/useSelectedGroupSeachView.tsx +++ b/static/app/views/issueList/issueViews/useSelectedGroupSeachView.tsx @@ -1,7 +1,7 @@ import {useQueryClient} from '@tanstack/react-query'; import {useQuery} from '@tanstack/react-query'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useParams} from 'sentry/utils/useParams'; import {groupSearchViewApiOptions} from 'sentry/views/issueList/queries/groupSearchView'; diff --git a/static/app/views/issueList/mutations/useUpdateGroupSearchViewStarredOrder.tsx b/static/app/views/issueList/mutations/useUpdateGroupSearchViewStarredOrder.tsx index 2a55999a5aed23..9118721108560f 100644 --- a/static/app/views/issueList/mutations/useUpdateGroupSearchViewStarredOrder.tsx +++ b/static/app/views/issueList/mutations/useUpdateGroupSearchViewStarredOrder.tsx @@ -2,7 +2,7 @@ import {useQueryClient, useMutation} from '@tanstack/react-query'; import {addErrorMessage} from 'sentry/actionCreators/indicator'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {RequestError} from 'sentry/utils/requestError/requestError'; import {useApi} from 'sentry/utils/useApi'; import {starredGroupSearchViewsApiOptions} from 'sentry/views/issueList/queries/starredGroupSearchViews'; diff --git a/static/app/views/issueList/overview.tsx b/static/app/views/issueList/overview.tsx index 655d1bc5256f71..ec38a3b387bf2d 100644 --- a/static/app/views/issueList/overview.tsx +++ b/static/app/views/issueList/overview.tsx @@ -27,10 +27,10 @@ import {useLegacyStore} from 'sentry/stores/useLegacyStore'; import type {PageFilters} from 'sentry/types/core'; import type {BaseGroup, Group, PriorityLevel} from 'sentry/types/group'; import {GroupStatus} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; import {CursorPoller} from 'sentry/utils/cursorPoller'; import {getUtcDateString} from 'sentry/utils/dates'; +import {defined} from 'sentry/utils/defined'; import {getCurrentSentryReactRootSpan} from 'sentry/utils/getCurrentSentryReactRootSpan'; import {useProjectMembersQueryOptions} from 'sentry/utils/members/projectMembers'; import {indexMembersByProject} from 'sentry/utils/members/shared'; diff --git a/static/app/views/issueList/overviewWrapper.tsx b/static/app/views/issueList/overviewWrapper.tsx index 330fc6037075d8..6493f88d10237a 100644 --- a/static/app/views/issueList/overviewWrapper.tsx +++ b/static/app/views/issueList/overviewWrapper.tsx @@ -1,6 +1,6 @@ import {TAXONOMY_DEFAULT_QUERY} from 'sentry/constants'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {IssueListContainer} from 'sentry/views/issueList'; import IssueListOverview from 'sentry/views/issueList/overview'; diff --git a/static/app/views/navigation/secondary/sections/dashboards/dashboardsSecondaryNavigation.tsx b/static/app/views/navigation/secondary/sections/dashboards/dashboardsSecondaryNavigation.tsx index 7c6e4fb8e30978..afaded856a3489 100644 --- a/static/app/views/navigation/secondary/sections/dashboards/dashboardsSecondaryNavigation.tsx +++ b/static/app/views/navigation/secondary/sections/dashboards/dashboardsSecondaryNavigation.tsx @@ -4,7 +4,7 @@ import * as Sentry from '@sentry/react'; import {ErrorBoundary} from 'sentry/components/errorBoundary'; import {t} from 'sentry/locale'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeScalar} from 'sentry/utils/queryString'; import {useLocation} from 'sentry/utils/useLocation'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/navigation/secondary/sections/explore/exploreSavedQueryNavigationItems.tsx b/static/app/views/navigation/secondary/sections/explore/exploreSavedQueryNavigationItems.tsx index fc110148e2980b..e2d923c5eb043a 100644 --- a/static/app/views/navigation/secondary/sections/explore/exploreSavedQueryNavigationItems.tsx +++ b/static/app/views/navigation/secondary/sections/explore/exploreSavedQueryNavigationItems.tsx @@ -1,7 +1,7 @@ import {Text} from '@sentry/scraps/text'; import {Tooltip} from '@sentry/scraps/tooltip'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeScalar} from 'sentry/utils/queryString'; import {useLocation} from 'sentry/utils/useLocation'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/navigation/secondary/sections/issues/issueViews/issueViewItem.tsx b/static/app/views/navigation/secondary/sections/issues/issueViews/issueViewItem.tsx index ee5466513209d1..067a952e64d4d6 100644 --- a/static/app/views/navigation/secondary/sections/issues/issueViews/issueViewItem.tsx +++ b/static/app/views/navigation/secondary/sections/issues/issueViews/issueViewItem.tsx @@ -5,8 +5,8 @@ import {Text} from '@sentry/scraps/text'; import {Tooltip} from '@sentry/scraps/tooltip'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {oxfordizeArray} from 'sentry/utils/oxfordizeArray'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useProjects} from 'sentry/utils/useProjects'; diff --git a/static/app/views/navigation/secondary/sections/issues/issueViews/useStarredIssueViews.tsx b/static/app/views/navigation/secondary/sections/issues/issueViews/useStarredIssueViews.tsx index 69c463d9398574..b7a1012b9ebf63 100644 --- a/static/app/views/navigation/secondary/sections/issues/issueViews/useStarredIssueViews.tsx +++ b/static/app/views/navigation/secondary/sections/issues/issueViews/useStarredIssueViews.tsx @@ -1,7 +1,7 @@ import {useCallback} from 'react'; import {useQuery, useQueryClient} from '@tanstack/react-query'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {starredGroupSearchViewsApiOptions} from 'sentry/views/issueList/queries/starredGroupSearchViews'; import type {StarredGroupSearchView} from 'sentry/views/issueList/types'; diff --git a/static/app/views/navigation/secondary/sections/settings/settingsSecondaryNavigation.tsx b/static/app/views/navigation/secondary/sections/settings/settingsSecondaryNavigation.tsx index 2c7c9fe184f102..1c1fc0fcfa80a8 100644 --- a/static/app/views/navigation/secondary/sections/settings/settingsSecondaryNavigation.tsx +++ b/static/app/views/navigation/secondary/sections/settings/settingsSecondaryNavigation.tsx @@ -1,4 +1,4 @@ -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useParams} from 'sentry/utils/useParams'; import {usePrimaryNavigation} from 'sentry/views/navigation/primaryNavigationContext'; diff --git a/static/app/views/onboarding/onboarding.tsx b/static/app/views/onboarding/onboarding.tsx index aba372c368cfcf..a69f0154c99a90 100644 --- a/static/app/views/onboarding/onboarding.tsx +++ b/static/app/views/onboarding/onboarding.tsx @@ -21,8 +21,8 @@ import {IconArrow} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {OnboardingSelectedSDK} from 'sentry/types/onboarding'; import type {PlatformKey} from 'sentry/types/platform'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {useReplayForCriticalFlow} from 'sentry/utils/replays/useReplayForCriticalFlow'; import {normalizeUrl} from 'sentry/utils/url/normalizeUrl'; import {useExperiment} from 'sentry/utils/useExperiment'; diff --git a/static/app/views/onboarding/useBackActions.tsx b/static/app/views/onboarding/useBackActions.tsx index 47a83ac252ebc3..869bcfa2731166 100644 --- a/static/app/views/onboarding/useBackActions.tsx +++ b/static/app/views/onboarding/useBackActions.tsx @@ -4,8 +4,8 @@ import {useBlocker} from 'react-router-dom'; import {removeProject} from 'sentry/actionCreators/projects'; import {useOnboardingContext} from 'sentry/components/onboarding/onboardingContext'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {handleXhrErrorResponse} from 'sentry/utils/handleXhrErrorResponse'; import type {RequestError} from 'sentry/utils/requestError/requestError'; import {normalizeUrl} from 'sentry/utils/url/normalizeUrl'; diff --git a/static/app/views/performance/landing/widgets/transforms/transformDiscoverToList.tsx b/static/app/views/performance/landing/widgets/transforms/transformDiscoverToList.tsx index 14a279fa27dea7..aa1159d728f9b6 100644 --- a/static/app/views/performance/landing/widgets/transforms/transformDiscoverToList.tsx +++ b/static/app/views/performance/landing/widgets/transforms/transformDiscoverToList.tsx @@ -1,5 +1,5 @@ import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {TableData, TableDataRow} from 'sentry/utils/discover/discoverQuery'; import type {GenericChildrenProps} from 'sentry/utils/discover/genericDiscoverQuery'; import {DEFAULT_STATS_PERIOD} from 'sentry/views/performance/data'; diff --git a/static/app/views/performance/landing/widgets/transforms/transformEventsToArea.tsx b/static/app/views/performance/landing/widgets/transforms/transformEventsToArea.tsx index 24e68e963180f9..ee0694f26feebf 100644 --- a/static/app/views/performance/landing/widgets/transforms/transformEventsToArea.tsx +++ b/static/app/views/performance/landing/widgets/transforms/transformEventsToArea.tsx @@ -1,6 +1,6 @@ import type {RenderProps} from 'sentry/components/charts/eventsRequest'; import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type { QueryDefinitionWithKey, WidgetDataConstraint, diff --git a/static/app/views/performance/landing/widgets/transforms/transformEventsToStackedBars.tsx b/static/app/views/performance/landing/widgets/transforms/transformEventsToStackedBars.tsx index 20fbebc1b4a345..2237771f562175 100644 --- a/static/app/views/performance/landing/widgets/transforms/transformEventsToStackedBars.tsx +++ b/static/app/views/performance/landing/widgets/transforms/transformEventsToStackedBars.tsx @@ -1,6 +1,6 @@ import type {RenderProps} from 'sentry/components/charts/eventsRequest'; import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type { QueryDefinitionWithKey, WidgetDataConstraint, diff --git a/static/app/views/performance/landing/widgets/widgets/mobileReleaseComparisonListWidget.tsx b/static/app/views/performance/landing/widgets/widgets/mobileReleaseComparisonListWidget.tsx index 472daa2b515b43..0747427363ade7 100644 --- a/static/app/views/performance/landing/widgets/widgets/mobileReleaseComparisonListWidget.tsx +++ b/static/app/views/performance/landing/widgets/widgets/mobileReleaseComparisonListWidget.tsx @@ -15,7 +15,7 @@ import {PerformanceDuration} from 'sentry/components/performanceDuration'; import {Truncate} from 'sentry/components/truncate'; import {t} from 'sentry/locale'; import type {Series} from 'sentry/types/echarts'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {tooltipFormatterUsingAggregateOutputType} from 'sentry/utils/discover/charts'; import {DiscoverQuery} from 'sentry/utils/discover/discoverQuery'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; diff --git a/static/app/views/performance/newTraceDetails/issuesTraceWaterfallOverlay.tsx b/static/app/views/performance/newTraceDetails/issuesTraceWaterfallOverlay.tsx index 9ce2708c090649..9cc2783a369f7d 100644 --- a/static/app/views/performance/newTraceDetails/issuesTraceWaterfallOverlay.tsx +++ b/static/app/views/performance/newTraceDetails/issuesTraceWaterfallOverlay.tsx @@ -9,8 +9,8 @@ import {Link} from '@sentry/scraps/link'; import {generateTraceTarget} from 'sentry/components/quickTrace/utils'; import type {Event} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {useLocation} from 'sentry/utils/useLocation'; import {useOrganization} from 'sentry/utils/useOrganization'; import {isCollapsedNode} from 'sentry/views/performance/newTraceDetails/traceGuards'; diff --git a/static/app/views/performance/newTraceDetails/traceContextVitals.tsx b/static/app/views/performance/newTraceDetails/traceContextVitals.tsx index 823b8d9ee1a871..7916e01b4d3745 100644 --- a/static/app/views/performance/newTraceDetails/traceContextVitals.tsx +++ b/static/app/views/performance/newTraceDetails/traceContextVitals.tsx @@ -6,7 +6,7 @@ import {Flex} from '@sentry/scraps/layout'; import {Tooltip} from '@sentry/scraps/tooltip'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getDuration} from 'sentry/utils/duration/getDuration'; import type {MobileVital, WebVital} from 'sentry/utils/fields'; import {VITAL_DETAILS} from 'sentry/utils/performance/vitals/constants'; diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/profiling/profilePreview.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/profiling/profilePreview.tsx index 63ab5b9dbfa91c..4f0e42a02ccf35 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/profiling/profilePreview.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/profiling/profilePreview.tsx @@ -13,8 +13,8 @@ import {FlamegraphPreview} from 'sentry/components/profiling/flamegraph/flamegra import {t} from 'sentry/locale'; import type {EventTransaction} from 'sentry/types/event'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import type {CanvasView} from 'sentry/utils/profiling/canvasView'; import {colorComponentsToRGBA} from 'sentry/utils/profiling/colors/utils'; import {Flamegraph as FlamegraphModel} from 'sentry/utils/profiling/flamegraph'; diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/span/components/profileDetails.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/span/components/profileDetails.tsx index a30e8cf17fe965..60ab21e1c25516 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/span/components/profileDetails.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/span/components/profileDetails.tsx @@ -9,7 +9,7 @@ import {t} from 'sentry/locale'; import type {EventTransaction} from 'sentry/types/event'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {FoldSection} from 'sentry/views/issueDetails/foldSection'; export function ProfileDetails({ diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/span/index.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/span/index.tsx index 33c6d22bab375b..709c1db49640a8 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/span/index.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/span/index.tsx @@ -15,8 +15,8 @@ import {t} from 'sentry/locale'; import type {EventTransaction} from 'sentry/types/event'; import type {NewQuery, Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {LogsAnalyticsPageSource} from 'sentry/utils/analytics/logsAnalyticsEvent'; +import {defined} from 'sentry/utils/defined'; import {EventView} from 'sentry/utils/discover/eventView'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; import {useLocation} from 'sentry/utils/useLocation'; diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/ancestry.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/ancestry.tsx index 7d96dd9a970b64..968f703872d618 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/ancestry.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/ancestry.tsx @@ -3,7 +3,7 @@ import type {Location} from 'history'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {SpanFields} from 'sentry/views/insights/types'; import { TraceDrawerComponents, diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/keys.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/keys.tsx index 19bf1ac836fbb7..acf9925b51fb7f 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/keys.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/keys.tsx @@ -16,7 +16,7 @@ import { import {OpsDot} from 'sentry/components/events/opsBreakdown'; import {FileSize} from 'sentry/components/fileSize'; import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {toTitleCase} from 'sentry/utils/string/toTitleCase'; import { TraceDrawerComponents, diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/measurements.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/measurements.tsx index 194e9d80e9e42d..c25fa74376850f 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/measurements.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/span/sections/measurements.tsx @@ -10,7 +10,7 @@ import { } from 'sentry/components/events/eventCustomPerformanceMetrics'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { DURATION_UNITS, FIELD_FORMATTERS, diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/additionalData.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/additionalData.tsx index 1e839a62970b4c..7c8916bb0988a7 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/additionalData.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/additionalData.tsx @@ -7,7 +7,7 @@ import {getKnownData} from 'sentry/components/events/contexts/utils'; import {StructuredData} from 'sentry/components/structuredEventData'; import {t} from 'sentry/locale'; import type {EventTransaction} from 'sentry/types/event'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isEmptyObject} from 'sentry/utils/object/isEmptyObject'; import {TraceDrawerComponents} from 'sentry/views/performance/newTraceDetails/traceDrawer/details/styles'; diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/request.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/request.tsx index 407cb3e5315f74..d3d106ce5af463 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/request.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/request.tsx @@ -19,7 +19,7 @@ import {IconOpen} from 'sentry/icons'; import {t} from 'sentry/locale'; import {EntryType, type EntryRequest, type EventTransaction} from 'sentry/types/event'; import type {Meta} from 'sentry/types/group'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {isValidUrl} from 'sentry/utils/string/isValidUrl'; import { TraceDrawerComponents, diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/utils.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/utils.tsx index 970c1bcc96ef74..99fef46eea05ac 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/utils.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/utils.tsx @@ -6,7 +6,7 @@ import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; import {t} from 'sentry/locale'; import type {EventTransaction, Level} from 'sentry/types/event'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {FieldValueType, getFieldDefinition} from 'sentry/utils/fields'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; import type {AttributesTreeContent} from 'sentry/views/explore/components/traceItemAttributes/attributesTree'; diff --git a/static/app/views/performance/newTraceDetails/traceHeader/projects.tsx b/static/app/views/performance/newTraceDetails/traceHeader/projects.tsx index 8069108f6d868c..14edf85bb1cab5 100644 --- a/static/app/views/performance/newTraceDetails/traceHeader/projects.tsx +++ b/static/app/views/performance/newTraceDetails/traceHeader/projects.tsx @@ -2,7 +2,7 @@ import {useCallback, useMemo} from 'react'; import styled from '@emotion/styled'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { OurLogKnownFieldKey, type OurLogsResponseItem, diff --git a/static/app/views/performance/newTraceDetails/traceSearch/traceSearchEvaluator.tsx b/static/app/views/performance/newTraceDetails/traceSearch/traceSearchEvaluator.tsx index f4bea51fbd1fc4..01bf54e0db7d7d 100644 --- a/static/app/views/performance/newTraceDetails/traceSearch/traceSearchEvaluator.tsx +++ b/static/app/views/performance/newTraceDetails/traceSearch/traceSearchEvaluator.tsx @@ -10,7 +10,7 @@ import { Token, type TokenResult, } from 'sentry/components/searchSyntax/parser'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {TraceTree} from 'sentry/views/performance/newTraceDetails/traceModels/traceTree'; import type {BaseNode} from 'sentry/views/performance/newTraceDetails/traceModels/traceTreeNode/baseNode'; diff --git a/static/app/views/performance/newTraceDetails/useTraceStateAnalytics.tsx b/static/app/views/performance/newTraceDetails/useTraceStateAnalytics.tsx index eefd85a6409d1e..42f3f664b8b37c 100644 --- a/static/app/views/performance/newTraceDetails/useTraceStateAnalytics.tsx +++ b/static/app/views/performance/newTraceDetails/useTraceStateAnalytics.tsx @@ -2,7 +2,7 @@ import {useEffect} from 'react'; import {getRelativeDate} from 'sentry/components/timeSince'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useProjects} from 'sentry/utils/useProjects'; import type {TraceQueryResult} from 'sentry/views/performance/newTraceDetails/traceApi/useTrace'; diff --git a/static/app/views/performance/transactionSummary/pageLayout.tsx b/static/app/views/performance/transactionSummary/pageLayout.tsx index 305e72fdc137a5..1f61e0ac63778d 100644 --- a/static/app/views/performance/transactionSummary/pageLayout.tsx +++ b/static/app/views/performance/transactionSummary/pageLayout.tsx @@ -21,8 +21,8 @@ import {t} from 'sentry/locale'; import {DataCategory} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {DiscoverQuery} from 'sentry/utils/discover/discoverQuery'; import type {EventView} from 'sentry/utils/discover/eventView'; import { diff --git a/static/app/views/performance/transactionSummary/teamKeyTransactionButton.tsx b/static/app/views/performance/transactionSummary/teamKeyTransactionButton.tsx index d0d468eed97ea6..41d9359c5ea709 100644 --- a/static/app/views/performance/transactionSummary/teamKeyTransactionButton.tsx +++ b/static/app/views/performance/transactionSummary/teamKeyTransactionButton.tsx @@ -8,7 +8,7 @@ import {IconStar} from 'sentry/icons'; import {t, tn} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {EventView} from 'sentry/utils/discover/eventView'; import {useTeams} from 'sentry/utils/useTeams'; import {withProjects} from 'sentry/utils/withProjects'; diff --git a/static/app/views/performance/transactionSummary/transactionThresholdButton.tsx b/static/app/views/performance/transactionSummary/transactionThresholdButton.tsx index 4e356c48d697f9..71402bd8fad711 100644 --- a/static/app/views/performance/transactionSummary/transactionThresholdButton.tsx +++ b/static/app/views/performance/transactionSummary/transactionThresholdButton.tsx @@ -9,7 +9,7 @@ import {IconSettings} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {EventView} from 'sentry/utils/discover/eventView'; import {getRequestErrorUserMessage} from 'sentry/utils/requestError/getRequestErrorUserMessage'; import {RequestError} from 'sentry/utils/requestError/requestError'; diff --git a/static/app/views/performance/transactionSummary/transactionThresholdModal.tsx b/static/app/views/performance/transactionSummary/transactionThresholdModal.tsx index d6ea927152f798..f8bd8fec4a21dc 100644 --- a/static/app/views/performance/transactionSummary/transactionThresholdModal.tsx +++ b/static/app/views/performance/transactionSummary/transactionThresholdModal.tsx @@ -15,7 +15,7 @@ import {FieldGroup} from 'sentry/components/forms/fieldGroup'; import {t, tct} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {EventView} from 'sentry/utils/discover/eventView'; import {RequestError} from 'sentry/utils/requestError/requestError'; import {withApi} from 'sentry/utils/withApi'; diff --git a/static/app/views/projectDetail/charts/projectErrorsBasicChart.tsx b/static/app/views/projectDetail/charts/projectErrorsBasicChart.tsx index e682d95a06a1a4..04c917290b48fb 100644 --- a/static/app/views/projectDetail/charts/projectErrorsBasicChart.tsx +++ b/static/app/views/projectDetail/charts/projectErrorsBasicChart.tsx @@ -10,8 +10,8 @@ import {LoadingError} from 'sentry/components/loadingError'; import {DEFAULT_STATS_PERIOD} from 'sentry/constants'; import {t} from 'sentry/locale'; import type {Project, ProjectStats} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; export const ERRORS_BASIC_CHART_PERIODS = ['1h', '24h', '7d', '14d', '30d']; diff --git a/static/app/views/projectDetail/charts/projectSessionsAnrRequest.tsx b/static/app/views/projectDetail/charts/projectSessionsAnrRequest.tsx index f2f54ffdc5893b..d34879315b2850 100644 --- a/static/app/views/projectDetail/charts/projectSessionsAnrRequest.tsx +++ b/static/app/views/projectDetail/charts/projectSessionsAnrRequest.tsx @@ -8,8 +8,8 @@ import {normalizeDateTimeParams} from 'sentry/components/pageFilters/parse'; import {t} from 'sentry/locale'; import type {Series} from 'sentry/types/echarts'; import type {SessionApiResponse} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {getPeriod} from 'sentry/utils/duration/getPeriod'; import {useApiQuery} from 'sentry/utils/queryClient'; import {filterSessionsInTimeWindow, getSessionsInterval} from 'sentry/utils/sessions'; diff --git a/static/app/views/projectDetail/projectCharts.tsx b/static/app/views/projectDetail/projectCharts.tsx index 9dbd13b1618c26..94a21604c785b7 100644 --- a/static/app/views/projectDetail/projectCharts.tsx +++ b/static/app/views/projectDetail/projectCharts.tsx @@ -27,8 +27,8 @@ import {t} from 'sentry/locale'; import type {SelectValue} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {DiscoverDatasets} from 'sentry/utils/discover/types'; import {decodeScalar} from 'sentry/utils/queryString'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; diff --git a/static/app/views/projectDetail/projectDetail.tsx b/static/app/views/projectDetail/projectDetail.tsx index ecf95011f5e098..b0be7e92dbff4f 100644 --- a/static/app/views/projectDetail/projectDetail.tsx +++ b/static/app/views/projectDetail/projectDetail.tsx @@ -23,7 +23,7 @@ import {SentryDocumentTitle} from 'sentry/components/sentryDocumentTitle'; import {DEFAULT_RELATIVE_PERIODS} from 'sentry/constants'; import {IconSettings} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeScalar} from 'sentry/utils/queryString'; import {routeTitleGen} from 'sentry/utils/routeTitle'; import {useApi} from 'sentry/utils/useApi'; diff --git a/static/app/views/projectDetail/projectScoreCards/projectAnrScoreCard.tsx b/static/app/views/projectDetail/projectScoreCards/projectAnrScoreCard.tsx index 8f9371f408e757..a9c89548e927e6 100644 --- a/static/app/views/projectDetail/projectScoreCards/projectAnrScoreCard.tsx +++ b/static/app/views/projectDetail/projectScoreCards/projectAnrScoreCard.tsx @@ -14,8 +14,8 @@ import {t} from 'sentry/locale'; import type {PageFilters} from 'sentry/types/core'; import type {Organization, SessionApiResponse} from 'sentry/types/organization'; import type {PlatformKey} from 'sentry/types/platform'; -import {defined} from 'sentry/utils'; import {trackAnalytics} from 'sentry/utils/analytics'; +import {defined} from 'sentry/utils/defined'; import {getPeriod} from 'sentry/utils/duration/getPeriod'; import {BigNumberWidgetVisualization} from 'sentry/views/dashboards/widgets/bigNumberWidget/bigNumberWidgetVisualization'; import {Widget} from 'sentry/views/dashboards/widgets/widget/widget'; diff --git a/static/app/views/projectDetail/projectScoreCards/projectApdexScoreCard.tsx b/static/app/views/projectDetail/projectScoreCards/projectApdexScoreCard.tsx index d54e911a59d3be..5577277edf5ad7 100644 --- a/static/app/views/projectDetail/projectScoreCards/projectApdexScoreCard.tsx +++ b/static/app/views/projectDetail/projectScoreCards/projectApdexScoreCard.tsx @@ -7,8 +7,8 @@ import {DEFAULT_STATS_PERIOD} from 'sentry/constants'; import {t} from 'sentry/locale'; import type {PageFilters} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import type {TableData} from 'sentry/utils/discover/discoverQuery'; import {getPeriod} from 'sentry/utils/duration/getPeriod'; import {useApiQuery} from 'sentry/utils/queryClient'; diff --git a/static/app/views/projectDetail/projectScoreCards/projectStabilityScoreCard.tsx b/static/app/views/projectDetail/projectScoreCards/projectStabilityScoreCard.tsx index 700edfc686d268..38ad4dfaf1909a 100644 --- a/static/app/views/projectDetail/projectScoreCards/projectStabilityScoreCard.tsx +++ b/static/app/views/projectDetail/projectScoreCards/projectStabilityScoreCard.tsx @@ -9,8 +9,8 @@ import type {PageFilters} from 'sentry/types/core'; import type {SessionApiResponse} from 'sentry/types/organization'; import {SessionFieldWithOperation} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {getPeriod} from 'sentry/utils/duration/getPeriod'; import {useApiQuery} from 'sentry/utils/queryClient'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/app/views/projectDetail/projectScoreCards/projectVelocityScoreCard.tsx b/static/app/views/projectDetail/projectScoreCards/projectVelocityScoreCard.tsx index dafe1f441877f2..79110c5a6cebf6 100644 --- a/static/app/views/projectDetail/projectScoreCards/projectVelocityScoreCard.tsx +++ b/static/app/views/projectDetail/projectScoreCards/projectVelocityScoreCard.tsx @@ -7,8 +7,8 @@ import {DEFAULT_STATS_PERIOD} from 'sentry/constants'; import {t} from 'sentry/locale'; import type {PageFilters} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {getPeriod} from 'sentry/utils/duration/getPeriod'; import {useApiQuery} from 'sentry/utils/queryClient'; import {BigNumberWidgetVisualization} from 'sentry/views/dashboards/widgets/bigNumberWidget/bigNumberWidgetVisualization'; diff --git a/static/app/views/projectsDashboard/projectCard.tsx b/static/app/views/projectsDashboard/projectCard.tsx index 49ea75816e400d..6368b0242b259a 100644 --- a/static/app/views/projectsDashboard/projectCard.tsx +++ b/static/app/views/projectsDashboard/projectCard.tsx @@ -22,7 +22,7 @@ import { import {IconArrow, IconSettings} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {formatAbbreviatedNumber} from 'sentry/utils/formatters'; import {useOrganization} from 'sentry/utils/useOrganization'; import { diff --git a/static/app/views/settings/components/dataScrubbing/index.tsx b/static/app/views/settings/components/dataScrubbing/index.tsx index e52609792297ed..99bc31c943dfea 100644 --- a/static/app/views/settings/components/dataScrubbing/index.tsx +++ b/static/app/views/settings/components/dataScrubbing/index.tsx @@ -15,7 +15,7 @@ import {IconWarning} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useApi} from 'sentry/utils/useApi'; import {useNavigate} from 'sentry/utils/useNavigate'; import {useParams} from 'sentry/utils/useParams'; diff --git a/static/app/views/settings/components/dataScrubbing/modals/form/sourceField.tsx b/static/app/views/settings/components/dataScrubbing/modals/form/sourceField.tsx index e2946dd3bcb83c..94d0b2811d54a9 100644 --- a/static/app/views/settings/components/dataScrubbing/modals/form/sourceField.tsx +++ b/static/app/views/settings/components/dataScrubbing/modals/form/sourceField.tsx @@ -6,7 +6,7 @@ import {Text} from '@sentry/scraps/text'; import {TextOverflow} from 'sentry/components/textOverflow'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {SourceSuggestion} from 'sentry/views/settings/components/dataScrubbing/types'; import {SourceSuggestionType} from 'sentry/views/settings/components/dataScrubbing/types'; import { diff --git a/static/app/views/settings/project/projectFilters/groupTombstones.tsx b/static/app/views/settings/project/projectFilters/groupTombstones.tsx index 12e103746df9c7..e98714dab7407f 100644 --- a/static/app/views/settings/project/projectFilters/groupTombstones.tsx +++ b/static/app/views/settings/project/projectFilters/groupTombstones.tsx @@ -22,8 +22,8 @@ import {IconDelete} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {GroupTombstone} from 'sentry/types/group'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {getMessage, getTitle} from 'sentry/utils/events'; import {useApi} from 'sentry/utils/useApi'; import {useLocation} from 'sentry/utils/useLocation'; diff --git a/static/app/views/settings/project/projectKeys/details/keyRateLimitsForm.tsx b/static/app/views/settings/project/projectKeys/details/keyRateLimitsForm.tsx index a8e7347764e2c4..5162bcf43c7f2e 100644 --- a/static/app/views/settings/project/projectKeys/details/keyRateLimitsForm.tsx +++ b/static/app/views/settings/project/projectKeys/details/keyRateLimitsForm.tsx @@ -20,7 +20,7 @@ import {t, tct, tn} from 'sentry/locale'; import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import type {Organization} from 'sentry/types/organization'; import type {Project, ProjectKey} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getExactDuration} from 'sentry/utils/duration/getExactDuration'; import {fetchMutation} from 'sentry/utils/queryClient'; import {RequestError} from 'sentry/utils/requestError/requestError'; diff --git a/static/app/views/settings/project/projectOwnership/ownerInput.tsx b/static/app/views/settings/project/projectOwnership/ownerInput.tsx index c058e837f7959c..4a2b1449277f11 100644 --- a/static/app/views/settings/project/projectOwnership/ownerInput.tsx +++ b/static/app/views/settings/project/projectOwnership/ownerInput.tsx @@ -15,7 +15,7 @@ import {t} from 'sentry/locale'; import type {IssueOwnership} from 'sentry/types/group'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {trackIntegrationAnalytics} from 'sentry/utils/integrationUtil'; import {RequestError} from 'sentry/utils/requestError/requestError'; diff --git a/static/app/views/settings/project/projectOwnership/ownershipRulesTable.tsx b/static/app/views/settings/project/projectOwnership/ownershipRulesTable.tsx index 537941b82628e6..1d376938115e32 100644 --- a/static/app/views/settings/project/projectOwnership/ownershipRulesTable.tsx +++ b/static/app/views/settings/project/projectOwnership/ownershipRulesTable.tsx @@ -19,7 +19,7 @@ import {TeamStore} from 'sentry/stores/teamStore'; import type {Actor} from 'sentry/types/core'; import type {CodeOwner} from 'sentry/types/integrations'; import type {ParsedOwnershipRule} from 'sentry/types/ownership'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useMembers} from 'sentry/utils/members/useMembers'; import {useTeams} from 'sentry/utils/useTeams'; import {useUser} from 'sentry/utils/useUser'; diff --git a/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx b/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx index b0c5cb3454b5a2..6b708107d9c1ba 100644 --- a/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx +++ b/static/app/views/settings/projectDebugFiles/sources/customRepositories/index.tsx @@ -18,7 +18,7 @@ import {ProjectsStore} from 'sentry/stores/projectsStore'; import type {CustomRepo, CustomRepoType} from 'sentry/types/debugFiles'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useNavigate} from 'sentry/utils/useNavigate'; import {Repository} from './repository'; diff --git a/static/app/views/settings/projectSourceMaps/associatedReleases.tsx b/static/app/views/settings/projectSourceMaps/associatedReleases.tsx index 63dd682a1920fb..554e00f9f96a33 100644 --- a/static/app/views/settings/projectSourceMaps/associatedReleases.tsx +++ b/static/app/views/settings/projectSourceMaps/associatedReleases.tsx @@ -6,7 +6,7 @@ import {Tooltip} from '@sentry/scraps/tooltip'; import {Version} from 'sentry/components/version'; import {t} from 'sentry/locale'; import type {DebugIdBundleAssociation} from 'sentry/types/sourceMaps'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; export function AssociatedReleases({ associations, diff --git a/static/app/views/settings/projectSourceMaps/sourceMapsList.tsx b/static/app/views/settings/projectSourceMaps/sourceMapsList.tsx index 21f9a2b06925e7..a9843be13545ea 100644 --- a/static/app/views/settings/projectSourceMaps/sourceMapsList.tsx +++ b/static/app/views/settings/projectSourceMaps/sourceMapsList.tsx @@ -28,8 +28,8 @@ import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; import type {Release, SourceMapsArchive} from 'sentry/types/release'; import type {DebugIdBundle, DebugIdBundleAssociation} from 'sentry/types/sourceMaps'; -import {defined} from 'sentry/utils'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {decodeScalar} from 'sentry/utils/queryString'; import {useLocation} from 'sentry/utils/useLocation'; import {useNavigate} from 'sentry/utils/useNavigate'; From 501a835e0014d884aa7e4dbcbe497ad33bdb9629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Thu, 4 Jun 2026 12:47:25 -0400 Subject: [PATCH 4/4] ref(getsentry): import defined from its leaf in gsApp/gsAdmin The prior commit dropped the sentry/utils defined re-export but only repointed static/app and tests/js. The vendored getsentry frontend (static/gsApp, static/gsAdmin) also imported defined from sentry/utils, which broke its typecheck and jest. Repoint those consumers too. --- static/gsAdmin/components/customers/customerOverview.tsx | 2 +- static/gsAdmin/components/customers/customerStats.tsx | 2 +- static/gsAdmin/views/customerDetails.tsx | 2 +- static/gsAdmin/views/dynamicSamplingPanel.tsx | 2 +- static/gsApp/components/billingDetails/form.tsx | 2 +- .../components/creditCardEdit/intentForms/innerIntentForm.tsx | 2 +- static/gsApp/components/dataConsentBanner.tsx | 2 +- static/gsApp/components/dataConsentPriorityLearnMore.tsx | 2 +- .../spendVisibility/enhancedUsageStatsOrganization.tsx | 2 +- static/gsApp/overrides/useMaxPickableDays.tsx | 2 +- static/gsApp/utils/billing.tsx | 2 +- static/gsApp/views/amCheckout/components/checkoutSuccess.tsx | 2 +- static/gsApp/views/amCheckout/components/volumeSliders.tsx | 2 +- static/gsApp/views/legalAndCompliance/dataConsentForm.tsx | 2 +- static/gsApp/views/legalAndCompliance/utils.tsx | 2 +- .../gsApp/views/spikeProtection/spikeProtectionHistoryTable.tsx | 2 +- static/gsApp/views/subscriptionPage/reservedUsageChart.tsx | 2 +- .../subscriptionPage/usageOverview/components/billedSeats.tsx | 2 +- .../subscriptionPage/usageOverview/components/breakdownInfo.tsx | 2 +- static/gsApp/views/subscriptionPage/utils.tsx | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/static/gsAdmin/components/customers/customerOverview.tsx b/static/gsAdmin/components/customers/customerOverview.tsx index bec9b61c4aba95..5d944454ff0a92 100644 --- a/static/gsAdmin/components/customers/customerOverview.tsx +++ b/static/gsAdmin/components/customers/customerOverview.tsx @@ -12,8 +12,8 @@ import {ExternalLink} from '@sentry/scraps/link'; import {ConfigStore} from 'sentry/stores/configStore'; import {DataCategory} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {useApiQuery} from 'sentry/utils/queryClient'; import {getRegions} from 'sentry/utils/regions'; import {toTitleCase} from 'sentry/utils/string/toTitleCase'; diff --git a/static/gsAdmin/components/customers/customerStats.tsx b/static/gsAdmin/components/customers/customerStats.tsx index 8d52c8427a0e59..b9c50c0cbaf2d3 100644 --- a/static/gsAdmin/components/customers/customerStats.tsx +++ b/static/gsAdmin/components/customers/customerStats.tsx @@ -20,8 +20,8 @@ import type {DataCategoryExact} from 'sentry/types/core'; import type {DataPoint, ECharts} from 'sentry/types/echarts'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {getDynamicText} from 'sentry/utils/getDynamicText'; import {useApiQuery} from 'sentry/utils/queryClient'; import {useLocation} from 'sentry/utils/useLocation'; diff --git a/static/gsAdmin/views/customerDetails.tsx b/static/gsAdmin/views/customerDetails.tsx index fef866a3e9445c..21a701149c0b05 100644 --- a/static/gsAdmin/views/customerDetails.tsx +++ b/static/gsAdmin/views/customerDetails.tsx @@ -19,9 +19,9 @@ import {ConfigStore} from 'sentry/stores/configStore'; import type {DataCategory} from 'sentry/types/core'; import {DataCategoryExact} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {OrganizationContext} from 'sentry/utils/organizationContext'; import type {ApiQueryKey} from 'sentry/utils/queryClient'; import {fetchMutation, setApiQueryData, useApiQuery} from 'sentry/utils/queryClient'; diff --git a/static/gsAdmin/views/dynamicSamplingPanel.tsx b/static/gsAdmin/views/dynamicSamplingPanel.tsx index 433071045ea809..e059d52f323749 100644 --- a/static/gsAdmin/views/dynamicSamplingPanel.tsx +++ b/static/gsAdmin/views/dynamicSamplingPanel.tsx @@ -20,7 +20,7 @@ import {PanelHeader} from 'sentry/components/panels/panelHeader'; import {PanelTable} from 'sentry/components/panels/panelTable'; import {IconArrow, IconOpen} from 'sentry/icons'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {handleXhrErrorResponse} from 'sentry/utils/handleXhrErrorResponse'; import type {RequestError} from 'sentry/utils/requestError/requestError'; import {useApi} from 'sentry/utils/useApi'; diff --git a/static/gsApp/components/billingDetails/form.tsx b/static/gsApp/components/billingDetails/form.tsx index 59b20081c13424..36a1837e4351da 100644 --- a/static/gsApp/components/billingDetails/form.tsx +++ b/static/gsApp/components/billingDetails/form.tsx @@ -16,7 +16,7 @@ import {QuestionTooltip} from 'sentry/components/questionTooltip'; import {t, tct} from 'sentry/locale'; import {ConfigStore} from 'sentry/stores/configStore'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeScalar} from 'sentry/utils/queryString'; import {useLocation} from 'sentry/utils/useLocation'; diff --git a/static/gsApp/components/creditCardEdit/intentForms/innerIntentForm.tsx b/static/gsApp/components/creditCardEdit/intentForms/innerIntentForm.tsx index eb4aabae314477..1db6c9c78dc550 100644 --- a/static/gsApp/components/creditCardEdit/intentForms/innerIntentForm.tsx +++ b/static/gsApp/components/creditCardEdit/intentForms/innerIntentForm.tsx @@ -11,7 +11,7 @@ import {Text} from '@sentry/scraps/text'; import {Form} from 'sentry/components/forms/form'; import {LoadingIndicator} from 'sentry/components/loadingIndicator'; import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import type {InnerIntentFormProps} from 'getsentry/components/creditCardEdit/intentForms/types'; diff --git a/static/gsApp/components/dataConsentBanner.tsx b/static/gsApp/components/dataConsentBanner.tsx index 1ea8ad1876d84f..5547f56b41c7bc 100644 --- a/static/gsApp/components/dataConsentBanner.tsx +++ b/static/gsApp/components/dataConsentBanner.tsx @@ -9,7 +9,7 @@ import {Button} from '@sentry/scraps/button'; import {usePrompt} from 'sentry/actionCreators/prompts'; import {IconClose} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getOrganizationAge} from 'sentry/utils/getOrganizationAge'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useProjects} from 'sentry/utils/useProjects'; diff --git a/static/gsApp/components/dataConsentPriorityLearnMore.tsx b/static/gsApp/components/dataConsentPriorityLearnMore.tsx index 78b3951834fb3f..c27ea87454f966 100644 --- a/static/gsApp/components/dataConsentPriorityLearnMore.tsx +++ b/static/gsApp/components/dataConsentPriorityLearnMore.tsx @@ -8,7 +8,7 @@ import {Button} from '@sentry/scraps/button'; import {usePrompt} from 'sentry/actionCreators/prompts'; import {IconClose} from 'sentry/icons'; import {t} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getOrganizationAge} from 'sentry/utils/getOrganizationAge'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/gsApp/overrides/spendVisibility/enhancedUsageStatsOrganization.tsx b/static/gsApp/overrides/spendVisibility/enhancedUsageStatsOrganization.tsx index 67d54c3014ce2f..bcbce349cd53c7 100644 --- a/static/gsApp/overrides/spendVisibility/enhancedUsageStatsOrganization.tsx +++ b/static/gsApp/overrides/spendVisibility/enhancedUsageStatsOrganization.tsx @@ -10,9 +10,9 @@ import {DATA_CATEGORY_INFO} from 'sentry/constants'; import {tct} from 'sentry/locale'; import type {DataCategoryInfo} from 'sentry/types/core'; import type {Project, ProjectSummaryWithOptions} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; import {apiOptions} from 'sentry/utils/api/apiOptions'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {useApiQuery} from 'sentry/utils/queryClient'; import {useRouteAnalyticsParams} from 'sentry/utils/routeAnalytics/useRouteAnalyticsParams'; import {useNavigate} from 'sentry/utils/useNavigate'; diff --git a/static/gsApp/overrides/useMaxPickableDays.tsx b/static/gsApp/overrides/useMaxPickableDays.tsx index a49227311a6987..8426552d760f0f 100644 --- a/static/gsApp/overrides/useMaxPickableDays.tsx +++ b/static/gsApp/overrides/useMaxPickableDays.tsx @@ -3,7 +3,7 @@ import moment from 'moment-timezone'; import {MAX_PICKABLE_DAYS} from 'sentry/constants'; import {DataCategory} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import { getBestMaxPickableDays, getMaxPickableDays, diff --git a/static/gsApp/utils/billing.tsx b/static/gsApp/utils/billing.tsx index 8d77304d868339..d6dccc44d01515 100644 --- a/static/gsApp/utils/billing.tsx +++ b/static/gsApp/utils/billing.tsx @@ -5,7 +5,7 @@ import {IconBuilding, IconGroup, IconSeer, IconUser} from 'sentry/icons'; import type {SVGIconProps} from 'sentry/icons/svgIcon'; import {DataCategory} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getDaysSinceDate} from 'sentry/utils/getDaysSinceDate'; import {toTitleCase} from 'sentry/utils/string/toTitleCase'; diff --git a/static/gsApp/views/amCheckout/components/checkoutSuccess.tsx b/static/gsApp/views/amCheckout/components/checkoutSuccess.tsx index a51f270d6d819a..44bdf6c137f168 100644 --- a/static/gsApp/views/amCheckout/components/checkoutSuccess.tsx +++ b/static/gsApp/views/amCheckout/components/checkoutSuccess.tsx @@ -14,7 +14,7 @@ import {Heading, Text} from '@sentry/scraps/text'; import {FeedbackButton} from 'sentry/components/feedbackButton/feedbackButton'; import {t, tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {useOrganization} from 'sentry/utils/useOrganization'; import {GIGABYTE} from 'getsentry/constants'; diff --git a/static/gsApp/views/amCheckout/components/volumeSliders.tsx b/static/gsApp/views/amCheckout/components/volumeSliders.tsx index 963144d3ef8bc5..7b690cc7eae91f 100644 --- a/static/gsApp/views/amCheckout/components/volumeSliders.tsx +++ b/static/gsApp/views/amCheckout/components/volumeSliders.tsx @@ -10,7 +10,7 @@ import {DATA_CATEGORY_INFO} from 'sentry/constants'; import {IconLightning, IconQuestion} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import {DataCategory, DataCategoryExact} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {PlanTier} from 'getsentry/types'; import {formatReservedWithUnits} from 'getsentry/utils/billing'; diff --git a/static/gsApp/views/legalAndCompliance/dataConsentForm.tsx b/static/gsApp/views/legalAndCompliance/dataConsentForm.tsx index 755d41f286fde2..e24d2be580f00b 100644 --- a/static/gsApp/views/legalAndCompliance/dataConsentForm.tsx +++ b/static/gsApp/views/legalAndCompliance/dataConsentForm.tsx @@ -7,8 +7,8 @@ import {ExternalLink} from '@sentry/scraps/link'; import {updateOrganization} from 'sentry/actionCreators/organizations'; import {t, tct} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {getApiUrl} from 'sentry/utils/api/getApiUrl'; +import {defined} from 'sentry/utils/defined'; import {fetchMutation} from 'sentry/utils/queryClient'; import {useOrganization} from 'sentry/utils/useOrganization'; import {useUser} from 'sentry/utils/useUser'; diff --git a/static/gsApp/views/legalAndCompliance/utils.tsx b/static/gsApp/views/legalAndCompliance/utils.tsx index 8f91f55ff938d2..1f4d219f9419b1 100644 --- a/static/gsApp/views/legalAndCompliance/utils.tsx +++ b/static/gsApp/views/legalAndCompliance/utils.tsx @@ -2,7 +2,7 @@ import {ExternalLink} from '@sentry/scraps/link'; import {PanelItem} from 'sentry/components/panels/panelItem'; import {tct} from 'sentry/locale'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {withSubscription} from 'getsentry/components/withSubscription'; import type {Subscription} from 'getsentry/types'; diff --git a/static/gsApp/views/spikeProtection/spikeProtectionHistoryTable.tsx b/static/gsApp/views/spikeProtection/spikeProtectionHistoryTable.tsx index fbef4fe9f71c7f..bfd8fba9aa670d 100644 --- a/static/gsApp/views/spikeProtection/spikeProtectionHistoryTable.tsx +++ b/static/gsApp/views/spikeProtection/spikeProtectionHistoryTable.tsx @@ -18,7 +18,7 @@ import {t, tct} from 'sentry/locale'; import type {DataCategoryInfo} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; import type {ProjectSummaryWithOptions} from 'sentry/types/project'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {getExactDuration} from 'sentry/utils/duration/getExactDuration'; import {decodeScalar} from 'sentry/utils/queryString'; import {useApi} from 'sentry/utils/useApi'; diff --git a/static/gsApp/views/subscriptionPage/reservedUsageChart.tsx b/static/gsApp/views/subscriptionPage/reservedUsageChart.tsx index 983ea8adf6d822..b46b197600edd2 100644 --- a/static/gsApp/views/subscriptionPage/reservedUsageChart.tsx +++ b/static/gsApp/views/subscriptionPage/reservedUsageChart.tsx @@ -9,7 +9,7 @@ import {BarSeries} from 'sentry/components/charts/series/barSeries'; import {LineSeries as lineSeries} from 'sentry/components/charts/series/lineSeries'; import {t} from 'sentry/locale'; import {DataCategory} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {decodeScalar} from 'sentry/utils/queryString'; import { ChartDataTransform, diff --git a/static/gsApp/views/subscriptionPage/usageOverview/components/billedSeats.tsx b/static/gsApp/views/subscriptionPage/usageOverview/components/billedSeats.tsx index 4692e4bfd96211..013d3199fc2024 100644 --- a/static/gsApp/views/subscriptionPage/usageOverview/components/billedSeats.tsx +++ b/static/gsApp/views/subscriptionPage/usageOverview/components/billedSeats.tsx @@ -13,8 +13,8 @@ import {TimeSince} from 'sentry/components/timeSince'; import {t, tct} from 'sentry/locale'; import {DataCategory} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; import {apiOptions, selectJsonWithHeaders} from 'sentry/utils/api/apiOptions'; +import {defined} from 'sentry/utils/defined'; import {UNLIMITED_RESERVED} from 'getsentry/constants'; import {useProductBillingMetadata} from 'getsentry/hooks/useProductBillingMetadata'; diff --git a/static/gsApp/views/subscriptionPage/usageOverview/components/breakdownInfo.tsx b/static/gsApp/views/subscriptionPage/usageOverview/components/breakdownInfo.tsx index 606b3437a49433..beb5d179d1b429 100644 --- a/static/gsApp/views/subscriptionPage/usageOverview/components/breakdownInfo.tsx +++ b/static/gsApp/views/subscriptionPage/usageOverview/components/breakdownInfo.tsx @@ -6,7 +6,7 @@ import {Text} from '@sentry/scraps/text'; import {QuestionTooltip} from 'sentry/components/questionTooltip'; import {t, tct} from 'sentry/locale'; import {DataCategory} from 'sentry/types/core'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {toTitleCase} from 'sentry/utils/string/toTitleCase'; import {useOrganization} from 'sentry/utils/useOrganization'; diff --git a/static/gsApp/views/subscriptionPage/utils.tsx b/static/gsApp/views/subscriptionPage/utils.tsx index b00b8231dfe80e..47f1652e633e90 100644 --- a/static/gsApp/views/subscriptionPage/utils.tsx +++ b/static/gsApp/views/subscriptionPage/utils.tsx @@ -1,6 +1,6 @@ import type {DataCategory, Scope} from 'sentry/types/core'; import type {Organization} from 'sentry/types/organization'; -import {defined} from 'sentry/utils'; +import {defined} from 'sentry/utils/defined'; import {type Subscription} from 'getsentry/types'; import {isPartOfReservedBudget} from 'getsentry/utils/dataCategory';