From df7bd3ba0d6a6dfa5c0a39895e82c2b4101684e8 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 1 Aug 2025 09:57:34 +0200 Subject: [PATCH] frontend-app-api: removed deprecated FrontendFeature type Signed-off-by: Patrik Oldsberg --- .changeset/cruel-bars-buy.md | 5 +++++ .changeset/free-months-share.md | 5 +++++ packages/frontend-app-api/report.api.md | 7 ++----- packages/frontend-app-api/src/routing/collectRouteIds.ts | 2 +- packages/frontend-app-api/src/tree/resolveAppNodeSpecs.ts | 3 +-- packages/frontend-app-api/src/wiring/types.ts | 6 ------ packages/frontend-test-utils/report.api.md | 2 +- packages/frontend-test-utils/src/app/renderInTestApp.tsx | 6 ++---- 8 files changed, 17 insertions(+), 19 deletions(-) create mode 100644 .changeset/cruel-bars-buy.md create mode 100644 .changeset/free-months-share.md diff --git a/.changeset/cruel-bars-buy.md b/.changeset/cruel-bars-buy.md new file mode 100644 index 0000000000..d172551428 --- /dev/null +++ b/.changeset/cruel-bars-buy.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-test-utils': patch +--- + +Updated import of the `FrontendFeature` type. diff --git a/.changeset/free-months-share.md b/.changeset/free-months-share.md new file mode 100644 index 0000000000..42e47a973d --- /dev/null +++ b/.changeset/free-months-share.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-app-api': minor +--- + +**BREAKING**: Removed the deprecated `FrontendFeature` type, import it from `@backstage/frontend-plugin-api` instead. diff --git a/packages/frontend-app-api/report.api.md b/packages/frontend-app-api/report.api.md index f121640e0a..38f9647b79 100644 --- a/packages/frontend-app-api/report.api.md +++ b/packages/frontend-app-api/report.api.md @@ -8,7 +8,7 @@ import { AppTree } from '@backstage/frontend-plugin-api'; import { ConfigApi } from '@backstage/core-plugin-api'; import { ExtensionFactoryMiddleware } from '@backstage/frontend-plugin-api'; import { ExternalRouteRef } from '@backstage/frontend-plugin-api'; -import { FrontendFeature as FrontendFeature_2 } from '@backstage/frontend-plugin-api'; +import { FrontendFeature } from '@backstage/frontend-plugin-api'; import { FrontendPluginInfo } from '@backstage/frontend-plugin-api'; import { JsonObject } from '@backstage/types'; import { RouteRef } from '@backstage/frontend-plugin-api'; @@ -35,7 +35,7 @@ export function createSpecializedApp(options?: CreateSpecializedAppOptions): { // @public export type CreateSpecializedAppOptions = { - features?: FrontendFeature_2[]; + features?: FrontendFeature[]; config?: ConfigApi; bindRoutes?(context: { bind: CreateAppRouteBinder }): void; apis?: ApiHolder; @@ -48,9 +48,6 @@ export type CreateSpecializedAppOptions = { pluginInfoResolver?: FrontendPluginInfoResolver; }; -// @public @deprecated (undocumented) -export type FrontendFeature = FrontendFeature_2; - // @public export type FrontendPluginInfoResolver = (ctx: { packageJson(): Promise; diff --git a/packages/frontend-app-api/src/routing/collectRouteIds.ts b/packages/frontend-app-api/src/routing/collectRouteIds.ts index 6b0527f670..8f189bda81 100644 --- a/packages/frontend-app-api/src/routing/collectRouteIds.ts +++ b/packages/frontend-app-api/src/routing/collectRouteIds.ts @@ -18,6 +18,7 @@ import { RouteRef, SubRouteRef, ExternalRouteRef, + FrontendFeature, } from '@backstage/frontend-plugin-api'; // eslint-disable-next-line @backstage/no-relative-monorepo-imports import { @@ -29,7 +30,6 @@ import { toInternalExternalRouteRef } from '../../../frontend-plugin-api/src/rou // eslint-disable-next-line @backstage/no-relative-monorepo-imports import { toInternalSubRouteRef } from '../../../frontend-plugin-api/src/routing/SubRouteRef'; import { OpaqueFrontendPlugin } from '@internal/frontend'; -import { FrontendFeature } from '../wiring/types'; /** @internal */ export interface RouteRefsById { diff --git a/packages/frontend-app-api/src/tree/resolveAppNodeSpecs.ts b/packages/frontend-app-api/src/tree/resolveAppNodeSpecs.ts index 5e27d571b5..4788734800 100644 --- a/packages/frontend-app-api/src/tree/resolveAppNodeSpecs.ts +++ b/packages/frontend-app-api/src/tree/resolveAppNodeSpecs.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Extension } from '@backstage/frontend-plugin-api'; +import { Extension, FrontendFeature } from '@backstage/frontend-plugin-api'; import { ExtensionParameters } from './readAppExtensionsConfig'; import { AppNodeSpec } from '@backstage/frontend-plugin-api'; import { OpaqueFrontendPlugin } from '@internal/frontend'; @@ -25,7 +25,6 @@ import { } from '../../../frontend-plugin-api/src/wiring/createFrontendModule'; // eslint-disable-next-line @backstage/no-relative-monorepo-imports import { toInternalExtension } from '../../../frontend-plugin-api/src/wiring/resolveExtensionDefinition'; -import { FrontendFeature } from '../wiring/types'; /** @internal */ export function resolveAppNodeSpecs(options: { diff --git a/packages/frontend-app-api/src/wiring/types.ts b/packages/frontend-app-api/src/wiring/types.ts index 5192ef4139..4b47c7f250 100644 --- a/packages/frontend-app-api/src/wiring/types.ts +++ b/packages/frontend-app-api/src/wiring/types.ts @@ -14,15 +14,9 @@ * limitations under the License. */ import { RouteRef } from '@backstage/frontend-plugin-api'; -import { FrontendFeature as PluginApiFrontendFeature } from '@backstage/frontend-plugin-api'; import { BackstageRouteObject } from '../routing/types'; import { RouteAliasResolver } from '../routing/RouteAliasResolver'; -/** @public - * @deprecated Use {@link @backstage/frontend-plugin-api#FrontendFeature} instead. - */ -export type FrontendFeature = PluginApiFrontendFeature; - /** @internal */ export type RouteInfo = { routePaths: Map; diff --git a/packages/frontend-test-utils/report.api.md b/packages/frontend-test-utils/report.api.md index b139538cbe..e498976b3b 100644 --- a/packages/frontend-test-utils/report.api.md +++ b/packages/frontend-test-utils/report.api.md @@ -13,7 +13,7 @@ import { ErrorWithContext } from '@backstage/test-utils'; import { ExtensionDataRef } from '@backstage/frontend-plugin-api'; import { ExtensionDefinition } from '@backstage/frontend-plugin-api'; import { ExtensionDefinitionParameters } from '@backstage/frontend-plugin-api'; -import { FrontendFeature } from '@backstage/frontend-app-api'; +import { FrontendFeature } from '@backstage/frontend-plugin-api'; import { JsonObject } from '@backstage/types'; import { mockApis } from '@backstage/test-utils'; import { MockConfigApi } from '@backstage/test-utils'; diff --git a/packages/frontend-test-utils/src/app/renderInTestApp.tsx b/packages/frontend-test-utils/src/app/renderInTestApp.tsx index d4010a92ad..cdd8627384 100644 --- a/packages/frontend-test-utils/src/app/renderInTestApp.tsx +++ b/packages/frontend-test-utils/src/app/renderInTestApp.tsx @@ -16,10 +16,7 @@ import { Fragment } from 'react'; import { Link, MemoryRouter } from 'react-router-dom'; -import { - createSpecializedApp, - FrontendFeature, -} from '@backstage/frontend-app-api'; +import { createSpecializedApp } from '@backstage/frontend-app-api'; import { RenderResult, render } from '@testing-library/react'; import { ConfigReader } from '@backstage/config'; import { JsonObject } from '@backstage/types'; @@ -33,6 +30,7 @@ import { RouterBlueprint, NavItemBlueprint, createFrontendPlugin, + FrontendFeature, } from '@backstage/frontend-plugin-api'; import appPlugin from '@backstage/plugin-app';