Skip to content

Commit

Permalink
sonarqube - Removed usages and references of `@backstage/backend-comm…
Browse files Browse the repository at this point in the history
…on` (#1955)

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

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

* Added deprecation

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

* Updated changeset and reports

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

---------

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
  • Loading branch information
awanlin authored Nov 18, 2024
1 parent 3a74e4b commit f53852b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions workspaces/sonarqube/.changeset/giant-comics-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@backstage-community/plugin-sonarqube-backend': 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/sonarqube/packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"dependencies": {
"@backstage-community/plugin-sonarqube-backend": "workspace:^",
"@backstage/backend-common": "^0.25.0",
"@backstage/backend-defaults": "^0.5.2",
"@backstage/backend-plugin-api": "^1.0.1",
"@backstage/backend-tasks": "^0.6.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"test": "backstage-cli package test"
},
"dependencies": {
"@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
4 changes: 2 additions & 2 deletions workspaces/sonarqube/plugins/sonarqube-backend/report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Config } from '@backstage/config';
import express from 'express';
import { LoggerService } from '@backstage/backend-plugin-api';

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

// @public
Expand All @@ -27,7 +27,7 @@ export class DefaultSonarqubeInfoProvider implements SonarqubeInfoProvider {
}): Promise<SonarqubeFindings | undefined>;
}

// @public
// @public @deprecated (undocumented)
export interface RouterOptions {
logger: LoggerService;
sonarqubeInfoProvider: SonarqubeInfoProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

import { getVoidLogger } from '@backstage/backend-common';
import express from 'express';
import request from 'supertest';

import { createRouter } from './router';
import { SonarqubeFindings } from './sonarqubeInfoProvider';
import { mockServices } from '@backstage/backend-test-utils';

describe('createRouter', () => {
let app: express.Express;
Expand All @@ -39,7 +39,7 @@ describe('createRouter', () => {

beforeAll(async () => {
const router = await createRouter({
logger: getVoidLogger(),
logger: mockServices.rootLogger(),
sonarqubeInfoProvider: {
getBaseUrl: getBaseUrlMock,
getFindings: getFindingsMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import { InputError } from '@backstage/errors';
import { LoggerService } from '@backstage/backend-plugin-api';

/**
* @deprecated Please migrate to the new backend system as this will be removed in the future.
*
* Dependencies needed by the router
* @public
*/
Expand All @@ -36,6 +38,8 @@ export interface RouterOptions {
}

/**
* @deprecated Please migrate to the new backend system as this will be removed in the future.
*
* @public
*
* Constructs a sonarqube router.
Expand Down
2 changes: 0 additions & 2 deletions workspaces/sonarqube/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@backstage-community/plugin-sonarqube-backend@workspace:plugins/sonarqube-backend"
dependencies:
"@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 @@ -13414,7 +13413,6 @@ __metadata:
resolution: "backend@workspace:packages/backend"
dependencies:
"@backstage-community/plugin-sonarqube-backend": "workspace:^"
"@backstage/backend-common": ^0.25.0
"@backstage/backend-defaults": ^0.5.2
"@backstage/backend-plugin-api": ^1.0.1
"@backstage/backend-tasks": ^0.6.1
Expand Down

0 comments on commit f53852b

Please sign in to comment.