Merge pull request #9548 from backstage/jhaals/compareEntityToRef

catalog-model: deprecate compareEntityToRef
This commit is contained in:
Johan Haals
2022-02-15 15:38:20 +01:00
committed by GitHub
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
@@ -245,6 +245,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} />