From 8359c7647d6ed10c6336d08b088bc01b570890ea Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Tue, 23 May 2023 08:15:20 +0100 Subject: [PATCH] export deprecated properly Signed-off-by: Brian Fletcher --- plugins/pagerduty/api-report.md | 9 +++++---- plugins/pagerduty/src/deprecated.ts | 29 +++++++++++++++++++++++++++++ plugins/pagerduty/src/index.ts | 11 +---------- 3 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 plugins/pagerduty/src/deprecated.ts diff --git a/plugins/pagerduty/api-report.md b/plugins/pagerduty/api-report.md index 4e0d4784f3..dd24aa9bec 100644 --- a/plugins/pagerduty/api-report.md +++ b/plugins/pagerduty/api-report.md @@ -20,11 +20,9 @@ export const EntityPagerDutyCard: ( ) => JSX.Element; // @public (undocumented) -type EntityPagerDutyCardProps = { +export type EntityPagerDutyCardProps = { readOnly?: boolean; }; -export { EntityPagerDutyCardProps }; -export { EntityPagerDutyCardProps as PagerDutyCardProps }; // @public (undocumented) export const HomePagePagerDutyCard: ( @@ -67,9 +65,12 @@ export type PagerDutyAssignee = { html_url: string; }; -// @public (undocumented) +// @public @deprecated (undocumented) export const PagerDutyCard: (props: EntityPagerDutyCardProps) => JSX.Element; +// @public @deprecated (undocumented) +export type PagerDutyCardProps = EntityPagerDutyCardProps; + // @public (undocumented) export type PagerDutyChangeEvent = { id: string; diff --git a/plugins/pagerduty/src/deprecated.ts b/plugins/pagerduty/src/deprecated.ts new file mode 100644 index 0000000000..e9f60f6894 --- /dev/null +++ b/plugins/pagerduty/src/deprecated.ts @@ -0,0 +1,29 @@ +/* + * Copyright 2023 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 { EntityPagerDutyCardProps, EntityPagerDutyCard } from './components'; + +/** + * @public + * @deprecated Please use EntityPagerDutyCard + */ +export const PagerDutyCard = EntityPagerDutyCard; + +/** + * @public + * @deprecated Please use EntityPagerDutyCardProps + */ +export type PagerDutyCardProps = EntityPagerDutyCardProps; diff --git a/plugins/pagerduty/src/index.ts b/plugins/pagerduty/src/index.ts index d0320e3343..c6f7aef89a 100644 --- a/plugins/pagerduty/src/index.ts +++ b/plugins/pagerduty/src/index.ts @@ -29,16 +29,7 @@ export { export * from './components'; -/** - * @deprecated Please use EntityPagerDutyCard - */ -export { EntityPagerDutyCard as PagerDutyCard } from './components'; - -/** - * @deprecated Please use EntityPagerDutyCardProps - */ -export type { EntityPagerDutyCardProps as PagerDutyCardProps } from './components'; - export * from './api'; +export * from './deprecated'; export type { PagerDutyEntity } from './types';