Browse Source

feat(rr6): Switch things over to vendored types (#76733)

Use the vendored types

This may need some things pulled out because of the getsentry switch
over of the types as well

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Evan Purkhiser 6 months ago
parent
commit
6d8b040ffb

+ 1 - 2
static/app/actionCreators/navigation.spec.tsx

@@ -1,11 +1,10 @@
-import type {InjectedRouter} from 'react-router';
-
 import {initializeOrg} from 'sentry-test/initializeOrg';
 
 import {openModal} from 'sentry/actionCreators/modal';
 import {navigateTo} from 'sentry/actionCreators/navigation';
 import ConfigStore from 'sentry/stores/configStore';
 import ProjectsStore from 'sentry/stores/projectsStore';
+import type {InjectedRouter} from 'sentry/types/legacyReactRouter';
 import type {Config} from 'sentry/types/system';
 
 jest.mock('sentry/actionCreators/modal');

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

@@ -1,9 +1,9 @@
-import type {InjectedRouter} from 'react-router';
 import type {Location} from 'history';
 
 import {openModal} from 'sentry/actionCreators/modal';
 import ContextPickerModal from 'sentry/components/contextPickerModal';
 import ProjectsStore from 'sentry/stores/projectsStore';
+import type {InjectedRouter} from 'sentry/types/legacyReactRouter';
 import replaceRouterParams from 'sentry/utils/replaceRouterParams';
 import normalizeUrl from 'sentry/utils/url/normalizeUrl';
 

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

@@ -1,4 +1,3 @@
-import type {InjectedRouter} from 'react-router';
 import * as Sentry from '@sentry/react';
 import type {Location} from 'history';
 import isInteger from 'lodash/isInteger';
@@ -24,6 +23,7 @@ import {
 import OrganizationStore from 'sentry/stores/organizationStore';
 import PageFiltersStore from 'sentry/stores/pageFiltersStore';
 import type {DateString, PageFilters, PinnedPageFilter} from 'sentry/types/core';
+import type {InjectedRouter} from 'sentry/types/legacyReactRouter';
 import type {Organization} from 'sentry/types/organization';
 import type {Environment, MinimalProject, Project} from 'sentry/types/project';
 import {defined} from 'sentry/utils';

+ 1 - 1
static/app/components/asyncComponentSearchInput.tsx

@@ -1,5 +1,4 @@
 import {Component} from 'react';
-import type {WithRouterProps} from 'react-router';
 import styled from '@emotion/styled';
 import debounce from 'lodash/debounce';
 
@@ -7,6 +6,7 @@ import type {Client, ResponseMeta} from 'sentry/api';
 import Input from 'sentry/components/input';
 import LoadingIndicator from 'sentry/components/loadingIndicator';
 import {t} from 'sentry/locale';
+import type {WithRouterProps} from 'sentry/types/legacyReactRouter';
 // eslint-disable-next-line no-restricted-imports
 import withSentryRouter from 'sentry/utils/withSentryRouter';
 

+ 1 - 1
static/app/components/charts/chartZoom.tsx

@@ -1,5 +1,4 @@
 import {Component} from 'react';
-import type {InjectedRouter} from 'react-router';
 import type {
   DataZoomComponentOption,
   ECharts,
@@ -21,6 +20,7 @@ import type {
   EChartFinishedHandler,
   EChartRestoreHandler,
 } from 'sentry/types/echarts';
+import type {InjectedRouter} from 'sentry/types/legacyReactRouter';
 import {getUtcDateString, getUtcToLocalDateObject} from 'sentry/utils/dates';
 
 const getDate = date =>

+ 1 - 1
static/app/components/charts/eventsChart.tsx

@@ -1,5 +1,4 @@
 import {Component, isValidElement} from 'react';
-import type {InjectedRouter} from 'react-router';
 import type {Theme} from '@emotion/react';
 import {withTheme} from '@emotion/react';
 import type {
@@ -30,6 +29,7 @@ import {IconWarning} from 'sentry/icons';
 import {t} from 'sentry/locale';
 import type {DateString} from 'sentry/types/core';
 import type {Series} from 'sentry/types/echarts';
+import type {InjectedRouter} from 'sentry/types/legacyReactRouter';
 import type {OrganizationSummary} from 'sentry/types/organization';
 import {defined} from 'sentry/utils';
 import {

+ 1 - 1
static/app/components/charts/releaseSeries.tsx

@@ -1,5 +1,4 @@
 import {Component} from 'react';
-import type {WithRouterProps} from 'react-router';
 import type {Theme} from '@emotion/react';
 import {withTheme} from '@emotion/react';
 import type {Query} from 'history';
@@ -13,6 +12,7 @@ import MarkLine from 'sentry/components/charts/components/markLine';
 import {t} from 'sentry/locale';
 import type {DateString} from 'sentry/types/core';
 import type {Series} from 'sentry/types/echarts';
+import type {WithRouterProps} from 'sentry/types/legacyReactRouter';
 import type {Organization} from 'sentry/types/organization';
 import {escape} from 'sentry/utils';
 import {getFormattedDate, getUtcDateString} from 'sentry/utils/dates';

+ 1 - 1
static/app/components/charts/useChartZoom.tsx

@@ -1,5 +1,4 @@
 import {useCallback, useMemo, useState} from 'react';
-import type {InjectedRouter} from 'react-router';
 import type {
   DataZoomComponentOption,
   InsideDataZoomComponentOption,
@@ -20,6 +19,7 @@ import type {
   EChartFinishedHandler,
   EChartRestoreHandler,
 } from 'sentry/types/echarts';
+import type {InjectedRouter} from 'sentry/types/legacyReactRouter';
 import {getUtcDateString, getUtcToLocalDateObject} from 'sentry/utils/dates';
 
 // TODO: replace usages of ChartZoom with useChartZoom

+ 4 - 1
static/app/components/deprecatedAsyncComponent.tsx

@@ -1,5 +1,4 @@
 import {Component} from 'react';
-import type {RouteComponentProps, RouteContextInterface} from 'react-router';
 import * as Sentry from '@sentry/react';
 import isEqual from 'lodash/isEqual';
 
@@ -10,6 +9,10 @@ import LoadingError from 'sentry/components/loadingError';
 import LoadingIndicator from 'sentry/components/loadingIndicator';
 import {t} from 'sentry/locale';
 import {SentryPropTypeValidators} from 'sentry/sentryPropTypeValidators';
+import type {
+  RouteComponentProps,
+  RouteContextInterface,
+} from 'sentry/types/legacyReactRouter';
 import {metric} from 'sentry/utils/analytics';
 import getRouteStringFromRoutes from 'sentry/utils/getRouteStringFromRoutes';
 import PermissionDenied from 'sentry/views/permissionDenied';

+ 1 - 1
static/app/components/forms/jsonForm.tsx

@@ -1,8 +1,8 @@
 import {Component, Fragment} from 'react';
-import type {WithRouterProps} from 'react-router';
 import * as Sentry from '@sentry/react';
 import scrollToElement from 'scroll-to-element';
 
+import type {WithRouterProps} from 'sentry/types/legacyReactRouter';
 import {defined} from 'sentry/utils';
 import {sanitizeQuerySelector} from 'sentry/utils/sanitizeQuerySelector';
 // eslint-disable-next-line no-restricted-imports

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