fork-ts-checker-webpack-plugin 6.4.2 → 7.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -103
- package/lib/ForkTsCheckerWebpackPlugin.d.ts +11 -12
- package/lib/ForkTsCheckerWebpackPlugin.js +49 -49
- package/lib/ForkTsCheckerWebpackPluginConfiguration.d.ts +6 -8
- package/lib/ForkTsCheckerWebpackPluginConfiguration.js +3 -4
- package/lib/ForkTsCheckerWebpackPluginOptions.d.ts +4 -6
- package/lib/ForkTsCheckerWebpackPluginOptions.json +73 -111
- package/lib/ForkTsCheckerWebpackPluginState.d.ts +5 -6
- package/lib/ForkTsCheckerWebpackPluginState.js +2 -2
- package/lib/{reporter/FilesChange.d.ts → files-change.d.ts} +4 -4
- package/lib/{reporter/FilesChange.js → files-change.js} +4 -3
- package/lib/{reporter/FilesMatch.d.ts → files-match.d.ts} +0 -0
- package/lib/{eslint-reporter/EsLintReporterOptions.js → files-match.js} +0 -0
- package/lib/formatter/BasicFormatter.d.ts +1 -1
- package/lib/formatter/BasicFormatter.js +1 -0
- package/lib/formatter/CodeFrameFormatter.d.ts +1 -1
- package/lib/formatter/CodeFrameFormatter.js +2 -1
- package/lib/formatter/Formatter.d.ts +1 -1
- package/lib/formatter/FormatterConfiguration.d.ts +3 -3
- package/lib/formatter/FormatterConfiguration.js +21 -2
- package/lib/formatter/FormatterOptions.d.ts +11 -6
- package/lib/formatter/WebpackFormatter.d.ts +1 -1
- package/lib/formatter/WebpackFormatter.js +6 -6
- package/lib/formatter/index.d.ts +0 -1
- package/lib/formatter/index.js +16 -8
- package/lib/hooks/interceptDoneToGetWebpackDevServerTap.d.ts +3 -3
- package/lib/hooks/interceptDoneToGetWebpackDevServerTap.js +4 -0
- package/lib/hooks/pluginHooks.d.ts +13 -13
- package/lib/hooks/pluginHooks.js +1 -0
- package/lib/hooks/pluginPools.d.ts +4 -0
- package/lib/hooks/pluginPools.js +28 -0
- package/lib/hooks/tapAfterCompileToAddDependencies.d.ts +3 -3
- package/lib/hooks/tapAfterCompileToAddDependencies.js +4 -0
- package/lib/hooks/tapAfterCompileToGetIssues.d.ts +3 -3
- package/lib/hooks/tapAfterCompileToGetIssues.js +5 -1
- package/lib/hooks/tapAfterEnvironmentToPatchWatching.d.ts +2 -2
- package/lib/hooks/tapAfterEnvironmentToPatchWatching.js +10 -1
- package/lib/hooks/tapDoneToAsyncGetIssues.d.ts +3 -3
- package/lib/hooks/tapDoneToAsyncGetIssues.js +7 -7
- package/lib/hooks/tapErrorToLogMessage.d.ts +2 -2
- package/lib/hooks/tapErrorToLogMessage.js +5 -4
- package/lib/hooks/tapStartToRunWorkers.d.ts +8 -0
- package/lib/hooks/tapStartToRunWorkers.js +95 -0
- package/lib/hooks/tapStopToTerminateWorkers.d.ts +5 -0
- package/lib/hooks/tapStopToTerminateWorkers.js +26 -0
- package/lib/infrastructure-logger.d.ts +10 -0
- package/lib/infrastructure-logger.js +15 -0
- package/lib/issue/Issue.d.ts +2 -3
- package/lib/issue/Issue.js +2 -3
- package/lib/issue/IssueConfiguration.d.ts +3 -3
- package/lib/issue/IssueConfiguration.js +1 -0
- package/lib/issue/IssueLocation.d.ts +2 -2
- package/lib/issue/IssueLocation.js +17 -2
- package/lib/issue/IssueMatch.d.ts +3 -3
- package/lib/issue/IssueMatch.js +3 -3
- package/lib/issue/IssueOptions.d.ts +2 -2
- package/lib/issue/IssuePosition.js +1 -0
- package/lib/issue/IssuePredicate.d.ts +1 -1
- package/lib/issue/IssuePredicate.js +1 -0
- package/lib/issue/IssueSeverity.js +1 -0
- package/lib/issue/IssueWebpackError.d.ts +3 -3
- package/lib/issue/IssueWebpackError.js +7 -5
- package/lib/issue/index.js +13 -6
- package/lib/logger/LoggerConfiguration.d.ts +3 -3
- package/lib/logger/LoggerConfiguration.js +2 -1
- package/lib/logger/LoggerFactory.d.ts +2 -2
- package/lib/logger/LoggerFactory.js +2 -1
- package/lib/logger/LoggerOptions.d.ts +2 -2
- package/lib/logger/PartialLogger.d.ts +1 -1
- package/lib/logger/PartialLogger.js +1 -0
- package/lib/logger/WebpackInfrastructureLogger.d.ts +2 -2
- package/lib/logger/WebpackInfrastructureLogger.js +1 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptConfigurationOverwrite.d.ts +1 -1
- package/lib/{typescript-reporter → typescript}/TypeScriptConfigurationOverwrite.js +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptDiagnosticsOptions.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptDiagnosticsOptions.js +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptReporterConfiguration.d.ts +5 -5
- package/lib/{typescript-reporter → typescript}/TypeScriptReporterConfiguration.js +2 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptReporterOptions.d.ts +4 -5
- package/lib/{typescript-reporter → typescript}/TypeScriptReporterOptions.js +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptSupport.d.ts +1 -1
- package/lib/{typescript-reporter → typescript}/TypeScriptSupport.js +26 -11
- package/lib/{typescript-reporter → typescript}/extension/TypeScriptEmbeddedExtension.d.ts +1 -1
- package/lib/{typescript-reporter → typescript}/extension/TypeScriptEmbeddedExtension.js +2 -1
- package/lib/{typescript-reporter → typescript}/extension/TypeScriptExtension.d.ts +2 -2
- package/lib/{typescript-reporter → typescript}/extension/TypeScriptExtension.js +0 -0
- package/lib/typescript/extension/vue/TypeScriptVueExtension.d.ts +4 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtension.js +2 -1
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionConfiguration.d.ts +1 -1
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionConfiguration.js +1 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionOptions.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionOptions.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionSupport.d.ts +1 -1
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionSupport.js +1 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue-template-compiler.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue-template-compiler.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue__compiler-sfc.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue__compiler-sfc.js +0 -0
- package/lib/typescript/worker/get-dependencies-worker.d.ts +5 -0
- package/lib/typescript/worker/get-dependencies-worker.js +18 -0
- package/lib/typescript/worker/get-issues-worker.d.ts +5 -0
- package/lib/typescript/worker/get-issues-worker.js +76 -0
- package/lib/typescript/worker/lib/artifacts.d.ts +4 -0
- package/lib/typescript/worker/lib/artifacts.js +90 -0
- package/lib/typescript/worker/lib/config.d.ts +14 -0
- package/lib/typescript/worker/lib/config.js +114 -0
- package/lib/typescript/worker/lib/dependencies.d.ts +3 -0
- package/lib/typescript/worker/lib/dependencies.js +87 -0
- package/lib/typescript/worker/lib/diagnostics.d.ts +7 -0
- package/lib/typescript/worker/lib/diagnostics.js +100 -0
- package/lib/typescript/worker/lib/extensions.d.ts +3 -0
- package/lib/typescript/worker/lib/extensions.js +11 -0
- package/lib/{typescript-reporter/file-system/FileSystem.d.ts → typescript/worker/lib/file-system/file-system.d.ts} +2 -3
- package/lib/{eslint-reporter/types/eslint.js → typescript/worker/lib/file-system/file-system.js} +0 -0
- package/lib/typescript/worker/lib/file-system/mem-file-system.d.ts +5 -0
- package/lib/typescript/worker/lib/file-system/mem-file-system.js +78 -0
- package/lib/typescript/worker/lib/file-system/passive-file-system.d.ts +5 -0
- package/lib/typescript/worker/lib/file-system/passive-file-system.js +65 -0
- package/lib/typescript/worker/lib/file-system/real-file-system.d.ts +5 -0
- package/lib/typescript/worker/lib/file-system/real-file-system.js +187 -0
- package/lib/typescript/worker/lib/host/compiler-host.d.ts +2 -0
- package/lib/typescript/worker/lib/host/compiler-host.js +17 -0
- package/lib/typescript/worker/lib/host/watch-compiler-host.d.ts +2 -0
- package/lib/typescript/worker/lib/host/watch-compiler-host.js +32 -0
- package/lib/typescript/worker/lib/host/watch-solution-builder-host.d.ts +2 -0
- package/lib/typescript/worker/lib/host/watch-solution-builder-host.js +54 -0
- package/lib/typescript/worker/lib/performance.d.ts +3 -0
- package/lib/typescript/worker/lib/performance.js +32 -0
- package/lib/typescript/worker/lib/program/program.d.ts +2 -0
- package/lib/typescript/worker/lib/program/program.js +32 -0
- package/lib/typescript/worker/lib/program/solution-builder.d.ts +2 -0
- package/lib/typescript/worker/lib/program/solution-builder.js +39 -0
- package/lib/typescript/worker/lib/program/watch-program.d.ts +3 -0
- package/lib/typescript/worker/lib/program/watch-program.js +49 -0
- package/lib/{typescript-reporter/reporter/ControlledTypeScriptSystem.d.ts → typescript/worker/lib/system.d.ts} +4 -6
- package/lib/typescript/worker/lib/system.js +209 -0
- package/lib/typescript/worker/lib/tracing.d.ts +4 -0
- package/lib/typescript/worker/lib/tracing.js +28 -0
- package/lib/typescript/worker/lib/tsbuildinfo.d.ts +4 -0
- package/lib/typescript/worker/lib/tsbuildinfo.js +92 -0
- package/lib/typescript/worker/lib/typescript.d.ts +2 -0
- package/lib/typescript/worker/lib/typescript.js +6 -0
- package/lib/typescript/worker/lib/worker-config.d.ts +2 -0
- package/lib/typescript/worker/lib/worker-config.js +5 -0
- package/lib/utils/async/pool.d.ts +2 -1
- package/lib/utils/async/pool.js +13 -14
- package/lib/utils/path/relativeToContext.d.ts +2 -0
- package/lib/utils/path/relativeToContext.js +16 -0
- package/lib/{rpc/rpc-ipc/error/RpcIpcMessagePortClosedError.d.ts → utils/rpc/error.d.ts} +2 -3
- package/lib/utils/rpc/error.js +12 -0
- package/lib/utils/rpc/expose.d.ts +1 -0
- package/lib/utils/rpc/expose.js +78 -0
- package/lib/utils/rpc/index.d.ts +5 -0
- package/lib/utils/rpc/index.js +12 -0
- package/lib/utils/rpc/types.d.ts +19 -0
- package/lib/{reporter/FilesMatch.js → utils/rpc/types.js} +0 -0
- package/lib/utils/rpc/worker.d.ts +13 -0
- package/lib/utils/rpc/worker.js +79 -0
- package/lib/utils/rpc/wrap.d.ts +4 -0
- package/lib/utils/rpc/wrap.js +96 -0
- package/lib/watch/InclusiveNodeWatchFileSystem.d.ts +5 -5
- package/lib/watch/InclusiveNodeWatchFileSystem.js +90 -92
- package/lib/watch/WatchFileSystem.d.ts +5 -22
- package/package.json +50 -67
- package/CHANGELOG.md +0 -318
- package/changelog.config.js +0 -36
- package/lib/error/OperationCanceledError.d.ts +0 -4
- package/lib/error/OperationCanceledError.js +0 -9
- package/lib/eslint-reporter/EsLintReporterConfiguration.d.ts +0 -11
- package/lib/eslint-reporter/EsLintReporterConfiguration.js +0 -26
- package/lib/eslint-reporter/EsLintReporterOptions.d.ts +0 -8
- package/lib/eslint-reporter/assertEsLintSupport.d.ts +0 -3
- package/lib/eslint-reporter/assertEsLintSupport.js +0 -30
- package/lib/eslint-reporter/issue/EsLintIssueFactory.d.ts +0 -4
- package/lib/eslint-reporter/issue/EsLintIssueFactory.js +0 -32
- package/lib/eslint-reporter/reporter/EsLintReporter.d.ts +0 -4
- package/lib/eslint-reporter/reporter/EsLintReporter.js +0 -179
- package/lib/eslint-reporter/reporter/EsLintReporterRpcClient.d.ts +0 -4
- package/lib/eslint-reporter/reporter/EsLintReporterRpcClient.js +0 -13
- package/lib/eslint-reporter/reporter/EsLintReporterRpcService.d.ts +0 -1
- package/lib/eslint-reporter/reporter/EsLintReporterRpcService.js +0 -11
- package/lib/eslint-reporter/types/eslint.d.ts +0 -37
- package/lib/formatter/FormatterFactory.d.ts +0 -13
- package/lib/formatter/FormatterFactory.js +0 -18
- package/lib/hooks/tapStartToConnectAndRunReporter.d.ts +0 -6
- package/lib/hooks/tapStartToConnectAndRunReporter.js +0 -125
- package/lib/hooks/tapStopToDisconnectReporter.d.ts +0 -5
- package/lib/hooks/tapStopToDisconnectReporter.js +0 -29
- package/lib/profile/Performance.d.ts +0 -11
- package/lib/profile/Performance.js +0 -62
- package/lib/reporter/AggregatedReporter.d.ts +0 -6
- package/lib/reporter/AggregatedReporter.js +0 -60
- package/lib/reporter/Report.d.ts +0 -8
- package/lib/reporter/Report.js +0 -2
- package/lib/reporter/Reporter.d.ts +0 -6
- package/lib/reporter/Reporter.js +0 -2
- package/lib/reporter/index.d.ts +0 -7
- package/lib/reporter/index.js +0 -9
- package/lib/reporter/reporter-rpc/ReporterRpcClient.d.ts +0 -10
- package/lib/reporter/reporter-rpc/ReporterRpcClient.js +0 -82
- package/lib/reporter/reporter-rpc/ReporterRpcProcedure.d.ts +0 -10
- package/lib/reporter/reporter-rpc/ReporterRpcProcedure.js +0 -12
- package/lib/reporter/reporter-rpc/ReporterRpcService.d.ts +0 -9
- package/lib/reporter/reporter-rpc/ReporterRpcService.js +0 -74
- package/lib/rpc/RpcClient.d.ts +0 -10
- package/lib/rpc/RpcClient.js +0 -78
- package/lib/rpc/RpcHost.d.ts +0 -6
- package/lib/rpc/RpcHost.js +0 -2
- package/lib/rpc/RpcMessage.d.ts +0 -26
- package/lib/rpc/RpcMessage.js +0 -45
- package/lib/rpc/RpcMessageChannel.d.ts +0 -10
- package/lib/rpc/RpcMessageChannel.js +0 -49
- package/lib/rpc/RpcMessagePort.d.ts +0 -14
- package/lib/rpc/RpcMessagePort.js +0 -2
- package/lib/rpc/RpcProcedure.d.ts +0 -5
- package/lib/rpc/RpcProcedure.js +0 -2
- package/lib/rpc/RpcService.d.ts +0 -12
- package/lib/rpc/RpcService.js +0 -63
- package/lib/rpc/error/RpcMessagePortClosedError.d.ts +0 -3
- package/lib/rpc/error/RpcMessagePortClosedError.js +0 -5
- package/lib/rpc/error/RpcRemoteError.d.ts +0 -6
- package/lib/rpc/error/RpcRemoteError.js +0 -17
- package/lib/rpc/index.d.ts +0 -7
- package/lib/rpc/index.js +0 -9
- package/lib/rpc/rpc-ipc/ProcessLike.d.ts +0 -12
- package/lib/rpc/rpc-ipc/ProcessLike.js +0 -3
- package/lib/rpc/rpc-ipc/RpcIpcMessageChannel.d.ts +0 -3
- package/lib/rpc/rpc-ipc/RpcIpcMessageChannel.js +0 -10
- package/lib/rpc/rpc-ipc/RpcIpcMessagePort.d.ts +0 -5
- package/lib/rpc/rpc-ipc/RpcIpcMessagePort.js +0 -150
- package/lib/rpc/rpc-ipc/error/RpcIpcMessagePortClosedError.js +0 -12
- package/lib/rpc/rpc-ipc/index.d.ts +0 -2
- package/lib/rpc/rpc-ipc/index.js +0 -7
- package/lib/typescript-reporter/extension/vue/TypeScriptVueExtension.d.ts +0 -4
- package/lib/typescript-reporter/file-system/FileSystem.js +0 -2
- package/lib/typescript-reporter/file-system/MemFileSystem.d.ts +0 -8
- package/lib/typescript-reporter/file-system/MemFileSystem.js +0 -81
- package/lib/typescript-reporter/file-system/PassiveFileSystem.d.ts +0 -9
- package/lib/typescript-reporter/file-system/PassiveFileSystem.js +0 -68
- package/lib/typescript-reporter/file-system/RealFileSystem.d.ts +0 -8
- package/lib/typescript-reporter/file-system/RealFileSystem.js +0 -179
- package/lib/typescript-reporter/issue/TypeScriptIssueFactory.d.ts +0 -4
- package/lib/typescript-reporter/issue/TypeScriptIssueFactory.js +0 -45
- package/lib/typescript-reporter/profile/TypeScriptPerformance.d.ts +0 -10
- package/lib/typescript-reporter/profile/TypeScriptPerformance.js +0 -33
- package/lib/typescript-reporter/reporter/ControlledTypeScriptSystem.js +0 -229
- package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.js +0 -28
- package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.js +0 -50
- package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.d.ts +0 -8
- package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.js +0 -136
- package/lib/typescript-reporter/reporter/TypeScriptReporter.d.ts +0 -4
- package/lib/typescript-reporter/reporter/TypeScriptReporter.js +0 -352
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.d.ts +0 -4
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.js +0 -13
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.d.ts +0 -1
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.js +0 -11
- package/lib/watch/CompilerWithWatchFileSystem.d.ts +0 -6
- package/lib/watch/CompilerWithWatchFileSystem.js +0 -2
package/README.md
CHANGED
|
@@ -14,17 +14,18 @@
|
|
|
14
14
|
|
|
15
15
|
## Features
|
|
16
16
|
|
|
17
|
-
* Speeds up [TypeScript](https://github.com/Microsoft/TypeScript) type checking
|
|
17
|
+
* Speeds up [TypeScript](https://github.com/Microsoft/TypeScript) type checking (by moving it to a separate process) 🏎
|
|
18
18
|
* Supports modern TypeScript features like [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) and [incremental mode](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#faster-subsequent-builds-with-the---incremental-flag) ✨
|
|
19
19
|
* Supports [Vue Single File Component](https://vuejs.org/v2/guide/single-file-components.html) ✅
|
|
20
20
|
* Displays nice error messages with the [code frame](https://babeljs.io/docs/en/next/babel-code-frame.html) formatter 🌈
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
24
|
-
This plugin requires
|
|
24
|
+
This plugin requires **Node.js >=12.13.0+**, **Webpack ^5.11.0**, **TypeScript ^3.6.0**
|
|
25
|
+
|
|
26
|
+
* If you depend on **TypeScript 2.1 - 2.6.2**, please use [version 4](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v4.1.4) of the plugin.
|
|
27
|
+
* If you depend on **Webpack 4**, **TypeScript 2.7 - 3.5.3** or **ESLint** feature, please use [version 6](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v6.2.6) of the plugin.
|
|
25
28
|
|
|
26
|
-
* If you depend on **Webpack 2**, **Webpack 3**, or **TSLint 4**, please use [version 3](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v3.1.1) of the plugin.
|
|
27
|
-
* If you depend on **TypeScript >= 2.1** and **< 2.7** or you can't update to **Node 10**, please use [version 4](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v4.1.4) of the plugin.
|
|
28
29
|
```sh
|
|
29
30
|
# with npm
|
|
30
31
|
npm install --save-dev fork-ts-checker-webpack-plugin
|
|
@@ -62,9 +63,8 @@ module.exports = {
|
|
|
62
63
|
};
|
|
63
64
|
```
|
|
64
65
|
|
|
65
|
-
> Examples how to configure it with [babel-loader](https://github.com/babel/babel-loader), [ts-loader](https://github.com/TypeStrong/ts-loader)
|
|
66
|
-
>
|
|
67
|
-
> [**examples**](./examples) directory.
|
|
66
|
+
> Examples how to configure it with [babel-loader](https://github.com/babel/babel-loader), [ts-loader](https://github.com/TypeStrong/ts-loader)
|
|
67
|
+
> and [Visual Studio Code](https://code.visualstudio.com/) are in the [**examples**](./examples) directory.
|
|
68
68
|
|
|
69
69
|
## Modules resolution
|
|
70
70
|
|
|
@@ -75,57 +75,6 @@ It's very important to be aware that **this plugin uses [TypeScript](https://git
|
|
|
75
75
|
>
|
|
76
76
|
> To debug TypeScript's modules resolution, you can use `tsc --traceResolution` command.
|
|
77
77
|
|
|
78
|
-
## ESLint
|
|
79
|
-
|
|
80
|
-
If you'd like to use ESLint with the plugin, ensure you have the relevant dependencies installed:
|
|
81
|
-
|
|
82
|
-
```sh
|
|
83
|
-
# with npm
|
|
84
|
-
npm install --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
|
|
85
|
-
|
|
86
|
-
# with yarn
|
|
87
|
-
yarn add --dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Then set up ESLint in the plugin. This is the minimal configuration:
|
|
91
|
-
```js
|
|
92
|
-
// webpack.config.js
|
|
93
|
-
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
|
94
|
-
|
|
95
|
-
module.exports = {
|
|
96
|
-
// ...the webpack configuration
|
|
97
|
-
plugins: [
|
|
98
|
-
new ForkTsCheckerWebpackPlugin({
|
|
99
|
-
eslint: {
|
|
100
|
-
files: './src/**/*.{ts,tsx,js,jsx}' // required - same as command `eslint ./src/**/*.{ts,tsx,js,jsx} --ext .ts,.tsx,.js,.jsx`
|
|
101
|
-
}
|
|
102
|
-
})
|
|
103
|
-
]
|
|
104
|
-
};
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
You should also have an ESLint configuration file in your root project directory.
|
|
108
|
-
Here is a sample `.eslintrc.js` configuration for a TypeScript project:
|
|
109
|
-
|
|
110
|
-
```js
|
|
111
|
-
module.exports = {
|
|
112
|
-
parser: '@typescript-eslint/parser',
|
|
113
|
-
parserOptions: {
|
|
114
|
-
ecmaVersion: 2018,
|
|
115
|
-
sourceType: 'module',
|
|
116
|
-
},
|
|
117
|
-
extends: [
|
|
118
|
-
'plugin:@typescript-eslint/recommended'
|
|
119
|
-
],
|
|
120
|
-
rules: {
|
|
121
|
-
// place to specify ESLint rules - can be used to overwrite rules specified from the extended configs
|
|
122
|
-
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
There's a [good explanation on setting up TypeScript ESLint support by Robert Cooper](https://dev.to/robertcoopercode/using-eslint-and-prettier-in-a-typescript-project-53jb).
|
|
128
|
-
|
|
129
78
|
## Options
|
|
130
79
|
|
|
131
80
|
This plugin uses [`cosmiconfig`](https://github.com/davidtheclark/cosmiconfig). This means that besides the plugin constructor,
|
|
@@ -139,11 +88,10 @@ Options passed to the plugin constructor will overwrite options from the cosmico
|
|
|
139
88
|
| Name | Type | Default value | Description |
|
|
140
89
|
| ----------------- | ---------------------------------- | ------------------------------------------------------------------ | ----------- |
|
|
141
90
|
| `async` | `boolean` | `compiler.options.mode === 'development'` | If `true`, reports issues **after** webpack's compilation is done. Thanks to that it doesn't block the compilation. Used only in the `watch` mode. |
|
|
142
|
-
| `typescript` | `object`
|
|
143
|
-
| `eslint` | `object` | `undefined` | If `undefined`, it disables ESLint linter. If an `object`, see [ESLint options](#eslint-options). |
|
|
91
|
+
| `typescript` | `object` | `{}` | See [TypeScript options](#typescript-options). |
|
|
144
92
|
| `issue` | `object` | `{}` | See [Issues options](#issues-options). |
|
|
145
93
|
| `formatter` | `string` or `object` or `function` | `codeframe` | Available formatters are `basic`, `codeframe` and a custom `function`. To [configure](https://babeljs.io/docs/en/babel-code-frame#options) `codeframe` formatter, pass object: `{ type: 'codeframe', options: { <coderame options> } }`. |
|
|
146
|
-
| `logger` | `object`
|
|
94
|
+
| `logger` | `object` | `{ infrastructure: 'silent', issues: 'console', devServer: true }` | Available loggers are `silent`, `console`, and `webpack-infrastructure`. Infrastructure logger prints additional information, issue logger prints `issues` in the `async` mode. If `devServer` is set to `false`, errors will not be reported to Webpack Dev Server. |
|
|
147
95
|
|
|
148
96
|
### TypeScript options
|
|
149
97
|
|
|
@@ -151,7 +99,6 @@ Options for the TypeScript checker (`typescript` option object).
|
|
|
151
99
|
|
|
152
100
|
| Name | Type | Default value | Description |
|
|
153
101
|
| -------------------- | --------- | -------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
154
|
-
| `enabled` | `boolean` | `true` | If `true`, it enables TypeScript checker. |
|
|
155
102
|
| `memoryLimit` | `number` | `2048` | Memory limit for the checker process in MB. If the process exits with the allocation failed error, try to increase this number. |
|
|
156
103
|
| `configFile` | `string` | `'tsconfig.json'` | Path to the `tsconfig.json` file (path relative to the `compiler.options.context` or absolute path) |
|
|
157
104
|
| `configOverwrite` | `object` | `{ compilerOptions: { skipLibCheck: true, sourceMap: false, inlineSourceMap: false, declarationMap: false } }` | This configuration will overwrite configuration from the `tsconfig.json` file. Supported fields are: `extends`, `compilerOptions`, `include`, `exclude`, `files`, and `references`. |
|
|
@@ -173,17 +120,6 @@ Options for the TypeScript checker extensions (`typescript.extensions` option ob
|
|
|
173
120
|
| `vue.enabled` | `boolean` | `false` | Same as the `vue` option |
|
|
174
121
|
| `vue.compiler` | `string` | `'vue-template-compiler'` | The package name of the compiler that will be used to parse `.vue` files. You can use `'nativescript-vue-template-compiler'` if you use [nativescript-vue](https://github.com/nativescript-vue/nativescript-vue) |
|
|
175
122
|
|
|
176
|
-
### ESLint options
|
|
177
|
-
|
|
178
|
-
Options for the ESLint linter (`eslint` option object).
|
|
179
|
-
|
|
180
|
-
| Name | Type | Default value | Description |
|
|
181
|
-
| -------------------- | ---------------------- | ------------------------- | ----------- |
|
|
182
|
-
| `enabled` | `boolean` | `false` | If `true`, it enables ESLint linter. If you set the `files` option, it will be `true` by default. |
|
|
183
|
-
| `files` | `string` or `string[]` | This value is required | One or more [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)) to the files that should be linted. Works the same as the `eslint` command. |
|
|
184
|
-
| `memoryLimit` | `number` | `2048` | Memory limit for the linter process in MB. If the process exits with the allocation failed error, try to increase this number. |
|
|
185
|
-
| `options` | `object` | `{}` | [Options](https://eslint.org/docs/developer-guide/nodejs-api#cliengine) that can be used to initialize ESLint. |
|
|
186
|
-
|
|
187
123
|
### Issues options
|
|
188
124
|
|
|
189
125
|
Options for the issues filtering (`issue` option object).
|
|
@@ -191,7 +127,6 @@ I could write some plain text explanation of these options but I think code will
|
|
|
191
127
|
|
|
192
128
|
```typescript
|
|
193
129
|
interface Issue {
|
|
194
|
-
origin: 'typescript' | 'eslint';
|
|
195
130
|
severity: 'error' | 'warning';
|
|
196
131
|
code: string;
|
|
197
132
|
file?: string;
|
|
@@ -210,7 +145,7 @@ type IssueFilter = IssueMatch | IssuePredicate | (IssueMatch | IssuePredicate)[]
|
|
|
210
145
|
<details>
|
|
211
146
|
<summary>Expand example</summary>
|
|
212
147
|
|
|
213
|
-
Include issues from the `src` directory, exclude
|
|
148
|
+
Include issues from the `src` directory, exclude issues from `.spec.ts` files:
|
|
214
149
|
|
|
215
150
|
```js
|
|
216
151
|
module.exports = {
|
|
@@ -222,7 +157,7 @@ module.exports = {
|
|
|
222
157
|
{ file: '**/src/**/*' }
|
|
223
158
|
],
|
|
224
159
|
exclude: [
|
|
225
|
-
{
|
|
160
|
+
{ file: '**/*.spec.ts' }
|
|
226
161
|
]
|
|
227
162
|
}
|
|
228
163
|
})
|
|
@@ -362,37 +297,24 @@ When we call this method with a [webpack compiler instance](https://webpack.js.o
|
|
|
362
297
|
[tapable](https://github.com/webpack/tapable) hooks where you can pass in your callbacks.
|
|
363
298
|
|
|
364
299
|
```js
|
|
365
|
-
|
|
300
|
+
const webpack = require('webpack');
|
|
366
301
|
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
|
367
302
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
// log some message on waiting
|
|
373
|
-
hooks.waiting.tap('MyPlugin', () => {
|
|
374
|
-
console.log('waiting for issues');
|
|
375
|
-
});
|
|
376
|
-
// don't show warnings
|
|
377
|
-
hooks.issues.tap('MyPlugin', (issues) =>
|
|
378
|
-
issues.filter((issue) => issue.severity === 'error')
|
|
379
|
-
);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
303
|
+
const compiler = webpack({
|
|
304
|
+
// ... webpack config
|
|
305
|
+
});
|
|
382
306
|
|
|
383
|
-
|
|
307
|
+
// optionally add the plugin to the compiler
|
|
308
|
+
// **don't do this if already added through configuration**
|
|
309
|
+
new ForkTsCheckerWebpackPlugin().apply(compiler);
|
|
384
310
|
|
|
385
|
-
//
|
|
386
|
-
const
|
|
387
|
-
const MyWebpackPlugin = require('./src/webpack/MyWebpackPlugin');
|
|
311
|
+
// now get the plugin hooks from compiler
|
|
312
|
+
const hooks = ForkTsCheckerWebpackPlugin.getCompilerHooks(compiler);
|
|
388
313
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
new MyWebpackPlugin()
|
|
394
|
-
]
|
|
395
|
-
};
|
|
314
|
+
// say we want to show some message when plugin is waiting for issues results
|
|
315
|
+
hooks.waiting.tap('yourListenerName', () => {
|
|
316
|
+
console.log('waiting for issues');
|
|
317
|
+
});
|
|
396
318
|
```
|
|
397
319
|
|
|
398
320
|
## Typings
|
|
@@ -410,7 +332,7 @@ yarn add --dev @types/webpack
|
|
|
410
332
|
|
|
411
333
|
## Profiling types resolution
|
|
412
334
|
|
|
413
|
-
Starting from TypeScript 4.1.0, you can profile long type checks by
|
|
335
|
+
Starting from TypeScript 4.1.0 (currently in beta), you can profile long type checks by
|
|
414
336
|
setting "generateTrace" compiler option. This is an instruction from [microsoft/TypeScript#40063](https://github.com/microsoft/TypeScript/pull/40063):
|
|
415
337
|
|
|
416
338
|
1. Set "generateTrace": "{folderName}" in your `tsconfig.json`
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { ForkTsCheckerWebpackPluginOptions } from './ForkTsCheckerWebpackPluginOptions';
|
|
3
|
-
|
|
4
|
-
declare class ForkTsCheckerWebpackPlugin implements webpack.Plugin {
|
|
1
|
+
import type webpack from 'webpack';
|
|
2
|
+
import type { ForkTsCheckerWebpackPluginOptions } from './ForkTsCheckerWebpackPluginOptions';
|
|
3
|
+
declare class ForkTsCheckerWebpackPlugin {
|
|
5
4
|
/**
|
|
6
5
|
* Current version of the plugin
|
|
7
6
|
*/
|
|
@@ -9,20 +8,20 @@ declare class ForkTsCheckerWebpackPlugin implements webpack.Plugin {
|
|
|
9
8
|
/**
|
|
10
9
|
* Default pools for the plugin concurrency limit
|
|
11
10
|
*/
|
|
12
|
-
static readonly issuesPool: Pool;
|
|
13
|
-
static readonly dependenciesPool: Pool;
|
|
11
|
+
static readonly issuesPool: import("./utils/async/pool").Pool;
|
|
12
|
+
static readonly dependenciesPool: import("./utils/async/pool").Pool;
|
|
14
13
|
/**
|
|
15
14
|
* @deprecated Use ForkTsCheckerWebpackPlugin.issuesPool instead
|
|
16
15
|
*/
|
|
17
|
-
static
|
|
16
|
+
static readonly pool: import("./utils/async/pool").Pool;
|
|
18
17
|
private readonly options;
|
|
19
18
|
constructor(options?: ForkTsCheckerWebpackPluginOptions);
|
|
20
19
|
static getCompilerHooks(compiler: webpack.Compiler): {
|
|
21
|
-
start: import("tapable").AsyncSeriesWaterfallHook<import("./
|
|
22
|
-
waiting: import("tapable").SyncHook<webpack.
|
|
23
|
-
canceled: import("tapable").SyncHook<webpack.
|
|
24
|
-
error: import("tapable").SyncHook<Error, webpack.
|
|
25
|
-
issues: import("tapable").SyncWaterfallHook<import("./issue/Issue").Issue[], webpack.
|
|
20
|
+
start: import("tapable").AsyncSeriesWaterfallHook<[import("./files-change").FilesChange, webpack.Compilation], import("tapable").UnsetAdditionalOptions>;
|
|
21
|
+
waiting: import("tapable").SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
22
|
+
canceled: import("tapable").SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
23
|
+
error: import("tapable").SyncHook<[Error, webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
24
|
+
issues: import("tapable").SyncWaterfallHook<[import("./issue/Issue").Issue[], webpack.Compilation | undefined], void>;
|
|
26
25
|
};
|
|
27
26
|
apply(compiler: webpack.Compiler): void;
|
|
28
27
|
}
|
|
@@ -1,44 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
23
|
};
|
|
5
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
25
|
+
exports.ForkTsCheckerWebpackPlugin = void 0;
|
|
26
|
+
const path = __importStar(require("path"));
|
|
7
27
|
const cosmiconfig_1 = require("cosmiconfig");
|
|
8
28
|
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
9
|
-
const
|
|
29
|
+
const schema_utils_1 = require("schema-utils");
|
|
30
|
+
// type only dependency
|
|
31
|
+
// eslint-disable-next-line node/no-extraneous-import
|
|
10
32
|
const ForkTsCheckerWebpackPluginConfiguration_1 = require("./ForkTsCheckerWebpackPluginConfiguration");
|
|
33
|
+
const ForkTsCheckerWebpackPluginOptions_json_1 = __importDefault(require("./ForkTsCheckerWebpackPluginOptions.json"));
|
|
11
34
|
const ForkTsCheckerWebpackPluginState_1 = require("./ForkTsCheckerWebpackPluginState");
|
|
12
|
-
const reporter_1 = require("./reporter");
|
|
13
|
-
const TypeScriptSupport_1 = require("./typescript-reporter/TypeScriptSupport");
|
|
14
|
-
const TypeScriptReporterRpcClient_1 = require("./typescript-reporter/reporter/TypeScriptReporterRpcClient");
|
|
15
|
-
const assertEsLintSupport_1 = require("./eslint-reporter/assertEsLintSupport");
|
|
16
|
-
const EsLintReporterRpcClient_1 = require("./eslint-reporter/reporter/EsLintReporterRpcClient");
|
|
17
|
-
const tapStartToConnectAndRunReporter_1 = require("./hooks/tapStartToConnectAndRunReporter");
|
|
18
|
-
const tapStopToDisconnectReporter_1 = require("./hooks/tapStopToDisconnectReporter");
|
|
19
|
-
const tapAfterCompileToAddDependencies_1 = require("./hooks/tapAfterCompileToAddDependencies");
|
|
20
|
-
const tapErrorToLogMessage_1 = require("./hooks/tapErrorToLogMessage");
|
|
21
35
|
const pluginHooks_1 = require("./hooks/pluginHooks");
|
|
36
|
+
const pluginPools_1 = require("./hooks/pluginPools");
|
|
37
|
+
const tapAfterCompileToAddDependencies_1 = require("./hooks/tapAfterCompileToAddDependencies");
|
|
22
38
|
const tapAfterEnvironmentToPatchWatching_1 = require("./hooks/tapAfterEnvironmentToPatchWatching");
|
|
23
|
-
const
|
|
24
|
-
const
|
|
39
|
+
const tapErrorToLogMessage_1 = require("./hooks/tapErrorToLogMessage");
|
|
40
|
+
const tapStartToRunWorkers_1 = require("./hooks/tapStartToRunWorkers");
|
|
41
|
+
const tapStopToTerminateWorkers_1 = require("./hooks/tapStopToTerminateWorkers");
|
|
42
|
+
const TypeScriptSupport_1 = require("./typescript/TypeScriptSupport");
|
|
43
|
+
const rpc_1 = require("./utils/rpc");
|
|
25
44
|
class ForkTsCheckerWebpackPlugin {
|
|
26
45
|
constructor(options = {}) {
|
|
27
46
|
const explorerSync = cosmiconfig_1.cosmiconfigSync('fork-ts-checker');
|
|
28
47
|
const { config: externalOptions } = explorerSync.search() || {};
|
|
29
48
|
// first validate options directly passed to the constructor
|
|
30
49
|
const configuration = { name: 'ForkTsCheckerWebpackPlugin' };
|
|
31
|
-
schema_utils_1.
|
|
50
|
+
schema_utils_1.validate(ForkTsCheckerWebpackPluginOptions_json_1.default, options, configuration);
|
|
32
51
|
this.options = deepmerge_1.default(externalOptions || {}, options || {});
|
|
33
52
|
// then validate merged options
|
|
34
|
-
schema_utils_1.
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated Use ForkTsCheckerWebpackPlugin.issuesPool instead
|
|
38
|
-
*/
|
|
39
|
-
static get pool() {
|
|
40
|
-
// for backward compatibility
|
|
41
|
-
return ForkTsCheckerWebpackPlugin.issuesPool;
|
|
53
|
+
schema_utils_1.validate(ForkTsCheckerWebpackPluginOptions_json_1.default, this.options, configuration);
|
|
42
54
|
}
|
|
43
55
|
static getCompilerHooks(compiler) {
|
|
44
56
|
return pluginHooks_1.getForkTsCheckerWebpackPluginHooks(compiler);
|
|
@@ -46,39 +58,27 @@ class ForkTsCheckerWebpackPlugin {
|
|
|
46
58
|
apply(compiler) {
|
|
47
59
|
const configuration = ForkTsCheckerWebpackPluginConfiguration_1.createForkTsCheckerWebpackPluginConfiguration(compiler, this.options);
|
|
48
60
|
const state = ForkTsCheckerWebpackPluginState_1.createForkTsCheckerWebpackPluginState();
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
assertEsLintSupport_1.assertEsLintSupport(configuration.eslint);
|
|
58
|
-
issuesReporters.push(EsLintReporterRpcClient_1.createEsLintReporterRpcClient(configuration.eslint));
|
|
59
|
-
dependenciesReporters.push(EsLintReporterRpcClient_1.createEsLintReporterRpcClient(configuration.eslint));
|
|
60
|
-
}
|
|
61
|
-
if (issuesReporters.length) {
|
|
62
|
-
const issuesReporter = reporter_1.createAggregatedReporter(reporter_1.composeReporterRpcClients(issuesReporters));
|
|
63
|
-
const dependenciesReporter = reporter_1.createAggregatedReporter(reporter_1.composeReporterRpcClients(dependenciesReporters));
|
|
64
|
-
tapAfterEnvironmentToPatchWatching_1.tapAfterEnvironmentToPatchWatching(compiler, state);
|
|
65
|
-
tapStartToConnectAndRunReporter_1.tapStartToConnectAndRunReporter(compiler, issuesReporter, dependenciesReporter, configuration, state);
|
|
66
|
-
tapAfterCompileToAddDependencies_1.tapAfterCompileToAddDependencies(compiler, configuration, state);
|
|
67
|
-
tapStopToDisconnectReporter_1.tapStopToDisconnectReporter(compiler, issuesReporter, dependenciesReporter, state);
|
|
68
|
-
tapErrorToLogMessage_1.tapErrorToLogMessage(compiler, configuration);
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
throw new Error(`ForkTsCheckerWebpackPlugin is configured to not use any issue reporter. It's probably a configuration issue.`);
|
|
72
|
-
}
|
|
61
|
+
TypeScriptSupport_1.assertTypeScriptSupport(configuration.typescript);
|
|
62
|
+
const getIssuesWorker = rpc_1.createRpcWorker(path.resolve(__dirname, './typescript/worker/get-issues-worker.js'), configuration.typescript, configuration.typescript.memoryLimit);
|
|
63
|
+
const getDependenciesWorker = rpc_1.createRpcWorker(path.resolve(__dirname, './typescript/worker/get-dependencies-worker.js'), configuration.typescript);
|
|
64
|
+
tapAfterEnvironmentToPatchWatching_1.tapAfterEnvironmentToPatchWatching(compiler, state);
|
|
65
|
+
tapStartToRunWorkers_1.tapStartToRunWorkers(compiler, getIssuesWorker, getDependenciesWorker, configuration, state);
|
|
66
|
+
tapAfterCompileToAddDependencies_1.tapAfterCompileToAddDependencies(compiler, configuration, state);
|
|
67
|
+
tapStopToTerminateWorkers_1.tapStopToTerminateWorkers(compiler, getIssuesWorker, getDependenciesWorker, state);
|
|
68
|
+
tapErrorToLogMessage_1.tapErrorToLogMessage(compiler, configuration);
|
|
73
69
|
}
|
|
74
70
|
}
|
|
75
71
|
exports.ForkTsCheckerWebpackPlugin = ForkTsCheckerWebpackPlugin;
|
|
76
72
|
/**
|
|
77
73
|
* Current version of the plugin
|
|
78
74
|
*/
|
|
79
|
-
ForkTsCheckerWebpackPlugin.version = '
|
|
75
|
+
ForkTsCheckerWebpackPlugin.version = '7.0.0-alpha.11'; // will be replaced by the @semantic-release/exec
|
|
80
76
|
/**
|
|
81
77
|
* Default pools for the plugin concurrency limit
|
|
82
78
|
*/
|
|
83
|
-
ForkTsCheckerWebpackPlugin.issuesPool =
|
|
84
|
-
ForkTsCheckerWebpackPlugin.dependenciesPool =
|
|
79
|
+
ForkTsCheckerWebpackPlugin.issuesPool = pluginPools_1.issuesPool;
|
|
80
|
+
ForkTsCheckerWebpackPlugin.dependenciesPool = pluginPools_1.dependenciesPool;
|
|
81
|
+
/**
|
|
82
|
+
* @deprecated Use ForkTsCheckerWebpackPlugin.issuesPool instead
|
|
83
|
+
*/
|
|
84
|
+
ForkTsCheckerWebpackPlugin.pool = pluginPools_1.issuesPool;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { ForkTsCheckerWebpackPluginOptions } from './ForkTsCheckerWebpackPluginOptions';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { LoggerConfiguration } from './logger/LoggerConfiguration';
|
|
1
|
+
import type webpack from 'webpack';
|
|
2
|
+
import type { ForkTsCheckerWebpackPluginOptions } from './ForkTsCheckerWebpackPluginOptions';
|
|
3
|
+
import type { FormatterConfiguration } from './formatter';
|
|
4
|
+
import type { IssueConfiguration } from './issue/IssueConfiguration';
|
|
5
|
+
import type { LoggerConfiguration } from './logger/LoggerConfiguration';
|
|
6
|
+
import type { TypeScriptReporterConfiguration } from './typescript/TypeScriptReporterConfiguration';
|
|
8
7
|
interface ForkTsCheckerWebpackPluginConfiguration {
|
|
9
8
|
async: boolean;
|
|
10
9
|
typescript: TypeScriptReporterConfiguration;
|
|
11
|
-
eslint: EsLintReporterConfiguration;
|
|
12
10
|
issue: IssueConfiguration;
|
|
13
11
|
formatter: FormatterConfiguration;
|
|
14
12
|
logger: LoggerConfiguration;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.createForkTsCheckerWebpackPluginConfiguration = void 0;
|
|
4
4
|
const formatter_1 = require("./formatter");
|
|
5
|
-
const
|
|
6
|
-
const EsLintReporterConfiguration_1 = require("./eslint-reporter/EsLintReporterConfiguration");
|
|
5
|
+
const IssueConfiguration_1 = require("./issue/IssueConfiguration");
|
|
7
6
|
const LoggerConfiguration_1 = require("./logger/LoggerConfiguration");
|
|
7
|
+
const TypeScriptReporterConfiguration_1 = require("./typescript/TypeScriptReporterConfiguration");
|
|
8
8
|
function createForkTsCheckerWebpackPluginConfiguration(compiler, options = {}) {
|
|
9
9
|
return {
|
|
10
10
|
async: options.async === undefined ? compiler.options.mode === 'development' : options.async,
|
|
11
11
|
typescript: TypeScriptReporterConfiguration_1.createTypeScriptReporterConfiguration(compiler, options.typescript),
|
|
12
|
-
eslint: EsLintReporterConfiguration_1.createEsLintReporterConfiguration(compiler, options.eslint),
|
|
13
12
|
issue: IssueConfiguration_1.createIssueConfiguration(compiler, options.issue),
|
|
14
13
|
formatter: formatter_1.createFormatterConfiguration(options.formatter),
|
|
15
14
|
logger: LoggerConfiguration_1.createLoggerConfiguration(compiler, options.logger),
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import LoggerOptions from './logger/LoggerOptions';
|
|
1
|
+
import type { FormatterOptions } from './formatter';
|
|
2
|
+
import type { IssueOptions } from './issue/IssueOptions';
|
|
3
|
+
import type LoggerOptions from './logger/LoggerOptions';
|
|
4
|
+
import type { TypeScriptReporterOptions } from './typescript/TypeScriptReporterOptions';
|
|
6
5
|
interface ForkTsCheckerWebpackPluginOptions {
|
|
7
6
|
async?: boolean;
|
|
8
7
|
typescript?: TypeScriptReporterOptions;
|
|
9
|
-
eslint?: EsLintReporterOptions;
|
|
10
8
|
formatter?: FormatterOptions;
|
|
11
9
|
issue?: IssueOptions;
|
|
12
10
|
logger?: LoggerOptions;
|