catalog-model: deprecate compareEntityToRef
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Replaced use of deprecated `compareEntityToRef` utility.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/catalog-model': patch
|
||||
---
|
||||
|
||||
Deprecated `compareEntityToRef` due to low usage and provided value.
|
||||
@@ -66,7 +66,7 @@ export class CommonValidatorFunctions {
|
||||
static isValidUrl(value: unknown): boolean;
|
||||
}
|
||||
|
||||
// @public
|
||||
// @public @deprecated
|
||||
export function compareEntityToRef(
|
||||
entity: Entity,
|
||||
ref: EntityRef | EntityName,
|
||||
|
||||
@@ -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,
|
||||
|
||||
+2
-5
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user