From 727c83bddc0586fad1a2e2f422fc9d339c995cd7 Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Mon, 4 Aug 2025 11:04:45 +0200 Subject: [PATCH] chore: added some helper error message for removal of the `Component` param Signed-off-by: benjdlambert --- packages/frontend-plugin-api/report.api.md | 2 ++ .../src/blueprints/AppRootWrapperBlueprint.tsx | 2 ++ .../src/blueprints/RouterBlueprint.tsx | 8 ++++---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/frontend-plugin-api/report.api.md b/packages/frontend-plugin-api/report.api.md index b91295630b..bda12a8d89 100644 --- a/packages/frontend-plugin-api/report.api.md +++ b/packages/frontend-plugin-api/report.api.md @@ -267,6 +267,7 @@ export const AppRootWrapperBlueprint: ExtensionBlueprint<{ kind: 'app-root-wrapper'; name: undefined; params: { + Component?: [error: 'Use the `component` parameter instead']; component: (props: { children: ReactNode }) => JSX.Element | null; }; output: ConfigurableExtensionDataRef< @@ -1719,6 +1720,7 @@ export const RouterBlueprint: ExtensionBlueprint<{ kind: 'app-router-component'; name: undefined; params: { + Component?: [error: 'Use the `component` parameter instead']; component: (props: { children: ReactNode }) => JSX.Element | null; }; output: ConfigurableExtensionDataRef< diff --git a/packages/frontend-plugin-api/src/blueprints/AppRootWrapperBlueprint.tsx b/packages/frontend-plugin-api/src/blueprints/AppRootWrapperBlueprint.tsx index 1002f9a383..493fba05f6 100644 --- a/packages/frontend-plugin-api/src/blueprints/AppRootWrapperBlueprint.tsx +++ b/packages/frontend-plugin-api/src/blueprints/AppRootWrapperBlueprint.tsx @@ -36,6 +36,8 @@ export const AppRootWrapperBlueprint = createExtensionBlueprint({ component: componentDataRef, }, *factory(params: { + /** @deprecated use the `component` parameter instead */ + Component?: [error: 'Use the `component` parameter instead']; component: (props: { children: ReactNode }) => JSX.Element | null; }) { yield componentDataRef(params.component); diff --git a/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.tsx b/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.tsx index 97870b8589..c4b7c16bd6 100644 --- a/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.tsx +++ b/packages/frontend-plugin-api/src/blueprints/RouterBlueprint.tsx @@ -29,11 +29,11 @@ export const RouterBlueprint = createExtensionBlueprint({ dataRefs: { component: componentDataRef, }, - *factory({ - component, - }: { + *factory(params: { + /** @deprecated use the `component` parameter instead */ + Component?: [error: 'Use the `component` parameter instead']; component: (props: { children: ReactNode }) => JSX.Element | null; }) { - yield componentDataRef(component); + yield componentDataRef(params.component); }, });