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.
Files changed (285) hide show
  1. package/README.md +39 -24
  2. package/lib/files-change.d.ts +17 -0
  3. package/lib/{reporter/FilesChange.js → files-change.js} +20 -13
  4. package/lib/{reporter/FilesMatch.d.ts → files-match.d.ts} +0 -0
  5. package/lib/{ForkTsCheckerWebpackPluginOptions.js → files-match.js} +0 -0
  6. package/lib/formatter/{BasicFormatter.d.ts → basic-formatter.d.ts} +1 -1
  7. package/lib/formatter/{BasicFormatter.js → basic-formatter.js} +0 -0
  8. package/lib/formatter/{CodeFrameFormatter.d.ts → code-frame-formatter.d.ts} +1 -1
  9. package/lib/formatter/{CodeFrameFormatter.js → code-frame-formatter.js} +4 -4
  10. package/lib/formatter/formatter-config.d.ts +5 -0
  11. package/lib/formatter/{FormatterConfiguration.js → formatter-config.js} +8 -8
  12. package/lib/formatter/{FormatterOptions.d.ts → formatter-options.d.ts} +2 -2
  13. package/lib/formatter/{Formatter.js → formatter-options.js} +0 -0
  14. package/lib/formatter/{Formatter.d.ts → formatter.d.ts} +1 -1
  15. package/lib/formatter/{FormatterOptions.js → formatter.js} +0 -0
  16. package/lib/formatter/index.d.ts +6 -6
  17. package/lib/formatter/index.js +6 -6
  18. package/lib/formatter/{WebpackFormatter.d.ts → webpack-formatter.d.ts} +1 -1
  19. package/lib/formatter/{WebpackFormatter.js → webpack-formatter.js} +3 -3
  20. package/lib/hooks/intercept-done-to-get-dev-server-tap.d.ts +5 -0
  21. package/lib/hooks/intercept-done-to-get-dev-server-tap.js +18 -0
  22. package/lib/hooks/tap-after-compile-to-add-dependencies.d.ts +5 -0
  23. package/lib/hooks/{tapAfterCompileToAddDependencies.js → tap-after-compile-to-add-dependencies.js} +4 -1
  24. package/lib/hooks/tap-after-compile-to-get-issues.d.ts +5 -0
  25. package/lib/hooks/{tapAfterCompileToGetIssues.js → tap-after-compile-to-get-issues.js} +9 -6
  26. package/lib/hooks/{tapAfterEnvironmentToPatchWatching.d.ts → tap-after-environment-to-patch-watching.d.ts} +2 -2
  27. package/lib/hooks/{tapAfterEnvironmentToPatchWatching.js → tap-after-environment-to-patch-watching.js} +8 -2
  28. package/lib/hooks/tap-done-to-async-get-issues.d.ts +5 -0
  29. package/lib/hooks/{tapDoneToAsyncGetIssues.js → tap-done-to-async-get-issues.js} +20 -21
  30. package/lib/hooks/tap-error-to-log-message.d.ts +4 -0
  31. package/lib/hooks/{tapErrorToLogMessage.js → tap-error-to-log-message.js} +8 -8
  32. package/lib/hooks/tap-start-to-run-workers.d.ts +8 -0
  33. package/lib/hooks/tap-start-to-run-workers.js +95 -0
  34. package/lib/hooks/tap-stop-to-terminate-workers.d.ts +5 -0
  35. package/lib/hooks/tap-stop-to-terminate-workers.js +26 -0
  36. package/lib/index.d.ts +1 -1
  37. package/lib/index.js +2 -2
  38. package/lib/infrastructure-logger.d.ts +9 -0
  39. package/lib/infrastructure-logger.js +14 -0
  40. package/lib/issue/index.d.ts +3 -3
  41. package/lib/issue/index.js +3 -3
  42. package/lib/issue/issue-config.d.ts +8 -0
  43. package/lib/issue/issue-config.js +29 -0
  44. package/lib/issue/{IssueLocation.d.ts → issue-location.d.ts} +1 -1
  45. package/lib/issue/{IssueLocation.js → issue-location.js} +3 -3
  46. package/lib/issue/{IssueMatch.d.ts → issue-match.d.ts} +2 -2
  47. package/lib/issue/{IssueMatch.js → issue-match.js} +3 -3
  48. package/lib/issue/{IssueOptions.d.ts → issue-options.d.ts} +2 -2
  49. package/lib/issue/{IssueOptions.js → issue-options.js} +0 -0
  50. package/lib/issue/{IssuePosition.d.ts → issue-position.d.ts} +0 -0
  51. package/lib/issue/{IssuePosition.js → issue-position.js} +0 -0
  52. package/lib/issue/{IssuePredicate.d.ts → issue-predicate.d.ts} +1 -1
  53. package/lib/issue/{IssuePredicate.js → issue-predicate.js} +0 -0
  54. package/lib/issue/{IssueSeverity.d.ts → issue-severity.d.ts} +0 -0
  55. package/lib/issue/{IssueSeverity.js → issue-severity.js} +0 -0
  56. package/lib/issue/{IssueWebpackError.d.ts → issue-webpack-error.d.ts} +1 -1
  57. package/lib/issue/{IssueWebpackError.js → issue-webpack-error.js} +5 -5
  58. package/lib/issue/{Issue.d.ts → issue.d.ts} +2 -2
  59. package/lib/issue/{Issue.js → issue.js} +5 -5
  60. package/lib/{logger/Logger.d.ts → logger.d.ts} +1 -2
  61. package/lib/{logger/Logger.js → logger.js} +0 -0
  62. package/lib/plugin-config.d.ts +16 -0
  63. package/lib/plugin-config.js +17 -0
  64. package/lib/{hooks/pluginHooks.d.ts → plugin-hooks.d.ts} +9 -9
  65. package/lib/{hooks/pluginHooks.js → plugin-hooks.js} +8 -8
  66. package/lib/plugin-options.d.ts +13 -0
  67. package/lib/{logger/LoggerOptions.js → plugin-options.js} +0 -0
  68. package/lib/{ForkTsCheckerWebpackPluginOptions.json → plugin-options.json} +9 -44
  69. package/lib/plugin-pools.d.ts +4 -0
  70. package/lib/plugin-pools.js +28 -0
  71. package/lib/plugin-state.d.ts +14 -0
  72. package/lib/{ForkTsCheckerWebpackPluginState.js → plugin-state.js} +4 -5
  73. package/lib/{ForkTsCheckerWebpackPlugin.d.ts → plugin.d.ts} +8 -9
  74. package/lib/plugin.js +82 -0
  75. package/lib/rpc/expose-rpc.d.ts +1 -0
  76. package/lib/rpc/expose-rpc.js +78 -0
  77. package/lib/rpc/index.d.ts +5 -7
  78. package/lib/rpc/index.js +10 -17
  79. package/lib/rpc/{rpc-ipc/error/RpcIpcMessagePortClosedError.d.ts → rpc-error.d.ts} +2 -3
  80. package/lib/rpc/rpc-error.js +12 -0
  81. package/lib/rpc/rpc-worker.d.ts +13 -0
  82. package/lib/rpc/rpc-worker.js +79 -0
  83. package/lib/rpc/types.d.ts +19 -0
  84. package/lib/{reporter/FilesMatch.js → rpc/types.js} +0 -0
  85. package/lib/rpc/wrap-rpc.d.ts +4 -0
  86. package/lib/rpc/wrap-rpc.js +96 -0
  87. package/lib/{typescript-reporter/extension/TypeScriptEmbeddedExtension.d.ts → typescript/extension/type-script-embedded-extension.d.ts} +1 -1
  88. package/lib/{typescript-reporter/extension/TypeScriptEmbeddedExtension.js → typescript/extension/type-script-embedded-extension.js} +3 -3
  89. package/lib/{typescript-reporter/extension/TypeScriptExtension.d.ts → typescript/extension/type-script-extension.d.ts} +2 -2
  90. package/lib/{reporter/Report.js → typescript/extension/type-script-extension.js} +0 -0
  91. package/lib/typescript/extension/vue/type-script-vue-extension-config.d.ts +7 -0
  92. package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtensionConfiguration.js → typescript/extension/vue/type-script-vue-extension-config.js} +3 -3
  93. package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtensionOptions.d.ts → typescript/extension/vue/type-script-vue-extension-options.d.ts} +0 -0
  94. package/lib/{reporter/Reporter.js → typescript/extension/vue/type-script-vue-extension-options.js} +0 -0
  95. package/lib/typescript/extension/vue/type-script-vue-extension-support.d.ts +3 -0
  96. package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtensionSupport.js → typescript/extension/vue/type-script-vue-extension-support.js} +3 -3
  97. package/lib/typescript/extension/vue/type-script-vue-extension.d.ts +4 -0
  98. package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtension.js → typescript/extension/vue/type-script-vue-extension.js} +4 -4
  99. package/lib/{typescript-reporter → typescript}/extension/vue/types/vue-template-compiler.d.ts +0 -0
  100. package/lib/{typescript-reporter → typescript}/extension/vue/types/vue-template-compiler.js +0 -0
  101. package/lib/{typescript-reporter → typescript}/extension/vue/types/vue__compiler-sfc.d.ts +0 -0
  102. package/lib/{typescript-reporter → typescript}/extension/vue/types/vue__compiler-sfc.js +0 -0
  103. package/lib/{typescript-reporter/TypeScriptConfigurationOverwrite.d.ts → typescript/type-script-config-overwrite.d.ts} +2 -2
  104. package/lib/{rpc/RpcHost.js → typescript/type-script-config-overwrite.js} +0 -0
  105. package/lib/{typescript-reporter/TypeScriptDiagnosticsOptions.d.ts → typescript/type-script-diagnostics-options.d.ts} +0 -0
  106. package/lib/{rpc/RpcMessagePort.js → typescript/type-script-diagnostics-options.js} +0 -0
  107. package/lib/typescript/type-script-support.d.ts +3 -0
  108. package/lib/{typescript-reporter/TypeScriptSupport.js → typescript/type-script-support.js} +10 -10
  109. package/lib/typescript/type-script-worker-config.d.ts +22 -0
  110. package/lib/{typescript-reporter/TypeScriptReporterConfiguration.js → typescript/type-script-worker-config.js} +5 -5
  111. package/lib/typescript/type-script-worker-options.d.ts +18 -0
  112. package/lib/{rpc/RpcProcedure.js → typescript/type-script-worker-options.js} +0 -0
  113. package/lib/typescript/worker/get-dependencies-worker.d.ts +5 -0
  114. package/lib/typescript/worker/get-dependencies-worker.js +18 -0
  115. package/lib/typescript/worker/get-issues-worker.d.ts +5 -0
  116. package/lib/typescript/worker/get-issues-worker.js +75 -0
  117. package/lib/typescript/worker/lib/artifacts.d.ts +4 -0
  118. package/lib/typescript/worker/lib/artifacts.js +90 -0
  119. package/lib/typescript/worker/lib/config.d.ts +14 -0
  120. package/lib/typescript/worker/lib/config.js +111 -0
  121. package/lib/typescript/worker/lib/dependencies.d.ts +3 -0
  122. package/lib/typescript/worker/lib/dependencies.js +87 -0
  123. package/lib/typescript/worker/lib/diagnostics.d.ts +7 -0
  124. package/lib/typescript/worker/lib/diagnostics.js +100 -0
  125. package/lib/typescript/worker/lib/extensions.d.ts +3 -0
  126. package/lib/typescript/worker/lib/extensions.js +11 -0
  127. package/lib/{typescript-reporter/file-system/FileSystem.d.ts → typescript/worker/lib/file-system/file-system.d.ts} +2 -3
  128. package/lib/{typescript-reporter/TypeScriptConfigurationOverwrite.js → typescript/worker/lib/file-system/file-system.js} +0 -0
  129. package/lib/typescript/worker/lib/file-system/mem-file-system.d.ts +5 -0
  130. package/lib/typescript/worker/lib/file-system/mem-file-system.js +78 -0
  131. package/lib/typescript/worker/lib/file-system/passive-file-system.d.ts +5 -0
  132. package/lib/typescript/worker/lib/file-system/passive-file-system.js +65 -0
  133. package/lib/typescript/worker/lib/file-system/real-file-system.d.ts +5 -0
  134. package/lib/typescript/worker/lib/file-system/real-file-system.js +187 -0
  135. package/lib/typescript/worker/lib/host/compiler-host.d.ts +2 -0
  136. package/lib/typescript/worker/lib/host/compiler-host.js +17 -0
  137. package/lib/typescript/worker/lib/host/watch-compiler-host.d.ts +2 -0
  138. package/lib/typescript/worker/lib/host/watch-compiler-host.js +32 -0
  139. package/lib/typescript/worker/lib/host/watch-solution-builder-host.d.ts +2 -0
  140. package/lib/typescript/worker/lib/host/watch-solution-builder-host.js +54 -0
  141. package/lib/typescript/worker/lib/performance.d.ts +3 -0
  142. package/lib/typescript/worker/lib/performance.js +32 -0
  143. package/lib/typescript/worker/lib/program/program.d.ts +2 -0
  144. package/lib/typescript/worker/lib/program/program.js +32 -0
  145. package/lib/typescript/worker/lib/program/solution-builder.d.ts +2 -0
  146. package/lib/typescript/worker/lib/program/solution-builder.js +39 -0
  147. package/lib/typescript/worker/lib/program/watch-program.d.ts +3 -0
  148. package/lib/typescript/worker/lib/program/watch-program.js +49 -0
  149. package/lib/{typescript-reporter/reporter/ControlledTypeScriptSystem.d.ts → typescript/worker/lib/system.d.ts} +4 -6
  150. package/lib/typescript/worker/lib/system.js +222 -0
  151. package/lib/typescript/worker/lib/tracing.d.ts +4 -0
  152. package/lib/typescript/worker/lib/tracing.js +28 -0
  153. package/lib/typescript/worker/lib/tsbuildinfo.d.ts +4 -0
  154. package/lib/typescript/worker/lib/tsbuildinfo.js +92 -0
  155. package/lib/typescript/worker/lib/typescript.d.ts +2 -0
  156. package/lib/typescript/worker/lib/typescript.js +6 -0
  157. package/lib/typescript/worker/lib/worker-config.d.ts +2 -0
  158. package/lib/typescript/worker/lib/worker-config.js +5 -0
  159. package/lib/utils/async/{isPending.d.ts → is-pending.d.ts} +1 -1
  160. package/lib/utils/async/{isPending.js → is-pending.js} +2 -1
  161. package/lib/utils/async/pool.d.ts +1 -1
  162. package/lib/utils/async/pool.js +3 -14
  163. package/lib/utils/async/wait.d.ts +1 -1
  164. package/lib/utils/async/wait.js +2 -1
  165. package/lib/utils/path/{forwardSlash.d.ts → forward-slash.d.ts} +1 -1
  166. package/lib/utils/path/{forwardSlash.js → forward-slash.js} +2 -1
  167. package/lib/utils/path/{relativeToContext.d.ts → relative-to-context.d.ts} +0 -0
  168. package/lib/utils/path/{relativeToContext.js → relative-to-context.js} +2 -2
  169. package/lib/watch/{InclusiveNodeWatchFileSystem.d.ts → inclusive-node-watch-file-system.d.ts} +7 -7
  170. package/lib/watch/{InclusiveNodeWatchFileSystem.js → inclusive-node-watch-file-system.js} +47 -15
  171. package/lib/watch/{WatchFileSystem.d.ts → watch-file-system.d.ts} +3 -3
  172. package/lib/{typescript-reporter/TypeScriptDiagnosticsOptions.js → watch/watch-file-system.js} +0 -0
  173. package/package.json +41 -35
  174. package/lib/ForkTsCheckerWebpackPlugin.js +0 -66
  175. package/lib/ForkTsCheckerWebpackPluginConfiguration.d.ts +0 -15
  176. package/lib/ForkTsCheckerWebpackPluginConfiguration.js +0 -17
  177. package/lib/ForkTsCheckerWebpackPluginOptions.d.ts +0 -12
  178. package/lib/ForkTsCheckerWebpackPluginState.d.ts +0 -15
  179. package/lib/error/OperationCanceledError.d.ts +0 -4
  180. package/lib/error/OperationCanceledError.js +0 -10
  181. package/lib/formatter/FormatterConfiguration.d.ts +0 -5
  182. package/lib/hooks/interceptDoneToGetWebpackDevServerTap.d.ts +0 -5
  183. package/lib/hooks/interceptDoneToGetWebpackDevServerTap.js +0 -17
  184. package/lib/hooks/tapAfterCompileToAddDependencies.d.ts +0 -5
  185. package/lib/hooks/tapAfterCompileToGetIssues.d.ts +0 -5
  186. package/lib/hooks/tapDoneToAsyncGetIssues.d.ts +0 -5
  187. package/lib/hooks/tapErrorToLogMessage.d.ts +0 -4
  188. package/lib/hooks/tapStartToConnectAndRunReporter.d.ts +0 -6
  189. package/lib/hooks/tapStartToConnectAndRunReporter.js +0 -130
  190. package/lib/hooks/tapStopToDisconnectReporter.d.ts +0 -5
  191. package/lib/hooks/tapStopToDisconnectReporter.js +0 -30
  192. package/lib/issue/IssueConfiguration.d.ts +0 -8
  193. package/lib/issue/IssueConfiguration.js +0 -29
  194. package/lib/logger/LoggerConfiguration.d.ts +0 -10
  195. package/lib/logger/LoggerConfiguration.js +0 -12
  196. package/lib/logger/LoggerFactory.d.ts +0 -5
  197. package/lib/logger/LoggerFactory.js +0 -21
  198. package/lib/logger/LoggerOptions.d.ts +0 -8
  199. package/lib/logger/PartialLogger.d.ts +0 -4
  200. package/lib/logger/PartialLogger.js +0 -11
  201. package/lib/logger/WebpackInfrastructureLogger.d.ts +0 -4
  202. package/lib/logger/WebpackInfrastructureLogger.js +0 -13
  203. package/lib/profile/Performance.d.ts +0 -11
  204. package/lib/profile/Performance.js +0 -63
  205. package/lib/reporter/AggregatedReporter.d.ts +0 -6
  206. package/lib/reporter/AggregatedReporter.js +0 -61
  207. package/lib/reporter/FilesChange.d.ts +0 -16
  208. package/lib/reporter/Report.d.ts +0 -8
  209. package/lib/reporter/Reporter.d.ts +0 -6
  210. package/lib/reporter/index.d.ts +0 -7
  211. package/lib/reporter/index.js +0 -19
  212. package/lib/reporter/reporter-rpc/ReporterRpcClient.d.ts +0 -10
  213. package/lib/reporter/reporter-rpc/ReporterRpcClient.js +0 -85
  214. package/lib/reporter/reporter-rpc/ReporterRpcProcedure.d.ts +0 -13
  215. package/lib/reporter/reporter-rpc/ReporterRpcProcedure.js +0 -15
  216. package/lib/reporter/reporter-rpc/ReporterRpcService.d.ts +0 -9
  217. package/lib/reporter/reporter-rpc/ReporterRpcService.js +0 -77
  218. package/lib/rpc/RpcClient.d.ts +0 -10
  219. package/lib/rpc/RpcClient.js +0 -79
  220. package/lib/rpc/RpcHost.d.ts +0 -6
  221. package/lib/rpc/RpcMessage.d.ts +0 -26
  222. package/lib/rpc/RpcMessage.js +0 -48
  223. package/lib/rpc/RpcMessageChannel.d.ts +0 -10
  224. package/lib/rpc/RpcMessageChannel.js +0 -50
  225. package/lib/rpc/RpcMessagePort.d.ts +0 -14
  226. package/lib/rpc/RpcProcedure.d.ts +0 -5
  227. package/lib/rpc/RpcService.d.ts +0 -12
  228. package/lib/rpc/RpcService.js +0 -64
  229. package/lib/rpc/error/RpcMessagePortClosedError.d.ts +0 -3
  230. package/lib/rpc/error/RpcMessagePortClosedError.js +0 -6
  231. package/lib/rpc/error/RpcRemoteError.d.ts +0 -6
  232. package/lib/rpc/error/RpcRemoteError.js +0 -18
  233. package/lib/rpc/rpc-ipc/ProcessLike.d.ts +0 -12
  234. package/lib/rpc/rpc-ipc/ProcessLike.js +0 -3
  235. package/lib/rpc/rpc-ipc/RpcIpcMessageChannel.d.ts +0 -3
  236. package/lib/rpc/rpc-ipc/RpcIpcMessageChannel.js +0 -11
  237. package/lib/rpc/rpc-ipc/RpcIpcMessagePort.d.ts +0 -5
  238. package/lib/rpc/rpc-ipc/RpcIpcMessagePort.js +0 -151
  239. package/lib/rpc/rpc-ipc/error/RpcIpcMessagePortClosedError.js +0 -13
  240. package/lib/rpc/rpc-ipc/index.d.ts +0 -2
  241. package/lib/rpc/rpc-ipc/index.js +0 -14
  242. package/lib/typescript-reporter/TypeScriptReporterConfiguration.d.ts +0 -22
  243. package/lib/typescript-reporter/TypeScriptReporterOptions.d.ts +0 -18
  244. package/lib/typescript-reporter/TypeScriptReporterOptions.js +0 -2
  245. package/lib/typescript-reporter/TypeScriptSupport.d.ts +0 -3
  246. package/lib/typescript-reporter/extension/TypeScriptExtension.js +0 -2
  247. package/lib/typescript-reporter/extension/vue/TypeScriptVueExtension.d.ts +0 -4
  248. package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionConfiguration.d.ts +0 -7
  249. package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionOptions.js +0 -2
  250. package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionSupport.d.ts +0 -3
  251. package/lib/typescript-reporter/file-system/FileSystem.js +0 -2
  252. package/lib/typescript-reporter/file-system/MemFileSystem.d.ts +0 -8
  253. package/lib/typescript-reporter/file-system/MemFileSystem.js +0 -82
  254. package/lib/typescript-reporter/file-system/PassiveFileSystem.d.ts +0 -9
  255. package/lib/typescript-reporter/file-system/PassiveFileSystem.js +0 -69
  256. package/lib/typescript-reporter/file-system/RealFileSystem.d.ts +0 -8
  257. package/lib/typescript-reporter/file-system/RealFileSystem.js +0 -180
  258. package/lib/typescript-reporter/issue/TypeScriptIssueFactory.d.ts +0 -4
  259. package/lib/typescript-reporter/issue/TypeScriptIssueFactory.js +0 -57
  260. package/lib/typescript-reporter/profile/TypeScriptPerformance.d.ts +0 -10
  261. package/lib/typescript-reporter/profile/TypeScriptPerformance.js +0 -34
  262. package/lib/typescript-reporter/reporter/ControlledCompilerHost.d.ts +0 -5
  263. package/lib/typescript-reporter/reporter/ControlledCompilerHost.js +0 -14
  264. package/lib/typescript-reporter/reporter/ControlledTypeScriptSystem.js +0 -218
  265. package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.d.ts +0 -5
  266. package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.js +0 -29
  267. package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.d.ts +0 -5
  268. package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.js +0 -51
  269. package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.d.ts +0 -8
  270. package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.js +0 -142
  271. package/lib/typescript-reporter/reporter/TypeScriptReporter.d.ts +0 -4
  272. package/lib/typescript-reporter/reporter/TypeScriptReporter.js +0 -376
  273. package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.d.ts +0 -4
  274. package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.js +0 -14
  275. package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.d.ts +0 -1
  276. package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.js +0 -11
  277. package/lib/utils/array/flatten.d.ts +0 -2
  278. package/lib/utils/array/flatten.js +0 -6
  279. package/lib/utils/array/intersect.d.ts +0 -2
  280. package/lib/utils/array/intersect.js +0 -6
  281. package/lib/utils/array/substract.d.ts +0 -2
  282. package/lib/utils/array/substract.js +0 -6
  283. package/lib/utils/array/unique.d.ts +0 -2
  284. package/lib/utils/array/unique.js +0 -6
  285. package/lib/watch/WatchFileSystem.js +0 -2
@@ -0,0 +1,8 @@
1
+ import type * as webpack from 'webpack';
2
+ import type { ForkTsCheckerWebpackPluginConfig } from '../plugin-config';
3
+ import type { ForkTsCheckerWebpackPluginState } from '../plugin-state';
4
+ import type { RpcWorker } from '../rpc';
5
+ import type { GetDependenciesWorker } from '../typescript/worker/get-dependencies-worker';
6
+ import type { GetIssuesWorker } from '../typescript/worker/get-issues-worker';
7
+ declare function tapStartToRunWorkers(compiler: webpack.Compiler, getIssuesWorker: RpcWorker<GetIssuesWorker>, getDependenciesWorker: RpcWorker<GetDependenciesWorker>, config: ForkTsCheckerWebpackPluginConfig, state: ForkTsCheckerWebpackPluginState): void;
8
+ export { tapStartToRunWorkers };
@@ -0,0 +1,95 @@
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.tapStartToRunWorkers = void 0;
13
+ const files_change_1 = require("../files-change");
14
+ const infrastructure_logger_1 = require("../infrastructure-logger");
15
+ const plugin_hooks_1 = require("../plugin-hooks");
16
+ const plugin_pools_1 = require("../plugin-pools");
17
+ const intercept_done_to_get_dev_server_tap_1 = require("./intercept-done-to-get-dev-server-tap");
18
+ const tap_after_compile_to_get_issues_1 = require("./tap-after-compile-to-get-issues");
19
+ const tap_done_to_async_get_issues_1 = require("./tap-done-to-async-get-issues");
20
+ function tapStartToRunWorkers(compiler, getIssuesWorker, getDependenciesWorker, config, state) {
21
+ const hooks = (0, plugin_hooks_1.getPluginHooks)(compiler);
22
+ const { log, debug } = (0, infrastructure_logger_1.getInfrastructureLogger)(compiler);
23
+ compiler.hooks.run.tap('ForkTsCheckerWebpackPlugin', () => {
24
+ if (!state.initialized) {
25
+ debug('Initializing plugin for single run (not async).');
26
+ state.initialized = true;
27
+ state.watching = false;
28
+ (0, tap_after_compile_to_get_issues_1.tapAfterCompileToGetIssues)(compiler, config, state);
29
+ }
30
+ });
31
+ compiler.hooks.watchRun.tap('ForkTsCheckerWebpackPlugin', () => __awaiter(this, void 0, void 0, function* () {
32
+ if (!state.initialized) {
33
+ state.initialized = true;
34
+ state.watching = true;
35
+ if (config.async) {
36
+ debug('Initializing plugin for watch run (async).');
37
+ (0, tap_done_to_async_get_issues_1.tapDoneToAsyncGetIssues)(compiler, config, state);
38
+ (0, intercept_done_to_get_dev_server_tap_1.interceptDoneToGetDevServerTap)(compiler, config, state);
39
+ }
40
+ else {
41
+ debug('Initializing plugin for watch run (not async).');
42
+ (0, tap_after_compile_to_get_issues_1.tapAfterCompileToGetIssues)(compiler, config, state);
43
+ }
44
+ }
45
+ }));
46
+ compiler.hooks.compilation.tap('ForkTsCheckerWebpackPlugin', (compilation) => __awaiter(this, void 0, void 0, function* () {
47
+ if (compilation.compiler !== compiler) {
48
+ // run only for the compiler that the plugin was registered for
49
+ return;
50
+ }
51
+ const iteration = ++state.iteration;
52
+ let change = {};
53
+ if (state.watching) {
54
+ change = (0, files_change_1.consumeFilesChange)(compiler);
55
+ log([
56
+ 'Calling reporter service for incremental check.',
57
+ ` Changed files: ${JSON.stringify(change.changedFiles)}`,
58
+ ` Deleted files: ${JSON.stringify(change.deletedFiles)}`,
59
+ ].join('\n'));
60
+ }
61
+ else {
62
+ log('Calling reporter service for single check.');
63
+ }
64
+ change = yield hooks.start.promise(change, compilation);
65
+ debug(`Submitting the getIssuesWorker to the pool, iteration ${iteration}.`);
66
+ state.issuesPromise = plugin_pools_1.issuesPool.submit(() => __awaiter(this, void 0, void 0, function* () {
67
+ try {
68
+ debug(`Running the getIssuesWorker, iteration ${iteration}.`);
69
+ return yield getIssuesWorker(change, state.watching);
70
+ }
71
+ catch (error) {
72
+ hooks.error.call(error, compilation);
73
+ return undefined;
74
+ }
75
+ finally {
76
+ debug(`The getIssuesWorker finished its job, iteration ${iteration}.`);
77
+ }
78
+ }));
79
+ debug(`Submitting the getDependenciesWorker to the pool, iteration ${iteration}.`);
80
+ state.dependenciesPromise = plugin_pools_1.dependenciesPool.submit(() => __awaiter(this, void 0, void 0, function* () {
81
+ try {
82
+ debug(`Running the getDependenciesWorker, iteration ${iteration}.`);
83
+ return yield getDependenciesWorker(change);
84
+ }
85
+ catch (error) {
86
+ hooks.error.call(error, compilation);
87
+ return undefined;
88
+ }
89
+ finally {
90
+ debug(`The getDependenciesWorker finished its job, iteration ${iteration}.`);
91
+ }
92
+ }));
93
+ }));
94
+ }
95
+ exports.tapStartToRunWorkers = tapStartToRunWorkers;
@@ -0,0 +1,5 @@
1
+ import type webpack from 'webpack';
2
+ import type { ForkTsCheckerWebpackPluginState } from '../plugin-state';
3
+ import type { RpcWorker } from '../rpc';
4
+ declare function tapStopToTerminateWorkers(compiler: webpack.Compiler, getIssuesWorker: RpcWorker, getDependenciesWorker: RpcWorker, state: ForkTsCheckerWebpackPluginState): void;
5
+ export { tapStopToTerminateWorkers };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tapStopToTerminateWorkers = void 0;
4
+ const infrastructure_logger_1 = require("../infrastructure-logger");
5
+ function tapStopToTerminateWorkers(compiler, getIssuesWorker, getDependenciesWorker, state) {
6
+ const { debug } = (0, infrastructure_logger_1.getInfrastructureLogger)(compiler);
7
+ const terminateWorkers = () => {
8
+ debug('Compiler is going to close - terminating workers...');
9
+ getIssuesWorker.terminate();
10
+ getDependenciesWorker.terminate();
11
+ };
12
+ compiler.hooks.watchClose.tap('ForkTsCheckerWebpackPlugin', () => {
13
+ terminateWorkers();
14
+ });
15
+ compiler.hooks.done.tap('ForkTsCheckerWebpackPlugin', () => {
16
+ if (!state.watching) {
17
+ terminateWorkers();
18
+ }
19
+ });
20
+ compiler.hooks.failed.tap('ForkTsCheckerWebpackPlugin', () => {
21
+ if (!state.watching) {
22
+ terminateWorkers();
23
+ }
24
+ });
25
+ }
26
+ exports.tapStopToTerminateWorkers = tapStopToTerminateWorkers;
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { ForkTsCheckerWebpackPlugin } from './ForkTsCheckerWebpackPlugin';
1
+ import { ForkTsCheckerWebpackPlugin } from './plugin';
2
2
  export = ForkTsCheckerWebpackPlugin;
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const ForkTsCheckerWebpackPlugin_1 = require("./ForkTsCheckerWebpackPlugin");
3
- module.exports = ForkTsCheckerWebpackPlugin_1.ForkTsCheckerWebpackPlugin;
2
+ const plugin_1 = require("./plugin");
3
+ module.exports = plugin_1.ForkTsCheckerWebpackPlugin;
@@ -0,0 +1,9 @@
1
+ import type webpack from 'webpack';
2
+ export interface InfrastructureLogger {
3
+ log(...args: unknown[]): void;
4
+ debug(...args: unknown[]): void;
5
+ error(...args: unknown[]): void;
6
+ warn(...args: unknown[]): void;
7
+ info(...args: unknown[]): void;
8
+ }
9
+ export declare function getInfrastructureLogger(compiler: webpack.Compiler): InfrastructureLogger;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getInfrastructureLogger = void 0;
4
+ function getInfrastructureLogger(compiler) {
5
+ const logger = compiler.getInfrastructureLogger('ForkTsCheckerWebpackPlugin');
6
+ return {
7
+ log: logger.log.bind(logger),
8
+ debug: logger.debug.bind(logger),
9
+ error: logger.error.bind(logger),
10
+ warn: logger.warn.bind(logger),
11
+ info: logger.info.bind(logger),
12
+ };
13
+ }
14
+ exports.getInfrastructureLogger = getInfrastructureLogger;
@@ -1,3 +1,3 @@
1
- export * from './Issue';
2
- export * from './IssueSeverity';
3
- export * from './IssueLocation';
1
+ export * from './issue';
2
+ export * from './issue-severity';
3
+ export * from './issue-location';
@@ -10,6 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./Issue"), exports);
14
- __exportStar(require("./IssueSeverity"), exports);
15
- __exportStar(require("./IssueLocation"), exports);
13
+ __exportStar(require("./issue"), exports);
14
+ __exportStar(require("./issue-severity"), exports);
15
+ __exportStar(require("./issue-location"), exports);
@@ -0,0 +1,8 @@
1
+ import type webpack from 'webpack';
2
+ import type { IssueOptions } from './issue-options';
3
+ import type { IssuePredicate } from './issue-predicate';
4
+ interface IssueConfig {
5
+ predicate: IssuePredicate;
6
+ }
7
+ declare function createIssueConfig(compiler: webpack.Compiler, options: IssueOptions | undefined): IssueConfig;
8
+ export { IssueConfig, createIssueConfig };
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createIssueConfig = void 0;
4
+ const issue_match_1 = require("./issue-match");
5
+ const issue_predicate_1 = require("./issue-predicate");
6
+ function createIssuePredicateFromOption(context, option) {
7
+ if (Array.isArray(option)) {
8
+ return (0, issue_predicate_1.composeIssuePredicates)(option.map((option) => typeof option === 'function' ? option : (0, issue_match_1.createIssuePredicateFromIssueMatch)(context, option)));
9
+ }
10
+ return typeof option === 'function'
11
+ ? option
12
+ : (0, issue_match_1.createIssuePredicateFromIssueMatch)(context, option);
13
+ }
14
+ function createIssueConfig(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
+ : (0, issue_predicate_1.createTrivialIssuePredicate)(true);
22
+ const exclude = options.exclude
23
+ ? createIssuePredicateFromOption(context, options.exclude)
24
+ : (0, issue_predicate_1.createTrivialIssuePredicate)(false);
25
+ return {
26
+ predicate: (issue) => include(issue) && !exclude(issue),
27
+ };
28
+ }
29
+ exports.createIssueConfig = createIssueConfig;
@@ -1,4 +1,4 @@
1
- import { IssuePosition } from './IssuePosition';
1
+ import type { IssuePosition } from './issue-position';
2
2
  interface IssueLocation {
3
3
  start: IssuePosition;
4
4
  end: IssuePosition;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.formatIssueLocation = exports.compareIssueLocations = void 0;
4
- const IssuePosition_1 = require("./IssuePosition");
4
+ const issue_position_1 = require("./issue-position");
5
5
  function compareIssueLocations(locationA, locationB) {
6
6
  if (locationA === locationB) {
7
7
  return 0;
@@ -12,8 +12,8 @@ function compareIssueLocations(locationA, locationB) {
12
12
  if (!locationB) {
13
13
  return 1;
14
14
  }
15
- return (IssuePosition_1.compareIssuePositions(locationA.start, locationB.start) ||
16
- IssuePosition_1.compareIssuePositions(locationA.end, locationB.end));
15
+ return ((0, issue_position_1.compareIssuePositions)(locationA.start, locationB.start) ||
16
+ (0, issue_position_1.compareIssuePositions)(locationA.end, locationB.end));
17
17
  }
18
18
  exports.compareIssueLocations = compareIssueLocations;
19
19
  function formatIssueLocation({ start, end }) {
@@ -1,5 +1,5 @@
1
- import { Issue } from './index';
2
- import { IssuePredicate } from './IssuePredicate';
1
+ import type { IssuePredicate } from './issue-predicate';
2
+ import type { Issue } from './index';
3
3
  declare type IssueMatch = Partial<Pick<Issue, 'severity' | 'code' | 'file'>>;
4
4
  declare function createIssuePredicateFromIssueMatch(context: string, match: IssueMatch): IssuePredicate;
5
5
  export { IssueMatch, createIssuePredicateFromIssueMatch };
@@ -4,16 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.createIssuePredicateFromIssueMatch = void 0;
7
- const minimatch_1 = __importDefault(require("minimatch"));
8
7
  const path_1 = __importDefault(require("path"));
9
- const forwardSlash_1 = __importDefault(require("../utils/path/forwardSlash"));
8
+ const minimatch_1 = __importDefault(require("minimatch"));
9
+ const forward_slash_1 = require("../utils/path/forward-slash");
10
10
  function createIssuePredicateFromIssueMatch(context, match) {
11
11
  return (issue) => {
12
12
  const matchesSeverity = !match.severity || match.severity === issue.severity;
13
13
  const matchesCode = !match.code || match.code === issue.code;
14
14
  const matchesFile = !issue.file ||
15
15
  (!!issue.file &&
16
- (!match.file || minimatch_1.default(forwardSlash_1.default(path_1.default.relative(context, issue.file)), match.file)));
16
+ (!match.file || (0, minimatch_1.default)((0, forward_slash_1.forwardSlash)(path_1.default.relative(context, issue.file)), match.file)));
17
17
  return matchesSeverity && matchesCode && matchesFile;
18
18
  };
19
19
  }
@@ -1,5 +1,5 @@
1
- import { IssueMatch } from './IssueMatch';
2
- import { IssuePredicate } from './IssuePredicate';
1
+ import type { IssueMatch } from './issue-match';
2
+ import type { IssuePredicate } from './issue-predicate';
3
3
  declare type IssuePredicateOption = IssuePredicate | IssueMatch | (IssuePredicate | IssueMatch)[];
4
4
  interface IssueOptions {
5
5
  include?: IssuePredicateOption;
File without changes
@@ -1,4 +1,4 @@
1
- import { Issue } from './index';
1
+ import type { Issue } from './index';
2
2
  declare type IssuePredicate = (issue: Issue) => boolean;
3
3
  declare function createTrivialIssuePredicate(result: boolean): IssuePredicate;
4
4
  declare function composeIssuePredicates(predicates: IssuePredicate[]): IssuePredicate;
@@ -1,5 +1,5 @@
1
1
  import webpack from 'webpack';
2
- import { Issue } from './Issue';
2
+ import type { Issue } from './issue';
3
3
  declare class IssueWebpackError extends webpack.WebpackError {
4
4
  readonly issue: Issue;
5
5
  readonly hideStack = true;
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.IssueWebpackError = void 0;
7
- const webpack_1 = __importDefault(require("webpack"));
8
- const IssueLocation_1 = require("./IssueLocation");
9
- const relativeToContext_1 = require("../utils/path/relativeToContext");
10
7
  const chalk_1 = __importDefault(require("chalk"));
8
+ const webpack_1 = __importDefault(require("webpack"));
9
+ const relative_to_context_1 = require("../utils/path/relative-to-context");
10
+ const issue_location_1 = require("./issue-location");
11
11
  class IssueWebpackError extends webpack_1.default.WebpackError {
12
12
  constructor(message, issue) {
13
13
  super(message);
@@ -17,9 +17,9 @@ class IssueWebpackError extends webpack_1.default.WebpackError {
17
17
  // should be a NormalModule instance.
18
18
  // to avoid such a dependency, we do a workaround - error.file will contain formatted location instead
19
19
  if (issue.file) {
20
- this.file = relativeToContext_1.relativeToContext(issue.file, process.cwd());
20
+ this.file = (0, relative_to_context_1.relativeToContext)(issue.file, process.cwd());
21
21
  if (issue.location) {
22
- this.file += ` ${chalk_1.default.green.bold(IssueLocation_1.formatIssueLocation(issue.location))}`;
22
+ this.file += ` ${chalk_1.default.green.bold((0, issue_location_1.formatIssueLocation)(issue.location))}`;
23
23
  }
24
24
  }
25
25
  Error.captureStackTrace(this, this.constructor);
@@ -1,5 +1,5 @@
1
- import { IssueSeverity } from './IssueSeverity';
2
- import { IssueLocation } from './IssueLocation';
1
+ import type { IssueLocation } from './issue-location';
2
+ import type { IssueSeverity } from './issue-severity';
3
3
  interface Issue {
4
4
  severity: IssueSeverity;
5
5
  code: string;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deduplicateAndSortIssues = exports.isIssue = void 0;
4
- const IssueSeverity_1 = require("./IssueSeverity");
5
- const IssueLocation_1 = require("./IssueLocation");
4
+ const issue_location_1 = require("./issue-location");
5
+ const issue_severity_1 = require("./issue-severity");
6
6
  function isIssue(value) {
7
7
  return (!!value &&
8
8
  typeof value === 'object' &&
9
- IssueSeverity_1.isIssueSeverity(value.severity) &&
9
+ (0, issue_severity_1.isIssueSeverity)(value.severity) &&
10
10
  !!value.code &&
11
11
  !!value.message);
12
12
  }
@@ -24,9 +24,9 @@ function compareStrings(stringA, stringB) {
24
24
  return stringA.toString().localeCompare(stringB.toString());
25
25
  }
26
26
  function compareIssues(issueA, issueB) {
27
- return (IssueSeverity_1.compareIssueSeverities(issueA.severity, issueB.severity) ||
27
+ return ((0, issue_severity_1.compareIssueSeverities)(issueA.severity, issueB.severity) ||
28
28
  compareStrings(issueA.file, issueB.file) ||
29
- IssueLocation_1.compareIssueLocations(issueA.location, issueB.location) ||
29
+ (0, issue_location_1.compareIssueLocations)(issueA.location, issueB.location) ||
30
30
  compareStrings(issueA.code, issueB.code) ||
31
31
  compareStrings(issueA.message, issueB.message) ||
32
32
  0 /* EqualTo */);
@@ -1,6 +1,5 @@
1
1
  interface Logger {
2
- info: (message: string) => void;
3
2
  log: (message: string) => void;
4
3
  error: (message: string) => void;
5
4
  }
6
- export default Logger;
5
+ export { Logger };
File without changes
@@ -0,0 +1,16 @@
1
+ import type webpack from 'webpack';
2
+ import type { FormatterConfig } from './formatter';
3
+ import type { IssueConfig } from './issue/issue-config';
4
+ import type { Logger } from './logger';
5
+ import type { ForkTsCheckerWebpackPluginOptions } from './plugin-options';
6
+ import type { TypeScriptWorkerConfig } from './typescript/type-script-worker-config';
7
+ interface ForkTsCheckerWebpackPluginConfig {
8
+ async: boolean;
9
+ typescript: TypeScriptWorkerConfig;
10
+ issue: IssueConfig;
11
+ formatter: FormatterConfig;
12
+ logger: Logger;
13
+ devServer: boolean;
14
+ }
15
+ declare function createPluginConfig(compiler: webpack.Compiler, options?: ForkTsCheckerWebpackPluginOptions): ForkTsCheckerWebpackPluginConfig;
16
+ export { ForkTsCheckerWebpackPluginConfig, createPluginConfig };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPluginConfig = void 0;
4
+ const formatter_1 = require("./formatter");
5
+ const issue_config_1 = require("./issue/issue-config");
6
+ const type_script_worker_config_1 = require("./typescript/type-script-worker-config");
7
+ function createPluginConfig(compiler, options = {}) {
8
+ return {
9
+ async: options.async === undefined ? compiler.options.mode === 'development' : options.async,
10
+ typescript: (0, type_script_worker_config_1.createTypeScriptWorkerConfig)(compiler, options.typescript),
11
+ issue: (0, issue_config_1.createIssueConfig)(compiler, options.issue),
12
+ formatter: (0, formatter_1.createFormatterConfig)(options.formatter),
13
+ logger: options.logger || console,
14
+ devServer: options.devServer !== false,
15
+ };
16
+ }
17
+ exports.createPluginConfig = createPluginConfig;
@@ -1,20 +1,20 @@
1
- import * as webpack from 'webpack';
2
1
  import { SyncHook, SyncWaterfallHook, AsyncSeriesWaterfallHook } from 'tapable';
3
- import { FilesChange } from '../reporter';
4
- import { Issue } from '../issue';
5
- declare function createForkTsCheckerWebpackPluginHooks(): {
2
+ import type * as webpack from 'webpack';
3
+ import type { FilesChange } from './files-change';
4
+ import type { Issue } from './issue';
5
+ declare function createPluginHooks(): {
6
6
  start: AsyncSeriesWaterfallHook<[FilesChange, webpack.Compilation], import("tapable").UnsetAdditionalOptions>;
7
7
  waiting: SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
8
8
  canceled: SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
9
- error: SyncHook<[Error, webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
9
+ error: SyncHook<[unknown, webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
10
10
  issues: SyncWaterfallHook<[Issue[], webpack.Compilation | undefined], void>;
11
11
  };
12
- declare type ForkTsCheckerWebpackPluginHooks = ReturnType<typeof createForkTsCheckerWebpackPluginHooks>;
13
- declare function getForkTsCheckerWebpackPluginHooks(compiler: webpack.Compiler | webpack.MultiCompiler): {
12
+ declare type ForkTsCheckerWebpackPluginHooks = ReturnType<typeof createPluginHooks>;
13
+ declare function getPluginHooks(compiler: webpack.Compiler | webpack.MultiCompiler): {
14
14
  start: AsyncSeriesWaterfallHook<[FilesChange, webpack.Compilation], import("tapable").UnsetAdditionalOptions>;
15
15
  waiting: SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
16
16
  canceled: SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
17
- error: SyncHook<[Error, webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
17
+ error: SyncHook<[unknown, webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
18
18
  issues: SyncWaterfallHook<[Issue[], webpack.Compilation | undefined], void>;
19
19
  };
20
- export { getForkTsCheckerWebpackPluginHooks, ForkTsCheckerWebpackPluginHooks };
20
+ export { getPluginHooks, ForkTsCheckerWebpackPluginHooks };
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getForkTsCheckerWebpackPluginHooks = void 0;
3
+ exports.getPluginHooks = void 0;
4
4
  const tapable_1 = require("tapable");
5
5
  const compilerHookMap = new WeakMap();
6
- function createForkTsCheckerWebpackPluginHooks() {
6
+ function createPluginHooks() {
7
7
  return {
8
8
  start: new tapable_1.AsyncSeriesWaterfallHook([
9
9
  'change',
@@ -18,28 +18,28 @@ function createForkTsCheckerWebpackPluginHooks() {
18
18
  ]),
19
19
  };
20
20
  }
21
- function forwardForkTsCheckerWebpackPluginHooks(source, target) {
21
+ function forwardPluginHooks(source, target) {
22
22
  source.start.tapPromise('ForkTsCheckerWebpackPlugin', target.start.promise);
23
23
  source.waiting.tap('ForkTsCheckerWebpackPlugin', target.waiting.call);
24
24
  source.canceled.tap('ForkTsCheckerWebpackPlugin', target.canceled.call);
25
25
  source.error.tap('ForkTsCheckerWebpackPlugin', target.error.call);
26
26
  source.issues.tap('ForkTsCheckerWebpackPlugin', target.issues.call);
27
27
  }
28
- function getForkTsCheckerWebpackPluginHooks(compiler) {
28
+ function getPluginHooks(compiler) {
29
29
  let hooks = compilerHookMap.get(compiler);
30
30
  if (hooks === undefined) {
31
- hooks = createForkTsCheckerWebpackPluginHooks();
31
+ hooks = createPluginHooks();
32
32
  compilerHookMap.set(compiler, hooks);
33
33
  // proxy hooks for multi-compiler
34
34
  if ('compilers' in compiler) {
35
35
  compiler.compilers.forEach((childCompiler) => {
36
- const childHooks = getForkTsCheckerWebpackPluginHooks(childCompiler);
36
+ const childHooks = getPluginHooks(childCompiler);
37
37
  if (hooks) {
38
- forwardForkTsCheckerWebpackPluginHooks(childHooks, hooks);
38
+ forwardPluginHooks(childHooks, hooks);
39
39
  }
40
40
  });
41
41
  }
42
42
  }
43
43
  return hooks;
44
44
  }
45
- exports.getForkTsCheckerWebpackPluginHooks = getForkTsCheckerWebpackPluginHooks;
45
+ exports.getPluginHooks = getPluginHooks;
@@ -0,0 +1,13 @@
1
+ import type { FormatterOptions } from './formatter';
2
+ import type { IssueOptions } from './issue/issue-options';
3
+ import type { Logger } from './logger';
4
+ import type { TypeScriptWorkerOptions } from './typescript/type-script-worker-options';
5
+ interface ForkTsCheckerWebpackPluginOptions {
6
+ async?: boolean;
7
+ typescript?: TypeScriptWorkerOptions;
8
+ formatter?: FormatterOptions;
9
+ issue?: IssueOptions;
10
+ logger?: Logger;
11
+ devServer?: boolean;
12
+ }
13
+ export { ForkTsCheckerWebpackPluginOptions };