chore: added a console warning for deprecation as it's a little tricky to do in typescript

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-08-30 13:11:43 +02:00
parent 52f9c5a012
commit 86ec8e170b
@@ -149,6 +149,7 @@ export function resolveExtensionDefinition<
override: _skip2,
...rest
} = internalDefinition;
const namespace = internalDefinition.namespace ?? context?.namespace;
const namePart =
@@ -161,6 +162,13 @@ export function resolveExtensionDefinition<
const id = kind ? `${kind}:${namePart}` : namePart;
if (internalDefinition.namespace) {
// eslint-disable-next-line no-console
console.warn(
`Extension ${id} has a deprecated namespace set, this option is no longer required, and should be removed from createExtensionBlueprint or createExtension. It will be automatically set from the pluginId when installing extensions using createFrontendModule and createFrontendPlugin`,
);
}
return {
...rest,
$$type: '@backstage/Extension',