Skip to content

Commit

Permalink
Chore: Deprecated 'createRouter' and 'RouterOptions' exports (#187)
Browse files Browse the repository at this point in the history
These exports is only useful for the old backend system, these will
soon be removed from upstreams plugins.

Co-authored-by: Niklas Aronsson <niklasar@axis.com>
  • Loading branch information
anicke and Niklas Aronsson committed Sep 18, 2024
1 parent 3bfe58a commit 1db0ada
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .changeset/selfish-kids-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@axis-backstage/plugin-jira-dashboard-backend': patch
'@axis-backstage/plugin-statuspage-backend': patch
'@axis-backstage/plugin-readme-backend': patch
---

Marked `createRouter` and `RouterOptions` as deprecated, to be removed soon after the Backstage `1.32.0` release in October
4 changes: 2 additions & 2 deletions plugins/jira-dashboard-backend/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { RootConfigService } from '@backstage/backend-plugin-api';
import { TokenManagerService } from '@backstage/backend-plugin-api';
import { UserInfoService } from '@backstage/backend-plugin-api';

// @public
// @public @deprecated
export function createRouter(options: RouterOptions): Promise<express.Router>;

// @public
Expand All @@ -36,7 +36,7 @@ export type JqlQueryBuilderArgs = {
query?: string;
};

// @public
// @public @deprecated
export interface RouterOptions {
auth?: AuthService;
config: RootConfigService;
Expand Down
2 changes: 2 additions & 0 deletions plugins/jira-dashboard-backend/src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { getAnnotations } from '../lib';

/**
* Constructs a jira dashboard router.
* @deprecated Please migrate to the new backend system as this will be removed in the future.
* @public
*/
export interface RouterOptions {
Expand Down Expand Up @@ -84,6 +85,7 @@ const DEFAULT_MAX_RESULTS_USER_ISSUES = 10;
/**
* Constructs a jira dashboard router.
*
* @deprecated Please migrate to the new backend system as this will be removed in the future.
* @public
*/
export async function createRouter(
Expand Down
4 changes: 2 additions & 2 deletions plugins/readme-backend/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import { RootConfigService } from '@backstage/backend-plugin-api';
import { TokenManagerService } from '@backstage/backend-plugin-api';
import { UrlReaderService } from '@backstage/backend-plugin-api';

// @public
// @public @deprecated
export function createRouter(options: RouterOptions): Promise<express.Router>;

// @public
const readmePlugin: BackendFeatureCompat;
export default readmePlugin;

// @public
// @public @deprecated
export interface RouterOptions {
auth?: AuthService;
config: RootConfigService;
Expand Down
2 changes: 2 additions & 0 deletions plugins/readme-backend/src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { isSymLink } from '../lib';

/**
* Constructs a readme router.
* @deprecated Please migrate to the new backend system as this will be removed in the future.
* @public
*/
export interface RouterOptions {
Expand Down Expand Up @@ -73,6 +74,7 @@ const README_TYPES: FileType[] = [
/**
* Constructs a readme router.
*
* @deprecated Please migrate to the new backend system as this will be removed in the future.
* @public
*/
export async function createRouter(
Expand Down
4 changes: 2 additions & 2 deletions plugins/statuspage-backend/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { Config } from '@backstage/config';
import express from 'express';
import { LoggerService } from '@backstage/backend-plugin-api';

// @public
// @public @deprecated
export function createRouter(options: RouterOptions): Promise<express.Router>;

// @public
// @public @deprecated
export interface RouterOptions {
config: Config;
logger: LoggerService;
Expand Down
2 changes: 2 additions & 0 deletions plugins/statuspage-backend/src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { getStatuspageConfig } from '../config';
/**
* Router options.
*
* @deprecated Please migrate to the new backend system as this will be removed in the future.
* @public
*/
export interface RouterOptions {
Expand All @@ -24,6 +25,7 @@ const COMPONENTS_KEY = 'components';
/**
* Create the router.
*
* @deprecated Please migrate to the new backend system as this will be removed in the future.
* @public
*/
export async function createRouter(
Expand Down

0 comments on commit 1db0ada

Please sign in to comment.