Browse Source

chore(types) Move more types out of types/index (#30241)

Move project, release and group types out. There is one circular import
between Commit and Release. A potential solution for that cycle is to
have Commit in release module but it feels odd for it to be there when
repository and other source code related types are in integrations.
Mark Story 3 years ago
parent
commit
9445d2ce1b

+ 4 - 2
static/app/components/events/eventEntries.tsx

@@ -28,17 +28,19 @@ import ExternalLink from 'sentry/components/links/externalLink';
 import {t, tct} from 'sentry/locale';
 import space from 'sentry/styles/space';
 import {
+  Entry,
+  EntryType,
+  Event,
   ExceptionValue,
   Group,
   IssueAttachment,
   Organization,
   Project,
   SharedViewOrganization,
+  Thread,
 } from 'sentry/types';
 import {DebugFile} from 'sentry/types/debugFiles';
 import {Image} from 'sentry/types/debugImage';
-import {Entry, EntryType, Event} from 'sentry/types/event';
-import {Thread} from 'sentry/types/events';
 import {isNotSharedOrganization} from 'sentry/types/utils';
 import {defined, objectIsEmpty} from 'sentry/utils';
 import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';

+ 7 - 3
static/app/components/events/interfaces/crashHeader/crashActions.tsx

@@ -4,9 +4,13 @@ import Button from 'sentry/components/button';
 import ButtonBar from 'sentry/components/buttonBar';
 import {t} from 'sentry/locale';
 import space from 'sentry/styles/space';
-import {ExceptionType, ExceptionValue} from 'sentry/types';
-import {Thread} from 'sentry/types/events';
-import {STACK_TYPE, STACK_VIEW} from 'sentry/types/stacktrace';
+import {
+  ExceptionType,
+  ExceptionValue,
+  STACK_TYPE,
+  STACK_VIEW,
+  Thread,
+} from 'sentry/types';
 
 type NotifyOptions = {
   stackView?: STACK_VIEW;

+ 1 - 4
static/app/components/events/interfaces/threads/content.tsx

@@ -5,10 +5,7 @@ import CrashContent from 'sentry/components/events/interfaces/crashContent';
 import Pill from 'sentry/components/pill';
 import Pills from 'sentry/components/pills';
 import {t} from 'sentry/locale';
-import {Project} from 'sentry/types';
-import {Event} from 'sentry/types/event';
-import {Thread} from 'sentry/types/events';
-import {STACK_TYPE, STACK_VIEW} from 'sentry/types/stacktrace';
+import {Event, Project, STACK_TYPE, STACK_VIEW, Thread} from 'sentry/types';
 
 import NoStackTraceMessage from '../noStackTraceMessage';
 

+ 1 - 4
static/app/components/events/interfaces/threads/index.tsx

@@ -4,10 +4,7 @@ import EventDataSection from 'sentry/components/events/eventDataSection';
 import CrashActions from 'sentry/components/events/interfaces/crashHeader/crashActions';
 import CrashTitle from 'sentry/components/events/interfaces/crashHeader/crashTitle';
 import {t} from 'sentry/locale';
-import {Project} from 'sentry/types';
-import {Event} from 'sentry/types/event';
-import {Thread} from 'sentry/types/events';
-import {STACK_TYPE, STACK_VIEW} from 'sentry/types/stacktrace';
+import {Event, Project, STACK_TYPE, STACK_VIEW, Thread} from 'sentry/types';
 import {defined} from 'sentry/utils';
 
 import {isStacktraceNewestFirst} from '../utils';

+ 8 - 4
static/app/components/events/interfaces/threads/threadSelector/filterThreadInfo.tsx

@@ -1,8 +1,12 @@
 import {trimPackage} from 'sentry/components/events/interfaces/frame/utils';
-import {EntryData, ExceptionType, Frame} from 'sentry/types';
-import {Event} from 'sentry/types/event';
-import {Thread} from 'sentry/types/events';
-import {StacktraceType} from 'sentry/types/stacktrace';
+import {
+  EntryData,
+  Event,
+  ExceptionType,
+  Frame,
+  StacktraceType,
+  Thread,
+} from 'sentry/types';
 
 import getRelevantFrame from './getRelevantFrame';
 import getThreadException from './getThreadException';

+ 1 - 1
static/app/components/events/interfaces/threads/threadSelector/findBestThread.tsx

@@ -1,4 +1,4 @@
-import {Thread} from 'sentry/types/events';
+import {Thread} from 'sentry/types';
 
 function findBestThread(threads: Array<Thread>) {
   // search the entire threads list for a crashed thread with stack trace

+ 1 - 3
static/app/components/events/interfaces/threads/threadSelector/getThreadException.tsx

@@ -1,6 +1,4 @@
-import {ExceptionType, ExceptionValue} from 'sentry/types';
-import {Event} from 'sentry/types/event';
-import {Thread} from 'sentry/types/events';
+import {Event, ExceptionType, ExceptionValue, Thread} from 'sentry/types';
 import {defined} from 'sentry/utils';
 
 function getException(

+ 1 - 2
static/app/components/events/interfaces/threads/threadSelector/getThreadStacktrace.tsx

@@ -1,5 +1,4 @@
-import {Thread} from 'sentry/types/events';
-import {StacktraceType} from 'sentry/types/stacktrace';
+import {StacktraceType, Thread} from 'sentry/types';
 
 function getThreadStacktrace(raw: boolean, thread?: Thread): StacktraceType | undefined {
   if (!thread) {

+ 1 - 3
static/app/components/events/interfaces/threads/threadSelector/index.tsx

@@ -5,9 +5,7 @@ import partition from 'lodash/partition';
 import DropdownAutoComplete from 'sentry/components/dropdownAutoComplete';
 import DropdownButton from 'sentry/components/dropdownButton';
 import {t} from 'sentry/locale';
-import {ExceptionType} from 'sentry/types';
-import {Event} from 'sentry/types/event';
-import {Thread} from 'sentry/types/events';
+import {Event, ExceptionType, Thread} from 'sentry/types';
 import theme from 'sentry/utils/theme';
 
 import filterThreadInfo from './filterThreadInfo';

+ 9 - 4
static/app/components/events/interfaces/threadsV2.tsx

@@ -5,10 +5,15 @@ import isNil from 'lodash/isNil';
 import Pill from 'sentry/components/pill';
 import Pills from 'sentry/components/pills';
 import {t} from 'sentry/locale';
-import {Frame, PlatformType, Project} from 'sentry/types';
-import {Event} from 'sentry/types/event';
-import {Thread} from 'sentry/types/events';
-import {STACK_TYPE, STACK_VIEW} from 'sentry/types/stacktrace';
+import {
+  Event,
+  Frame,
+  PlatformType,
+  Project,
+  STACK_TYPE,
+  STACK_VIEW,
+  Thread,
+} from 'sentry/types';
 
 import TraceEventDataSection from '../traceEventDataSection';
 import {DisplayOption} from '../traceEventDataSection/displayOptions';

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