diff --git a/.changeset/fix-frontend-feature-compat.md b/.changeset/fix-frontend-feature-compat.md new file mode 100644 index 0000000000..ced9237285 --- /dev/null +++ b/.changeset/fix-frontend-feature-compat.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-plugin-api': patch +--- + +Made the `pluginId` property optional in the `FrontendFeature` type, allowing plugins published against older versions of the framework to be used without type errors. diff --git a/.patches/pr-32905.txt b/.patches/pr-32905.txt new file mode 100644 index 0000000000..3af61baa35 --- /dev/null +++ b/.patches/pr-32905.txt @@ -0,0 +1 @@ +Fix type compatibility for older plugins in FrontendFeature type \ No newline at end of file diff --git a/packages/frontend-plugin-api/report.api.md b/packages/frontend-plugin-api/report.api.md index 6ba548af19..1909b1deef 100644 --- a/packages/frontend-plugin-api/report.api.md +++ b/packages/frontend-plugin-api/report.api.md @@ -1336,7 +1336,11 @@ export type FetchApi = { export const fetchApiRef: ApiRef; // @public (undocumented) -export type FrontendFeature = FrontendPlugin | FrontendModule; +export type FrontendFeature = + | (Omit & { + pluginId?: string; + }) + | FrontendModule; // @public (undocumented) export interface FrontendFeatureLoader { diff --git a/packages/frontend-plugin-api/src/wiring/types.ts b/packages/frontend-plugin-api/src/wiring/types.ts index 460a399871..0b59e7a7fb 100644 --- a/packages/frontend-plugin-api/src/wiring/types.ts +++ b/packages/frontend-plugin-api/src/wiring/types.ts @@ -73,4 +73,6 @@ export type ExtensionFactoryMiddleware = ( ) => Iterable>; /** @public */ -export type FrontendFeature = FrontendPlugin | FrontendModule; +export type FrontendFeature = + | (Omit & { pluginId?: string }) + | FrontendModule;