From 997998e0e036ad74b209cfb546f9e05c10c51dbf Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Wed, 21 Aug 2024 11:48:49 +0200 Subject: [PATCH] refactor: apply review suggestions Signed-off-by: Camila Belo --- plugins/techdocs-node/api-report.md | 3 ++- plugins/techdocs-node/package.json | 1 - plugins/techdocs-node/src/stages/generate/types.ts | 3 ++- .../techdocs-node/src/stages/publish/azureBlobStorage.test.ts | 1 - plugins/techdocs-node/src/stages/publish/googleStorage.test.ts | 2 -- yarn.lock | 1 - 6 files changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/techdocs-node/api-report.md b/plugins/techdocs-node/api-report.md index 77be81a9f6..ea93ddfc98 100644 --- a/plugins/techdocs-node/api-report.md +++ b/plugins/techdocs-node/api-report.md @@ -12,6 +12,7 @@ import { Entity } from '@backstage/catalog-model'; import express from 'express'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; import { IndexableDocument } from '@backstage/plugin-search-common'; +import { Logger } from 'winston'; import { LoggerService } from '@backstage/backend-plugin-api'; import { ScmIntegrationRegistry } from '@backstage/integration'; import { UrlReaderService } from '@backstage/backend-plugin-api'; @@ -57,7 +58,7 @@ export type GeneratorRunOptions = { outputDir: string; parsedLocationAnnotation?: ParsedLocationAnnotation; etag?: string; - logger: LoggerService; + logger: Logger; logStream?: Writable; siteOptions?: { name?: string; diff --git a/plugins/techdocs-node/package.json b/plugins/techdocs-node/package.json index edef992e6b..3c3184213b 100644 --- a/plugins/techdocs-node/package.json +++ b/plugins/techdocs-node/package.json @@ -53,7 +53,6 @@ "@aws-sdk/types": "^3.347.0", "@azure/identity": "^4.0.0", "@azure/storage-blob": "^12.5.0", - "@backstage/backend-common": "workspace:^", "@backstage/backend-plugin-api": "workspace:^", "@backstage/catalog-model": "workspace:^", "@backstage/config": "workspace:^", diff --git a/plugins/techdocs-node/src/stages/generate/types.ts b/plugins/techdocs-node/src/stages/generate/types.ts index 96c90f5c4d..c7513d2710 100644 --- a/plugins/techdocs-node/src/stages/generate/types.ts +++ b/plugins/techdocs-node/src/stages/generate/types.ts @@ -16,6 +16,7 @@ import { Entity } from '@backstage/catalog-model'; import { Writable } from 'stream'; +import { Logger } from 'winston'; import { ParsedLocationAnnotation } from '../../helpers'; import { LoggerService } from '@backstage/backend-plugin-api'; import { TechDocsContainerRunner } from '../publish/types'; @@ -65,7 +66,7 @@ export type GeneratorRunOptions = { outputDir: string; parsedLocationAnnotation?: ParsedLocationAnnotation; etag?: string; - logger: LoggerService; + logger: Logger; logStream?: Writable; siteOptions?: { name?: string }; runAsDefaultUser?: boolean; diff --git a/plugins/techdocs-node/src/stages/publish/azureBlobStorage.test.ts b/plugins/techdocs-node/src/stages/publish/azureBlobStorage.test.ts index 56c2ce1b69..83e707fd54 100644 --- a/plugins/techdocs-node/src/stages/publish/azureBlobStorage.test.ts +++ b/plugins/techdocs-node/src/stages/publish/azureBlobStorage.test.ts @@ -224,7 +224,6 @@ const getEntityRootDir = (entity: Entity) => { }; const logger = mockServices.logger.mock(); -jest.spyOn(logger, 'error'); const createPublisherFromConfig = ({ accountName = 'accountName', diff --git a/plugins/techdocs-node/src/stages/publish/googleStorage.test.ts b/plugins/techdocs-node/src/stages/publish/googleStorage.test.ts index 97627182e7..f09ba160d9 100644 --- a/plugins/techdocs-node/src/stages/publish/googleStorage.test.ts +++ b/plugins/techdocs-node/src/stages/publish/googleStorage.test.ts @@ -139,8 +139,6 @@ const getEntityRootDir = (entity: Entity) => { }; const logger = mockServices.logger.mock(); -jest.spyOn(logger, 'info'); -jest.spyOn(logger, 'error'); const createPublisherFromConfig = ({ bucketName = 'bucketName', diff --git a/yarn.lock b/yarn.lock index 92abc82cbe..c3a4bb412e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7651,7 +7651,6 @@ __metadata: "@aws-sdk/types": ^3.347.0 "@azure/identity": ^4.0.0 "@azure/storage-blob": ^12.5.0 - "@backstage/backend-common": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/catalog-model": "workspace:^"