diff --git a/.changeset/shaggy-beers-unite.md b/.changeset/shaggy-beers-unite.md new file mode 100644 index 0000000000..7649203f52 --- /dev/null +++ b/.changeset/shaggy-beers-unite.md @@ -0,0 +1,8 @@ +--- +'@backstage/plugin-catalog-react': minor +--- + +**BREAKING**: The following deprecated annotation reading helper functions were removed: + +- `getEntityMetadataViewUrl`, use `entity.metadata.annotations?.[ANNOTATION_VIEW_URL]` instead. +- `getEntityMetadataEditUrl`, use `entity.metadata.annotations?.[ANNOTATION_EDIT_URL]` instead. diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 8b5e10911b..d6d56b5c81 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -401,12 +401,6 @@ export const favoriteEntityTooltip: ( isStarred: boolean, ) => 'Remove from favorites' | 'Add to favorites'; -// @public @deprecated (undocumented) -export function getEntityMetadataEditUrl(entity: Entity): string | undefined; - -// @public @deprecated (undocumented) -export function getEntityMetadataViewUrl(entity: Entity): string | undefined; - // @public export function getEntityRelations( entity: Entity | undefined, diff --git a/plugins/catalog-react/src/index.ts b/plugins/catalog-react/src/index.ts index 6d5a5ad204..2ca7d67d59 100644 --- a/plugins/catalog-react/src/index.ts +++ b/plugins/catalog-react/src/index.ts @@ -32,8 +32,6 @@ export * from './testUtils'; export * from './types'; export * from './overridableComponents'; export { - getEntityMetadataEditUrl, - getEntityMetadataViewUrl, getEntityRelations, getEntitySourceLocation, isOwnerOf, diff --git a/plugins/catalog-react/src/utils/getEntityMetadataUrl.ts b/plugins/catalog-react/src/utils/getEntityMetadataUrl.ts deleted file mode 100644 index 6037fc3c4d..0000000000 --- a/plugins/catalog-react/src/utils/getEntityMetadataUrl.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - ANNOTATION_EDIT_URL, - ANNOTATION_VIEW_URL, - Entity, -} from '@backstage/catalog-model'; - -/** - * @public - * @deprecated use entity.metadata.annotations?.[ANNOTATION_VIEW_URL] instead. */ -export function getEntityMetadataViewUrl(entity: Entity): string | undefined { - return entity.metadata.annotations?.[ANNOTATION_VIEW_URL]; -} - -/** - * @public - * @deprecated use entity.metadata.annotations?.[ANNOTATION_EDIT_URL] instead. - */ -export function getEntityMetadataEditUrl(entity: Entity): string | undefined { - return entity.metadata.annotations?.[ANNOTATION_EDIT_URL]; -} diff --git a/plugins/catalog-react/src/utils/index.ts b/plugins/catalog-react/src/utils/index.ts index 2672664ef8..5afc32af63 100644 --- a/plugins/catalog-react/src/utils/index.ts +++ b/plugins/catalog-react/src/utils/index.ts @@ -14,10 +14,6 @@ * limitations under the License. */ export * from './filters'; -export { - getEntityMetadataEditUrl, - getEntityMetadataViewUrl, -} from './getEntityMetadataUrl'; export { getEntityRelations } from './getEntityRelations'; export { getEntitySourceLocation } from './getEntitySourceLocation'; export type { EntitySourceLocation } from './getEntitySourceLocation';