From c7126d657bfddba371f18f2dc975cc7f73dbd5e6 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 6 Aug 2024 13:42:02 +0200 Subject: [PATCH] review fixes Signed-off-by: Patrik Oldsberg --- .../backend-app-api/src/wiring/BackendInitializer.ts | 11 +++++------ .../src/routing/describeParentCallSite.ts | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/backend-app-api/src/wiring/BackendInitializer.ts b/packages/backend-app-api/src/wiring/BackendInitializer.ts index 4bfbf6244f..c0da9eda62 100644 --- a/packages/backend-app-api/src/wiring/BackendInitializer.ts +++ b/packages/backend-app-api/src/wiring/BackendInitializer.ts @@ -25,14 +25,14 @@ import { } from '@backstage/backend-plugin-api'; import { ServiceOrExtensionPoint } from './types'; // Direct internal import to avoid duplication -// eslint-disable-next-line @backstage/no-forbidden-package-imports +// eslint-disable-next-line @backstage/no-relative-monorepo-imports import type { InternalBackendFeature, InternalBackendFeatureLoader, InternalBackendRegistrations, -} from '@backstage/backend-plugin-api/src/wiring/types'; -// eslint-disable-next-line @backstage/no-forbidden-package-imports -import type { InternalServiceFactory } from '@backstage/backend-plugin-api/src/services/system/types'; +} from '../../../backend-plugin-api/src/wiring/types'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import type { InternalServiceFactory } from '../../../backend-plugin-api/src/services/system/types'; import { ForwardedError, ConflictError } from '@backstage/errors'; import { featureDiscoveryServiceRef } from '@backstage/backend-plugin-api/alpha'; import { DependencyGraph } from '../lib/DependencyGraph'; @@ -431,8 +431,7 @@ export class BackendInitializer { if (isBackendFeatureLoader(feature)) { newLoaders.push(feature); } else { - didAddServiceFactory = - didAddServiceFactory || isServiceFactory(feature); + didAddServiceFactory ||= isServiceFactory(feature); this.#addFeature(feature); } } diff --git a/packages/frontend-plugin-api/src/routing/describeParentCallSite.ts b/packages/frontend-plugin-api/src/routing/describeParentCallSite.ts index 72997e07db..ab5fc2f034 100644 --- a/packages/frontend-plugin-api/src/routing/describeParentCallSite.ts +++ b/packages/frontend-plugin-api/src/routing/describeParentCallSite.ts @@ -16,6 +16,8 @@ const MESSAGE_MARKER = 'eHgtF5hmbrXyiEvo'; +// NOTE: This function is also imported and used in backend code + /** * Internal helper that describes the location of the parent caller. * @internal