Browse Source

perf: use direct imports rather than barrels (#69408)

Fixes more barrel file imports.
Yagiz Nizipli 10 months ago
parent
commit
4232c80caa

+ 0 - 2
fixtures/js-stubs/release.tsx

@@ -3,8 +3,6 @@ import {HealthFixture} from 'sentry-fixture/health';
 import type {Health, ReleaseWithHealth} from 'sentry/types/release';
 import {ReleaseStatus} from 'sentry/types/release';
 
-// import {Health, ReleaseStatus, ReleaseWithHealth} from 'sentry/types';
-
 export function ReleaseFixture(
   params?: Partial<ReleaseWithHealth>,
   healthParams?: Health

+ 4 - 9
static/app/actionCreators/group.tsx

@@ -4,15 +4,10 @@ import type {Tag} from 'sentry/actionCreators/events';
 import type {RequestCallbacks, RequestOptions} from 'sentry/api';
 import {Client} from 'sentry/api';
 import GroupStore from 'sentry/stores/groupStore';
-import type {
-  Actor,
-  Group,
-  Member,
-  Note,
-  Tag as GroupTag,
-  TagValue,
-  User,
-} from 'sentry/types';
+import type {Actor} from 'sentry/types/core';
+import type {Group, Note, Tag as GroupTag, TagValue} from 'sentry/types/group';
+import type {Member} from 'sentry/types/organization';
+import type {User} from 'sentry/types/user';
 import {buildTeamId, buildUserId, defined} from 'sentry/utils';
 import {uniqueId} from 'sentry/utils/guid';
 import type {ApiQueryKey, UseApiQueryOptions} from 'sentry/utils/queryClient';

+ 5 - 11
static/app/actionCreators/modal.tsx

@@ -8,18 +8,12 @@ import type {OverwriteWidgetModalProps} from 'sentry/components/modals/widgetBui
 import type {WidgetViewerModalOptions} from 'sentry/components/modals/widgetViewerModal';
 import type {Category} from 'sentry/components/platformPicker';
 import ModalStore from 'sentry/stores/modalStore';
-import type {
-  Event,
-  Group,
-  IssueOwnership,
-  MissingMember,
-  Organization,
-  OrgRole,
-  Project,
-  SentryApp,
-  Team,
-} from 'sentry/types';
 import type {AppStoreConnectStatusData, CustomRepoType} from 'sentry/types/debugFiles';
+import type {Event} from 'sentry/types/event';
+import type {Group, IssueOwnership} from 'sentry/types/group';
+import type {SentryApp} from 'sentry/types/integrations';
+import type {MissingMember, Organization, OrgRole, Team} from 'sentry/types/organization';
+import type {Project} from 'sentry/types/project';
 import {WidgetType} from 'sentry/views/dashboards/types';
 
 export type ModalOptions = ModalTypes['options'];

+ 1 - 1
static/app/actionCreators/savedSearches.tsx

@@ -1,6 +1,6 @@
 import type {Client} from 'sentry/api';
 import {MAX_AUTOCOMPLETE_RECENT_SEARCHES} from 'sentry/constants';
-import type {RecentSearch, SavedSearch, SavedSearchType} from 'sentry/types';
+import type {RecentSearch, SavedSearch, SavedSearchType} from 'sentry/types/group';
 import {handleXhrErrorResponse} from 'sentry/utils/handleXhrErrorResponse';
 import type RequestError from 'sentry/utils/requestError/requestError';
 

+ 2 - 1
static/app/actionCreators/tags.tsx

@@ -6,7 +6,8 @@ import {normalizeDateTimeParams} from 'sentry/components/organizations/pageFilte
 import {t} from 'sentry/locale';
 import AlertStore from 'sentry/stores/alertStore';
 import TagStore from 'sentry/stores/tagStore';
-import type {PageFilters, Tag, TagValue} from 'sentry/types';
+import type {PageFilters} from 'sentry/types/core';
+import type {Tag, TagValue} from 'sentry/types/group';
 
 const MAX_TAGS = 1000;
 

+ 1 - 1
static/app/actionCreators/teams.tsx

@@ -2,7 +2,7 @@ import {addErrorMessage, addSuccessMessage} from 'sentry/actionCreators/indicato
 import type {Client} from 'sentry/api';
 import {tct} from 'sentry/locale';
 import TeamStore from 'sentry/stores/teamStore';
-import type {Team} from 'sentry/types';
+import type {Team} from 'sentry/types/organization';
 
 type CallbackOptions = {
   error?: Function;

+ 1 - 1
static/app/bootstrap/renderPipelineView.tsx

@@ -2,7 +2,7 @@ import {render} from 'react-dom';
 import {createRoot} from 'react-dom/client';
 
 import {ROOT_ELEMENT, USE_REACT_CONCURRENT_MODE} from 'sentry/constants';
-import type {PipelineInitialData} from 'sentry/types';
+import type {PipelineInitialData} from 'sentry/types/system';
 import PipelineView from 'sentry/views/integrationPipeline/pipelineView';
 
 function renderDom(pipelineName: string, props: PipelineInitialData['props']) {

+ 1 - 1
static/app/chartcuterie/discover.tsx

@@ -6,7 +6,7 @@ import BarSeries from 'sentry/components/charts/series/barSeries';
 import LineSeries from 'sentry/components/charts/series/lineSeries';
 import {lightenHexToRgb} from 'sentry/components/charts/utils';
 import {t} from 'sentry/locale';
-import type {EventsStats} from 'sentry/types';
+import type {EventsStats} from 'sentry/types/organization';
 import {lightTheme as theme} from 'sentry/utils/theme';
 
 import {DEFAULT_FONT_FAMILY, slackChartDefaults, slackChartSize} from './slack';

+ 3 - 1
static/app/components/acl/access.tsx

@@ -1,6 +1,8 @@
 import {Fragment} from 'react';
 
-import type {Organization, Project, Scope, Team} from 'sentry/types';
+import type {Scope} from 'sentry/types/core';
+import type {Organization, Team} from 'sentry/types/organization';
+import type {Project} from 'sentry/types/project';
 import {isRenderFunc} from 'sentry/utils/isRenderFunc';
 import {useUser} from 'sentry/utils/useUser';
 import withOrganization from 'sentry/utils/withOrganization';

+ 3 - 1
static/app/components/acl/feature.tsx

@@ -1,8 +1,10 @@
 import {Component} from 'react';
 
 import HookStore from 'sentry/stores/hookStore';
-import type {Config, Organization, Project} from 'sentry/types';
 import type {FeatureDisabledHooks} from 'sentry/types/hooks';
+import type {Organization} from 'sentry/types/organization';
+import type {Project} from 'sentry/types/project';
+import type {Config} from 'sentry/types/system';
 import {isRenderFunc} from 'sentry/utils/isRenderFunc';
 import withConfig from 'sentry/utils/withConfig';
 import withOrganization from 'sentry/utils/withOrganization';

Some files were not shown because too many files changed in this diff