fork-ts-checker-webpack-plugin 7.0.0-alpha.9 → 7.0.0
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 +39 -24
- package/lib/files-change.d.ts +17 -0
- package/lib/{reporter/FilesChange.js → files-change.js} +20 -13
- package/lib/{reporter/FilesMatch.d.ts → files-match.d.ts} +0 -0
- package/lib/{ForkTsCheckerWebpackPluginOptions.js → files-match.js} +0 -0
- package/lib/formatter/{BasicFormatter.d.ts → basic-formatter.d.ts} +1 -1
- package/lib/formatter/{BasicFormatter.js → basic-formatter.js} +0 -0
- package/lib/formatter/{CodeFrameFormatter.d.ts → code-frame-formatter.d.ts} +1 -1
- package/lib/formatter/{CodeFrameFormatter.js → code-frame-formatter.js} +4 -4
- package/lib/formatter/formatter-config.d.ts +5 -0
- package/lib/formatter/{FormatterConfiguration.js → formatter-config.js} +8 -8
- package/lib/formatter/{FormatterOptions.d.ts → formatter-options.d.ts} +2 -2
- package/lib/formatter/{Formatter.js → formatter-options.js} +0 -0
- package/lib/formatter/{Formatter.d.ts → formatter.d.ts} +1 -1
- package/lib/formatter/{FormatterOptions.js → formatter.js} +0 -0
- package/lib/formatter/index.d.ts +6 -6
- package/lib/formatter/index.js +6 -6
- package/lib/formatter/{WebpackFormatter.d.ts → webpack-formatter.d.ts} +1 -1
- package/lib/formatter/{WebpackFormatter.js → webpack-formatter.js} +3 -3
- package/lib/hooks/intercept-done-to-get-dev-server-tap.d.ts +5 -0
- package/lib/hooks/intercept-done-to-get-dev-server-tap.js +18 -0
- package/lib/hooks/tap-after-compile-to-add-dependencies.d.ts +5 -0
- package/lib/hooks/{tapAfterCompileToAddDependencies.js → tap-after-compile-to-add-dependencies.js} +4 -1
- package/lib/hooks/tap-after-compile-to-get-issues.d.ts +5 -0
- package/lib/hooks/{tapAfterCompileToGetIssues.js → tap-after-compile-to-get-issues.js} +9 -6
- package/lib/hooks/{tapAfterEnvironmentToPatchWatching.d.ts → tap-after-environment-to-patch-watching.d.ts} +2 -2
- package/lib/hooks/{tapAfterEnvironmentToPatchWatching.js → tap-after-environment-to-patch-watching.js} +8 -2
- package/lib/hooks/tap-done-to-async-get-issues.d.ts +5 -0
- package/lib/hooks/{tapDoneToAsyncGetIssues.js → tap-done-to-async-get-issues.js} +20 -21
- package/lib/hooks/tap-error-to-log-message.d.ts +4 -0
- package/lib/hooks/{tapErrorToLogMessage.js → tap-error-to-log-message.js} +8 -8
- package/lib/hooks/tap-start-to-run-workers.d.ts +8 -0
- package/lib/hooks/tap-start-to-run-workers.js +95 -0
- package/lib/hooks/tap-stop-to-terminate-workers.d.ts +5 -0
- package/lib/hooks/tap-stop-to-terminate-workers.js +26 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/infrastructure-logger.d.ts +9 -0
- package/lib/infrastructure-logger.js +14 -0
- package/lib/issue/index.d.ts +3 -3
- package/lib/issue/index.js +3 -3
- package/lib/issue/issue-config.d.ts +8 -0
- package/lib/issue/issue-config.js +29 -0
- package/lib/issue/{IssueLocation.d.ts → issue-location.d.ts} +1 -1
- package/lib/issue/{IssueLocation.js → issue-location.js} +3 -3
- package/lib/issue/{IssueMatch.d.ts → issue-match.d.ts} +2 -2
- package/lib/issue/{IssueMatch.js → issue-match.js} +3 -3
- package/lib/issue/{IssueOptions.d.ts → issue-options.d.ts} +2 -2
- package/lib/issue/{IssueOptions.js → issue-options.js} +0 -0
- package/lib/issue/{IssuePosition.d.ts → issue-position.d.ts} +0 -0
- package/lib/issue/{IssuePosition.js → issue-position.js} +0 -0
- package/lib/issue/{IssuePredicate.d.ts → issue-predicate.d.ts} +1 -1
- package/lib/issue/{IssuePredicate.js → issue-predicate.js} +0 -0
- package/lib/issue/{IssueSeverity.d.ts → issue-severity.d.ts} +0 -0
- package/lib/issue/{IssueSeverity.js → issue-severity.js} +0 -0
- package/lib/issue/{IssueWebpackError.d.ts → issue-webpack-error.d.ts} +1 -1
- package/lib/issue/{IssueWebpackError.js → issue-webpack-error.js} +5 -5
- package/lib/issue/{Issue.d.ts → issue.d.ts} +2 -2
- package/lib/issue/{Issue.js → issue.js} +5 -5
- package/lib/{logger/Logger.d.ts → logger.d.ts} +1 -2
- package/lib/{logger/Logger.js → logger.js} +0 -0
- package/lib/plugin-config.d.ts +16 -0
- package/lib/plugin-config.js +17 -0
- package/lib/{hooks/pluginHooks.d.ts → plugin-hooks.d.ts} +9 -9
- package/lib/{hooks/pluginHooks.js → plugin-hooks.js} +8 -8
- package/lib/plugin-options.d.ts +13 -0
- package/lib/{logger/LoggerOptions.js → plugin-options.js} +0 -0
- package/lib/{ForkTsCheckerWebpackPluginOptions.json → plugin-options.json} +9 -44
- package/lib/plugin-pools.d.ts +4 -0
- package/lib/plugin-pools.js +28 -0
- package/lib/plugin-state.d.ts +14 -0
- package/lib/{ForkTsCheckerWebpackPluginState.js → plugin-state.js} +4 -5
- package/lib/{ForkTsCheckerWebpackPlugin.d.ts → plugin.d.ts} +8 -9
- package/lib/plugin.js +82 -0
- package/lib/rpc/expose-rpc.d.ts +1 -0
- package/lib/rpc/expose-rpc.js +78 -0
- package/lib/rpc/index.d.ts +5 -7
- package/lib/rpc/index.js +10 -17
- package/lib/rpc/{rpc-ipc/error/RpcIpcMessagePortClosedError.d.ts → rpc-error.d.ts} +2 -3
- package/lib/rpc/rpc-error.js +12 -0
- package/lib/rpc/rpc-worker.d.ts +13 -0
- package/lib/rpc/rpc-worker.js +79 -0
- package/lib/rpc/types.d.ts +19 -0
- package/lib/{reporter/FilesMatch.js → rpc/types.js} +0 -0
- package/lib/rpc/wrap-rpc.d.ts +4 -0
- package/lib/rpc/wrap-rpc.js +96 -0
- package/lib/{typescript-reporter/extension/TypeScriptEmbeddedExtension.d.ts → typescript/extension/type-script-embedded-extension.d.ts} +1 -1
- package/lib/{typescript-reporter/extension/TypeScriptEmbeddedExtension.js → typescript/extension/type-script-embedded-extension.js} +3 -3
- package/lib/{typescript-reporter/extension/TypeScriptExtension.d.ts → typescript/extension/type-script-extension.d.ts} +2 -2
- package/lib/{reporter/Report.js → typescript/extension/type-script-extension.js} +0 -0
- package/lib/typescript/extension/vue/type-script-vue-extension-config.d.ts +7 -0
- package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtensionConfiguration.js → typescript/extension/vue/type-script-vue-extension-config.js} +3 -3
- package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtensionOptions.d.ts → typescript/extension/vue/type-script-vue-extension-options.d.ts} +0 -0
- package/lib/{reporter/Reporter.js → typescript/extension/vue/type-script-vue-extension-options.js} +0 -0
- package/lib/typescript/extension/vue/type-script-vue-extension-support.d.ts +3 -0
- package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtensionSupport.js → typescript/extension/vue/type-script-vue-extension-support.js} +3 -3
- package/lib/typescript/extension/vue/type-script-vue-extension.d.ts +4 -0
- package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtension.js → typescript/extension/vue/type-script-vue-extension.js} +4 -4
- 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-reporter/TypeScriptConfigurationOverwrite.d.ts → typescript/type-script-config-overwrite.d.ts} +2 -2
- package/lib/{rpc/RpcHost.js → typescript/type-script-config-overwrite.js} +0 -0
- package/lib/{typescript-reporter/TypeScriptDiagnosticsOptions.d.ts → typescript/type-script-diagnostics-options.d.ts} +0 -0
- package/lib/{rpc/RpcMessagePort.js → typescript/type-script-diagnostics-options.js} +0 -0
- package/lib/typescript/type-script-support.d.ts +3 -0
- package/lib/{typescript-reporter/TypeScriptSupport.js → typescript/type-script-support.js} +10 -10
- package/lib/typescript/type-script-worker-config.d.ts +22 -0
- package/lib/{typescript-reporter/TypeScriptReporterConfiguration.js → typescript/type-script-worker-config.js} +5 -5
- package/lib/typescript/type-script-worker-options.d.ts +18 -0
- package/lib/{rpc/RpcProcedure.js → typescript/type-script-worker-options.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 +75 -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 +111 -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/{typescript-reporter/TypeScriptConfigurationOverwrite.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 +222 -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/{isPending.d.ts → is-pending.d.ts} +1 -1
- package/lib/utils/async/{isPending.js → is-pending.js} +2 -1
- package/lib/utils/async/pool.d.ts +1 -1
- package/lib/utils/async/pool.js +3 -14
- package/lib/utils/async/wait.d.ts +1 -1
- package/lib/utils/async/wait.js +2 -1
- package/lib/utils/path/{forwardSlash.d.ts → forward-slash.d.ts} +1 -1
- package/lib/utils/path/{forwardSlash.js → forward-slash.js} +2 -1
- package/lib/utils/path/{relativeToContext.d.ts → relative-to-context.d.ts} +0 -0
- package/lib/utils/path/{relativeToContext.js → relative-to-context.js} +2 -2
- package/lib/watch/{InclusiveNodeWatchFileSystem.d.ts → inclusive-node-watch-file-system.d.ts} +7 -7
- package/lib/watch/{InclusiveNodeWatchFileSystem.js → inclusive-node-watch-file-system.js} +47 -15
- package/lib/watch/{WatchFileSystem.d.ts → watch-file-system.d.ts} +3 -3
- package/lib/{typescript-reporter/TypeScriptDiagnosticsOptions.js → watch/watch-file-system.js} +0 -0
- package/package.json +41 -35
- package/lib/ForkTsCheckerWebpackPlugin.js +0 -66
- package/lib/ForkTsCheckerWebpackPluginConfiguration.d.ts +0 -15
- package/lib/ForkTsCheckerWebpackPluginConfiguration.js +0 -17
- package/lib/ForkTsCheckerWebpackPluginOptions.d.ts +0 -12
- package/lib/ForkTsCheckerWebpackPluginState.d.ts +0 -15
- package/lib/error/OperationCanceledError.d.ts +0 -4
- package/lib/error/OperationCanceledError.js +0 -10
- package/lib/formatter/FormatterConfiguration.d.ts +0 -5
- package/lib/hooks/interceptDoneToGetWebpackDevServerTap.d.ts +0 -5
- package/lib/hooks/interceptDoneToGetWebpackDevServerTap.js +0 -17
- package/lib/hooks/tapAfterCompileToAddDependencies.d.ts +0 -5
- package/lib/hooks/tapAfterCompileToGetIssues.d.ts +0 -5
- package/lib/hooks/tapDoneToAsyncGetIssues.d.ts +0 -5
- package/lib/hooks/tapErrorToLogMessage.d.ts +0 -4
- package/lib/hooks/tapStartToConnectAndRunReporter.d.ts +0 -6
- package/lib/hooks/tapStartToConnectAndRunReporter.js +0 -130
- package/lib/hooks/tapStopToDisconnectReporter.d.ts +0 -5
- package/lib/hooks/tapStopToDisconnectReporter.js +0 -30
- package/lib/issue/IssueConfiguration.d.ts +0 -8
- package/lib/issue/IssueConfiguration.js +0 -29
- package/lib/logger/LoggerConfiguration.d.ts +0 -10
- package/lib/logger/LoggerConfiguration.js +0 -12
- package/lib/logger/LoggerFactory.d.ts +0 -5
- package/lib/logger/LoggerFactory.js +0 -21
- package/lib/logger/LoggerOptions.d.ts +0 -8
- package/lib/logger/PartialLogger.d.ts +0 -4
- package/lib/logger/PartialLogger.js +0 -11
- package/lib/logger/WebpackInfrastructureLogger.d.ts +0 -4
- package/lib/logger/WebpackInfrastructureLogger.js +0 -13
- package/lib/profile/Performance.d.ts +0 -11
- package/lib/profile/Performance.js +0 -63
- package/lib/reporter/AggregatedReporter.d.ts +0 -6
- package/lib/reporter/AggregatedReporter.js +0 -61
- package/lib/reporter/FilesChange.d.ts +0 -16
- package/lib/reporter/Report.d.ts +0 -8
- package/lib/reporter/Reporter.d.ts +0 -6
- package/lib/reporter/index.d.ts +0 -7
- package/lib/reporter/index.js +0 -19
- package/lib/reporter/reporter-rpc/ReporterRpcClient.d.ts +0 -10
- package/lib/reporter/reporter-rpc/ReporterRpcClient.js +0 -85
- package/lib/reporter/reporter-rpc/ReporterRpcProcedure.d.ts +0 -13
- package/lib/reporter/reporter-rpc/ReporterRpcProcedure.js +0 -15
- package/lib/reporter/reporter-rpc/ReporterRpcService.d.ts +0 -9
- package/lib/reporter/reporter-rpc/ReporterRpcService.js +0 -77
- package/lib/rpc/RpcClient.d.ts +0 -10
- package/lib/rpc/RpcClient.js +0 -79
- package/lib/rpc/RpcHost.d.ts +0 -6
- package/lib/rpc/RpcMessage.d.ts +0 -26
- package/lib/rpc/RpcMessage.js +0 -48
- package/lib/rpc/RpcMessageChannel.d.ts +0 -10
- package/lib/rpc/RpcMessageChannel.js +0 -50
- package/lib/rpc/RpcMessagePort.d.ts +0 -14
- package/lib/rpc/RpcProcedure.d.ts +0 -5
- package/lib/rpc/RpcService.d.ts +0 -12
- package/lib/rpc/RpcService.js +0 -64
- package/lib/rpc/error/RpcMessagePortClosedError.d.ts +0 -3
- package/lib/rpc/error/RpcMessagePortClosedError.js +0 -6
- package/lib/rpc/error/RpcRemoteError.d.ts +0 -6
- package/lib/rpc/error/RpcRemoteError.js +0 -18
- 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 -11
- package/lib/rpc/rpc-ipc/RpcIpcMessagePort.d.ts +0 -5
- package/lib/rpc/rpc-ipc/RpcIpcMessagePort.js +0 -151
- package/lib/rpc/rpc-ipc/error/RpcIpcMessagePortClosedError.js +0 -13
- package/lib/rpc/rpc-ipc/index.d.ts +0 -2
- package/lib/rpc/rpc-ipc/index.js +0 -14
- package/lib/typescript-reporter/TypeScriptReporterConfiguration.d.ts +0 -22
- package/lib/typescript-reporter/TypeScriptReporterOptions.d.ts +0 -18
- package/lib/typescript-reporter/TypeScriptReporterOptions.js +0 -2
- package/lib/typescript-reporter/TypeScriptSupport.d.ts +0 -3
- package/lib/typescript-reporter/extension/TypeScriptExtension.js +0 -2
- package/lib/typescript-reporter/extension/vue/TypeScriptVueExtension.d.ts +0 -4
- package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionConfiguration.d.ts +0 -7
- package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionOptions.js +0 -2
- package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionSupport.d.ts +0 -3
- 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 -82
- package/lib/typescript-reporter/file-system/PassiveFileSystem.d.ts +0 -9
- package/lib/typescript-reporter/file-system/PassiveFileSystem.js +0 -69
- package/lib/typescript-reporter/file-system/RealFileSystem.d.ts +0 -8
- package/lib/typescript-reporter/file-system/RealFileSystem.js +0 -180
- package/lib/typescript-reporter/issue/TypeScriptIssueFactory.d.ts +0 -4
- package/lib/typescript-reporter/issue/TypeScriptIssueFactory.js +0 -57
- package/lib/typescript-reporter/profile/TypeScriptPerformance.d.ts +0 -10
- package/lib/typescript-reporter/profile/TypeScriptPerformance.js +0 -34
- package/lib/typescript-reporter/reporter/ControlledCompilerHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledCompilerHost.js +0 -14
- package/lib/typescript-reporter/reporter/ControlledTypeScriptSystem.js +0 -218
- package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.js +0 -29
- package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.js +0 -51
- package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.d.ts +0 -8
- package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.js +0 -142
- package/lib/typescript-reporter/reporter/TypeScriptReporter.d.ts +0 -4
- package/lib/typescript-reporter/reporter/TypeScriptReporter.js +0 -376
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.d.ts +0 -4
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.js +0 -14
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.d.ts +0 -1
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.js +0 -11
- package/lib/utils/array/flatten.d.ts +0 -2
- package/lib/utils/array/flatten.js +0 -6
- package/lib/utils/array/intersect.d.ts +0 -2
- package/lib/utils/array/intersect.js +0 -6
- package/lib/utils/array/substract.d.ts +0 -2
- package/lib/utils/array/substract.js +0 -6
- package/lib/utils/array/unique.d.ts +0 -2
- package/lib/utils/array/unique.js +0 -6
- package/lib/watch/WatchFileSystem.js +0 -2
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fork-ts-checker-webpack-plugin",
|
|
3
|
-
"version": "7.0.0
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Runs typescript type checker and linter on separate process.",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"fast",
|
|
7
|
-
"fork",
|
|
8
|
-
"linter",
|
|
9
6
|
"webpack",
|
|
10
7
|
"plugin",
|
|
11
|
-
"ts-loader",
|
|
12
8
|
"typescript",
|
|
13
|
-
"
|
|
9
|
+
"typecheck",
|
|
10
|
+
"ts-loader",
|
|
11
|
+
"webpack",
|
|
12
|
+
"fork",
|
|
13
|
+
"fast"
|
|
14
14
|
],
|
|
15
15
|
"bugs": {
|
|
16
16
|
"url": "https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues"
|
|
@@ -55,25 +55,30 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@babel/code-frame": "^7.
|
|
58
|
+
"@babel/code-frame": "^7.16.7",
|
|
59
59
|
"chalk": "^4.1.2",
|
|
60
|
-
"chokidar": "^3.5.
|
|
61
|
-
"cosmiconfig": "^7.0.
|
|
60
|
+
"chokidar": "^3.5.3",
|
|
61
|
+
"cosmiconfig": "^7.0.1",
|
|
62
62
|
"deepmerge": "^4.2.2",
|
|
63
63
|
"fs-extra": "^10.0.0",
|
|
64
|
-
"
|
|
65
|
-
"memfs": "^3.2.2",
|
|
64
|
+
"memfs": "^3.4.1",
|
|
66
65
|
"minimatch": "^3.0.4",
|
|
67
|
-
"schema-utils": "
|
|
66
|
+
"schema-utils": "4.0.0",
|
|
68
67
|
"semver": "^7.3.5",
|
|
69
|
-
"tapable": "^2.
|
|
68
|
+
"tapable": "^2.2.1"
|
|
70
69
|
},
|
|
71
70
|
"peerDependencies": {
|
|
71
|
+
"typescript": ">3.6.0",
|
|
72
72
|
"webpack": "^5.11.0",
|
|
73
|
-
"
|
|
73
|
+
"vue-template-compiler": "*"
|
|
74
|
+
},
|
|
75
|
+
"peerDependenciesMeta": {
|
|
76
|
+
"vue-template-compiler": {
|
|
77
|
+
"optional": true
|
|
78
|
+
}
|
|
74
79
|
},
|
|
75
80
|
"devDependencies": {
|
|
76
|
-
"@commitlint/config-conventional": "^
|
|
81
|
+
"@commitlint/config-conventional": "^16.0.0",
|
|
77
82
|
"@semantic-release/commit-analyzer": "^8.0.1",
|
|
78
83
|
"@semantic-release/exec": "^5.0.0",
|
|
79
84
|
"@semantic-release/github": "^7.2.3",
|
|
@@ -81,37 +86,38 @@
|
|
|
81
86
|
"@semantic-release/release-notes-generator": "^9.0.3",
|
|
82
87
|
"@types/babel__code-frame": "^7.0.3",
|
|
83
88
|
"@types/cross-spawn": "^6.0.2",
|
|
84
|
-
"@types/fs-extra": "^9.0.
|
|
85
|
-
"@types/jest": "^
|
|
89
|
+
"@types/fs-extra": "^9.0.13",
|
|
90
|
+
"@types/jest": "^27.4.0",
|
|
86
91
|
"@types/json-schema": "^7.0.9",
|
|
87
92
|
"@types/minimatch": "^3.0.5",
|
|
88
93
|
"@types/mock-fs": "^4.13.1",
|
|
89
94
|
"@types/node": "^16.4.13",
|
|
90
|
-
"@types/rimraf": "^3.0.
|
|
91
|
-
"@types/semver": "^7.3.
|
|
92
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
93
|
-
"@typescript-eslint/parser": "^
|
|
94
|
-
"commitlint": "^
|
|
95
|
+
"@types/rimraf": "^3.0.2",
|
|
96
|
+
"@types/semver": "^7.3.9",
|
|
97
|
+
"@typescript-eslint/eslint-plugin": "^5.10.1",
|
|
98
|
+
"@typescript-eslint/parser": "^5.10.1",
|
|
99
|
+
"commitlint": "^16.1.0",
|
|
95
100
|
"cross-env": "^7.0.3",
|
|
96
|
-
"eslint": "^
|
|
97
|
-
"eslint-
|
|
101
|
+
"eslint": "^8.8.0",
|
|
102
|
+
"eslint-plugin-import": "^2.25.4",
|
|
98
103
|
"eslint-plugin-node": "^11.1.0",
|
|
99
|
-
"eslint-plugin-prettier": "^
|
|
100
|
-
"git-cz": "^4.
|
|
101
|
-
"husky": "^7.0.
|
|
102
|
-
"jest": "^27.
|
|
103
|
-
"jest-circus": "^27.
|
|
104
|
-
"jest-environment-node": "^27.
|
|
104
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
105
|
+
"git-cz": "^4.8.0",
|
|
106
|
+
"husky": "^7.0.4",
|
|
107
|
+
"jest": "^27.4.7",
|
|
108
|
+
"jest-circus": "^27.4.6",
|
|
109
|
+
"jest-environment-node": "^27.4.6",
|
|
110
|
+
"json-schema": "^0.3.0",
|
|
105
111
|
"karton": "^0.4.1",
|
|
106
112
|
"lint-staged": "^11.1.2",
|
|
107
|
-
"mock-fs": "^5.
|
|
108
|
-
"prettier": "^2.
|
|
113
|
+
"mock-fs": "^5.1.2",
|
|
114
|
+
"prettier": "^2.5.1",
|
|
109
115
|
"rimraf": "^3.0.2",
|
|
110
116
|
"semantic-release": "^17.4.4",
|
|
111
117
|
"strip-ansi": "^6.0.0",
|
|
112
|
-
"ts-jest": "^27.
|
|
113
|
-
"typescript": "^4.
|
|
114
|
-
"webpack": "^5.
|
|
118
|
+
"ts-jest": "^27.1.3",
|
|
119
|
+
"typescript": "^4.5.5",
|
|
120
|
+
"webpack": "^5.67.0"
|
|
115
121
|
},
|
|
116
122
|
"engines": {
|
|
117
123
|
"node": ">=12.13.0",
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ForkTsCheckerWebpackPlugin = void 0;
|
|
7
|
-
const schema_utils_1 = require("schema-utils");
|
|
8
|
-
const cosmiconfig_1 = require("cosmiconfig");
|
|
9
|
-
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
10
|
-
const ForkTsCheckerWebpackPluginOptions_json_1 = __importDefault(require("./ForkTsCheckerWebpackPluginOptions.json"));
|
|
11
|
-
const ForkTsCheckerWebpackPluginConfiguration_1 = require("./ForkTsCheckerWebpackPluginConfiguration");
|
|
12
|
-
const ForkTsCheckerWebpackPluginState_1 = require("./ForkTsCheckerWebpackPluginState");
|
|
13
|
-
const TypeScriptSupport_1 = require("./typescript-reporter/TypeScriptSupport");
|
|
14
|
-
const TypeScriptReporterRpcClient_1 = require("./typescript-reporter/reporter/TypeScriptReporterRpcClient");
|
|
15
|
-
const tapStartToConnectAndRunReporter_1 = require("./hooks/tapStartToConnectAndRunReporter");
|
|
16
|
-
const tapStopToDisconnectReporter_1 = require("./hooks/tapStopToDisconnectReporter");
|
|
17
|
-
const tapAfterCompileToAddDependencies_1 = require("./hooks/tapAfterCompileToAddDependencies");
|
|
18
|
-
const tapErrorToLogMessage_1 = require("./hooks/tapErrorToLogMessage");
|
|
19
|
-
const pluginHooks_1 = require("./hooks/pluginHooks");
|
|
20
|
-
const tapAfterEnvironmentToPatchWatching_1 = require("./hooks/tapAfterEnvironmentToPatchWatching");
|
|
21
|
-
const pool_1 = require("./utils/async/pool");
|
|
22
|
-
const os_1 = __importDefault(require("os"));
|
|
23
|
-
class ForkTsCheckerWebpackPlugin {
|
|
24
|
-
constructor(options = {}) {
|
|
25
|
-
const explorerSync = cosmiconfig_1.cosmiconfigSync('fork-ts-checker');
|
|
26
|
-
const { config: externalOptions } = explorerSync.search() || {};
|
|
27
|
-
// first validate options directly passed to the constructor
|
|
28
|
-
const configuration = { name: 'ForkTsCheckerWebpackPlugin' };
|
|
29
|
-
schema_utils_1.validate(ForkTsCheckerWebpackPluginOptions_json_1.default, options, configuration);
|
|
30
|
-
this.options = deepmerge_1.default(externalOptions || {}, options || {});
|
|
31
|
-
// then validate merged options
|
|
32
|
-
schema_utils_1.validate(ForkTsCheckerWebpackPluginOptions_json_1.default, this.options, configuration);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Use ForkTsCheckerWebpackPlugin.issuesPool instead
|
|
36
|
-
*/
|
|
37
|
-
static get pool() {
|
|
38
|
-
// for backward compatibility
|
|
39
|
-
return ForkTsCheckerWebpackPlugin.issuesPool;
|
|
40
|
-
}
|
|
41
|
-
static getCompilerHooks(compiler) {
|
|
42
|
-
return pluginHooks_1.getForkTsCheckerWebpackPluginHooks(compiler);
|
|
43
|
-
}
|
|
44
|
-
apply(compiler) {
|
|
45
|
-
const configuration = ForkTsCheckerWebpackPluginConfiguration_1.createForkTsCheckerWebpackPluginConfiguration(compiler, this.options);
|
|
46
|
-
const state = ForkTsCheckerWebpackPluginState_1.createForkTsCheckerWebpackPluginState();
|
|
47
|
-
TypeScriptSupport_1.assertTypeScriptSupport(configuration.typescript);
|
|
48
|
-
const issuesReporter = TypeScriptReporterRpcClient_1.createTypeScriptReporterRpcClient(configuration.typescript);
|
|
49
|
-
const dependenciesReporter = TypeScriptReporterRpcClient_1.createTypeScriptReporterRpcClient(configuration.typescript);
|
|
50
|
-
tapAfterEnvironmentToPatchWatching_1.tapAfterEnvironmentToPatchWatching(compiler, state);
|
|
51
|
-
tapStartToConnectAndRunReporter_1.tapStartToConnectAndRunReporter(compiler, issuesReporter, dependenciesReporter, configuration, state);
|
|
52
|
-
tapAfterCompileToAddDependencies_1.tapAfterCompileToAddDependencies(compiler, configuration, state);
|
|
53
|
-
tapStopToDisconnectReporter_1.tapStopToDisconnectReporter(compiler, issuesReporter, dependenciesReporter, state);
|
|
54
|
-
tapErrorToLogMessage_1.tapErrorToLogMessage(compiler, configuration);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.ForkTsCheckerWebpackPlugin = ForkTsCheckerWebpackPlugin;
|
|
58
|
-
/**
|
|
59
|
-
* Current version of the plugin
|
|
60
|
-
*/
|
|
61
|
-
ForkTsCheckerWebpackPlugin.version = '7.0.0-alpha.9'; // will be replaced by the @semantic-release/exec
|
|
62
|
-
/**
|
|
63
|
-
* Default pools for the plugin concurrency limit
|
|
64
|
-
*/
|
|
65
|
-
ForkTsCheckerWebpackPlugin.issuesPool = pool_1.createPool(Math.max(1, os_1.default.cpus().length));
|
|
66
|
-
ForkTsCheckerWebpackPlugin.dependenciesPool = pool_1.createPool(Math.max(1, os_1.default.cpus().length));
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { ForkTsCheckerWebpackPluginOptions } from './ForkTsCheckerWebpackPluginOptions';
|
|
3
|
-
import { IssueConfiguration } from './issue/IssueConfiguration';
|
|
4
|
-
import { FormatterConfiguration } from './formatter';
|
|
5
|
-
import { TypeScriptReporterConfiguration } from './typescript-reporter/TypeScriptReporterConfiguration';
|
|
6
|
-
import { LoggerConfiguration } from './logger/LoggerConfiguration';
|
|
7
|
-
interface ForkTsCheckerWebpackPluginConfiguration {
|
|
8
|
-
async: boolean;
|
|
9
|
-
typescript: TypeScriptReporterConfiguration;
|
|
10
|
-
issue: IssueConfiguration;
|
|
11
|
-
formatter: FormatterConfiguration;
|
|
12
|
-
logger: LoggerConfiguration;
|
|
13
|
-
}
|
|
14
|
-
declare function createForkTsCheckerWebpackPluginConfiguration(compiler: webpack.Compiler, options?: ForkTsCheckerWebpackPluginOptions): ForkTsCheckerWebpackPluginConfiguration;
|
|
15
|
-
export { ForkTsCheckerWebpackPluginConfiguration, createForkTsCheckerWebpackPluginConfiguration };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createForkTsCheckerWebpackPluginConfiguration = void 0;
|
|
4
|
-
const IssueConfiguration_1 = require("./issue/IssueConfiguration");
|
|
5
|
-
const formatter_1 = require("./formatter");
|
|
6
|
-
const TypeScriptReporterConfiguration_1 = require("./typescript-reporter/TypeScriptReporterConfiguration");
|
|
7
|
-
const LoggerConfiguration_1 = require("./logger/LoggerConfiguration");
|
|
8
|
-
function createForkTsCheckerWebpackPluginConfiguration(compiler, options = {}) {
|
|
9
|
-
return {
|
|
10
|
-
async: options.async === undefined ? compiler.options.mode === 'development' : options.async,
|
|
11
|
-
typescript: TypeScriptReporterConfiguration_1.createTypeScriptReporterConfiguration(compiler, options.typescript),
|
|
12
|
-
issue: IssueConfiguration_1.createIssueConfiguration(compiler, options.issue),
|
|
13
|
-
formatter: formatter_1.createFormatterConfiguration(options.formatter),
|
|
14
|
-
logger: LoggerConfiguration_1.createLoggerConfiguration(compiler, options.logger),
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
exports.createForkTsCheckerWebpackPluginConfiguration = createForkTsCheckerWebpackPluginConfiguration;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TypeScriptReporterOptions } from './typescript-reporter/TypeScriptReporterOptions';
|
|
2
|
-
import { IssueOptions } from './issue/IssueOptions';
|
|
3
|
-
import { FormatterOptions } from './formatter';
|
|
4
|
-
import LoggerOptions from './logger/LoggerOptions';
|
|
5
|
-
interface ForkTsCheckerWebpackPluginOptions {
|
|
6
|
-
async?: boolean;
|
|
7
|
-
typescript?: TypeScriptReporterOptions;
|
|
8
|
-
formatter?: FormatterOptions;
|
|
9
|
-
issue?: IssueOptions;
|
|
10
|
-
logger?: LoggerOptions;
|
|
11
|
-
}
|
|
12
|
-
export { ForkTsCheckerWebpackPluginOptions };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FullTap } from 'tapable';
|
|
2
|
-
import { FilesMatch, Report } from './reporter';
|
|
3
|
-
import { Issue } from './issue';
|
|
4
|
-
interface ForkTsCheckerWebpackPluginState {
|
|
5
|
-
issuesReportPromise: Promise<Report | undefined>;
|
|
6
|
-
dependenciesReportPromise: Promise<Report | undefined>;
|
|
7
|
-
issuesPromise: Promise<Issue[] | undefined>;
|
|
8
|
-
dependenciesPromise: Promise<FilesMatch | undefined>;
|
|
9
|
-
lastDependencies: FilesMatch | undefined;
|
|
10
|
-
watching: boolean;
|
|
11
|
-
initialized: boolean;
|
|
12
|
-
webpackDevServerDoneTap: FullTap | undefined;
|
|
13
|
-
}
|
|
14
|
-
declare function createForkTsCheckerWebpackPluginState(): ForkTsCheckerWebpackPluginState;
|
|
15
|
-
export { ForkTsCheckerWebpackPluginState, createForkTsCheckerWebpackPluginState };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OperationCanceledError = void 0;
|
|
4
|
-
class OperationCanceledError extends Error {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.canceled = true;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.OperationCanceledError = OperationCanceledError;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { FormatterOptions } from './FormatterOptions';
|
|
2
|
-
import { Formatter } from './Formatter';
|
|
3
|
-
declare type FormatterConfiguration = Formatter;
|
|
4
|
-
declare function createFormatterConfiguration(options: FormatterOptions | undefined): FormatterConfiguration;
|
|
5
|
-
export { FormatterConfiguration, createFormatterConfiguration };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { ForkTsCheckerWebpackPluginConfiguration } from '../ForkTsCheckerWebpackPluginConfiguration';
|
|
3
|
-
import { ForkTsCheckerWebpackPluginState } from '../ForkTsCheckerWebpackPluginState';
|
|
4
|
-
declare function interceptDoneToGetWebpackDevServerTap(compiler: webpack.Compiler, configuration: ForkTsCheckerWebpackPluginConfiguration, state: ForkTsCheckerWebpackPluginState): void;
|
|
5
|
-
export { interceptDoneToGetWebpackDevServerTap };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.interceptDoneToGetWebpackDevServerTap = void 0;
|
|
4
|
-
function interceptDoneToGetWebpackDevServerTap(compiler, configuration, state) {
|
|
5
|
-
// inspired by https://github.com/ypresto/fork-ts-checker-async-overlay-webpack-plugin
|
|
6
|
-
compiler.hooks.done.intercept({
|
|
7
|
-
register: (tap) => {
|
|
8
|
-
if (tap.name === 'webpack-dev-server' &&
|
|
9
|
-
tap.type === 'sync' &&
|
|
10
|
-
configuration.logger.devServer) {
|
|
11
|
-
state.webpackDevServerDoneTap = tap;
|
|
12
|
-
}
|
|
13
|
-
return tap;
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
exports.interceptDoneToGetWebpackDevServerTap = interceptDoneToGetWebpackDevServerTap;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { ForkTsCheckerWebpackPluginConfiguration } from '../ForkTsCheckerWebpackPluginConfiguration';
|
|
3
|
-
import { ForkTsCheckerWebpackPluginState } from '../ForkTsCheckerWebpackPluginState';
|
|
4
|
-
declare function tapAfterCompileToAddDependencies(compiler: webpack.Compiler, configuration: ForkTsCheckerWebpackPluginConfiguration, state: ForkTsCheckerWebpackPluginState): void;
|
|
5
|
-
export { tapAfterCompileToAddDependencies };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { ForkTsCheckerWebpackPluginConfiguration } from '../ForkTsCheckerWebpackPluginConfiguration';
|
|
3
|
-
import { ForkTsCheckerWebpackPluginState } from '../ForkTsCheckerWebpackPluginState';
|
|
4
|
-
declare function tapAfterCompileToGetIssues(compiler: webpack.Compiler, configuration: ForkTsCheckerWebpackPluginConfiguration, state: ForkTsCheckerWebpackPluginState): void;
|
|
5
|
-
export { tapAfterCompileToGetIssues };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { ForkTsCheckerWebpackPluginConfiguration } from '../ForkTsCheckerWebpackPluginConfiguration';
|
|
3
|
-
import { ForkTsCheckerWebpackPluginState } from '../ForkTsCheckerWebpackPluginState';
|
|
4
|
-
declare function tapDoneToAsyncGetIssues(compiler: webpack.Compiler, configuration: ForkTsCheckerWebpackPluginConfiguration, state: ForkTsCheckerWebpackPluginState): void;
|
|
5
|
-
export { tapDoneToAsyncGetIssues };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { ForkTsCheckerWebpackPluginConfiguration } from '../ForkTsCheckerWebpackPluginConfiguration';
|
|
3
|
-
declare function tapErrorToLogMessage(compiler: webpack.Compiler, configuration: ForkTsCheckerWebpackPluginConfiguration): void;
|
|
4
|
-
export { tapErrorToLogMessage };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { ForkTsCheckerWebpackPluginConfiguration } from '../ForkTsCheckerWebpackPluginConfiguration';
|
|
3
|
-
import { ForkTsCheckerWebpackPluginState } from '../ForkTsCheckerWebpackPluginState';
|
|
4
|
-
import { ReporterRpcClient } from '../reporter';
|
|
5
|
-
declare function tapStartToConnectAndRunReporter(compiler: webpack.Compiler, issuesReporter: ReporterRpcClient, dependenciesReporter: ReporterRpcClient, configuration: ForkTsCheckerWebpackPluginConfiguration, state: ForkTsCheckerWebpackPluginState): void;
|
|
6
|
-
export { tapStartToConnectAndRunReporter };
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.tapStartToConnectAndRunReporter = void 0;
|
|
13
|
-
const pluginHooks_1 = require("./pluginHooks");
|
|
14
|
-
const reporter_1 = require("../reporter");
|
|
15
|
-
const OperationCanceledError_1 = require("../error/OperationCanceledError");
|
|
16
|
-
const tapDoneToAsyncGetIssues_1 = require("./tapDoneToAsyncGetIssues");
|
|
17
|
-
const tapAfterCompileToGetIssues_1 = require("./tapAfterCompileToGetIssues");
|
|
18
|
-
const interceptDoneToGetWebpackDevServerTap_1 = require("./interceptDoneToGetWebpackDevServerTap");
|
|
19
|
-
const ForkTsCheckerWebpackPlugin_1 = require("../ForkTsCheckerWebpackPlugin");
|
|
20
|
-
function tapStartToConnectAndRunReporter(compiler, issuesReporter, dependenciesReporter, configuration, state) {
|
|
21
|
-
const hooks = pluginHooks_1.getForkTsCheckerWebpackPluginHooks(compiler);
|
|
22
|
-
compiler.hooks.run.tap('ForkTsCheckerWebpackPlugin', () => {
|
|
23
|
-
if (!state.initialized) {
|
|
24
|
-
state.initialized = true;
|
|
25
|
-
state.watching = false;
|
|
26
|
-
tapAfterCompileToGetIssues_1.tapAfterCompileToGetIssues(compiler, configuration, state);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
compiler.hooks.watchRun.tap('ForkTsCheckerWebpackPlugin', () => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
if (!state.initialized) {
|
|
31
|
-
state.initialized = true;
|
|
32
|
-
state.watching = true;
|
|
33
|
-
if (configuration.async) {
|
|
34
|
-
tapDoneToAsyncGetIssues_1.tapDoneToAsyncGetIssues(compiler, configuration, state);
|
|
35
|
-
interceptDoneToGetWebpackDevServerTap_1.interceptDoneToGetWebpackDevServerTap(compiler, configuration, state);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
tapAfterCompileToGetIssues_1.tapAfterCompileToGetIssues(compiler, configuration, state);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}));
|
|
42
|
-
compiler.hooks.compilation.tap('ForkTsCheckerWebpackPlugin', (compilation) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
if (compilation.compiler !== compiler) {
|
|
44
|
-
// run only for the compiler that the plugin was registered for
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
let change = {};
|
|
48
|
-
if (state.watching) {
|
|
49
|
-
change = reporter_1.getFilesChange(compiler);
|
|
50
|
-
configuration.logger.infrastructure.log([
|
|
51
|
-
'Calling reporter service for incremental check.',
|
|
52
|
-
` Changed files: ${JSON.stringify(change.changedFiles)}`,
|
|
53
|
-
` Deleted files: ${JSON.stringify(change.deletedFiles)}`,
|
|
54
|
-
].join('\n'));
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
configuration.logger.infrastructure.log('Calling reporter service for single check.');
|
|
58
|
-
}
|
|
59
|
-
let resolveDependencies;
|
|
60
|
-
let rejectDependencies;
|
|
61
|
-
let resolveIssues;
|
|
62
|
-
let rejectIssues;
|
|
63
|
-
state.dependenciesPromise = new Promise((resolve, reject) => {
|
|
64
|
-
resolveDependencies = resolve;
|
|
65
|
-
rejectDependencies = reject;
|
|
66
|
-
});
|
|
67
|
-
state.issuesPromise = new Promise((resolve, reject) => {
|
|
68
|
-
resolveIssues = resolve;
|
|
69
|
-
rejectIssues = reject;
|
|
70
|
-
});
|
|
71
|
-
const previousIssuesReportPromise = state.issuesReportPromise;
|
|
72
|
-
const previousDependenciesReportPromise = state.dependenciesReportPromise;
|
|
73
|
-
change = yield hooks.start.promise(change, compilation);
|
|
74
|
-
state.issuesReportPromise = ForkTsCheckerWebpackPlugin_1.ForkTsCheckerWebpackPlugin.issuesPool.submit((done) =>
|
|
75
|
-
// eslint-disable-next-line no-async-promise-executor
|
|
76
|
-
new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
try {
|
|
78
|
-
yield issuesReporter.connect();
|
|
79
|
-
const previousReport = yield previousIssuesReportPromise;
|
|
80
|
-
if (previousReport) {
|
|
81
|
-
yield previousReport.close();
|
|
82
|
-
}
|
|
83
|
-
const report = yield issuesReporter.getReport(change, state.watching);
|
|
84
|
-
resolve(report);
|
|
85
|
-
report.getIssues().then(resolveIssues).catch(rejectIssues).finally(done);
|
|
86
|
-
}
|
|
87
|
-
catch (error) {
|
|
88
|
-
if (error instanceof OperationCanceledError_1.OperationCanceledError) {
|
|
89
|
-
hooks.canceled.call(compilation);
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
hooks.error.call(error, compilation);
|
|
93
|
-
}
|
|
94
|
-
resolve(undefined);
|
|
95
|
-
resolveIssues(undefined);
|
|
96
|
-
done();
|
|
97
|
-
}
|
|
98
|
-
})));
|
|
99
|
-
state.dependenciesReportPromise = ForkTsCheckerWebpackPlugin_1.ForkTsCheckerWebpackPlugin.dependenciesPool.submit((done) =>
|
|
100
|
-
// eslint-disable-next-line no-async-promise-executor
|
|
101
|
-
new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
try {
|
|
103
|
-
yield dependenciesReporter.connect();
|
|
104
|
-
const previousReport = yield previousDependenciesReportPromise;
|
|
105
|
-
if (previousReport) {
|
|
106
|
-
yield previousReport.close();
|
|
107
|
-
}
|
|
108
|
-
const report = yield dependenciesReporter.getReport(change, state.watching);
|
|
109
|
-
resolve(report);
|
|
110
|
-
report
|
|
111
|
-
.getDependencies()
|
|
112
|
-
.then(resolveDependencies)
|
|
113
|
-
.catch(rejectDependencies)
|
|
114
|
-
.finally(done);
|
|
115
|
-
}
|
|
116
|
-
catch (error) {
|
|
117
|
-
if (error instanceof OperationCanceledError_1.OperationCanceledError) {
|
|
118
|
-
hooks.canceled.call(compilation);
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
hooks.error.call(error, compilation);
|
|
122
|
-
}
|
|
123
|
-
resolve(undefined);
|
|
124
|
-
resolveDependencies(undefined);
|
|
125
|
-
done();
|
|
126
|
-
}
|
|
127
|
-
})));
|
|
128
|
-
}));
|
|
129
|
-
}
|
|
130
|
-
exports.tapStartToConnectAndRunReporter = tapStartToConnectAndRunReporter;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { ForkTsCheckerWebpackPluginState } from '../ForkTsCheckerWebpackPluginState';
|
|
3
|
-
import { ReporterRpcClient } from '../reporter';
|
|
4
|
-
declare function tapStopToDisconnectReporter(compiler: webpack.Compiler, issuesReporter: ReporterRpcClient, dependenciesReporter: ReporterRpcClient, state: ForkTsCheckerWebpackPluginState): void;
|
|
5
|
-
export { tapStopToDisconnectReporter };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.tapStopToDisconnectReporter = void 0;
|
|
13
|
-
function tapStopToDisconnectReporter(compiler, issuesReporter, dependenciesReporter, state) {
|
|
14
|
-
compiler.hooks.watchClose.tap('ForkTsCheckerWebpackPlugin', () => {
|
|
15
|
-
issuesReporter.disconnect();
|
|
16
|
-
dependenciesReporter.disconnect();
|
|
17
|
-
});
|
|
18
|
-
compiler.hooks.done.tap('ForkTsCheckerWebpackPlugin', () => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
if (!state.watching) {
|
|
20
|
-
yield Promise.all([issuesReporter.disconnect(), dependenciesReporter.disconnect()]);
|
|
21
|
-
}
|
|
22
|
-
}));
|
|
23
|
-
compiler.hooks.failed.tap('ForkTsCheckerWebpackPlugin', () => {
|
|
24
|
-
if (!state.watching) {
|
|
25
|
-
issuesReporter.disconnect();
|
|
26
|
-
dependenciesReporter.disconnect();
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
exports.tapStopToDisconnectReporter = tapStopToDisconnectReporter;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import { IssuePredicate } from './IssuePredicate';
|
|
3
|
-
import { IssueOptions } from './IssueOptions';
|
|
4
|
-
interface IssueConfiguration {
|
|
5
|
-
predicate: IssuePredicate;
|
|
6
|
-
}
|
|
7
|
-
declare function createIssueConfiguration(compiler: webpack.Compiler, options: IssueOptions | undefined): IssueConfiguration;
|
|
8
|
-
export { IssueConfiguration, createIssueConfiguration };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createIssueConfiguration = void 0;
|
|
4
|
-
const IssueMatch_1 = require("./IssueMatch");
|
|
5
|
-
const IssuePredicate_1 = require("./IssuePredicate");
|
|
6
|
-
function createIssuePredicateFromOption(context, option) {
|
|
7
|
-
if (Array.isArray(option)) {
|
|
8
|
-
return IssuePredicate_1.composeIssuePredicates(option.map((option) => typeof option === 'function' ? option : IssueMatch_1.createIssuePredicateFromIssueMatch(context, option)));
|
|
9
|
-
}
|
|
10
|
-
return typeof option === 'function'
|
|
11
|
-
? option
|
|
12
|
-
: IssueMatch_1.createIssuePredicateFromIssueMatch(context, option);
|
|
13
|
-
}
|
|
14
|
-
function createIssueConfiguration(compiler, options) {
|
|
15
|
-
const context = compiler.options.context || process.cwd();
|
|
16
|
-
if (!options) {
|
|
17
|
-
options = {};
|
|
18
|
-
}
|
|
19
|
-
const include = options.include
|
|
20
|
-
? createIssuePredicateFromOption(context, options.include)
|
|
21
|
-
: IssuePredicate_1.createTrivialIssuePredicate(true);
|
|
22
|
-
const exclude = options.exclude
|
|
23
|
-
? createIssuePredicateFromOption(context, options.exclude)
|
|
24
|
-
: IssuePredicate_1.createTrivialIssuePredicate(false);
|
|
25
|
-
return {
|
|
26
|
-
predicate: (issue) => include(issue) && !exclude(issue),
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
exports.createIssueConfiguration = createIssueConfiguration;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import LoggerOptions from './LoggerOptions';
|
|
2
|
-
import Logger from './Logger';
|
|
3
|
-
import webpack from 'webpack';
|
|
4
|
-
interface LoggerConfiguration {
|
|
5
|
-
infrastructure: Logger;
|
|
6
|
-
issues: Logger;
|
|
7
|
-
devServer: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare function createLoggerConfiguration(compiler: webpack.Compiler, options: LoggerOptions | undefined): LoggerConfiguration;
|
|
10
|
-
export { LoggerConfiguration, createLoggerConfiguration };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createLoggerConfiguration = void 0;
|
|
4
|
-
const LoggerFactory_1 = require("./LoggerFactory");
|
|
5
|
-
function createLoggerConfiguration(compiler, options) {
|
|
6
|
-
return {
|
|
7
|
-
infrastructure: LoggerFactory_1.createLogger((options && options.infrastructure) || 'webpack-infrastructure', compiler),
|
|
8
|
-
issues: LoggerFactory_1.createLogger((options && options.issues) || 'console', compiler),
|
|
9
|
-
devServer: (options === null || options === void 0 ? void 0 : options.devServer) !== false,
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
exports.createLoggerConfiguration = createLoggerConfiguration;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
import Logger from './Logger';
|
|
3
|
-
declare type LoggerType = 'console' | 'webpack-infrastructure' | 'silent';
|
|
4
|
-
declare function createLogger(type: LoggerType | Logger, compiler: webpack.Compiler): Logger;
|
|
5
|
-
export { createLogger, LoggerType };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createLogger = void 0;
|
|
4
|
-
const WebpackInfrastructureLogger_1 = require("./WebpackInfrastructureLogger");
|
|
5
|
-
const PartialLogger_1 = require("./PartialLogger");
|
|
6
|
-
function createLogger(type, compiler) {
|
|
7
|
-
if (typeof type !== 'string') {
|
|
8
|
-
return type;
|
|
9
|
-
}
|
|
10
|
-
switch (type) {
|
|
11
|
-
case 'webpack-infrastructure':
|
|
12
|
-
return (WebpackInfrastructureLogger_1.createWebpackInfrastructureLogger(compiler) ||
|
|
13
|
-
PartialLogger_1.createPartialLogger(['log', 'error'], console));
|
|
14
|
-
case 'silent':
|
|
15
|
-
return PartialLogger_1.createPartialLogger([], console);
|
|
16
|
-
case 'console':
|
|
17
|
-
default:
|
|
18
|
-
return console;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.createLogger = createLogger;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPartialLogger = void 0;
|
|
4
|
-
function createPartialLogger(methods, logger) {
|
|
5
|
-
return {
|
|
6
|
-
info: (message) => (methods.includes('info') ? logger.info(message) : undefined),
|
|
7
|
-
log: (message) => (methods.includes('log') ? logger.log(message) : undefined),
|
|
8
|
-
error: (message) => (methods.includes('error') ? logger.error(message) : undefined),
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
exports.createPartialLogger = createPartialLogger;
|