diff --git a/.changeset/quiet-pens-wait.md b/.changeset/quiet-pens-wait.md new file mode 100644 index 0000000000..b7510eab3f --- /dev/null +++ b/.changeset/quiet-pens-wait.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': minor +--- + +**BREAKING**: Removed `useEntityListProvider` use `useEntityList` instead. diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index c1701b0b00..40764b8844 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -527,11 +527,6 @@ export function useEntityList< EntityFilters extends DefaultEntityFilters = DefaultEntityFilters, >(): EntityListContextProps; -// @public @deprecated -export function useEntityListProvider< - EntityFilters extends DefaultEntityFilters = DefaultEntityFilters, ->(): EntityListContextProps; - // @public export function useEntityOwnership(): { loading: boolean; diff --git a/plugins/catalog-react/src/hooks/index.ts b/plugins/catalog-react/src/hooks/index.ts index 907dad973b..e26f01928d 100644 --- a/plugins/catalog-react/src/hooks/index.ts +++ b/plugins/catalog-react/src/hooks/index.ts @@ -28,7 +28,6 @@ export type { export { EntityListContext, EntityListProvider, - useEntityListProvider, useEntityList, } from './useEntityListProvider'; export type { diff --git a/plugins/catalog-react/src/hooks/useEntityListProvider.tsx b/plugins/catalog-react/src/hooks/useEntityListProvider.tsx index 72dfb7d1c3..ccac475ae8 100644 --- a/plugins/catalog-react/src/hooks/useEntityListProvider.tsx +++ b/plugins/catalog-react/src/hooks/useEntityListProvider.tsx @@ -249,20 +249,6 @@ export const EntityListProvider = ({ ); }; -/** - * Hook for interacting with the entity list context provided by the {@link EntityListProvider}. - * @public - * @deprecated use {@link useEntityList} instead. - */ -export function useEntityListProvider< - EntityFilters extends DefaultEntityFilters = DefaultEntityFilters, ->(): EntityListContextProps { - const context = useContext(EntityListContext); - if (!context) - throw new Error('useEntityList must be used within EntityListProvider'); - return context; -} - /** * Hook for interacting with the entity list context provided by the {@link EntityListProvider}. * @public