From 19f8ad42626ff082b4022cf6671df763dec3d8e9 Mon Sep 17 00:00:00 2001 From: Magnus Persson Date: Tue, 13 Dec 2022 22:49:54 +0100 Subject: [PATCH] Keep types but marked deprecated Signed-off-by: Magnus Persson --- plugins/sonarqube/src/api/types.ts | 13 ++++++++++++- plugins/sonarqube/src/components/index.ts | 16 ++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/plugins/sonarqube/src/api/types.ts b/plugins/sonarqube/src/api/types.ts index 48c7c41c03..470d05903a 100644 --- a/plugins/sonarqube/src/api/types.ts +++ b/plugins/sonarqube/src/api/types.ts @@ -14,7 +14,8 @@ * limitations under the License. */ -import { MetricKey } from '@backstage/plugin-sonarqube-react'; +import { MetricKey as NonDeprecatedMetricKey } from '@backstage/plugin-sonarqube-react'; +import { SonarUrlProcessorFunc as NonDeprecatedSonarUrlProcessorFunc } from '@backstage/plugin-sonarqube-react'; export interface InstanceUrlWrapper { instanceUrl: string; @@ -25,7 +26,17 @@ export interface FindingsWrapper { measures: Measure[]; } +/** + * @deprecated use the same type from `@backstage/plugin-sonarqube-react` instead + */ +export type MetricKey = NonDeprecatedMetricKey; + export interface Measure { metric: MetricKey; value: string; } + +/** + * @deprecated use the same type from `@backstage/plugin-sonarqube-react` instead + */ +export type SonarUrlProcessorFunc = NonDeprecatedSonarUrlProcessorFunc; diff --git a/plugins/sonarqube/src/components/index.ts b/plugins/sonarqube/src/components/index.ts index 85ccfe9621..08af5591fd 100644 --- a/plugins/sonarqube/src/components/index.ts +++ b/plugins/sonarqube/src/components/index.ts @@ -14,6 +14,22 @@ * limitations under the License. */ +import { + isSonarQubeAvailable as NonDeprecatedIsSonarQubeAvailable, + SONARQUBE_PROJECT_KEY_ANNOTATION as NON_DEPRECATED_SONARQUBE_PROJECT_KEY_ANNOTATION, +} from '@backstage/plugin-sonarqube-react'; + export { SonarQubeCard } from './SonarQubeCard'; export type { DuplicationRating } from './SonarQubeCard'; export type { SonarQubeContentPageProps } from './SonarQubeContentPage'; + +/** + * @deprecated use the same type from `@backstage/plugin-sonarqube-react` instead + */ +export const isSonarQubeAvailable = NonDeprecatedIsSonarQubeAvailable; + +/** + * @deprecated use the same type from `@backstage/plugin-sonarqube-react` instead + */ +export const SONARQUBE_PROJECT_KEY_ANNOTATION = + NON_DEPRECATED_SONARQUBE_PROJECT_KEY_ANNOTATION;