Merge pull request #10166 from backstage/rugvip/annotations
catalog-react: remove deprecated annotation helpers
This commit is contained in:
@@ -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.
|
||||
@@ -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,
|
||||
|
||||
@@ -32,8 +32,6 @@ export * from './testUtils';
|
||||
export * from './types';
|
||||
export * from './overridableComponents';
|
||||
export {
|
||||
getEntityMetadataEditUrl,
|
||||
getEntityMetadataViewUrl,
|
||||
getEntityRelations,
|
||||
getEntitySourceLocation,
|
||||
isOwnerOf,
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user