Skip to content

Commit

Permalink
linkerd - Removed usages and references of @backstage/backend-common (
Browse files Browse the repository at this point in the history
#1965)

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

Signed-off-by: Andre Wanlin <[email protected]>

* Added error middleware

Signed-off-by: Andre Wanlin <[email protected]>

---------

Signed-off-by: Andre Wanlin <[email protected]>
  • Loading branch information
awanlin authored Nov 18, 2024
1 parent 179ee02 commit 0555e21
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
5 changes: 5 additions & 0 deletions workspaces/linkerd/.changeset/calm-forks-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage-community/plugin-linkerd-backend': patch
---

Removed usages and references of `@backstage/backend-common`
1 change: 0 additions & 1 deletion workspaces/linkerd/packages/backend/knip-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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/backend-tasks | package.json | error |
| @backstage/config | package.json | error |
| better-sqlite3 | package.json | error |
Expand Down
1 change: 0 additions & 1 deletion workspaces/linkerd/packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"dependencies": {
"@backstage-community/plugin-linkerd-backend": "workspace:^",
"@backstage/backend-common": "^0.25.0",
"@backstage/backend-defaults": "^0.5.2",
"@backstage/backend-tasks": "^0.6.1",
"@backstage/config": "^1.2.0",
Expand Down
1 change: 0 additions & 1 deletion workspaces/linkerd/plugins/linkerd-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"postpack": "backstage-cli package postpack"
},
"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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { errorHandler } from '@backstage/backend-common';

import {
AuthService,
DiscoveryService,
Expand All @@ -24,6 +24,7 @@ import {
import express from 'express';
import Router from 'express-promise-router';
import { LinkerdVizClient } from '../lib/linkerdVizClient';
import { MiddlewareFactory } from '@backstage/backend-defaults/rootHttpRouter';

export interface RouterOptions {
logger: LoggerService;
Expand All @@ -36,7 +37,7 @@ export interface RouterOptions {
export async function createRouter(
opts: RouterOptions,
): Promise<express.Router> {
const { discovery, auth, httpAuth, config } = opts;
const { discovery, auth, httpAuth, config, logger } = opts;

const linkerdVizClient = LinkerdVizClient.fromConfig({
discovery,
Expand Down Expand Up @@ -98,6 +99,6 @@ export async function createRouter(
},
);

router.use(errorHandler());
router.use(MiddlewareFactory.create({ config, logger }).error());
return router;
}
2 changes: 0 additions & 2 deletions workspaces/linkerd/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2861,7 +2861,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@backstage-community/plugin-linkerd-backend@workspace:plugins/linkerd-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 @@ -14342,7 +14341,6 @@ __metadata:
resolution: "backend@workspace:packages/backend"
dependencies:
"@backstage-community/plugin-linkerd-backend": "workspace:^"
"@backstage/backend-common": ^0.25.0
"@backstage/backend-defaults": ^0.5.2
"@backstage/backend-tasks": ^0.6.1
"@backstage/cli": ^0.28.0
Expand Down

0 comments on commit 0555e21

Please sign in to comment.