fork-ts-checker-webpack-plugin 6.3.5 → 7.0.0-alpha.10

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 (170) hide show
  1. package/README.md +25 -103
  2. package/lib/ForkTsCheckerWebpackPlugin.d.ts +11 -12
  3. package/lib/ForkTsCheckerWebpackPlugin.js +29 -49
  4. package/lib/ForkTsCheckerWebpackPluginConfiguration.d.ts +6 -8
  5. package/lib/ForkTsCheckerWebpackPluginConfiguration.js +3 -4
  6. package/lib/ForkTsCheckerWebpackPluginOptions.d.ts +4 -6
  7. package/lib/ForkTsCheckerWebpackPluginOptions.json +73 -111
  8. package/lib/ForkTsCheckerWebpackPluginState.d.ts +4 -4
  9. package/lib/ForkTsCheckerWebpackPluginState.js +1 -0
  10. package/lib/error/OperationCanceledError.js +1 -0
  11. package/lib/formatter/BasicFormatter.d.ts +1 -1
  12. package/lib/formatter/BasicFormatter.js +1 -0
  13. package/lib/formatter/CodeFrameFormatter.d.ts +1 -1
  14. package/lib/formatter/CodeFrameFormatter.js +2 -1
  15. package/lib/formatter/Formatter.d.ts +1 -1
  16. package/lib/formatter/FormatterConfiguration.d.ts +3 -3
  17. package/lib/formatter/FormatterConfiguration.js +21 -2
  18. package/lib/formatter/FormatterOptions.d.ts +11 -6
  19. package/lib/formatter/WebpackFormatter.d.ts +1 -1
  20. package/lib/formatter/WebpackFormatter.js +6 -6
  21. package/lib/formatter/index.d.ts +0 -1
  22. package/lib/formatter/index.js +16 -8
  23. package/lib/hooks/interceptDoneToGetWebpackDevServerTap.d.ts +3 -3
  24. package/lib/hooks/interceptDoneToGetWebpackDevServerTap.js +1 -0
  25. package/lib/hooks/pluginHooks.d.ts +13 -13
  26. package/lib/hooks/pluginHooks.js +1 -0
  27. package/lib/hooks/pluginPools.d.ts +4 -0
  28. package/lib/hooks/pluginPools.js +28 -0
  29. package/lib/hooks/tapAfterCompileToAddDependencies.d.ts +3 -3
  30. package/lib/hooks/tapAfterCompileToAddDependencies.js +1 -0
  31. package/lib/hooks/tapAfterCompileToGetIssues.d.ts +3 -3
  32. package/lib/hooks/tapAfterCompileToGetIssues.js +2 -1
  33. package/lib/hooks/tapAfterEnvironmentToPatchWatching.d.ts +2 -2
  34. package/lib/hooks/tapAfterEnvironmentToPatchWatching.js +4 -1
  35. package/lib/hooks/tapDoneToAsyncGetIssues.d.ts +3 -3
  36. package/lib/hooks/tapDoneToAsyncGetIssues.js +3 -2
  37. package/lib/hooks/tapErrorToLogMessage.d.ts +2 -2
  38. package/lib/hooks/tapErrorToLogMessage.js +4 -3
  39. package/lib/hooks/tapStartToConnectAndRunReporter.d.ts +4 -4
  40. package/lib/hooks/tapStartToConnectAndRunReporter.js +16 -11
  41. package/lib/hooks/tapStopToDisconnectReporter.d.ts +3 -3
  42. package/lib/hooks/tapStopToDisconnectReporter.js +1 -0
  43. package/lib/issue/Issue.d.ts +2 -3
  44. package/lib/issue/Issue.js +2 -3
  45. package/lib/issue/IssueConfiguration.d.ts +3 -3
  46. package/lib/issue/IssueConfiguration.js +1 -0
  47. package/lib/issue/IssueLocation.d.ts +2 -2
  48. package/lib/issue/IssueLocation.js +17 -2
  49. package/lib/issue/IssueMatch.d.ts +3 -3
  50. package/lib/issue/IssueMatch.js +3 -3
  51. package/lib/issue/IssueOptions.d.ts +2 -2
  52. package/lib/issue/IssuePosition.js +1 -0
  53. package/lib/issue/IssuePredicate.d.ts +1 -1
  54. package/lib/issue/IssuePredicate.js +1 -0
  55. package/lib/issue/IssueSeverity.js +1 -0
  56. package/lib/issue/IssueWebpackError.d.ts +3 -3
  57. package/lib/issue/IssueWebpackError.js +7 -5
  58. package/lib/issue/index.js +13 -6
  59. package/lib/logger/LoggerConfiguration.d.ts +3 -3
  60. package/lib/logger/LoggerConfiguration.js +2 -1
  61. package/lib/logger/LoggerFactory.d.ts +2 -2
  62. package/lib/logger/LoggerFactory.js +2 -1
  63. package/lib/logger/LoggerOptions.d.ts +2 -2
  64. package/lib/logger/PartialLogger.d.ts +1 -1
  65. package/lib/logger/PartialLogger.js +1 -0
  66. package/lib/logger/WebpackInfrastructureLogger.d.ts +2 -2
  67. package/lib/logger/WebpackInfrastructureLogger.js +1 -0
  68. package/lib/profile/Performance.js +1 -0
  69. package/lib/reporter/AggregatedReporter.d.ts +1 -1
  70. package/lib/reporter/AggregatedReporter.js +5 -4
  71. package/lib/reporter/FilesChange.d.ts +1 -1
  72. package/lib/reporter/FilesChange.js +2 -1
  73. package/lib/reporter/Report.d.ts +2 -2
  74. package/lib/reporter/Reporter.d.ts +3 -3
  75. package/lib/reporter/index.js +17 -7
  76. package/lib/reporter/reporter-rpc/ReporterRpcClient.d.ts +2 -2
  77. package/lib/reporter/reporter-rpc/ReporterRpcClient.js +7 -4
  78. package/lib/reporter/reporter-rpc/ReporterRpcProcedure.d.ts +8 -5
  79. package/lib/reporter/reporter-rpc/ReporterRpcProcedure.js +3 -0
  80. package/lib/reporter/reporter-rpc/ReporterRpcService.d.ts +2 -2
  81. package/lib/reporter/reporter-rpc/ReporterRpcService.js +5 -2
  82. package/lib/rpc/RpcClient.d.ts +2 -2
  83. package/lib/rpc/RpcClient.js +2 -1
  84. package/lib/rpc/RpcMessage.d.ts +1 -1
  85. package/lib/rpc/RpcMessage.js +3 -0
  86. package/lib/rpc/RpcMessageChannel.d.ts +1 -1
  87. package/lib/rpc/RpcMessageChannel.js +1 -0
  88. package/lib/rpc/RpcService.d.ts +2 -2
  89. package/lib/rpc/RpcService.js +1 -0
  90. package/lib/rpc/error/RpcMessagePortClosedError.js +1 -0
  91. package/lib/rpc/error/RpcRemoteError.js +1 -0
  92. package/lib/rpc/index.js +17 -7
  93. package/lib/rpc/rpc-ipc/RpcIpcMessageChannel.d.ts +1 -1
  94. package/lib/rpc/rpc-ipc/RpcIpcMessageChannel.js +1 -0
  95. package/lib/rpc/rpc-ipc/RpcIpcMessagePort.d.ts +2 -2
  96. package/lib/rpc/rpc-ipc/RpcIpcMessagePort.js +1 -0
  97. package/lib/rpc/rpc-ipc/error/RpcIpcMessagePortClosedError.js +1 -0
  98. package/lib/rpc/rpc-ipc/index.js +12 -5
  99. package/lib/typescript-reporter/TypeScriptConfigurationOverwrite.d.ts +1 -1
  100. package/lib/typescript-reporter/TypeScriptReporterConfiguration.d.ts +5 -5
  101. package/lib/typescript-reporter/TypeScriptReporterConfiguration.js +2 -0
  102. package/lib/typescript-reporter/TypeScriptReporterOptions.d.ts +4 -5
  103. package/lib/typescript-reporter/TypeScriptSupport.d.ts +1 -1
  104. package/lib/typescript-reporter/TypeScriptSupport.js +26 -11
  105. package/lib/typescript-reporter/extension/TypeScriptEmbeddedExtension.d.ts +1 -1
  106. package/lib/typescript-reporter/extension/TypeScriptEmbeddedExtension.js +2 -1
  107. package/lib/typescript-reporter/extension/TypeScriptExtension.d.ts +2 -2
  108. package/lib/typescript-reporter/extension/vue/TypeScriptVueExtension.d.ts +2 -2
  109. package/lib/typescript-reporter/extension/vue/TypeScriptVueExtension.js +4 -3
  110. package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionConfiguration.d.ts +1 -1
  111. package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionConfiguration.js +1 -0
  112. package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionSupport.d.ts +1 -1
  113. package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionSupport.js +1 -0
  114. package/lib/typescript-reporter/extension/vue/types/vue__compiler-sfc.d.ts +0 -1
  115. package/lib/typescript-reporter/file-system/FileSystem.d.ts +1 -1
  116. package/lib/typescript-reporter/file-system/MemFileSystem.d.ts +1 -1
  117. package/lib/typescript-reporter/file-system/MemFileSystem.js +2 -0
  118. package/lib/typescript-reporter/file-system/PassiveFileSystem.d.ts +1 -1
  119. package/lib/typescript-reporter/file-system/PassiveFileSystem.js +1 -0
  120. package/lib/typescript-reporter/file-system/RealFileSystem.d.ts +1 -1
  121. package/lib/typescript-reporter/file-system/RealFileSystem.js +2 -0
  122. package/lib/typescript-reporter/issue/TypeScriptIssueFactory.d.ts +1 -1
  123. package/lib/typescript-reporter/issue/TypeScriptIssueFactory.js +17 -5
  124. package/lib/typescript-reporter/profile/TypeScriptPerformance.d.ts +1 -1
  125. package/lib/typescript-reporter/profile/TypeScriptPerformance.js +1 -0
  126. package/lib/typescript-reporter/reporter/ControlledCompilerHost.d.ts +5 -0
  127. package/lib/typescript-reporter/reporter/ControlledCompilerHost.js +14 -0
  128. package/lib/typescript-reporter/reporter/ControlledTypeScriptSystem.d.ts +1 -1
  129. package/lib/typescript-reporter/reporter/ControlledTypeScriptSystem.js +7 -18
  130. package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.d.ts +2 -2
  131. package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.js +1 -0
  132. package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.d.ts +2 -2
  133. package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.js +1 -0
  134. package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.d.ts +2 -2
  135. package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.js +8 -2
  136. package/lib/typescript-reporter/reporter/TypeScriptReporter.d.ts +2 -2
  137. package/lib/typescript-reporter/reporter/TypeScriptReporter.js +42 -18
  138. package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.d.ts +2 -2
  139. package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.js +1 -0
  140. package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.js +2 -2
  141. package/lib/utils/async/pool.d.ts +1 -0
  142. package/lib/utils/async/pool.js +10 -0
  143. package/lib/utils/path/relativeToContext.d.ts +2 -0
  144. package/lib/utils/path/relativeToContext.js +16 -0
  145. package/lib/watch/InclusiveNodeWatchFileSystem.d.ts +5 -5
  146. package/lib/watch/InclusiveNodeWatchFileSystem.js +90 -92
  147. package/lib/watch/WatchFileSystem.d.ts +5 -22
  148. package/package.json +50 -67
  149. package/CHANGELOG.md +0 -318
  150. package/changelog.config.js +0 -36
  151. package/lib/eslint-reporter/EsLintReporterConfiguration.d.ts +0 -11
  152. package/lib/eslint-reporter/EsLintReporterConfiguration.js +0 -26
  153. package/lib/eslint-reporter/EsLintReporterOptions.d.ts +0 -8
  154. package/lib/eslint-reporter/EsLintReporterOptions.js +0 -2
  155. package/lib/eslint-reporter/assertEsLintSupport.d.ts +0 -3
  156. package/lib/eslint-reporter/assertEsLintSupport.js +0 -30
  157. package/lib/eslint-reporter/issue/EsLintIssueFactory.d.ts +0 -4
  158. package/lib/eslint-reporter/issue/EsLintIssueFactory.js +0 -32
  159. package/lib/eslint-reporter/reporter/EsLintReporter.d.ts +0 -4
  160. package/lib/eslint-reporter/reporter/EsLintReporter.js +0 -133
  161. package/lib/eslint-reporter/reporter/EsLintReporterRpcClient.d.ts +0 -4
  162. package/lib/eslint-reporter/reporter/EsLintReporterRpcClient.js +0 -13
  163. package/lib/eslint-reporter/reporter/EsLintReporterRpcService.d.ts +0 -1
  164. package/lib/eslint-reporter/reporter/EsLintReporterRpcService.js +0 -11
  165. package/lib/eslint-reporter/types/eslint.d.ts +0 -31
  166. package/lib/eslint-reporter/types/eslint.js +0 -2
  167. package/lib/formatter/FormatterFactory.d.ts +0 -13
  168. package/lib/formatter/FormatterFactory.js +0 -18
  169. package/lib/watch/CompilerWithWatchFileSystem.d.ts +0 -6
  170. package/lib/watch/CompilerWithWatchFileSystem.js +0 -2
@@ -3,10 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const chokidar_1 = __importDefault(require("chokidar"));
6
+ exports.InclusiveNodeWatchFileSystem = void 0;
7
7
  const path_1 = require("path");
8
- const reporter_1 = require("../reporter");
8
+ const chokidar_1 = __importDefault(require("chokidar"));
9
9
  const minimatch_1 = __importDefault(require("minimatch"));
10
+ const reporter_1 = require("../reporter");
10
11
  const BUILTIN_IGNORED_DIRS = ['node_modules', '.git', '.yarn', '.pnp'];
11
12
  function createIsIgnored(ignored, excluded) {
12
13
  const ignoredPatterns = ignored ? (Array.isArray(ignored) ? ignored : [ignored]) : [];
@@ -15,9 +16,6 @@ function createIsIgnored(ignored, excluded) {
15
16
  if (typeof pattern === 'string') {
16
17
  return (path) => minimatch_1.default(path, pattern);
17
18
  }
18
- else if (typeof pattern === 'function') {
19
- return pattern;
20
- }
21
19
  else if (pattern instanceof RegExp) {
22
20
  return (path) => pattern.test(path);
23
21
  }
@@ -38,98 +36,98 @@ class InclusiveNodeWatchFileSystem {
38
36
  this.compiler = compiler;
39
37
  this.pluginState = pluginState;
40
38
  this.paused = true;
41
- this.dirsWatchers = new Map();
42
- }
43
- get watcher() {
44
- var _a;
45
- return this.watchFileSystem.watcher || ((_a = this.watchFileSystem.wfs) === null || _a === void 0 ? void 0 : _a.watcher);
46
- }
47
- watch(files, dirs, missing, startTime, options, callback, callbackUndelayed) {
48
- var _a, _b, _c, _d;
49
- reporter_1.clearFilesChange(this.compiler);
50
- const isIgnored = createIsIgnored(options === null || options === void 0 ? void 0 : options.ignored, ((_a = this.pluginState.lastDependencies) === null || _a === void 0 ? void 0 : _a.excluded) || []);
51
- // use standard watch file system for files and missing
52
- const standardWatcher = this.watchFileSystem.watch(files, dirs, missing, startTime, options, callback, callbackUndelayed);
53
- (_b = this.watcher) === null || _b === void 0 ? void 0 : _b.on('change', (file) => {
54
- if (typeof file === 'string' && !isIgnored(file)) {
55
- reporter_1.updateFilesChange(this.compiler, { changedFiles: [file] });
56
- }
57
- });
58
- (_c = this.watcher) === null || _c === void 0 ? void 0 : _c.on('remove', (file) => {
59
- if (typeof file === 'string' && !isIgnored(file)) {
60
- reporter_1.updateFilesChange(this.compiler, { deletedFiles: [file] });
61
- }
62
- });
63
- // calculate what to change
64
- const prevDirs = Array.from(this.dirsWatchers.keys());
65
- const nextDirs = Array.from(((_d = this.pluginState.lastDependencies) === null || _d === void 0 ? void 0 : _d.dirs) || []);
66
- const dirsToUnwatch = prevDirs.filter((prevDir) => !nextDirs.includes(prevDir));
67
- const dirsToWatch = nextDirs.filter((nextDir) => !prevDirs.includes(nextDir) && !isIgnored(nextDir));
68
- // update dirs watcher
69
- dirsToUnwatch.forEach((dirToUnwatch) => {
70
- var _a;
71
- (_a = this.dirsWatchers.get(dirToUnwatch)) === null || _a === void 0 ? void 0 : _a.close();
72
- this.dirsWatchers.delete(dirToUnwatch);
73
- });
74
- dirsToWatch.forEach((dirToWatch) => {
75
- const interval = typeof (options === null || options === void 0 ? void 0 : options.poll) === 'number' ? options.poll : undefined;
76
- const dirWatcher = chokidar_1.default.watch(dirToWatch, {
77
- ignoreInitial: true,
78
- ignorePermissionErrors: true,
79
- ignored: (path) => isIgnored(path),
80
- usePolling: (options === null || options === void 0 ? void 0 : options.poll) ? true : undefined,
81
- interval: interval,
82
- binaryInterval: interval,
83
- alwaysStat: true,
84
- atomic: true,
85
- awaitWriteFinish: true,
86
- });
87
- dirWatcher.on('add', (file, stats) => {
88
- var _a, _b;
89
- if (this.paused) {
90
- return;
91
- }
92
- const extension = path_1.extname(file);
93
- const supportedExtensions = ((_a = this.pluginState.lastDependencies) === null || _a === void 0 ? void 0 : _a.extensions) || [];
94
- if (!supportedExtensions.includes(extension)) {
95
- return;
39
+ this.watch = (files, dirs, missing, startTime, options, callback, callbackUndelayed) => {
40
+ var _a, _b, _c, _d;
41
+ reporter_1.clearFilesChange(this.compiler);
42
+ const isIgnored = createIsIgnored(options === null || options === void 0 ? void 0 : options.ignored, ((_a = this.pluginState.lastDependencies) === null || _a === void 0 ? void 0 : _a.excluded) || []);
43
+ // use standard watch file system for files and missing
44
+ const standardWatcher = this.watchFileSystem.watch(files, dirs, missing, startTime, options, callback, callbackUndelayed);
45
+ (_b = this.watcher) === null || _b === void 0 ? void 0 : _b.on('change', (file) => {
46
+ if (typeof file === 'string' && !isIgnored(file)) {
47
+ reporter_1.updateFilesChange(this.compiler, { changedFiles: [file] });
96
48
  }
97
- reporter_1.updateFilesChange(this.compiler, { changedFiles: [file] });
98
- const mtime = (stats === null || stats === void 0 ? void 0 : stats.mtimeMs) || (stats === null || stats === void 0 ? void 0 : stats.ctimeMs) || 1;
99
- (_b = this.watcher) === null || _b === void 0 ? void 0 : _b._onChange(dirToWatch, mtime, file, 'rename');
100
49
  });
101
- dirWatcher.on('unlink', (file) => {
102
- var _a, _b;
103
- if (this.paused) {
104
- return;
50
+ (_c = this.watcher) === null || _c === void 0 ? void 0 : _c.on('remove', (file) => {
51
+ if (typeof file === 'string' && !isIgnored(file)) {
52
+ reporter_1.updateFilesChange(this.compiler, { deletedFiles: [file] });
105
53
  }
106
- const extension = path_1.extname(file);
107
- const supportedExtensions = ((_a = this.pluginState.lastDependencies) === null || _a === void 0 ? void 0 : _a.extensions) || [];
108
- if (!supportedExtensions.includes(extension)) {
109
- return;
110
- }
111
- reporter_1.updateFilesChange(this.compiler, { deletedFiles: [file] });
112
- (_b = this.watcher) === null || _b === void 0 ? void 0 : _b._onRemove(dirToWatch, file, 'rename');
113
54
  });
114
- this.dirsWatchers.set(dirToWatch, dirWatcher);
115
- });
116
- this.paused = false;
117
- return Object.assign(Object.assign({}, standardWatcher), { close: () => {
118
- reporter_1.clearFilesChange(this.compiler);
119
- if (standardWatcher) {
120
- standardWatcher.close();
121
- }
122
- this.dirsWatchers.forEach((dirWatcher) => {
123
- dirWatcher === null || dirWatcher === void 0 ? void 0 : dirWatcher.close();
55
+ // calculate what to change
56
+ const prevDirs = Array.from(this.dirsWatchers.keys());
57
+ const nextDirs = Array.from(((_d = this.pluginState.lastDependencies) === null || _d === void 0 ? void 0 : _d.dirs) || []);
58
+ const dirsToUnwatch = prevDirs.filter((prevDir) => !nextDirs.includes(prevDir));
59
+ const dirsToWatch = nextDirs.filter((nextDir) => !prevDirs.includes(nextDir) && !isIgnored(nextDir));
60
+ // update dirs watcher
61
+ dirsToUnwatch.forEach((dirToUnwatch) => {
62
+ var _a;
63
+ (_a = this.dirsWatchers.get(dirToUnwatch)) === null || _a === void 0 ? void 0 : _a.close();
64
+ this.dirsWatchers.delete(dirToUnwatch);
65
+ });
66
+ dirsToWatch.forEach((dirToWatch) => {
67
+ const interval = typeof (options === null || options === void 0 ? void 0 : options.poll) === 'number' ? options.poll : undefined;
68
+ const dirWatcher = chokidar_1.default.watch(dirToWatch, {
69
+ ignoreInitial: true,
70
+ ignorePermissionErrors: true,
71
+ ignored: (path) => isIgnored(path),
72
+ usePolling: (options === null || options === void 0 ? void 0 : options.poll) ? true : undefined,
73
+ interval: interval,
74
+ binaryInterval: interval,
75
+ alwaysStat: true,
76
+ atomic: true,
77
+ awaitWriteFinish: true,
124
78
  });
125
- this.dirsWatchers.clear();
126
- this.paused = true;
127
- }, pause: () => {
128
- if (standardWatcher) {
129
- standardWatcher.pause();
130
- }
131
- this.paused = true;
132
- } });
79
+ dirWatcher.on('add', (file, stats) => {
80
+ var _a, _b;
81
+ if (this.paused) {
82
+ return;
83
+ }
84
+ const extension = path_1.extname(file);
85
+ const supportedExtensions = ((_a = this.pluginState.lastDependencies) === null || _a === void 0 ? void 0 : _a.extensions) || [];
86
+ if (!supportedExtensions.includes(extension)) {
87
+ return;
88
+ }
89
+ reporter_1.updateFilesChange(this.compiler, { changedFiles: [file] });
90
+ const mtime = (stats === null || stats === void 0 ? void 0 : stats.mtimeMs) || (stats === null || stats === void 0 ? void 0 : stats.ctimeMs) || 1;
91
+ (_b = this.watcher) === null || _b === void 0 ? void 0 : _b._onChange(dirToWatch, mtime, file, 'rename');
92
+ });
93
+ dirWatcher.on('unlink', (file) => {
94
+ var _a, _b;
95
+ if (this.paused) {
96
+ return;
97
+ }
98
+ const extension = path_1.extname(file);
99
+ const supportedExtensions = ((_a = this.pluginState.lastDependencies) === null || _a === void 0 ? void 0 : _a.extensions) || [];
100
+ if (!supportedExtensions.includes(extension)) {
101
+ return;
102
+ }
103
+ reporter_1.updateFilesChange(this.compiler, { deletedFiles: [file] });
104
+ (_b = this.watcher) === null || _b === void 0 ? void 0 : _b._onRemove(dirToWatch, file, 'rename');
105
+ });
106
+ this.dirsWatchers.set(dirToWatch, dirWatcher);
107
+ });
108
+ this.paused = false;
109
+ return Object.assign(Object.assign({}, standardWatcher), { close: () => {
110
+ reporter_1.clearFilesChange(this.compiler);
111
+ if (standardWatcher) {
112
+ standardWatcher.close();
113
+ }
114
+ this.dirsWatchers.forEach((dirWatcher) => {
115
+ dirWatcher === null || dirWatcher === void 0 ? void 0 : dirWatcher.close();
116
+ });
117
+ this.dirsWatchers.clear();
118
+ this.paused = true;
119
+ }, pause: () => {
120
+ if (standardWatcher) {
121
+ standardWatcher.pause();
122
+ }
123
+ this.paused = true;
124
+ } });
125
+ };
126
+ this.dirsWatchers = new Map();
127
+ }
128
+ get watcher() {
129
+ var _a;
130
+ return this.watchFileSystem.watcher || ((_a = this.watchFileSystem.wfs) === null || _a === void 0 ? void 0 : _a.watcher);
133
131
  }
134
132
  }
135
133
  exports.InclusiveNodeWatchFileSystem = InclusiveNodeWatchFileSystem;
@@ -1,33 +1,16 @@
1
1
  /// <reference types="node" />
2
- import { EventEmitter } from 'events';
3
- interface WatchFileSystemOptions {
4
- aggregateTimeout: number;
5
- poll: boolean;
6
- followSymlinks: boolean;
7
- ignored: string | RegExp | Function | (string | RegExp | Function)[];
8
- }
2
+ import type { EventEmitter } from 'events';
3
+ import type webpack from 'webpack';
9
4
  interface Watchpack extends EventEmitter {
10
5
  _onChange(item: string, mtime: number, file: string, type?: string): void;
11
6
  _onRemove(item: string, file: string, type?: string): void;
12
7
  }
13
- interface WatcherV4 {
14
- close(): void;
15
- pause(): void;
16
- getFileTimestamps(): Map<string, number>;
17
- getContextTimestamps(): Map<string, number>;
18
- }
19
- interface WatcherV5 {
20
- close(): void;
21
- pause(): void;
22
- getFileTimeInfoEntries(): Map<string, number>;
23
- getContextTimeInfoEntries(): Map<string, number>;
24
- }
25
- declare type Watcher = WatcherV4 | WatcherV5;
8
+ declare type Watch = webpack.Compiler['watchFileSystem']['watch'];
26
9
  interface WatchFileSystem {
27
10
  watcher: Watchpack;
28
11
  wfs?: {
29
12
  watcher: Watchpack;
30
13
  };
31
- watch(files: Iterable<string>, dirs: Iterable<string>, missing: Iterable<string>, startTime?: number, options?: Partial<WatchFileSystemOptions>, callback?: Function, callbackUndelayed?: Function): Watcher;
14
+ watch: Watch;
32
15
  }
33
- export { WatchFileSystem, WatchFileSystemOptions, Watchpack, WatcherV4, WatcherV5, Watcher };
16
+ export { WatchFileSystem, Watchpack };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fork-ts-checker-webpack-plugin",
3
- "version": "6.3.5",
3
+ "version": "7.0.0-alpha.10",
4
4
  "description": "Runs typescript type checker and linter on separate process.",
5
5
  "keywords": [
6
6
  "fast",
@@ -38,13 +38,8 @@
38
38
  "test:e2e": "npm pack && cross-env jest --config=test/e2e/jest.config.js --ci -i -b",
39
39
  "precommit": "cross-env lint-staged && yarn build && yarn test:unit",
40
40
  "commit": "cross-env git-cz",
41
- "semantic-release": "semantic-release"
42
- },
43
- "husky": {
44
- "hooks": {
45
- "pre-commit": "lint-staged && yarn build && yarn test:unit",
46
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
47
- }
41
+ "semantic-release": "semantic-release",
42
+ "prepare": "husky install"
48
43
  },
49
44
  "commitlint": {
50
45
  "extends": [
@@ -60,79 +55,67 @@
60
55
  }
61
56
  },
62
57
  "dependencies": {
63
- "@babel/code-frame": "^7.8.3",
64
- "@types/json-schema": "^7.0.5",
65
- "chalk": "^4.1.0",
66
- "chokidar": "^3.4.2",
67
- "cosmiconfig": "^6.0.0",
58
+ "@babel/code-frame": "^7.14.5",
59
+ "chalk": "^4.1.2",
60
+ "chokidar": "^3.5.2",
61
+ "cosmiconfig": "^7.0.0",
68
62
  "deepmerge": "^4.2.2",
69
- "fs-extra": "^9.0.0",
70
- "glob": "^7.1.6",
71
- "memfs": "^3.1.2",
63
+ "fs-extra": "^10.0.0",
64
+ "glob": "^7.1.7",
65
+ "memfs": "^3.2.2",
72
66
  "minimatch": "^3.0.4",
73
- "schema-utils": "2.7.0",
74
- "semver": "^7.3.2",
75
- "tapable": "^1.0.0"
67
+ "schema-utils": "3.1.1",
68
+ "semver": "^7.3.5",
69
+ "tapable": "^2.0.0"
76
70
  },
77
71
  "peerDependencies": {
78
- "eslint": ">= 6",
79
- "typescript": ">= 2.7",
80
- "webpack": ">= 4",
81
- "vue-template-compiler": "*"
82
- },
83
- "peerDependenciesMeta": {
84
- "eslint": {
85
- "optional": true
86
- },
87
- "vue-template-compiler": {
88
- "optional": true
89
- }
72
+ "typescript": ">3.6.0",
73
+ "webpack": "^5.11.0"
90
74
  },
91
75
  "devDependencies": {
92
- "@commitlint/config-conventional": "^11.0.0",
76
+ "@commitlint/config-conventional": "^13.1.0",
93
77
  "@semantic-release/commit-analyzer": "^8.0.1",
94
78
  "@semantic-release/exec": "^5.0.0",
95
- "@semantic-release/github": "^7.1.1",
96
- "@semantic-release/npm": "^7.0.6",
97
- "@semantic-release/release-notes-generator": "^9.0.1",
98
- "@types/babel__code-frame": "^7.0.2",
79
+ "@semantic-release/github": "^7.2.3",
80
+ "@semantic-release/npm": "^7.1.3",
81
+ "@semantic-release/release-notes-generator": "^9.0.3",
82
+ "@types/babel__code-frame": "^7.0.3",
99
83
  "@types/cross-spawn": "^6.0.2",
100
- "@types/eslint": "^7.2.4",
101
- "@types/fs-extra": "^9.0.2",
102
- "@types/jest": "^26.0.14",
103
- "@types/minimatch": "^3.0.1",
104
- "@types/mock-fs": "^4.13.0",
105
- "@types/node": "^14.11.10",
106
- "@types/rimraf": "^3.0.0",
107
- "@types/semver": "^7.3.4",
108
- "@types/webpack": "^4.41.22",
109
- "@typescript-eslint/eslint-plugin": "^2.27.0",
110
- "@typescript-eslint/parser": "^2.27.0",
111
- "commitlint": "^11.0.0",
112
- "cross-env": "^7.0.2",
113
- "cross-spawn": "^7.0.3",
114
- "eslint": "^6.8.0",
115
- "eslint-config-prettier": "^6.13.0",
84
+ "@types/fs-extra": "^9.0.12",
85
+ "@types/jest": "^26.0.24",
86
+ "@types/json-schema": "^7.0.9",
87
+ "@types/minimatch": "^3.0.5",
88
+ "@types/mock-fs": "^4.13.1",
89
+ "@types/node": "^16.4.13",
90
+ "@types/rimraf": "^3.0.1",
91
+ "@types/semver": "^7.3.8",
92
+ "@typescript-eslint/eslint-plugin": "^5.1.0",
93
+ "@typescript-eslint/parser": "^5.1.0",
94
+ "commitlint": "^13.1.0",
95
+ "cross-env": "^7.0.3",
96
+ "eslint": "^7.32.0",
97
+ "eslint-plugin-import": "^2.25.2",
116
98
  "eslint-plugin-node": "^11.1.0",
117
- "eslint-plugin-prettier": "^3.1.4",
118
- "git-cz": "^4.7.1",
119
- "husky": "^4.3.0",
120
- "jest": "^26.5.3",
121
- "jest-circus": "^26.5.3",
122
- "jest-environment-node": "^26.5.2",
123
- "lint-staged": "^10.4.2",
124
- "mock-fs": "^4.13.0",
125
- "prettier": "^2.1.2",
99
+ "eslint-plugin-prettier": "^4.0.0",
100
+ "git-cz": "^4.7.6",
101
+ "husky": "^7.0.0",
102
+ "jest": "^27.0.6",
103
+ "jest-circus": "^27.0.6",
104
+ "jest-environment-node": "^27.0.6",
105
+ "json-schema": "^0.3.0",
106
+ "karton": "^0.4.1",
107
+ "lint-staged": "^11.1.2",
108
+ "mock-fs": "^5.0.0",
109
+ "prettier": "^2.3.2",
126
110
  "rimraf": "^3.0.2",
127
- "semantic-release": "^17.2.1",
111
+ "semantic-release": "^17.4.4",
128
112
  "strip-ansi": "^6.0.0",
129
- "tree-kill": "^1.2.2",
130
- "ts-jest": "^26.4.1",
131
- "typescript": "^3.8.3",
132
- "webpack": "^4.42.1"
113
+ "ts-jest": "^27.0.4",
114
+ "typescript": "^4.3.5",
115
+ "webpack": "^5.49.0"
133
116
  },
134
117
  "engines": {
135
- "node": ">=10",
118
+ "node": ">=12.13.0",
136
119
  "yarn": ">=1.0.0"
137
120
  }
138
121
  }