From 1940ae08fce3a527f989af6164b883170726f770 Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Wed, 20 Aug 2025 11:46:16 +0200 Subject: [PATCH 1/3] chore: need to add backwards compat for `default*` props Signed-off-by: benjdlambert --- .../src/alpha/blueprints/EntityContentBlueprint.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-react/src/alpha/blueprints/EntityContentBlueprint.ts b/plugins/catalog-react/src/alpha/blueprints/EntityContentBlueprint.ts index dadf059922..40fbbdf0f8 100644 --- a/plugins/catalog-react/src/alpha/blueprints/EntityContentBlueprint.ts +++ b/plugins/catalog-react/src/alpha/blueprints/EntityContentBlueprint.ts @@ -86,9 +86,12 @@ export const EntityContentBlueprint = createExtensionBlueprint({ }, { node, config }, ) { - const path = config.path ?? params.path; - const title = config.title ?? params.title; - const group = config.group ?? params.group; + // TODO(blam): Remove support for all the `default*` props in the future, this breaks backwards compatibility without it + // As this is marked as BREAKING ALPHA, it doesn't affect the public API so it falls in range and gets picked + // up by packages that depend on `catalog-react`. + const path = config.path ?? params.path ?? params.defaultPath; + const title = config.title ?? params.title ?? params.defaultTitle; + const group = config.group ?? params.group ?? params.defaultGroup; yield coreExtensionData.reactElement( ExtensionBoundary.lazy(node, params.loader), @@ -104,7 +107,7 @@ export const EntityContentBlueprint = createExtensionBlueprint({ yield* resolveEntityFilterData(params.filter, config, node); - if (group) { + if (group && typeof group === 'string') { yield entityContentGroupDataRef(group); } }, From ad0f58d143a81313f7ad73fbeabd229813ec9eb9 Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Wed, 20 Aug 2025 11:47:11 +0200 Subject: [PATCH 2/3] chore: changeset Signed-off-by: benjdlambert --- .changeset/yellow-dragons-float.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/yellow-dragons-float.md diff --git a/.changeset/yellow-dragons-float.md b/.changeset/yellow-dragons-float.md new file mode 100644 index 0000000000..c1d8341e32 --- /dev/null +++ b/.changeset/yellow-dragons-float.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Support `default*` for older packages as this package is in range for breaking `/alpha` changes From 90c1f539755f8842f33a4f642931064c27626f12 Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Wed, 20 Aug 2025 11:55:21 +0200 Subject: [PATCH 3/3] chore: add support for legacyContentExtension too Signed-off-by: benjdlambert --- .../convertLegacyEntityContentExtension.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/catalog-react/src/alpha/converters/convertLegacyEntityContentExtension.tsx b/plugins/catalog-react/src/alpha/converters/convertLegacyEntityContentExtension.tsx index d9638286cb..605ee96d71 100644 --- a/plugins/catalog-react/src/alpha/converters/convertLegacyEntityContentExtension.tsx +++ b/plugins/catalog-react/src/alpha/converters/convertLegacyEntityContentExtension.tsx @@ -82,13 +82,19 @@ export function convertLegacyEntityContentExtension( } } name = name && kebabCase(name); - + // TODO(blam): Remove support for all the `default*` props in the future, this breaks backwards compatibility without it + // As this is marked as BREAKING ALPHA, it doesn't affect the public API so it falls in range and gets picked + // up by packages that depend on `catalog-react`. return EntityContentBlueprint.make({ name: overrides?.name ?? name, params: { filter: overrides?.filter, - path: overrides?.path ?? `/${kebabCase(infix)}`, - title: overrides?.title ?? startCase(infix), + path: (overrides?.path ?? + overrides?.defaultPath ?? + `/${kebabCase(infix)}`) as string, + title: (overrides?.title ?? + overrides?.defaultTitle ?? + startCase(infix)) as string, routeRef: mountPoint && convertLegacyRouteRef(mountPoint), loader: async () => compatWrapper(element), },