docs/releases/v1.42.0-next.2-changelog.md
Upgrade Helper: https://backstage.github.io/upgrade-helper/?to=1.42.0-next.2
@backstage/cli/templates/new-frontend-plugin and @backstage/cli/templates/new-frontend-plugin-module as custom templates.defaultPath override of convertLegacyPageExtension has been renamed to path, in order to align with the same update that was made to the PageBlueprint.RouterBlueprint and AppRootWrapperBlueprint to use the lowercase component parameterFrontendFeature type, import it from @backstage/frontend-plugin-api instead.d9e00e3: Add support for a new aliasFor option for createRouteRef. This allows for the creation of a new route ref that acts as an alias for an existing route ref that is installed in the app. This is particularly useful when creating modules that override existing plugin pages, without referring to the existing plugin. For example:
export default createFrontendModule({
pluginId: 'catalog',
extensions: [
PageBlueprint.make({
params: {
defaultPath: '/catalog',
routeRef: createRouteRef({ aliasFor: 'catalog.catalogIndex' }),
loader: () =>
import('./CustomCatalogIndexPage').then(m => (
<m.CustomCatalogIndexPage />
)),
},
}),
],
});
3d2499f: Moved createSpecializedApp options to a new CreateSpecializedAppOptions type.
Updated dependencies
CreateAppFeatureLoader and support for it in other APIs. Switch existing usage to use the newer createFrontendFeatureLoader from @backstage/frontend-plugin-api instead.createPublicSignInApp, which has been replaced by the new appModulePublicSignIn from @backstage/plugin-app/alpha instead.c5f88b5: BREAKING: Remove deprecated source property from the AppNodeSpec type, use AppNodeSpec.plugin instead.
e4ddf22: BREAKING: The defaultPath param of PageBlueprint has been renamed to path. This change does not affect the compatibility of extensions created with older versions of this blueprint.
37f2989: BREAKING: Removed the routable property from ExtensionBoundary. This property was never needed in practice and is instead inferred from whether or not the extension outputs a route reference. It can be safely removed.
3243fa6: BREAKING: Removed the ability to define a default extension name in blueprints. This option had no practical purpose as blueprints already use the kind to identity the source of the extension.
a082429: BREAKING: The separate RouteResolutionApiResolveOptions type has been removed.
5d31d66: BREAKING: In an attempt to align some of the API's around providing components to Blueprints, we've renamed the parameters for both the RouterBlueprint and AppRootWrapperBlueprint from Component to component.
// old
RouterBlueprint.make({
params: {
Component: ({ children }) => <div>{children}</div>,
},
});
// new
RouterBlueprint.make({
params: {
component: ({ children }) => <div>{children}</div>,
},
});
// old
AppRootWrapperBlueprint.make({
params: {
Component: ({ children }) => <div>{children}</div>,
},
});
// new
AppRootWrapperBlueprint.make({
params: {
component: ({ children }) => <div>{children}</div>,
},
});
As part of this change, the type for component has also changed from ComponentType<PropsWithChildren<{}>> to (props: { children: ReactNode }) => JSX.Element | null which is not breaking, just a little more reflective of the actual expected component.
45ead4a: BREAKING: The AnyRoutes and AnyExternalRoutes types have been removed and their usage has been inlined instead.
Existing usage can be replaced according to their previous definitions:
type AnyRoutes = { [name in string]: RouteRef | SubRouteRef };
type AnyExternalRoutes = { [name in string]: ExternalRouteRef };
121899a: BREAKING: The element param for AppRootElementBlueprint no longer accepts a component. If you are currently passing a component such as element: () => <MyComponent /> or element: MyComponent, simply switch to element: <MyComponent />.
a321f3b: BREAKING: The CommonAnalyticsContext has been removed, and inlined into AnalyticsContextValue instead.
d9e00e3: Add support for a new aliasFor option for createRouteRef. This allows for the creation of a new route ref that acts as an alias for an existing route ref that is installed in the app. This is particularly useful when creating modules that override existing plugin pages, without referring to the existing plugin. For example:
export default createFrontendModule({
pluginId: 'catalog',
extensions: [
PageBlueprint.make({
params: {
defaultPath: '/catalog',
routeRef: createRouteRef({ aliasFor: 'catalog.catalogIndex' }),
loader: () =>
import('./CustomCatalogIndexPage').then(m => (
<m.CustomCatalogIndexPage />
)),
},
}),
],
});
93b5e38: Plugins should now use the new AnalyticsImplementationBlueprint to define and provide concrete analytics implementations. For example:
import { AnalyticsImplementationBlueprint } from '@backstage/frontend-plugin-api';
const AcmeAnalytics = AnalyticsImplementationBlueprint.make({
name: 'acme-analytics',
params: define =>
define({
deps: { config: configApiRef },
factory: ({ config }) => AcmeAnalyticsImpl.fromConfig(config),
}),
});
948de17: Tweaked the return types from createExtension and createExtensionBlueprint to avoid the forwarding of ConfigurableExtensionDataRef into exported types.
147482b: Updated the recommended naming of the blueprint param callback from define to defineParams, making the syntax defineParams => defineParams(...).
3c3c882: Added added defaults for all type parameters of ExtensionDataRef and deprecated AnyExtensionDataRef, as it is now redundant.
Updated dependencies
app-root-element extension now only accepts JSX.Element in its element param, meaning overrides need to be updated.appModulePublicSignIn via the /alpha sub-path export. This replaces the createPublicSignInApp export from @backstage/frontend-defaults, which is now deprecated.RouterBlueprint and AppRootWrapperBlueprint to use the lowercase component parameterAnalyticsImplementationBlueprint extensions. If no such extensions are discovered, the API continues to do nothing with analytics events fired within Backstage. If multiple such extensions are discovered, every discovered implementation automatically receives analytics events.defaultPath, defaultTitle, and defaultGroup params of PageBlueprint has been renamed to path, title, and group. The convertLegacyEntityContentExtension utility has also received the same change. This change does not affect the compatibility of extensions created with older versions of this blueprint.FavoriteToggleProps.FrontendFeature type.RouterBlueprint and AppRootWrapperBlueprint to use the lowercase component parameterapp-root-element extension now only accepts JSX.Element in its element param, meaning overrides need to be updated.app-root-element extension now only accepts JSX.Element in its element param, meaning overrides need to be updated.