Skip to content

Commit

Permalink
chore: add knip and clean up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
drodil committed Jan 9, 2024
1 parent 1a0285b commit 8fbbf6e
Show file tree
Hide file tree
Showing 7 changed files with 1,152 additions and 859 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"test:all": "backstage-cli repo test --coverage",
"lint": "backstage-cli repo lint --since origin/main",
"lint:all": "backstage-cli repo lint",
"knip": "knip",
"prettier:check": "prettier --check .",
"prettier:fix": "prettier --write .",
"backstage:bump": "backstage-cli versions:bump",
Expand All @@ -35,8 +36,7 @@
},
"resolutions": {
"@types/react": "^17.0.59",
"@types/react-dom": "^17",
"@octokit/rest": "19.0.8"
"@types/react-dom": "^17"
},
"devDependencies": {
"@backstage/cli": "^0.25.0",
Expand All @@ -45,6 +45,7 @@
"@spotify/prettier-config": "^15.0.0",
"concurrently": "^7.0.0",
"husky": "^8.0.1",
"knip": "^3.13.0",
"lint-staged": "^14.0.1",
"prettier": "^2.4.1",
"react": "^17.0.2",
Expand Down
6 changes: 1 addition & 5 deletions plugins/qeta-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,11 @@
"knex": "^3.0.0",
"multiparty": "^4.2.3",
"uuid": "^9.0.1",
"winston": "^3.10.0",
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/backend-test-utils": "^0.2.9",
"@backstage/cli": "^0.25.0",
"@types/supertest": "^2.0.12",
"@types/uuid": "^9.0.4",
"supertest": "^6.2.4"
"@types/uuid": "^9.0.4"
},
"files": [
"dist",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Logger } from 'winston';
import { Config } from '@backstage/config';
import { Readable } from 'stream';
import { DocumentCollatorFactory } from '@backstage/plugin-search-common';
import { PluginDatabaseManager } from '@backstage/backend-common';
import { DatabaseQetaStore } from '../../database';
import { QetaDocument } from '@drodil/backstage-plugin-qeta-common';
import { LoggerService } from '@backstage/backend-plugin-api';

export type QetaCollatorFactoryOptions = {
logger: Logger;
logger: LoggerService;
database: PluginDatabaseManager;
};

export class QetaCollatorFactory implements DocumentCollatorFactory {
public readonly type: string = 'qeta';
private readonly logger: Logger;
private readonly logger: LoggerService;
private readonly database: PluginDatabaseManager;

private constructor(_config: Config, options: QetaCollatorFactoryOptions) {
Expand Down
4 changes: 2 additions & 2 deletions plugins/qeta-backend/src/service/router.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import express from 'express';
import Router from 'express-promise-router';
import bodyParser from 'body-parser';
import { Logger } from 'winston';
import { errorHandler } from '@backstage/backend-common';
import { Config } from '@backstage/config';
import { IdentityApi } from '@backstage/plugin-auth-node';
Expand All @@ -16,11 +15,12 @@ import { tagsRoutes } from './routes/tags';
import { attachmentsRoutes } from './routes/attachments';
import { answersRoutes } from './routes/answers';
import { EventBroker } from '@backstage/plugin-events-node';
import { LoggerService } from '@backstage/backend-plugin-api';

export interface RouterOptions {
identity: IdentityApi;
database: QetaStore;
logger: Logger;
logger: LoggerService;
config: Config;
permissions?: PermissionEvaluator;
eventBroker?: EventBroker;
Expand Down
4 changes: 2 additions & 2 deletions plugins/qeta-backend/src/service/standaloneServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ import {
loadBackendConfig,
} from '@backstage/backend-common';
import { Server } from 'http';
import { Logger } from 'winston';
import { createRouter } from './router';
import { DatabaseQetaStore } from '../database';
import Knex from 'knex';
import { IdentityApi } from '@backstage/plugin-auth-node';
import { createCatalogMockRouter } from './CatalogMockRouter';
import { LoggerService } from '@backstage/backend-plugin-api';

export interface ServerOptions {
port: number;
enableCors: boolean;
logger: Logger;
logger: LoggerService;
}

const getRandomMarvelCharacter = () => {
Expand Down
2 changes: 0 additions & 2 deletions plugins/qeta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "4.0.0-alpha.61",
"@rjsf/core": "^3.0.0",
"ajv": "^8.12.0",
"dompurify": "^3.0.5",
"file-type": "16.5.4",
Expand All @@ -75,7 +74,6 @@
"@backstage/cli": "^0.25.0",
"@backstage/dev-utils": "^1.0.25",
"@backstage/plugin-home": "^0.6.0",
"@testing-library/jest-dom": "^6.1.3",
"@types/dompurify": "^3.0.0",
"@types/lodash": "^4.14.199",
"cross-fetch": "^3.1.5"
Expand Down
Loading

0 comments on commit 8fbbf6e

Please sign in to comment.