Merge pull request #9778 from backstage/jhaals/dep-reduceCatalogFilters

catalog-react: Deprecate reduceCatalogFilters and reduceEntityFilters
This commit is contained in:
Fredrik Adelöw
2022-02-24 11:55:35 +01:00
committed by GitHub
3 changed files with 15 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': patch
---
Deprecated `reduceCatalogFilters` and `reduceEntityFilters` as these helper functions are used internally and provides low external value.
+2 -2
View File
@@ -488,12 +488,12 @@ export const MockEntityListContextProvider: ({
value?: Partial<EntityListContextProps<DefaultEntityFilters>> | undefined;
}>) => JSX.Element;
// @public (undocumented)
// @public @deprecated (undocumented)
export function reduceCatalogFilters(
filters: EntityFilter[],
): Record<string, string | symbol | (string | symbol)[]>;
// @public (undocumented)
// @public @deprecated (undocumented)
export function reduceEntityFilters(
filters: EntityFilter[],
): (entity: Entity) => boolean;
+8 -2
View File
@@ -17,7 +17,10 @@
import { Entity } from '@backstage/catalog-model';
import { EntityFilter } from '../types';
/** @public */
/**
* @public
* @deprecated will be made private.
*/
export function reduceCatalogFilters(
filters: EntityFilter[],
): Record<string, string | symbol | (string | symbol)[]> {
@@ -29,7 +32,10 @@ export function reduceCatalogFilters(
}, {} as Record<string, string | symbol | (string | symbol)[]>);
}
/** @public */
/**
* @public
* @deprecated will be made private.
*/
export function reduceEntityFilters(
filters: EntityFilter[],
): (entity: Entity) => boolean {