Skip to content

Commit

Permalink
plugin(linguist): marked createRouter, createRouterFromConfig, `R…
Browse files Browse the repository at this point in the history
…outerOptions`, and `PluginOptions` as deprecated (backstage#1198)

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
  • Loading branch information
awanlin authored and karthikjeeyar committed Oct 28, 2024
1 parent 3f2cbc5 commit bd498e0
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 bd498e0

Please sign in to comment.