From c99c620809e9d75b59ba76732a258d84aa4c3c09 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Fri, 16 Aug 2024 11:52:01 +0200 Subject: [PATCH] backend-plugin-api: Remove deprecated types Signed-off-by: Johan Haals --- .changeset/tame-doors-think.md | 9 +++ packages/backend-plugin-api/api-report.md | 28 ---------- packages/backend-plugin-api/src/deprecated.ts | 55 ------------------- packages/backend-plugin-api/src/index.ts | 1 - 4 files changed, 9 insertions(+), 84 deletions(-) create mode 100644 .changeset/tame-doors-think.md delete mode 100644 packages/backend-plugin-api/src/deprecated.ts diff --git a/.changeset/tame-doors-think.md b/.changeset/tame-doors-think.md new file mode 100644 index 0000000000..2e2ecabd35 --- /dev/null +++ b/.changeset/tame-doors-think.md @@ -0,0 +1,9 @@ +--- +'@backstage/backend-plugin-api': minor +--- + +**BREAKING** Removed the following deprecated types: + +- `ServiceRefConfig` use `ServiceRefOptions` +- `RootServiceFactoryConfig` use `RootServiceFactoryOptions` +- `PluginServiceFactoryConfig` use `PluginServiceFactoryOptions` diff --git a/packages/backend-plugin-api/api-report.md b/packages/backend-plugin-api/api-report.md index 319ddf0bc6..630f869be4 100644 --- a/packages/backend-plugin-api/api-report.md +++ b/packages/backend-plugin-api/api-report.md @@ -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; - }, -> = PluginServiceFactoryOptions; - // @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; - }, -> = RootServiceFactoryOptions; - // @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; - // @public (undocumented) export interface ServiceRefOptions< TService, diff --git a/packages/backend-plugin-api/src/deprecated.ts b/packages/backend-plugin-api/src/deprecated.ts deleted file mode 100644 index 0d02f9ed7e..0000000000 --- a/packages/backend-plugin-api/src/deprecated.ts +++ /dev/null @@ -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; - -/** - * @public - * @deprecated Use {@link RootServiceFactoryOptions} instead - */ -export type RootServiceFactoryConfig< - TService, - TInstances extends 'singleton' | 'multiton', - TImpl extends TService, - TDeps extends { [name in string]: ServiceRef }, -> = RootServiceFactoryOptions; - -/** - * @public - * @deprecated Use {@link PluginServiceFactoryOptions} instead - */ -export type PluginServiceFactoryConfig< - TService, - TInstances extends 'singleton' | 'multiton', - TContext, - TImpl extends TService, - TDeps extends { [name in string]: ServiceRef }, -> = PluginServiceFactoryOptions; diff --git a/packages/backend-plugin-api/src/index.ts b/packages/backend-plugin-api/src/index.ts index eb554db25d..e6e57db1dc 100644 --- a/packages/backend-plugin-api/src/index.ts +++ b/packages/backend-plugin-api/src/index.ts @@ -24,4 +24,3 @@ export * from './services'; export type { BackendFeature, BackendFeatureCompat } from './types'; export * from './paths'; export * from './wiring'; -export * from './deprecated';