diff --git a/.changeset/heavy-numbers-refuse.md b/.changeset/heavy-numbers-refuse.md new file mode 100644 index 0000000000..c5d9dc6deb --- /dev/null +++ b/.changeset/heavy-numbers-refuse.md @@ -0,0 +1,10 @@ +--- +'@backstage/plugin-api-docs': minor +'@backstage/plugin-cost-insights': minor +'@backstage/plugin-gcp-projects': minor +'@backstage/plugin-gitops-profiles': minor +'@backstage/plugin-newrelic': minor +'@backstage/plugin-welcome': minor +--- + +**BREAKING CHANGE** Remove deprecated route registrations, meaning that it is no longer enough to only import the plugin in the app and the exported page extension must be used instead. diff --git a/plugins/api-docs/src/plugin.ts b/plugins/api-docs/src/plugin.ts index 4956a48f18..bb8395081f 100644 --- a/plugins/api-docs/src/plugin.ts +++ b/plugins/api-docs/src/plugin.ts @@ -22,7 +22,6 @@ import { createRoutableExtension, } from '@backstage/core'; import { defaultDefinitionWidgets } from './components/ApiDefinitionCard'; -import { ApiExplorerPage as Page } from './components/ApiExplorerPage/ApiExplorerPage'; import { apiDocsConfigRef } from './config'; import { createComponentRouteRef, rootRoute } from './routes'; @@ -48,9 +47,6 @@ export const apiDocsPlugin = createPlugin({ externalRoutes: { createComponent: createComponentRouteRef, }, - register({ router }) { - router.addRoute(rootRoute, Page); - }, }); export const ApiExplorerPage = apiDocsPlugin.provide( diff --git a/plugins/cost-insights/src/plugin.ts b/plugins/cost-insights/src/plugin.ts index 29e345532d..aabafade9a 100644 --- a/plugins/cost-insights/src/plugin.ts +++ b/plugins/cost-insights/src/plugin.ts @@ -19,9 +19,6 @@ import { createRouteRef, createRoutableExtension, } from '@backstage/core'; -import { CostInsightsPage as CostInsightsPageComponent } from './components/CostInsightsPage'; -import { ProjectGrowthInstructionsPage as ProjectGrowthInstructionsPageComponent } from './components/ProjectGrowthInstructionsPage'; -import { LabelDataflowInstructionsPage as LabelDataflowInstructionsPageComponent } from './components/LabelDataflowInstructionsPage'; export const rootRouteRef = createRouteRef({ path: '/cost-insights', @@ -40,16 +37,7 @@ export const unlabeledDataflowAlertRef = createRouteRef({ export const costInsightsPlugin = createPlugin({ id: 'cost-insights', - register({ router, featureFlags }) { - router.addRoute(rootRouteRef, CostInsightsPageComponent); - router.addRoute( - projectGrowthAlertRef, - ProjectGrowthInstructionsPageComponent, - ); - router.addRoute( - unlabeledDataflowAlertRef, - LabelDataflowInstructionsPageComponent, - ); + register({ featureFlags }) { featureFlags.register('cost-insights-currencies'); }, routes: { diff --git a/plugins/gcp-projects/src/plugin.ts b/plugins/gcp-projects/src/plugin.ts index 9126716d55..5280ff8e35 100644 --- a/plugins/gcp-projects/src/plugin.ts +++ b/plugins/gcp-projects/src/plugin.ts @@ -21,10 +21,7 @@ import { googleAuthApiRef, } from '@backstage/core'; import { gcpApiRef, GcpClient } from './api'; -import { NewProjectPage } from './components/NewProjectPage'; -import { ProjectDetailsPage } from './components/ProjectDetailsPage'; -import { ProjectListPage } from './components/ProjectListPage'; -import { rootRouteRef, projectRouteRef, newProjectRouteRef } from './routes'; +import { rootRouteRef } from './routes'; export const gcpProjectsPlugin = createPlugin({ id: 'gcp-projects', @@ -40,11 +37,6 @@ export const gcpProjectsPlugin = createPlugin({ }, }), ], - register({ router }) { - router.addRoute(rootRouteRef, ProjectListPage); - router.addRoute(projectRouteRef, ProjectDetailsPage); - router.addRoute(newProjectRouteRef, NewProjectPage); - }, }); export const GcpProjectsPage = gcpProjectsPlugin.provide( diff --git a/plugins/gitops-profiles/src/plugin.ts b/plugins/gitops-profiles/src/plugin.ts index 98a0067969..df19087199 100644 --- a/plugins/gitops-profiles/src/plugin.ts +++ b/plugins/gitops-profiles/src/plugin.ts @@ -19,9 +19,6 @@ import { createApiFactory, createRoutableExtension, } from '@backstage/core'; -import ProfileCatalog from './components/ProfileCatalog'; -import ClusterPage from './components/ClusterPage'; -import ClusterList from './components/ClusterList'; import { gitOpsClusterListRoute, gitOpsClusterDetailsRoute, @@ -34,11 +31,6 @@ export const gitopsProfilesPlugin = createPlugin({ apis: [ createApiFactory(gitOpsApiRef, new GitOpsRestApi('http://localhost:3008')), ], - register({ router }) { - router.addRoute(gitOpsClusterListRoute, ClusterList); - router.addRoute(gitOpsClusterDetailsRoute, ClusterPage); - router.addRoute(gitOpsClusterCreateRoute, ProfileCatalog); - }, routes: { listPage: gitOpsClusterListRoute, detailsPage: gitOpsClusterDetailsRoute, diff --git a/plugins/newrelic/src/plugin.ts b/plugins/newrelic/src/plugin.ts index d89aa813e9..a92c051b27 100644 --- a/plugins/newrelic/src/plugin.ts +++ b/plugins/newrelic/src/plugin.ts @@ -22,7 +22,6 @@ import { createRoutableExtension, } from '@backstage/core'; import { NewRelicClient, newRelicApiRef } from './api'; -import NewRelicComponent from './components/NewRelicComponent'; export const rootRouteRef = createRouteRef({ path: '/newrelic', @@ -38,9 +37,6 @@ export const newRelicPlugin = createPlugin({ factory: ({ discoveryApi }) => new NewRelicClient({ discoveryApi }), }), ], - register({ router }) { - router.addRoute(rootRouteRef, NewRelicComponent); - }, routes: { root: rootRouteRef, }, diff --git a/plugins/welcome/src/plugin.ts b/plugins/welcome/src/plugin.ts index f950b93874..54a7cd93d1 100644 --- a/plugins/welcome/src/plugin.ts +++ b/plugins/welcome/src/plugin.ts @@ -19,7 +19,6 @@ import { createRoutableExtension, createRouteRef, } from '@backstage/core'; -import WelcomePageComponent from './components/WelcomePage'; export const rootRouteRef = createRouteRef({ title: 'Welcome', @@ -27,8 +26,7 @@ export const rootRouteRef = createRouteRef({ export const welcomePlugin = createPlugin({ id: 'welcome', - register({ router, featureFlags }) { - router.addRoute(rootRouteRef, WelcomePageComponent); + register({ featureFlags }) { featureFlags.register('enable-welcome-box'); }, });