catalog-model: deprecate compareEntityToRef

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2022-02-15 14:50:37 +01:00
parent 1c9891e3fb
commit 0d03e42a89
5 changed files with 14 additions and 6 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Replaced use of deprecated `compareEntityToRef` utility.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-model': patch
---
Deprecated `compareEntityToRef` due to low usage and provided value.
+1 -1
View File
@@ -66,7 +66,7 @@ export class CommonValidatorFunctions {
static isValidUrl(value: unknown): boolean;
}
// @public
// @public @deprecated
export function compareEntityToRef(
entity: Entity,
ref: EntityRef | EntityName,
+1
View File
@@ -234,6 +234,7 @@ export function stringifyEntityRef(
* @param context - An optional context of default kind and namespace, that apply
* to the ref if given
* @returns True if matching, false otherwise
* @deprecated compare using stringifyEntityRef instead.
*/
export function compareEntityToRef(
entity: Entity,
@@ -19,7 +19,6 @@ import {
AlphaEntity,
stringifyEntityRef,
EntityStatusItem,
compareEntityToRef,
} from '@backstage/catalog-model';
import {
catalogApiRef,
@@ -110,10 +109,8 @@ export const EntityProcessingErrorsPanel = () => {
<>
{value.items.map((ancestorError, index) => (
<Box key={index} mb={1}>
{!compareEntityToRef(
entity,
stringifyEntityRef(ancestorError.entity),
) && (
{stringifyEntityRef(entity) !==
stringifyEntityRef(ancestorError.entity) && (
<Box p={1}>
The error below originates from{' '}
<EntityRefLink entityRef={ancestorError.entity} />