backend-plugin-api: Remove deprecated types

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2024-08-16 11:52:01 +02:00
parent 4490d733b5
commit c99c620809
4 changed files with 9 additions and 84 deletions
+9
View File
@@ -0,0 +1,9 @@
---
'@backstage/backend-plugin-api': minor
---
**BREAKING** Removed the following deprecated types:
- `ServiceRefConfig` use `ServiceRefOptions`
- `RootServiceFactoryConfig` use `RootServiceFactoryOptions`
- `PluginServiceFactoryConfig` use `PluginServiceFactoryOptions`
-28
View File
@@ -511,17 +511,6 @@ export interface PluginMetadataService {
getId(): string;
}
// @public @deprecated (undocumented)
export type PluginServiceFactoryConfig<
TService,
TInstances extends 'singleton' | 'multiton',
TContext,
TImpl extends TService,
TDeps extends {
[name in string]: ServiceRef<unknown>;
},
> = PluginServiceFactoryOptions<TService, TInstances, TContext, TImpl, TDeps>;
// @public (undocumented)
export interface PluginServiceFactoryOptions<
TService,
@@ -604,16 +593,6 @@ export interface RootLifecycleService extends LifecycleService {}
// @public
export interface RootLoggerService extends LoggerService {}
// @public @deprecated (undocumented)
export type RootServiceFactoryConfig<
TService,
TInstances extends 'singleton' | 'multiton',
TImpl extends TService,
TDeps extends {
[name in string]: ServiceRef<unknown>;
},
> = RootServiceFactoryOptions<TService, TInstances, TImpl, TDeps>;
// @public (undocumented)
export interface RootServiceFactoryOptions<
TService, // TODO(Rugvip): Can we forward the entire service ref type here instead of forwarding each type arg once the callback form is gone?
@@ -755,13 +734,6 @@ export type ServiceRef<
$$type: '@backstage/ServiceRef';
};
// @public @deprecated (undocumented)
export type ServiceRefConfig<
TService,
TScope extends 'root' | 'plugin',
TInstances extends 'singleton' | 'multiton',
> = ServiceRefOptions<TService, TScope, TInstances>;
// @public (undocumented)
export interface ServiceRefOptions<
TService,
@@ -1,55 +0,0 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
ServiceRef,
ServiceRefOptions,
RootServiceFactoryOptions,
PluginServiceFactoryOptions,
} from './services';
/**
* @public
* @deprecated Use {@link ServiceRefOptions} instead
*/
export type ServiceRefConfig<
TService,
TScope extends 'root' | 'plugin',
TInstances extends 'singleton' | 'multiton',
> = ServiceRefOptions<TService, TScope, TInstances>;
/**
* @public
* @deprecated Use {@link RootServiceFactoryOptions} instead
*/
export type RootServiceFactoryConfig<
TService,
TInstances extends 'singleton' | 'multiton',
TImpl extends TService,
TDeps extends { [name in string]: ServiceRef<unknown> },
> = RootServiceFactoryOptions<TService, TInstances, TImpl, TDeps>;
/**
* @public
* @deprecated Use {@link PluginServiceFactoryOptions} instead
*/
export type PluginServiceFactoryConfig<
TService,
TInstances extends 'singleton' | 'multiton',
TContext,
TImpl extends TService,
TDeps extends { [name in string]: ServiceRef<unknown> },
> = PluginServiceFactoryOptions<TService, TInstances, TContext, TImpl, TDeps>;
-1
View File
@@ -24,4 +24,3 @@ export * from './services';
export type { BackendFeature, BackendFeatureCompat } from './types';
export * from './paths';
export * from './wiring';
export * from './deprecated';