Skip to content

Commit

Permalink
core-app-api: deprecate the BackstagePluginWithAnyOutput type
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
  • Loading branch information
Rugvip committed Nov 16, 2021
1 parent eaeac8f commit ecd1fcb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-lemons-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage/core-app-api': patch
---

Deprecated the `BackstagePluginWithAnyOutput` type.
11 changes: 9 additions & 2 deletions packages/core-app-api/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,14 @@ export type AppOptions = {
icons: AppIcons & {
[key in string]: IconComponent;
};
plugins?: BackstagePluginWithAnyOutput[];
plugins?: (Omit<BackstagePlugin<any, any>, 'output'> & {
output(): (
| PluginOutput
| {
type: string;
}
)[];
})[];
components: AppComponents;
themes: (Partial<AppTheme> & Omit<AppTheme, 'theme'>)[];
configLoader?: AppConfigLoader;
Expand Down Expand Up @@ -269,7 +276,7 @@ export type BackstageApp = {
getRouter(): ComponentType<{}>;
};

// @public
// @public @deprecated
export type BackstagePluginWithAnyOutput = Omit<
BackstagePlugin<any, any>,
'output'
Expand Down
5 changes: 4 additions & 1 deletion packages/core-app-api/src/app/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export type AppRouteBinder = <
*
* @public
* @remarks
* @deprecated Will be removed
*
* The `type: string` type is there to handle output from newer or older plugin
* API versions that might not be supported by this version of the app API, but
Expand Down Expand Up @@ -246,7 +247,9 @@ export type AppOptions = {
/**
* A list of all plugins to include in the app.
*/
plugins?: BackstagePluginWithAnyOutput[];
plugins?: (Omit<BackstagePlugin<any, any>, 'output'> & {
output(): (PluginOutput | { type: string })[];
})[];

/**
* Supply components to the app to override the default ones.
Expand Down

0 comments on commit ecd1fcb

Please sign in to comment.