1
- import webpack from 'webpack' ;
1
+ import { cosmiconfigSync } from 'cosmiconfig' ;
2
+ import merge from 'deepmerge' ;
3
+ import type { JSONSchema7 } from 'json-schema' ;
2
4
import { validate } from 'schema-utils' ;
5
+ import type webpack from 'webpack' ;
3
6
// type only dependency
4
7
// 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
+
10
9
import { createForkTsCheckerWebpackPluginConfiguration } from './ForkTsCheckerWebpackPluginConfiguration' ;
10
+ import type { ForkTsCheckerWebpackPluginOptions } from './ForkTsCheckerWebpackPluginOptions' ;
11
+ import schema from './ForkTsCheckerWebpackPluginOptions.json' ;
11
12
import { 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' ;
18
13
import { getForkTsCheckerWebpackPluginHooks } from './hooks/pluginHooks' ;
14
+ import { dependenciesPool , issuesPool } from './hooks/pluginPools' ;
15
+ import { tapAfterCompileToAddDependencies } from './hooks/tapAfterCompileToAddDependencies' ;
19
16
import { 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' ;
22
22
23
23
class ForkTsCheckerWebpackPlugin {
24
24
/**
@@ -28,16 +28,13 @@ class ForkTsCheckerWebpackPlugin {
28
28
/**
29
29
* Default pools for the plugin concurrency limit
30
30
*/
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 ;
33
33
34
34
/**
35
35
* @deprecated Use ForkTsCheckerWebpackPlugin.issuesPool instead
36
36
*/
37
- static get pool ( ) : Pool {
38
- // for backward compatibility
39
- return ForkTsCheckerWebpackPlugin . issuesPool ;
40
- }
37
+ static readonly pool = issuesPool ;
41
38
42
39
private readonly options : ForkTsCheckerWebpackPluginOptions ;
43
40
0 commit comments