From 120c2a49f3a4121bef10a5ff95c19042362b07e8 Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Tue, 14 May 2024 11:05:23 +0200 Subject: [PATCH] refactor(backend-common): unify deprecated file and folder Signed-off-by: Camila Belo --- packages/backend-common/src/deprecated.ts | 42 ------------------- .../backend-common/src/deprecated/index.ts | 27 ++++++++++++ packages/backend-common/src/index.ts | 2 - 3 files changed, 27 insertions(+), 44 deletions(-) delete mode 100644 packages/backend-common/src/deprecated.ts diff --git a/packages/backend-common/src/deprecated.ts b/packages/backend-common/src/deprecated.ts deleted file mode 100644 index 4589303e4b..0000000000 --- a/packages/backend-common/src/deprecated.ts +++ /dev/null @@ -1,42 +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 { - resolvePackagePath as _resolvePackagePath, - resolveSafeChildPath as _resolveSafeChildPath, - isChildPath as _isChildPath, -} from '@backstage/backend-plugin-api'; - -/** - * @public - * @deprecated This type is deprecated and will be removed in a future release, see https://github.com/backstage/backstage/issues/24493. - * Please use the `resolvePackagePath` function from the `@backstage/backend-plugin-api` package instead. - */ -export const resolvePackagePath = _resolvePackagePath; - -/** - * @public - * @deprecated This type is deprecated and will be removed in a future release, see - * Please use the `resolveSafeChildPath` function from the `@backstage/backend-plugin-api` package instead. - */ -export const resolveSafeChildPath = _resolveSafeChildPath; - -/** - * @public - * @deprecated This type is deprecated and will be removed in a future release, see - * Please use the `isChildPath` function from the `@backstage/cli-common` package instead. - */ -export const isChildPath = _isChildPath; diff --git a/packages/backend-common/src/deprecated/index.ts b/packages/backend-common/src/deprecated/index.ts index ed5fdcc577..708e358bfc 100644 --- a/packages/backend-common/src/deprecated/index.ts +++ b/packages/backend-common/src/deprecated/index.ts @@ -15,3 +15,30 @@ */ export * from './scm'; + +import { + resolvePackagePath as _resolvePackagePath, + resolveSafeChildPath as _resolveSafeChildPath, + isChildPath as _isChildPath, +} from '@backstage/backend-plugin-api'; + +/** + * @public + * @deprecated This type is deprecated and will be removed in a future release, see https://github.com/backstage/backstage/issues/24493. + * Please use the `resolvePackagePath` function from the `@backstage/backend-plugin-api` package instead. + */ +export const resolvePackagePath = _resolvePackagePath; + +/** + * @public + * @deprecated This type is deprecated and will be removed in a future release, see + * Please use the `resolveSafeChildPath` function from the `@backstage/backend-plugin-api` package instead. + */ +export const resolveSafeChildPath = _resolveSafeChildPath; + +/** + * @public + * @deprecated This type is deprecated and will be removed in a future release, see + * Please use the `isChildPath` function from the `@backstage/cli-common` package instead. + */ +export const isChildPath = _isChildPath; diff --git a/packages/backend-common/src/index.ts b/packages/backend-common/src/index.ts index 216eb9446e..87bfa245f6 100644 --- a/packages/backend-common/src/index.ts +++ b/packages/backend-common/src/index.ts @@ -22,8 +22,6 @@ export { legacyPlugin, makeLegacyPlugin } from './legacy'; export type { LegacyCreateRouter } from './legacy'; -export { Git } from './deprecated'; -export type { StaticAuthOptions, AuthCallbackOptions } from './deprecated'; export * from './auth'; export * from './cache'; export { loadBackendConfig } from './config';