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
@@ -12,9 +12,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.composeReporterRpcClients = exports.createReporterRpcClient = void 0;
15
16
  const rpc_1 = require("../../rpc");
16
- const ReporterRpcProcedure_1 = require("./ReporterRpcProcedure");
17
17
  const flatten_1 = __importDefault(require("../../utils/array/flatten"));
18
+ const ReporterRpcProcedure_1 = require("./ReporterRpcProcedure");
19
+ // suppressing because it will be removed anyway
20
+ // eslint-disable-next-line @typescript-eslint/ban-types
18
21
  function createReporterRpcClient(channel, configuration) {
19
22
  const rpcClient = rpc_1.createRpcClient(channel.clientPort);
20
23
  return {
@@ -45,8 +48,8 @@ function createReporterRpcClient(channel, configuration) {
45
48
  yield channel.close();
46
49
  }
47
50
  }),
48
- getReport: (change) => __awaiter(this, void 0, void 0, function* () {
49
- const reportId = yield rpcClient.dispatchCall(ReporterRpcProcedure_1.getReport, change);
51
+ getReport: (change, watching) => __awaiter(this, void 0, void 0, function* () {
52
+ const reportId = yield rpcClient.dispatchCall(ReporterRpcProcedure_1.getReport, { change, watching });
50
53
  return {
51
54
  getDependencies() {
52
55
  return rpcClient.dispatchCall(ReporterRpcProcedure_1.getDependencies, reportId);
@@ -67,7 +70,7 @@ function composeReporterRpcClients(clients) {
67
70
  isConnected: () => clients.every((client) => client.isConnected()),
68
71
  connect: () => Promise.all(clients.map((client) => client.connect())).then(() => undefined),
69
72
  disconnect: () => Promise.all(clients.map((client) => client.disconnect())).then(() => undefined),
70
- getReport: (change) => Promise.all(clients.map((client) => client.getReport(change))).then((reports) => ({
73
+ getReport: (change, watching) => Promise.all(clients.map((client) => client.getReport(change, watching))).then((reports) => ({
71
74
  getDependencies: () => Promise.all(reports.map((report) => report.getDependencies())).then((dependencies) => dependencies.reduce((mergedDependencies, singleDependencies) => ({
72
75
  files: Array.from(new Set([...mergedDependencies.files, ...singleDependencies.files])),
73
76
  dirs: Array.from(new Set([...mergedDependencies.dirs, ...singleDependencies.dirs])),
@@ -1,9 +1,12 @@
1
- import { RpcProcedure } from '../../rpc';
2
- import { FilesChange } from '../FilesChange';
3
- import { Issue } from '../../issue';
4
- import { FilesMatch } from '../FilesMatch';
1
+ import type { Issue } from '../../issue';
2
+ import type { RpcProcedure } from '../../rpc';
3
+ import type { FilesChange } from '../FilesChange';
4
+ import type { FilesMatch } from '../FilesMatch';
5
5
  declare const configure: RpcProcedure<object, void>;
6
- declare const getReport: RpcProcedure<FilesChange, void>;
6
+ declare const getReport: RpcProcedure<{
7
+ change: FilesChange;
8
+ watching: boolean;
9
+ }, void>;
7
10
  declare const getDependencies: RpcProcedure<void, FilesMatch>;
8
11
  declare const getIssues: RpcProcedure<void, Issue[]>;
9
12
  declare const closeReport: RpcProcedure<void, void>;
@@ -1,5 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.closeReport = exports.getIssues = exports.getDependencies = exports.getReport = exports.configure = void 0;
4
+ // suppressing because it will be removed anyway
5
+ // eslint-disable-next-line @typescript-eslint/ban-types
3
6
  const configure = 'configure';
4
7
  exports.configure = configure;
5
8
  const getReport = 'getReport';
@@ -1,5 +1,5 @@
1
- import { Reporter } from '../Reporter';
2
- import { RpcMessagePort } from '../../rpc';
1
+ import type { RpcMessagePort } from '../../rpc';
2
+ import type { Reporter } from '../Reporter';
3
3
  interface ReporterRpcService {
4
4
  isOpen: () => boolean;
5
5
  open: () => Promise<void>;
@@ -9,8 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.registerReporterRpcService = void 0;
12
13
  const rpc_1 = require("../../rpc");
13
14
  const ReporterRpcProcedure_1 = require("./ReporterRpcProcedure");
15
+ // suppressing because it will be removed anyway
16
+ // eslint-disable-next-line @typescript-eslint/ban-types
14
17
  function registerReporterRpcService(servicePort, reporterFactory) {
15
18
  const rpcService = rpc_1.createRpcService(servicePort);
16
19
  let reporterRegistered = false;
@@ -19,11 +22,11 @@ function registerReporterRpcService(servicePort, reporterFactory) {
19
22
  rpcService.addCallHandler(ReporterRpcProcedure_1.configure, (configuration) => __awaiter(this, void 0, void 0, function* () {
20
23
  rpcService.removeCallHandler(ReporterRpcProcedure_1.configure);
21
24
  const reporter = reporterFactory(configuration);
22
- rpcService.addCallHandler(ReporterRpcProcedure_1.getReport, (change) => __awaiter(this, void 0, void 0, function* () {
25
+ rpcService.addCallHandler(ReporterRpcProcedure_1.getReport, ({ change, watching }) => __awaiter(this, void 0, void 0, function* () {
23
26
  if (report) {
24
27
  throw new Error(`Close previous report before opening the next one.`);
25
28
  }
26
- report = yield reporter.getReport(change);
29
+ report = yield reporter.getReport(change, watching);
27
30
  }));
28
31
  rpcService.addCallHandler(ReporterRpcProcedure_1.getDependencies, () => {
29
32
  if (!report) {
@@ -1,5 +1,5 @@
1
- import { RpcProcedure, RpcProcedurePayload, RpcProcedureResult } from './RpcProcedure';
2
- import { RpcMessagePort } from './RpcMessagePort';
1
+ import type { RpcMessagePort } from './RpcMessagePort';
2
+ import type { RpcProcedure, RpcProcedurePayload, RpcProcedureResult } from './RpcProcedure';
3
3
  interface RpcClient {
4
4
  readonly isConnected: () => boolean;
5
5
  readonly connect: () => Promise<void>;
@@ -9,8 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const RpcMessage_1 = require("./RpcMessage");
12
+ exports.createRpcClient = void 0;
13
13
  const RpcRemoteError_1 = require("./error/RpcRemoteError");
14
+ const RpcMessage_1 = require("./RpcMessage");
14
15
  /* eslint-enable @typescript-eslint/no-explicit-any */
15
16
  function createRpcClient(port) {
16
17
  let callIndex = 0;
@@ -1,4 +1,4 @@
1
- import { RpcProcedure, RpcProcedurePayload, RpcProcedureResult } from './RpcProcedure';
1
+ import type { RpcProcedure, RpcProcedurePayload, RpcProcedureResult } from './RpcProcedure';
2
2
  interface RpcMessage<TType extends string = string, TProcedure extends RpcProcedure = RpcProcedure, TPayload = unknown> {
3
3
  rpc: true;
4
4
  type: TType;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRpcMessageKey = exports.isRpcThrowMessage = exports.isRpcReturnMessage = exports.isRpcCallMessage = exports.isRpcMessage = exports.createRpcThrow = exports.createRpcReturn = exports.createRpcCall = exports.createRpcMessage = void 0;
3
4
  function createRpcMessage(procedure, id, type, payload, source) {
4
5
  return {
5
6
  rpc: true,
@@ -19,6 +20,8 @@ function createRpcReturn(procedure, index, payload) {
19
20
  return createRpcMessage(procedure, index, 'return', payload);
20
21
  }
21
22
  exports.createRpcReturn = createRpcReturn;
23
+ // suppressing as it will be removed anyway
24
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
25
  function createRpcThrow(procedure, index, payload) {
23
26
  return createRpcMessage(procedure, index, 'throw', payload);
24
27
  }
@@ -1,4 +1,4 @@
1
- import { RpcMessagePort } from './RpcMessagePort';
1
+ import type { RpcMessagePort } from './RpcMessagePort';
2
2
  interface RpcMessageChannel {
3
3
  readonly servicePort: RpcMessagePort;
4
4
  readonly clientPort: RpcMessagePort;
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.createRpcMessageChannel = void 0;
12
13
  function createRpcMessageChannel(servicePort, clientPort, linkPorts, unlinkPorts) {
13
14
  // if there is not link and unlink function provided, we assume that channel is automatically linked
14
15
  let arePortsLinked = !linkPorts && !unlinkPorts;
@@ -1,5 +1,5 @@
1
- import { RpcProcedure } from './RpcProcedure';
2
- import { RpcMessagePort } from './RpcMessagePort';
1
+ import type { RpcMessagePort } from './RpcMessagePort';
2
+ import type { RpcProcedure } from './RpcProcedure';
3
3
  declare type RpcCallHandler<TPayload = any, TResult = any> = (payload: TPayload) => Promise<TResult>;
4
4
  interface RpcService {
5
5
  readonly isOpen: () => boolean;
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.createRpcService = void 0;
12
13
  const RpcMessage_1 = require("./RpcMessage");
13
14
  function createRpcService(port) {
14
15
  const handlers = new Map();
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RpcMessagePortClosedError = void 0;
3
4
  class RpcMessagePortClosedError extends Error {
4
5
  }
5
6
  exports.RpcMessagePortClosedError = RpcMessagePortClosedError;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RpcRemoteError = void 0;
3
4
  class RpcRemoteError extends Error {
4
5
  constructor(message, stack) {
5
6
  super(message);
package/lib/rpc/index.js CHANGED
@@ -1,9 +1,19 @@
1
1
  "use strict";
2
- function __export(m) {
3
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
- }
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
5
12
  Object.defineProperty(exports, "__esModule", { value: true });
6
- __export(require("./RpcMessage"));
7
- __export(require("./RpcClient"));
8
- __export(require("./RpcService"));
9
- __export(require("./RpcMessageChannel"));
13
+ __exportStar(require("./RpcMessage"), exports);
14
+ __exportStar(require("./RpcProcedure"), exports);
15
+ __exportStar(require("./RpcClient"), exports);
16
+ __exportStar(require("./RpcHost"), exports);
17
+ __exportStar(require("./RpcService"), exports);
18
+ __exportStar(require("./RpcMessagePort"), exports);
19
+ __exportStar(require("./RpcMessageChannel"), exports);
@@ -1,3 +1,3 @@
1
- import { RpcMessageChannel } from '../index';
1
+ import type { RpcMessageChannel } from '../index';
2
2
  declare function createRpcIpcMessageChannel(servicePath: string, memoryLimit?: number): RpcMessageChannel;
3
3
  export { createRpcIpcMessageChannel };
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createRpcIpcMessageChannel = void 0;
3
4
  const index_1 = require("../index");
4
5
  const RpcIpcMessagePort_1 = require("./RpcIpcMessagePort");
5
6
  function createRpcIpcMessageChannel(servicePath, memoryLimit = 2048) {
@@ -1,5 +1,5 @@
1
- import { ProcessLike } from './ProcessLike';
2
- import { RpcMessagePort } from '../index';
1
+ import type { RpcMessagePort } from '../index';
2
+ import type { ProcessLike } from './ProcessLike';
3
3
  declare function createRpcIpcMessagePort(process: ProcessLike): RpcMessagePort;
4
4
  declare function createRpcIpcForkedProcessMessagePort(filePath: string, memoryLimit?: number, autoRecreate?: boolean): RpcMessagePort;
5
5
  export { createRpcIpcMessagePort, createRpcIpcForkedProcessMessagePort };
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.createRpcIpcForkedProcessMessagePort = exports.createRpcIpcMessagePort = void 0;
12
13
  const child_process_1 = require("child_process");
13
14
  const RpcIpcMessagePortClosedError_1 = require("./error/RpcIpcMessagePortClosedError");
14
15
  function createRpcIpcMessagePort(process) {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RpcIpcMessagePortClosedError = void 0;
3
4
  const RpcMessagePortClosedError_1 = require("../../error/RpcMessagePortClosedError");
4
5
  class RpcIpcMessagePortClosedError extends RpcMessagePortClosedError_1.RpcMessagePortClosedError {
5
6
  constructor(message, code, signal) {
@@ -1,7 +1,14 @@
1
1
  "use strict";
2
- function __export(m) {
3
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
- }
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
5
12
  Object.defineProperty(exports, "__esModule", { value: true });
6
- __export(require("./RpcIpcMessagePort"));
7
- __export(require("./RpcIpcMessageChannel"));
13
+ __exportStar(require("./RpcIpcMessagePort"), exports);
14
+ __exportStar(require("./RpcIpcMessageChannel"), exports);
@@ -1,6 +1,6 @@
1
1
  interface TypeScriptConfigurationOverwrite {
2
2
  extends?: string;
3
- compilerOptions?: object;
3
+ compilerOptions?: any;
4
4
  include?: string[];
5
5
  exclude?: string[];
6
6
  files?: string[];
@@ -1,8 +1,8 @@
1
- import webpack from 'webpack';
2
- import { TypeScriptDiagnosticsOptions } from './TypeScriptDiagnosticsOptions';
3
- import { TypeScriptReporterOptions } from './TypeScriptReporterOptions';
4
- import { TypeScriptVueExtensionConfiguration } from './extension/vue/TypeScriptVueExtensionConfiguration';
5
- import { TypeScriptConfigurationOverwrite } from './TypeScriptConfigurationOverwrite';
1
+ import type webpack from 'webpack';
2
+ import type { TypeScriptVueExtensionConfiguration } from './extension/vue/TypeScriptVueExtensionConfiguration';
3
+ import type { TypeScriptConfigurationOverwrite } from './TypeScriptConfigurationOverwrite';
4
+ import type { TypeScriptDiagnosticsOptions } from './TypeScriptDiagnosticsOptions';
5
+ import type { TypeScriptReporterOptions } from './TypeScriptReporterOptions';
6
6
  interface TypeScriptReporterConfiguration {
7
7
  enabled: boolean;
8
8
  memoryLimit: number;
@@ -3,6 +3,7 @@ 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
+ exports.createTypeScriptReporterConfiguration = void 0;
6
7
  const path_1 = __importDefault(require("path"));
7
8
  const semver_1 = __importDefault(require("semver"));
8
9
  const TypeScriptVueExtensionConfiguration_1 = require("./extension/vue/TypeScriptVueExtensionConfiguration");
@@ -19,6 +20,7 @@ function createTypeScriptReporterConfiguration(compiler, options) {
19
20
  sourceMap: false,
20
21
  inlineSourceMap: false,
21
22
  };
23
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
22
24
  if (semver_1.default.gte(require(typescriptPath).version, '2.9.0')) {
23
25
  defaultCompilerOptions.declarationMap = false;
24
26
  }
@@ -1,8 +1,7 @@
1
- import { TypeScriptDiagnosticsOptions } from './TypeScriptDiagnosticsOptions';
2
- import { TypeScriptVueExtensionOptions } from './extension/vue/TypeScriptVueExtensionOptions';
3
- import { TypeScriptConfigurationOverwrite } from './TypeScriptConfigurationOverwrite';
4
- declare type TypeScriptReporterOptions = boolean | {
5
- enabled?: boolean;
1
+ import type { TypeScriptVueExtensionOptions } from './extension/vue/TypeScriptVueExtensionOptions';
2
+ import type { TypeScriptConfigurationOverwrite } from './TypeScriptConfigurationOverwrite';
3
+ import type { TypeScriptDiagnosticsOptions } from './TypeScriptDiagnosticsOptions';
4
+ declare type TypeScriptReporterOptions = {
6
5
  memoryLimit?: number;
7
6
  configFile?: string;
8
7
  configOverwrite?: TypeScriptConfigurationOverwrite;
@@ -1,3 +1,3 @@
1
- import { TypeScriptReporterConfiguration } from './TypeScriptReporterConfiguration';
1
+ import type { TypeScriptReporterConfiguration } from './TypeScriptReporterConfiguration';
2
2
  declare function assertTypeScriptSupport(configuration: TypeScriptReporterConfiguration): void;
3
3
  export { assertTypeScriptSupport };
@@ -1,39 +1,54 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
2
14
  var __importStar = (this && this.__importStar) || function (mod) {
3
15
  if (mod && mod.__esModule) return mod;
4
16
  var result = {};
5
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6
- result["default"] = mod;
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
7
19
  return result;
8
20
  };
9
21
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
22
  return (mod && mod.__esModule) ? mod : { "default": mod };
11
23
  };
12
24
  Object.defineProperty(exports, "__esModule", { value: true });
13
- const semver = __importStar(require("semver"));
14
- const fs_extra_1 = __importDefault(require("fs-extra"));
25
+ exports.assertTypeScriptSupport = void 0;
15
26
  const os_1 = __importDefault(require("os"));
27
+ const fs_extra_1 = __importDefault(require("fs-extra"));
28
+ const semver = __importStar(require("semver"));
16
29
  const TypeScriptVueExtensionSupport_1 = require("./extension/vue/TypeScriptVueExtensionSupport");
17
30
  function assertTypeScriptSupport(configuration) {
18
31
  let typescriptVersion;
19
32
  try {
33
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
20
34
  typescriptVersion = require(configuration.typescriptPath).version;
21
35
  }
22
- catch (error) { }
36
+ catch (error) {
37
+ // silent catch
38
+ }
23
39
  if (!typescriptVersion) {
24
40
  throw new Error('When you use ForkTsCheckerWebpackPlugin with typescript reporter enabled, you must install `typescript` package.');
25
41
  }
26
- if (semver.lt(typescriptVersion, '2.7.0')) {
42
+ if (semver.lt(typescriptVersion, '3.6.0')) {
27
43
  throw new Error([
28
44
  `ForkTsCheckerWebpackPlugin cannot use the current typescript version of ${typescriptVersion}.`,
29
- 'The minimum required version is 2.7.0.',
45
+ 'The minimum required version is 3.6.0.',
30
46
  ].join(os_1.default.EOL));
31
47
  }
32
- if (configuration.build && semver.lt(typescriptVersion, '3.6.0')) {
48
+ if (configuration.build && semver.lt(typescriptVersion, '3.8.0')) {
33
49
  throw new Error([
34
- `ForkTsCheckerWebpackPlugin cannot use the current typescript version of ${typescriptVersion} because of the "build" option enabled.`,
35
- 'The minimum version that supports "build" option is 3.6.0.',
36
- 'Consider upgrading `typescript` or disabling "build" option.',
50
+ `ForkTsCheckerWebpackPlugin doesn't support build option for the current typescript version of ${typescriptVersion}.`,
51
+ 'The minimum required version is 3.8.0.',
37
52
  ].join(os_1.default.EOL));
38
53
  }
39
54
  if (!fs_extra_1.default.existsSync(configuration.configFile)) {
@@ -1,4 +1,4 @@
1
- import { TypeScriptExtension } from './TypeScriptExtension';
1
+ import type { TypeScriptExtension } from './TypeScriptExtension';
2
2
  interface TypeScriptEmbeddedSource {
3
3
  sourceText: string;
4
4
  extension: '.ts' | '.tsx' | '.js';
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTypeScriptEmbeddedExtension = void 0;
3
4
  const path_1 = require("path");
4
5
  /**
5
6
  * It handles most of the logic required to process embedded TypeScript code (like in Vue components or MDX)
@@ -96,7 +97,7 @@ function createTypeScriptEmbeddedExtension({ embeddedExtensions, getEmbeddedSour
96
97
  },
97
98
  extendDependencies(dependencies) {
98
99
  return Object.assign(Object.assign({}, dependencies), { files: dependencies.files.map((fileName) => {
99
- const { embeddedExtension, embeddedFileName, extension, } = parsePotentiallyEmbeddedFileName(fileName);
100
+ const { embeddedExtension, embeddedFileName, extension } = parsePotentiallyEmbeddedFileName(fileName);
100
101
  if (embeddedExtensions.includes(embeddedExtension)) {
101
102
  const embeddedSource = getCachedEmbeddedSource(embeddedFileName);
102
103
  if (embeddedSource && embeddedSource.extension === extension) {
@@ -1,6 +1,6 @@
1
1
  import type * as ts from 'typescript';
2
- import { Issue } from '../../issue';
3
- import { FilesMatch } from '../../reporter';
2
+ import type { Issue } from '../../issue';
3
+ import type { FilesMatch } from '../../reporter';
4
4
  interface TypeScriptHostExtension {
5
5
  extendWatchSolutionBuilderHost?<TProgram extends ts.BuilderProgram, THost extends ts.SolutionBuilderWithWatchHost<TProgram>>(host: THost, parsedCommandLine?: ts.ParsedCommandLine): THost;
6
6
  extendWatchCompilerHost?<TProgram extends ts.BuilderProgram, THost extends ts.WatchCompilerHost<TProgram>>(host: THost, parsedCommandLine?: ts.ParsedCommandLine): THost;
@@ -1,4 +1,4 @@
1
- import { TypeScriptExtension } from '../TypeScriptExtension';
2
- import { TypeScriptVueExtensionConfiguration } from './TypeScriptVueExtensionConfiguration';
1
+ import type { TypeScriptExtension } from '../TypeScriptExtension';
2
+ import type { TypeScriptVueExtensionConfiguration } from './TypeScriptVueExtensionConfiguration';
3
3
  declare function createTypeScriptVueExtension(configuration: TypeScriptVueExtensionConfiguration): TypeScriptExtension;
4
4
  export { createTypeScriptVueExtension };
@@ -3,8 +3,9 @@ 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 TypeScriptEmbeddedExtension_1 = require("../TypeScriptEmbeddedExtension");
6
+ exports.createTypeScriptVueExtension = void 0;
7
7
  const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ const TypeScriptEmbeddedExtension_1 = require("../TypeScriptEmbeddedExtension");
8
9
  function createTypeScriptVueExtension(configuration) {
9
10
  function loadVueTemplateCompiler() {
10
11
  return require(configuration.compiler);
@@ -73,8 +74,8 @@ function createTypeScriptVueExtension(configuration) {
73
74
  }
74
75
  else if (isVueTemplateCompilerV3(compiler)) {
75
76
  const parsed = compiler.parse(vueSourceText);
76
- if (parsed.descriptor && (parsed.descriptor.script || parsed.descriptor.scriptSetup)) {
77
- const scriptV3 = (parsed.descriptor.script || parsed.descriptor.scriptSetup);
77
+ if (parsed.descriptor && parsed.descriptor.script) {
78
+ const scriptV3 = parsed.descriptor.script;
78
79
  // map newer version of SFCScriptBlock to the generic one
79
80
  script = {
80
81
  content: scriptV3.content,
@@ -1,4 +1,4 @@
1
- import { TypeScriptVueExtensionOptions } from './TypeScriptVueExtensionOptions';
1
+ import type { TypeScriptVueExtensionOptions } from './TypeScriptVueExtensionOptions';
2
2
  interface TypeScriptVueExtensionConfiguration {
3
3
  enabled: boolean;
4
4
  compiler: string;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTypeScriptVueExtensionConfiguration = void 0;
3
4
  function createTypeScriptVueExtensionConfiguration(options) {
4
5
  return Object.assign({ enabled: options === true, compiler: 'vue-template-compiler' }, (typeof options === 'object' ? options : {}));
5
6
  }
@@ -1,3 +1,3 @@
1
- import { TypeScriptVueExtensionConfiguration } from './TypeScriptVueExtensionConfiguration';
1
+ import type { TypeScriptVueExtensionConfiguration } from './TypeScriptVueExtensionConfiguration';
2
2
  declare function assertTypeScriptVueExtensionSupport(configuration: TypeScriptVueExtensionConfiguration): void;
3
3
  export { assertTypeScriptVueExtensionSupport };
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertTypeScriptVueExtensionSupport = void 0;
3
4
  function assertTypeScriptVueExtensionSupport(configuration) {
4
5
  // We need to import template compiler for vue lazily because it cannot be included it
5
6
  // as direct dependency because it is an optional dependency of fork-ts-checker-webpack-plugin.
@@ -20,7 +20,6 @@ interface SFCDescriptor {
20
20
  filename: string;
21
21
  template: SFCBlock | null;
22
22
  script: SFCBlock | null;
23
- scriptSetup: SFCBlock | null;
24
23
  styles: SFCBlock[];
25
24
  customBlocks: SFCBlock[];
26
25
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { Dirent, Stats } from 'fs';
2
+ import type { Dirent, Stats } from 'fs';
3
3
  /**
4
4
  * Interface to abstract file system implementation details.
5
5
  */
@@ -1,4 +1,4 @@
1
- import { FileSystem } from './FileSystem';
1
+ import type { FileSystem } from './FileSystem';
2
2
  /**
3
3
  * It's an implementation of FileSystem interface which reads and writes to the in-memory file system.
4
4
  *
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createMemFileSystem = void 0;
3
4
  const path_1 = require("path");
4
5
  const memfs_1 = require("memfs");
6
+ // eslint-disable-next-line node/no-unsupported-features/node-builtins
5
7
  /**
6
8
  * It's an implementation of FileSystem interface which reads and writes to the in-memory file system.
7
9
  *
@@ -1,4 +1,4 @@
1
- import { FileSystem } from './FileSystem';
1
+ import type { FileSystem } from './FileSystem';
2
2
  /**
3
3
  * It's an implementation of FileSystem interface which reads from the real file system, but write to the in-memory file system.
4
4
  *
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPassiveFileSystem = void 0;
3
4
  /**
4
5
  * It's an implementation of FileSystem interface which reads from the real file system, but write to the in-memory file system.
5
6
  *
@@ -1,4 +1,4 @@
1
- import { FileSystem } from './FileSystem';
1
+ import type { FileSystem } from './FileSystem';
2
2
  /**
3
3
  * It's an implementation of the FileSystem interface which reads and writes directly to the real file system.
4
4
  *
@@ -3,8 +3,10 @@ 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
+ exports.createRealFileSystem = void 0;
6
7
  const path_1 = require("path");
7
8
  const fs_extra_1 = __importDefault(require("fs-extra"));
9
+ // eslint-disable-next-line node/no-unsupported-features/node-builtins
8
10
  /**
9
11
  * It's an implementation of the FileSystem interface which reads and writes directly to the real file system.
10
12
  *
@@ -1,4 +1,4 @@
1
1
  import type * as ts from 'typescript';
2
- import { Issue } from '../../issue';
2
+ import type { Issue } from '../../issue';
3
3
  declare function createIssuesFromTsDiagnostics(typescript: typeof ts, diagnostics: ts.Diagnostic[]): Issue[];
4
4
  export { createIssuesFromTsDiagnostics };