chore: fixing deprecation warnings for all the things that are in the monorepo

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2021-10-20 15:53:42 +02:00
parent 37ebea2d68
commit 1332a98a01
37 changed files with 55 additions and 128 deletions
@@ -48,8 +48,11 @@ export class RouteRefImpl<Params extends AnyParams>
private readonly id: string,
readonly params: ParamKeys<Params>,
private readonly config: {
/** @deprecated */
path?: string;
/** @deprecated */
icon?: OldIconComponent;
/** @deprecated */
title?: string;
},
) {
@@ -79,11 +82,6 @@ export class RouteRefImpl<Params extends AnyParams>
return this.config.icon;
}
/** @deprecated */
get path() {
return this.config.path ?? '';
}
get title() {
return this.config.title ?? this.id;
}
@@ -88,7 +88,7 @@ export type RouteRef<Params extends AnyParams = any> = {
// TODO(Rugvip): Remove all of these once plugins don't rely on the path
/** @deprecated paths are no longer accessed directly from RouteRefs, use useRouteRef instead */
path: string;
// path: string;
/** @deprecated icons are no longer accessed via RouteRefs */
icon?: OldIconComponent;
/** @deprecated titles are no longer accessed via RouteRefs */
+1 -1
View File
@@ -23,7 +23,7 @@ import {
import { AllureApiClient, allureApiRef } from './api';
export const allureRouteRef = createRouteRef({
title: 'allure-report',
id: 'allure-report',
});
export const allurePlugin = createPlugin({
+1 -5
View File
@@ -19,12 +19,8 @@ import {
createRouteRef,
} from '@backstage/core-plugin-api';
const NoIcon = () => null;
export const rootRoute = createRouteRef({
icon: NoIcon,
path: '/api-docs',
title: 'APIs',
id: 'api-docs',
});
export const createComponentRouteRef = createExternalRouteRef({
+1 -1
View File
@@ -17,5 +17,5 @@
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
title: 'bazaar',
id: 'bazaar',
});
+1 -2
View File
@@ -24,8 +24,7 @@ import {
* @public
*/
export const catalogGraphRouteRef = createRouteRef({
path: '/catalog-graph',
title: 'Catalog Graph',
id: 'catalog-graph',
});
/**
+1 -2
View File
@@ -31,8 +31,7 @@ import { catalogApiRef } from '@backstage/plugin-catalog-react';
import { catalogImportApiRef, CatalogImportClient } from './api';
export const rootRouteRef = createRouteRef({
path: '',
title: 'catalog-import',
id: 'catalog-import',
});
export const catalogImportPlugin = createPlugin({
+4 -8
View File
@@ -17,22 +17,18 @@
import { Entity, ENTITY_DEFAULT_NAMESPACE } from '@backstage/catalog-model';
import { createRouteRef } from '@backstage/core-plugin-api';
const NoIcon = () => null;
// TODO(Rugvip): Move these route refs back to the catalog plugin once we're all ported to using external routes
export const rootRoute = createRouteRef({
icon: NoIcon,
path: '',
title: 'Catalog',
id: 'catalog',
});
export const catalogRouteRef = rootRoute;
export const entityRoute = createRouteRef({
icon: NoIcon,
path: ':namespace/:kind/:name/*',
title: 'Entity',
id: 'catalog/entity',
params: ['namespace', 'kind', 'name'],
});
export const entityRouteRef = entityRoute;
// Utility function to get suitable route params for entityRoute, given an
+2 -20
View File
@@ -14,30 +14,12 @@
* limitations under the License.
*/
import React from 'react';
import { SvgIcon, SvgIconProps } from '@material-ui/core';
import { createRouteRef } from '@backstage/core-plugin-api';
const CircleCIIcon = (props: SvgIconProps) => (
<SvgIcon
{...props}
enableBackground="new 0 0 200 200"
viewBox="0 0 103.8 105.2"
>
<path
d="m38.6 52.6c0-6.9 5.6-12.5 12.5-12.5s12.5 5.6 12.5 12.5-5.6 12.5-12.5 12.5c-6.9.1-12.5-5.6-12.5-12.5zm12.5-52.6c-24.6 0-45.2 16.8-51 39.6 0 .2-.1.3-.1.5 0 1.4 1.1 2.5 2.5 2.5h21.2c1 0 1.9-.6 2.3-1.5 4.4-9.5 13.9-16.1 25.1-16.1 15.2 0 27.6 12.4 27.6 27.6s-12.4 27.6-27.6 27.6c-11.1 0-20.7-6.6-25.1-16.1-.4-.9-1.3-1.5-2.3-1.5h-21.2c-1.4 0-2.5 1.1-2.5 2.5 0 .2 0 .3.1.5 5.8 22.8 26.4 39.6 51 39.6 29.1 0 52.7-23.6 52.7-52.7 0-29-23.6-52.5-52.7-52.5z"
fill="#343434"
/>
</SvgIcon>
);
export const circleCIRouteRef = createRouteRef({
icon: CircleCIIcon,
path: '',
title: 'CircleCI | All builds',
id: 'circle-ci',
});
export const circleCIBuildRouteRef = createRouteRef({
path: ':buildId',
title: 'CircleCI | Build info',
id: 'circle-ci/build',
});
+2 -4
View File
@@ -16,11 +16,9 @@
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '',
title: 'Google Cloudbuild',
id: 'cloudbuild',
});
export const buildRouteRef = createRouteRef({
path: ':id',
title: 'Cloudbuild Run',
id: 'cloudbuild/run',
});
+1 -1
View File
@@ -16,5 +16,5 @@
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
title: 'code-coverage',
id: 'code-coverage',
});
+1 -1
View File
@@ -16,5 +16,5 @@
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
title: 'config-schema',
id: 'config-schema',
});
+3 -6
View File
@@ -21,18 +21,15 @@ import {
} from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '/cost-insights',
title: 'Cost Insights',
id: 'cost-insights',
});
export const projectGrowthAlertRef = createRouteRef({
path: '/cost-insights/investigating-growth',
title: 'Investigating Growth',
id: 'cost-insights/investigating-growth',
});
export const unlabeledDataflowAlertRef = createRouteRef({
path: '/cost-insights/labeling-jobs',
title: 'Labeling Dataflow Jobs',
id: 'cost-insights/labeling-jobs',
});
export const costInsightsPlugin = createPlugin({
+1 -4
View File
@@ -19,11 +19,8 @@ import {
createRouteRef,
} from '@backstage/core-plugin-api';
const NoIcon = () => null;
export const exploreRouteRef = createRouteRef({
icon: NoIcon,
title: 'Explore',
id: 'explore',
});
export const catalogEntityRouteRef = createExternalRouteRef({
+1 -1
View File
@@ -16,5 +16,5 @@
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
title: 'firehydrant',
id: 'firehydrant',
});
+3 -6
View File
@@ -17,14 +17,11 @@
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '/gcp-projects',
title: 'GCP Projects',
id: 'gcp-projects',
});
export const projectRouteRef = createRouteRef({
path: '/gcp-projects/project',
title: 'GCP Project Page',
id: 'gcp-projects/project',
});
export const newProjectRouteRef = createRouteRef({
path: '/gcp-projects/new',
title: 'GCP Project Page',
id: 'gcp-projects/new',
});
+1 -1
View File
@@ -17,5 +17,5 @@
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
title: 'git-release-manager',
id: 'git-release-manager',
});
+2 -4
View File
@@ -17,12 +17,10 @@
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '',
title: 'GitHub Actions',
id: 'github-actions',
});
export const buildRouteRef = createRouteRef({
path: ':id',
id: 'github-actions/build',
params: ['id'],
title: 'GitHub Actions Workflow Run',
});
+3 -11
View File
@@ -16,23 +16,15 @@
import { createRouteRef } from '@backstage/core-plugin-api';
const NoIcon = () => null;
export const gitOpsClusterListRoute = createRouteRef({
icon: NoIcon,
path: '/gitops-clusters',
title: 'GitOps Clusters',
id: 'gitops-clusters',
});
export const gitOpsClusterDetailsRoute = createRouteRef({
icon: NoIcon,
path: '/gitops-cluster/:owner/:repo',
title: 'GitOps Cluster details',
id: 'gitops-cluster/:owner/:repo',
params: ['owner', 'repo'],
});
export const gitOpsClusterCreateRoute = createRouteRef({
icon: NoIcon,
path: '/gitops-cluster-create',
title: 'GitOps Cluster create',
id: 'gitops-cluster-create',
});
+1 -1
View File
@@ -16,5 +16,5 @@
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
title: 'home',
id: 'home',
});
+1 -4
View File
@@ -14,11 +14,8 @@
* limitations under the License.
*/
import ILertIcon from './assets/ilert.icon.svg';
import { createRouteRef } from '@backstage/core-plugin-api';
export const iLertRouteRef = createRouteRef({
icon: ILertIcon,
path: '/ilert',
title: 'iLert',
id: 'ilert',
});
+2 -4
View File
@@ -26,14 +26,12 @@ import {
import { JenkinsClient, jenkinsApiRef } from './api';
export const rootRouteRef = createRouteRef({
path: '',
title: 'Jenkins',
id: 'jenkins',
});
export const buildRouteRef = createRouteRef({
path: 'build/:jobFullName/:buildNumber',
id: 'jenkins/build',
params: ['jobFullName', 'buildNumber'],
title: 'Jenkins build',
});
export const jenkinsPlugin = createPlugin({
+1 -2
View File
@@ -25,8 +25,7 @@ import {
} from '@backstage/core-plugin-api';
export const rootCatalogKafkaRouteRef = createRouteRef({
path: '*',
title: 'Kafka',
id: 'kafka',
});
export const kafkaPlugin = createPlugin({
+1 -2
View File
@@ -28,8 +28,7 @@ import {
} from '@backstage/core-plugin-api';
export const rootCatalogKubernetesRouteRef = createRouteRef({
path: '*',
title: 'Kubernetes',
id: 'kubernetes',
});
export const kubernetesPlugin = createPlugin({
+4 -7
View File
@@ -25,22 +25,19 @@ import {
} from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '',
title: 'Lighthouse',
id: 'lighthouse',
});
export const viewAuditRouteRef = createRouteRef({
path: 'audit/:id',
title: 'View Lighthouse Audit',
id: 'audit/:id',
});
export const createAuditRouteRef = createRouteRef({
path: 'create-audit',
title: 'Create Lighthouse Audit',
id: 'create-audit',
});
export const entityContentRouteRef = createRouteRef({
title: 'Lighthouse Entity Content',
id: 'entity-content',
});
export const lighthousePlugin = createPlugin({
+1 -2
View File
@@ -24,8 +24,7 @@ import {
} from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '/newrelic',
title: 'newrelic',
id: 'newrelic',
});
export const newRelicPlugin = createPlugin({
+1 -2
View File
@@ -24,8 +24,7 @@ import {
} from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '/pagerduty',
title: 'pagerduty',
id: 'pagerduty',
});
export const pagerDutyPlugin = createPlugin({
+1 -2
View File
@@ -26,8 +26,7 @@ import {
} from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '',
title: 'Rollbar',
id: 'rollbar',
});
export const rollbarPlugin = createPlugin({
+1 -1
View File
@@ -24,5 +24,5 @@ export const registerComponentRouteRef = createExternalRouteRef({
});
export const rootRouteRef = createRouteRef({
title: 'Create new entity',
id: 'scaffolder',
});
+2 -4
View File
@@ -26,13 +26,11 @@ import {
} from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '/search',
title: 'search',
id: 'search',
});
export const rootNextRouteRef = createRouteRef({
path: '/search-next',
title: 'search',
id: 'search-next',
});
export const searchPlugin = createPlugin({
+1 -2
View File
@@ -25,8 +25,7 @@ import {
} from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '/sentry',
title: 'Sentry',
id: 'sentry',
});
export const sentryPlugin = createPlugin({
+1 -3
View File
@@ -24,9 +24,7 @@ import {
createComponentExtension,
} from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
title: 'splunk-on-call',
});
export const rootRouteRef = createRouteRef({ id: 'splunk-on-call' });
export const splunkOnCallPlugin = createPlugin({
id: 'splunk-on-call',
+1 -1
View File
@@ -25,7 +25,7 @@ import {
} from '@backstage/core-plugin-api';
const rootRouteRef = createRouteRef({
title: 'Tech Radar',
id: 'tech-radar',
});
/**
-3
View File
@@ -18,16 +18,13 @@ import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
id: 'techdocs-index-page',
title: 'TechDocs Landing Page',
});
export const rootDocsRouteRef = createRouteRef({
id: 'techdocs-reader-page',
title: 'Docs',
params: ['namespace', 'kind', 'name'],
});
export const rootCatalogDocsRouteRef = createRouteRef({
id: 'catalog-techdocs-reader-view',
title: 'Docs',
});
+1 -1
View File
@@ -16,5 +16,5 @@
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
title: 'todo',
id: 'todo',
});
+1 -2
View File
@@ -21,8 +21,7 @@ import {
} from '@backstage/core-plugin-api';
export const settingsRouteRef = createRouteRef({
path: '/settings',
title: 'Settings',
id: 'user-settings',
});
export const userSettingsPlugin = createPlugin({
+1 -1
View File
@@ -16,7 +16,7 @@
import { createRouteRef, createSubRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
title: 'XCMetrics',
id: 'xcmetrics',
});
export const buildsRouteRef = createSubRouteRef({