Skip to content

Commit

Permalink
Marked createRouter, createRouterFromConfig, RouterOptions, and…
Browse files Browse the repository at this point in the history
… `PluginOptions` as deprecated

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
  • Loading branch information
awanlin committed Sep 11, 2024
1 parent 1b55b99 commit 7adad4a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
5 changes: 5 additions & 0 deletions workspaces/linguist/.changeset/chilly-readers-own.md
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions workspaces/linguist/plugins/linguist-backend/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<express.Router>;

// @public (undocumented)
// @public @deprecated (undocumented)
export function createRouterFromConfig(
routerOptions: RouterOptions,
): Promise<express.Router>;
Expand All @@ -40,7 +40,7 @@ export interface LinguistBackendApi {
const linguistPlugin: BackendFeatureCompat;
export default linguistPlugin;

// @public (undocumented)
// @public @deprecated (undocumented)
export interface PluginOptions {
// (undocumented)
age?: HumanDuration;
Expand All @@ -56,7 +56,7 @@ export interface PluginOptions {
useSourceLocation?: boolean;
}

// @public (undocumented)
// @public @deprecated (undocumented)
export interface RouterOptions {
// (undocumented)
auth?: AuthService;
Expand Down
20 changes: 16 additions & 4 deletions workspaces/linguist/plugins/linguist-backend/src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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,
Expand Down Expand Up @@ -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 = {};
Expand Down

0 comments on commit 7adad4a

Please sign in to comment.