From ece8c70bb221726f353e0c0d830e58cd6a273473 Mon Sep 17 00:00:00 2001 From: manusant Date: Wed, 9 Nov 2022 16:25:10 +0000 Subject: [PATCH] API report cleanup Signed-off-by: manusant --- plugins/sonarqube/api-report.md | 24 ++++--------------- plugins/sonarqube/package.json | 3 +-- .../SonarQubeContentPage.tsx | 13 ++++------ plugins/sonarqube/src/index.ts | 8 ++++++- yarn.lock | 1 - 5 files changed, 17 insertions(+), 32 deletions(-) diff --git a/plugins/sonarqube/api-report.md b/plugins/sonarqube/api-report.md index 3248dbbbed..48cd38e97c 100644 --- a/plugins/sonarqube/api-report.md +++ b/plugins/sonarqube/api-report.md @@ -8,7 +8,6 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { InfoCardVariants } from '@backstage/core-components'; -import { default as React_2 } from 'react'; // @public (undocumented) export type DuplicationRating = { @@ -23,11 +22,9 @@ export const EntitySonarQubeCard: (props: { }) => JSX.Element; // @public (undocumented) -export const EntitySonarQubeContentPage: ({ - title, - supportTitle, - ...otherProps -}: SonarQubeContentPageProps) => JSX.Element; +export const EntitySonarQubeContentPage: ( + props: SonarQubeContentPageProps, +) => JSX.Element; // @public (undocumented) export const isSonarQubeAvailable: (entity: Entity) => boolean; @@ -35,24 +32,11 @@ export const isSonarQubeAvailable: (entity: Entity) => boolean; // @public (undocumented) export const SONARQUBE_PROJECT_KEY_ANNOTATION = 'sonarqube.org/project-key'; -// @public (undocumented) -export const SonarQubeCard: (props: { - variant?: InfoCardVariants; - duplicationRatings?: DuplicationRating[]; -}) => JSX.Element; - -// @public (undocumented) -export const SonarQubeContentPage: ({ - title, - supportTitle, - ...otherProps -}: SonarQubeContentPageProps) => JSX.Element; - // @public (undocumented) export type SonarQubeContentPageProps = { title?: string; supportTitle?: string; -} & React_2.ComponentPropsWithoutRef<'div'>; +}; // @public (undocumented) const sonarQubePlugin: BackstagePlugin<{}, {}, {}>; diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index 89cbb0c049..b46cb5c0b1 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -45,8 +45,7 @@ "@material-ui/styles": "^4.10.0", "cross-fetch": "^3.1.5", "rc-progress": "3.4.0", - "react-use": "^17.2.4", - "@types/react": "^16.13.1 || ^17.0.0" + "react-use": "^17.2.4" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0" diff --git a/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.tsx b/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.tsx index 124906bb12..c11fff7237 100644 --- a/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.tsx +++ b/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.tsx @@ -32,19 +32,16 @@ import { SonarQubeCard } from '../SonarQubeCard'; export type SonarQubeContentPageProps = { title?: string; supportTitle?: string; -} & React.ComponentPropsWithoutRef<'div'>; +}; /** @public */ -export const SonarQubeContentPage = ({ - title = 'SonarQube Dashboard', - supportTitle, - ...otherProps -}: SonarQubeContentPageProps) => { +export const SonarQubeContentPage = (props: SonarQubeContentPageProps) => { const { entity } = useEntity(); + const { title, supportTitle } = props; return isSonarQubeAvailable(entity) ? ( - - + + {supportTitle && {supportTitle}} diff --git a/plugins/sonarqube/src/index.ts b/plugins/sonarqube/src/index.ts index 8b2a4b86b8..9936cc04e9 100644 --- a/plugins/sonarqube/src/index.ts +++ b/plugins/sonarqube/src/index.ts @@ -21,7 +21,13 @@ * @packageDocumentation */ -export * from './components'; +export type { + DuplicationRating, + SonarQubeContentPageProps, + SONARQUBE_PROJECT_KEY_ANNOTATION, + isSonarQubeAvailable, +} from './components'; + export { sonarQubePlugin, sonarQubePlugin as plugin, diff --git a/yarn.lock b/yarn.lock index 6ab3c2300a..c42aac2eec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7261,7 +7261,6 @@ __metadata: "@testing-library/react": ^12.1.3 "@testing-library/user-event": ^14.0.0 "@types/node": ^16.11.26 - "@types/react": ^16.13.1 || ^17.0.0 cross-fetch: ^3.1.5 msw: ^0.47.0 rc-progress: 3.4.0