diff --git a/packages/nx/src/project-graph/plugins/internal-api.ts b/packages/nx/src/project-graph/plugins/internal-api.ts index 10d0bea36db43f..e71f7519db7ab0 100644 --- a/packages/nx/src/project-graph/plugins/internal-api.ts +++ b/packages/nx/src/project-graph/plugins/internal-api.ts @@ -1,7 +1,6 @@ // This file contains the bits and bobs of the internal API for loading and interacting with Nx plugins. // For the public API, used by plugin authors, see `./public-api.ts`. - import { join, dirname } from 'path'; import { toProjectName } from '../../config/workspaces'; diff --git a/packages/nx/src/project-graph/plugins/plugin-pool.ts b/packages/nx/src/project-graph/plugins/plugin-pool.ts index 48a077a3745694..1ad508bc95cdb8 100644 --- a/packages/nx/src/project-graph/plugins/plugin-pool.ts +++ b/packages/nx/src/project-graph/plugins/plugin-pool.ts @@ -35,9 +35,9 @@ export function loadRemoteNxPlugin(plugin: PluginConfiguration, root: string) { }); worker.send(createMessage({ type: 'load', payload: { plugin, root } })); pool.push(worker); - + logger.verbose(`[plugin-worker] started worker: ${worker.pid}`); - + return new Promise((res, rej) => { worker.on('message', createWorkerHandler(worker, res, rej)); worker.on('exit', () => workerOnExitHandler(worker)); @@ -52,7 +52,7 @@ export async function shutdownPluginWorkers() { // Marks the workers as shutdown so that we don't report unexpected exits pluginWorkersShutdown = true; - + const promises = []; for (const p of pool) { @@ -72,7 +72,6 @@ export async function shutdownPluginWorkers() { return Promise.all(promises); } - /** * Creates a message handler for the given worker. * @param worker Instance of plugin-worker @@ -85,7 +84,6 @@ function createWorkerHandler( onload: (plugin: RemotePlugin) => void, onloadError: (err?: unknown) => void ) { - // We store resolver and rejecter functions in the outer scope so that we can // resolve/reject the promise from the message handler. The flow is something like: // 1. plugin api called diff --git a/packages/nx/src/project-graph/utils/project-configuration-utils.ts b/packages/nx/src/project-graph/utils/project-configuration-utils.ts index 5f4688b12d70a5..0ec361e6ab1f37 100644 --- a/packages/nx/src/project-graph/utils/project-configuration-utils.ts +++ b/packages/nx/src/project-graph/utils/project-configuration-utils.ts @@ -12,7 +12,10 @@ import { ONLY_MODIFIES_EXISTING_TARGET } from '../../plugins/target-defaults/tar import { minimatch } from 'minimatch'; import { join } from 'path'; import { CreateNodesResult } from '../plugins'; -import { CreateNodesResultWithContext, RemotePlugin } from '../plugins/internal-api'; +import { + CreateNodesResultWithContext, + RemotePlugin, +} from '../plugins/internal-api'; export type SourceInformation = [file: string, plugin: string]; export type ConfigurationSourceMaps = Record<