diff --git a/.changeset/small-hornets-dress.md b/.changeset/small-hornets-dress.md index 2bb73b1ba3..474c3011bd 100644 --- a/.changeset/small-hornets-dress.md +++ b/.changeset/small-hornets-dress.md @@ -3,7 +3,7 @@ '@backstage/plugin-catalog-common': patch --- -Moved the `CatalogEntityDocument` to `@backstage/plugin-catalog-common` and deprecated the export from `@backstage/plugin-catalog-backend`. +**DEPRECATION**: Moved the `CatalogEntityDocument` to `@backstage/plugin-catalog-common` and deprecated the export from `@backstage/plugin-catalog-backend`. A new `type` field has also been added to `CatalogEntityDocument` as a replacement for `componentType`, which is now deprecated. Both fields are still present and should be set to the same value in order to avoid issues with indexing. diff --git a/plugins/catalog-backend/api-report.md b/plugins/catalog-backend/api-report.md index 9dcb2db752..dfe9a8943e 100644 --- a/plugins/catalog-backend/api-report.md +++ b/plugins/catalog-backend/api-report.md @@ -7,7 +7,7 @@ import { BitbucketIntegration } from '@backstage/integration'; import { CatalogApi } from '@backstage/catalog-client'; -import { CatalogEntityDocument } from '@backstage/plugin-catalog-common'; +import { CatalogEntityDocument as CatalogEntityDocument_2 } from '@backstage/plugin-catalog-common'; import { CompoundEntityRef } from '@backstage/catalog-model'; import { ConditionalPolicyDecision } from '@backstage/plugin-permission-node'; import { Conditions } from '@backstage/plugin-permission-node'; @@ -248,7 +248,8 @@ export const catalogConditions: Conditions<{ >; }>; -export { CatalogEntityDocument }; +// @public @deprecated (undocumented) +export type CatalogEntityDocument = CatalogEntityDocument_2; // @public (undocumented) export type CatalogEnvironment = { @@ -423,7 +424,7 @@ export class DefaultCatalogCollator { // (undocumented) protected discovery: PluginEndpointDiscovery; // (undocumented) - execute(): Promise; + execute(): Promise; // (undocumented) protected filter?: GetEntitiesRequest['filter']; // (undocumented) diff --git a/plugins/catalog-backend/src/search/DefaultCatalogCollatorFactory.ts b/plugins/catalog-backend/src/search/DefaultCatalogCollatorFactory.ts index ca6395b60a..440a8c8ebb 100644 --- a/plugins/catalog-backend/src/search/DefaultCatalogCollatorFactory.ts +++ b/plugins/catalog-backend/src/search/DefaultCatalogCollatorFactory.ts @@ -36,11 +36,6 @@ import { } from '@backstage/plugin-catalog-common'; import { Readable } from 'stream'; -/** - * @deprecated import from `@backstage/plugin-catalog-common` instead - */ -export type { CatalogEntityDocument }; - /** @public */ export type DefaultCatalogCollatorFactoryOptions = { discovery: PluginEndpointDiscovery; diff --git a/plugins/catalog-backend/src/search/index.ts b/plugins/catalog-backend/src/search/index.ts index bd54e33e59..eb5b1e7c22 100644 --- a/plugins/catalog-backend/src/search/index.ts +++ b/plugins/catalog-backend/src/search/index.ts @@ -17,8 +17,13 @@ export { DefaultCatalogCollatorFactory } from './DefaultCatalogCollatorFactory'; export type { DefaultCatalogCollatorFactoryOptions } from './DefaultCatalogCollatorFactory'; -/** @public @deprecated use the export from `plugin-catalog-common` instead */ -export type { CatalogEntityDocument } from '@backstage/plugin-catalog-common'; +import { CatalogEntityDocument as CatalogEntityDocumentType } from '@backstage/plugin-catalog-common'; + +/** + * @deprecated import from `@backstage/plugin-catalog-common` instead + * @public + */ +export type CatalogEntityDocument = CatalogEntityDocumentType; /** * todo(backstage/techdocs-core): stop exporting this in a future release.