Merge pull request #8931 from backstage/rugvip/entityrr
catalog-react: deprecate catalogRouteRef and deduplicate entityRouteRef
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-react': patch
|
||||
---
|
||||
|
||||
The `entityRouteRef` is now a well-known route that should be imported directly from `@backstage/plugin-catalog-react`. It is guaranteed to be globally unique across duplicate installations of the `@backstage/plugin-catalog-react`, starting at this version.
|
||||
|
||||
Deprecated `entityRoute` in favor of `entityRouteRef`.
|
||||
|
||||
Deprecated `rootRoute` and `catalogRouteRef`. If you want to refer to the catalog index page from a public plugin you now need to use an `ExternalRouteRef` instead. For private plugins it is possible to take the shortcut of referring directly to `catalogPlugin.routes.indexPage` instead.
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Added an external route binding from the `org` plugin to the catalog index page.
|
||||
|
||||
This change is needed because `@backstage/plugin-org` now has a required external route that needs to be bound for the app to start.
|
||||
|
||||
To apply this change to an existing app, make the following change to `packages/app/src/App.tsx`:
|
||||
|
||||
```diff
|
||||
import { ScaffolderPage, scaffolderPlugin } from '@backstage/plugin-scaffolder';
|
||||
+import { orgPlugin } from '@backstage/plugin-org';
|
||||
import { SearchPage } from '@backstage/plugin-search';
|
||||
```
|
||||
|
||||
And further down within the `createApp` call:
|
||||
|
||||
```diff
|
||||
bind(scaffolderPlugin.externalRoutes, {
|
||||
registerComponent: catalogImportPlugin.routes.importPage,
|
||||
});
|
||||
+ bind(orgPlugin.externalRoutes, {
|
||||
+ catalogIndex: catalogPlugin.routes.catalogIndex,
|
||||
+ });
|
||||
},
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-bazaar': patch
|
||||
---
|
||||
|
||||
Switched out internal usage of the `catalogRouteRef` from `@backstage/plugin-catalog-react`.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-app-api': patch
|
||||
---
|
||||
|
||||
Added validation during the application startup that detects if there are any plugins present that have not had their required external routes bound. Failing the validation will cause a hard crash as it is a programmer error. It lets you detect early on that there are dangling routes, rather than having them cause an error later on.
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
'@backstage/plugin-org': minor
|
||||
---
|
||||
|
||||
**BREAKING**: Added a new and required `catalogIndex` external route. It should typically be linked to the `catalogIndex` route of the Catalog plugin:
|
||||
|
||||
```ts
|
||||
bind(orgPlugin.externalRoutes, {
|
||||
catalogIndex: catalogPlugin.routes.catalogIndex,
|
||||
});
|
||||
```
|
||||
Reference in New Issue
Block a user