diff --git a/workspaces/linguist/.changeset/chilly-readers-own.md b/workspaces/linguist/.changeset/chilly-readers-own.md new file mode 100644 index 0000000000..e137ce11a2 --- /dev/null +++ b/workspaces/linguist/.changeset/chilly-readers-own.md @@ -0,0 +1,5 @@ +--- +'@backstage-community/plugin-linguist-backend': patch +--- + +Marked `createRouter`, `createRouterFromConfig`, `RouterOptions`, and `PluginOptions` as deprecated, to be removed soon after the Backstage `1.32.0` release in October diff --git a/workspaces/linguist/plugins/linguist-backend/api-report.md b/workspaces/linguist/plugins/linguist-backend/api-report.md index e5161dc2ef..42e7da77e8 100644 --- a/workspaces/linguist/plugins/linguist-backend/api-report.md +++ b/workspaces/linguist/plugins/linguist-backend/api-report.md @@ -17,13 +17,13 @@ import { SchedulerService } from '@backstage/backend-plugin-api'; import { SchedulerServiceTaskScheduleDefinition } from '@backstage/backend-plugin-api'; import { UrlReaderService } from '@backstage/backend-plugin-api'; -// @public (undocumented) +// @public @deprecated (undocumented) export function createRouter( pluginOptions: PluginOptions, routerOptions: RouterOptions, ): Promise; -// @public (undocumented) +// @public @deprecated (undocumented) export function createRouterFromConfig( routerOptions: RouterOptions, ): Promise; @@ -40,7 +40,7 @@ export interface LinguistBackendApi { const linguistPlugin: BackendFeatureCompat; export default linguistPlugin; -// @public (undocumented) +// @public @deprecated (undocumented) export interface PluginOptions { // (undocumented) age?: HumanDuration; @@ -56,7 +56,7 @@ export interface PluginOptions { useSourceLocation?: boolean; } -// @public (undocumented) +// @public @deprecated (undocumented) export interface RouterOptions { // (undocumented) auth?: AuthService; diff --git a/workspaces/linguist/plugins/linguist-backend/src/service/router.ts b/workspaces/linguist/plugins/linguist-backend/src/service/router.ts index 8a2ecde328..19b85c8e2e 100644 --- a/workspaces/linguist/plugins/linguist-backend/src/service/router.ts +++ b/workspaces/linguist/plugins/linguist-backend/src/service/router.ts @@ -38,7 +38,10 @@ import { } from '@backstage/backend-plugin-api'; import { MiddlewareFactory } from '@backstage/backend-defaults/rootHttpRouter'; -/** @public */ +/** + * @deprecated Please migrate to the new backend system as this will be removed in the future. + * @public + * */ export interface PluginOptions { schedule?: SchedulerServiceTaskScheduleDefinition; age?: HumanDuration; @@ -48,7 +51,10 @@ export interface PluginOptions { kind?: string[]; } -/** @public */ +/** + * @deprecated Please migrate to the new backend system as this will be removed in the future. + * @public + * */ export interface RouterOptions { linguistBackendApi?: LinguistBackendApi; logger: LoggerService; @@ -61,7 +67,10 @@ export interface RouterOptions { httpAuth?: HttpAuthService; } -/** @public */ +/** + * @deprecated Please migrate to the new backend system as this will be removed in the future. + * @public + * */ export async function createRouter( pluginOptions: PluginOptions, routerOptions: RouterOptions, @@ -149,7 +158,10 @@ export async function createRouter( return router; } -/** @public */ +/** + * @deprecated Please migrate to the new backend system as this will be removed in the future. + * @public + * */ export async function createRouterFromConfig(routerOptions: RouterOptions) { const { config } = routerOptions; const pluginOptions: PluginOptions = {};