X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fpools%2Fabstract-pool.ts;h=796cff1d56c6f85e87f48609c938eaa84535edb7;hb=7afd4514165c3cbb3435e230654643c389990a3f;hp=03f8c199be642dda1cac20171d0b2410ef73d1c3;hpb=23ccf9d796ac950710863515ff45612a0456931d;p=poolifier.git diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 03f8c199..796cff1d 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1,6 +1,5 @@ import crypto from 'node:crypto' import { performance } from 'node:perf_hooks' -import { readFileSync } from 'node:fs' import type { MessageValue, PromiseResponseWrapper } from '../utility-types' import { DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS, @@ -39,12 +38,7 @@ import { type WorkerChoiceStrategyOptions } from './selection-strategies/selection-strategies-types' import { WorkerChoiceStrategyContext } from './selection-strategies/worker-choice-strategy-context' - -const version = ( - JSON.parse( - readFileSync(new URL('../../package.json', import.meta.url), 'utf8') - ) as Record -).version as string +import { version } from './version' /** * Base class that implements some shared logic for all poolifier pools.