chore: deprecate the namespace option in blueprints and extensions

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-08-30 08:39:47 +02:00
parent 61e1632dda
commit b99b158dfc
11 changed files with 5 additions and 10 deletions
@@ -24,7 +24,6 @@ const iconsDataRef = createExtensionDataRef<{
/** @public */
export const IconBundleBlueprint = createExtensionBlueprint({
kind: 'icon-bundle',
namespace: 'app',
attachTo: { id: 'api:app/icons', input: 'icons' },
output: [iconsDataRef],
config: {
@@ -42,7 +42,7 @@ describe('ThemeBlueprint', () => {
"inputs": {},
"kind": "theme",
"name": "light",
"namespace": "app",
"namespace": undefined,
"output": [
[Function],
],
@@ -28,7 +28,6 @@ const themeDataRef = createExtensionDataRef<AppTheme>().with({
*/
export const ThemeBlueprint = createExtensionBlueprint({
kind: 'theme',
namespace: 'app',
attachTo: { id: 'api:app/app-theme', input: 'themes' },
output: [themeDataRef],
dataRefs: {
@@ -122,6 +122,7 @@ export type CreateExtensionOptions<
UFactoryOutput extends ExtensionDataValue<any, any>,
> = {
kind?: TKind;
/** @deprecated namespace is no longer required, you can safely remove this option and it will default to the `pluginId`. It will be removed in a future release. */
namespace?: TNamespace;
name?: TName;
attachTo: { id: string; input: string };
@@ -57,6 +57,7 @@ export type CreateExtensionBlueprintOptions<
TDataRefs extends { [name in string]: AnyExtensionDataRef },
> = {
kind: TKind;
/** @deprecated namespace is no longer required, you can safely remove this option and it will default to the `pluginId`. It will be removed in a future release. */
namespace?: TNamespace;
attachTo: { id: string; input: string };
disabled?: boolean;
@@ -111,6 +112,7 @@ export interface ExtensionBlueprint<
TNewNamespace extends string | undefined,
TNewName extends string | undefined,
>(args: {
/** @deprecated namespace is no longer required, you can safely remove this option and it will default to the `pluginId`. It will be removed in a future release. */
namespace?: TNewNamespace;
name?: TNewName;
attachTo?: { id: string; input: string };
@@ -149,6 +151,7 @@ export interface ExtensionBlueprint<
>;
},
>(args: {
/** @deprecated namespace is no longer required, you can safely remove this option and it will default to the `pluginId`. It will be removed in a future release. */
namespace?: TNewNamespace;
name?: TNewName;
attachTo?: { id: string; input: string };