Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blackduck - Removed usages and references of @backstage/backend-common #1975

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions workspaces/blackduck/.changeset/big-terms-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@backstage-community/plugin-blackduck-backend': patch
'@backstage-community/plugin-blackduck': patch
---

Removed usages and references of `@backstage/backend-common`

Deprecated `createRouter` and its router options in favour of the new backend system.
1 change: 0 additions & 1 deletion workspaces/blackduck/packages/backend/knip-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
| @backstage/plugin-permission-common | package.json | error |
| @backstage/plugin-permission-node | package.json | error |
| @backstage/plugin-auth-node | package.json | error |
| @backstage/backend-common | package.json | error |
| @backstage/catalog-client | package.json | error |
| @backstage/backend-tasks | package.json | error |
| @backstage/config | package.json | error |
Expand Down
1 change: 0 additions & 1 deletion workspaces/blackduck/packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"dependencies": {
"@backstage-community/plugin-blackduck-backend": "workspace:^",
"@backstage/backend-common": "^0.25.0",
"@backstage/backend-defaults": "^0.5.2",
"@backstage/backend-tasks": "^0.6.1",
"@backstage/catalog-client": "^1.7.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
},
"dependencies": {
"@backstage-community/plugin-blackduck-common": "workspace:^",
"@backstage/backend-common": "^0.25.0",
"@backstage/backend-defaults": "^0.5.2",
"@backstage/backend-plugin-api": "^1.0.1",
"@backstage/config": "^1.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export interface BlackDuckHostConfig {
const blackduckPlugin: BackendFeature;
export default blackduckPlugin;

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

// @public (undocumented)
// @public @deprecated (undocumented)
export interface RouterOptions {
// (undocumented)
blackDuckConfig: BlackDuckConfig;
Expand All @@ -46,7 +46,7 @@ export interface RouterOptions {
// (undocumented)
discovery: DiscoveryService;
// (undocumented)
httpAuth?: HttpAuthService;
httpAuth: HttpAuthService;
// (undocumented)
logger: LoggerService;
// (undocumented)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe('createRouter', () => {
permissions: mockServices.permissions.mock(),
discovery: mockServices.discovery.mock(),
blackDuckConfig: BlackDuckConfig.fromConfig(config),
httpAuth: mockServices.httpAuth(),
});
app = express().use(router);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import Router from 'express-promise-router';
import { createPermissionIntegrationRouter } from '@backstage/plugin-permission-node';
import { InputError, NotAllowedError } from '@backstage/errors';
import { AuthorizeResult } from '@backstage/plugin-permission-common';
import { createLegacyAuthAdapters } from '@backstage/backend-common';
import {
blackduckPermissions,
blackduckRiskProfileReadPermission,
Expand All @@ -35,22 +34,27 @@ import {
import { BlackDuckRestApi } from '../api/BlackDuckRestApi';
import { BlackDuckConfig } from './BlackDuckConfig';

/** @public */
/**
* @deprecated Please migrate to the new backend system as this will be removed in the future.
*
* @public */
export interface RouterOptions {
logger: LoggerService;
config: Config;
permissions: PermissionsService;
discovery: DiscoveryService;
httpAuth?: HttpAuthService;
httpAuth: HttpAuthService;
blackDuckConfig: BlackDuckConfig;
}

/** @public */
/**
* @deprecated Please migrate to the new backend system as this will be removed in the future.
*
* @public */
export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {
const { logger, permissions, config, blackDuckConfig } = options;
const { httpAuth } = createLegacyAuthAdapters(options);
const { logger, permissions, config, blackDuckConfig, httpAuth } = options;
const permissionIntegrationRouter = createPermissionIntegrationRouter({
permissions: blackduckPermissions,
});
Expand Down
1 change: 0 additions & 1 deletion workspaces/blackduck/plugins/blackduck/knip-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
| @backstage/plugin-permission-common | package.json | error |
| @backstage/plugin-permission-node | package.json | error |
| @backstage/backend-plugin-api | package.json | error |
| @backstage/backend-common | package.json | error |
| @backstage/config | package.json | error |

## Unused devDependencies (5)
Expand Down
1 change: 0 additions & 1 deletion workspaces/blackduck/plugins/blackduck/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
},
"dependencies": {
"@backstage-community/plugin-blackduck-common": "workspace:^",
"@backstage/backend-common": "^0.25.0",
"@backstage/backend-plugin-api": "^1.0.1",
"@backstage/catalog-model": "^1.7.0",
"@backstage/config": "^1.2.0",
Expand Down
3 changes: 0 additions & 3 deletions workspaces/blackduck/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2740,7 +2740,6 @@ __metadata:
resolution: "@backstage-community/plugin-blackduck-backend@workspace:plugins/blackduck-backend"
dependencies:
"@backstage-community/plugin-blackduck-common": "workspace:^"
"@backstage/backend-common": ^0.25.0
"@backstage/backend-defaults": ^0.5.2
"@backstage/backend-plugin-api": ^1.0.1
"@backstage/backend-test-utils": ^1.0.2
Expand Down Expand Up @@ -2776,7 +2775,6 @@ __metadata:
resolution: "@backstage-community/plugin-blackduck@workspace:plugins/blackduck"
dependencies:
"@backstage-community/plugin-blackduck-common": "workspace:^"
"@backstage/backend-common": ^0.25.0
"@backstage/backend-plugin-api": ^1.0.1
"@backstage/catalog-model": ^1.7.0
"@backstage/cli": ^0.28.0
Expand Down Expand Up @@ -15142,7 +15140,6 @@ __metadata:
resolution: "backend@workspace:packages/backend"
dependencies:
"@backstage-community/plugin-blackduck-backend": "workspace:^"
"@backstage/backend-common": ^0.25.0
"@backstage/backend-defaults": ^0.5.2
"@backstage/backend-tasks": ^0.6.1
"@backstage/catalog-client": ^1.7.1
Expand Down
Loading