1- import webpack from 'webpack' ;
1+ import { cosmiconfigSync } from 'cosmiconfig' ;
2+ import merge from 'deepmerge' ;
3+ import type { JSONSchema7 } from 'json-schema' ;
24import { validate } from 'schema-utils' ;
5+ import type webpack from 'webpack' ;
36// type only dependency
47// eslint-disable-next-line node/no-extraneous-import
5- import type { JSONSchema7 } from 'json-schema' ;
6- import { cosmiconfigSync } from 'cosmiconfig' ;
7- import merge from 'deepmerge' ;
8- import schema from './ForkTsCheckerWebpackPluginOptions.json' ;
9- import { ForkTsCheckerWebpackPluginOptions } from './ForkTsCheckerWebpackPluginOptions' ;
8+
109import { createForkTsCheckerWebpackPluginConfiguration } from './ForkTsCheckerWebpackPluginConfiguration' ;
10+ import type { ForkTsCheckerWebpackPluginOptions } from './ForkTsCheckerWebpackPluginOptions' ;
11+ import schema from './ForkTsCheckerWebpackPluginOptions.json' ;
1112import { createForkTsCheckerWebpackPluginState } from './ForkTsCheckerWebpackPluginState' ;
12- import { assertTypeScriptSupport } from './typescript-reporter/TypeScriptSupport' ;
13- import { createTypeScriptReporterRpcClient } from './typescript-reporter/reporter/TypeScriptReporterRpcClient' ;
14- import { tapStartToConnectAndRunReporter } from './hooks/tapStartToConnectAndRunReporter' ;
15- import { tapStopToDisconnectReporter } from './hooks/tapStopToDisconnectReporter' ;
16- import { tapAfterCompileToAddDependencies } from './hooks/tapAfterCompileToAddDependencies' ;
17- import { tapErrorToLogMessage } from './hooks/tapErrorToLogMessage' ;
1813import { getForkTsCheckerWebpackPluginHooks } from './hooks/pluginHooks' ;
14+ import { dependenciesPool , issuesPool } from './hooks/pluginPools' ;
15+ import { tapAfterCompileToAddDependencies } from './hooks/tapAfterCompileToAddDependencies' ;
1916import { tapAfterEnvironmentToPatchWatching } from './hooks/tapAfterEnvironmentToPatchWatching' ;
20- import { createPool , Pool } from './utils/async/pool' ;
21- import os from 'os' ;
17+ import { tapErrorToLogMessage } from './hooks/tapErrorToLogMessage' ;
18+ import { tapStartToConnectAndRunReporter } from './hooks/tapStartToConnectAndRunReporter' ;
19+ import { tapStopToDisconnectReporter } from './hooks/tapStopToDisconnectReporter' ;
20+ import { createTypeScriptReporterRpcClient } from './typescript-reporter/reporter/TypeScriptReporterRpcClient' ;
21+ import { assertTypeScriptSupport } from './typescript-reporter/TypeScriptSupport' ;
2222
2323class ForkTsCheckerWebpackPlugin {
2424 /**
@@ -28,16 +28,13 @@ class ForkTsCheckerWebpackPlugin {
2828 /**
2929 * Default pools for the plugin concurrency limit
3030 */
31- static readonly issuesPool : Pool = createPool ( Math . max ( 1 , os . cpus ( ) . length ) ) ;
32- static readonly dependenciesPool : Pool = createPool ( Math . max ( 1 , os . cpus ( ) . length ) ) ;
31+ static readonly issuesPool = issuesPool ;
32+ static readonly dependenciesPool = dependenciesPool ;
3333
3434 /**
3535 * @deprecated Use ForkTsCheckerWebpackPlugin.issuesPool instead
3636 */
37- static get pool ( ) : Pool {
38- // for backward compatibility
39- return ForkTsCheckerWebpackPlugin . issuesPool ;
40- }
37+ static readonly pool = issuesPool ;
4138
4239 private readonly options : ForkTsCheckerWebpackPluginOptions ;
4340
0 commit comments