fork-ts-checker-webpack-plugin 7.0.0-alpha.10 → 7.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ForkTsCheckerWebpackPlugin.d.ts +1 -1
- package/lib/ForkTsCheckerWebpackPlugin.js +29 -9
- package/lib/ForkTsCheckerWebpackPluginConfiguration.d.ts +1 -1
- package/lib/ForkTsCheckerWebpackPluginConfiguration.js +1 -1
- package/lib/ForkTsCheckerWebpackPluginOptions.d.ts +1 -1
- package/lib/ForkTsCheckerWebpackPluginState.d.ts +2 -3
- package/lib/ForkTsCheckerWebpackPluginState.js +1 -2
- package/lib/{reporter/FilesChange.d.ts → files-change.d.ts} +4 -4
- package/lib/{reporter/FilesChange.js → files-change.js} +2 -2
- package/lib/{reporter/FilesMatch.d.ts → files-match.d.ts} +0 -0
- package/lib/{reporter/FilesMatch.js → files-match.js} +0 -0
- package/lib/hooks/interceptDoneToGetWebpackDevServerTap.js +3 -0
- package/lib/hooks/pluginHooks.d.ts +1 -1
- package/lib/hooks/tapAfterCompileToAddDependencies.js +3 -0
- package/lib/hooks/tapAfterCompileToGetIssues.js +3 -0
- package/lib/hooks/tapAfterEnvironmentToPatchWatching.js +6 -0
- package/lib/hooks/tapDoneToAsyncGetIssues.js +5 -6
- package/lib/hooks/tapErrorToLogMessage.js +2 -2
- package/lib/hooks/tapStartToRunWorkers.d.ts +8 -0
- package/lib/hooks/tapStartToRunWorkers.js +95 -0
- package/lib/hooks/tapStopToTerminateWorkers.d.ts +5 -0
- package/lib/hooks/tapStopToTerminateWorkers.js +26 -0
- package/lib/infrastructure-logger.d.ts +10 -0
- package/lib/infrastructure-logger.js +15 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptConfigurationOverwrite.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptConfigurationOverwrite.js +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptDiagnosticsOptions.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptDiagnosticsOptions.js +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptReporterConfiguration.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptReporterConfiguration.js +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptReporterOptions.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptReporterOptions.js +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptSupport.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/TypeScriptSupport.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/TypeScriptEmbeddedExtension.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/TypeScriptEmbeddedExtension.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/TypeScriptExtension.d.ts +1 -1
- package/lib/{typescript-reporter → typescript}/extension/TypeScriptExtension.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtension.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtension.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionConfiguration.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionConfiguration.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionOptions.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionOptions.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionSupport.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionSupport.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue-template-compiler.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue-template-compiler.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue__compiler-sfc.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue__compiler-sfc.js +0 -0
- package/lib/typescript/worker/get-dependencies-worker.d.ts +5 -0
- package/lib/typescript/worker/get-dependencies-worker.js +18 -0
- package/lib/typescript/worker/get-issues-worker.d.ts +5 -0
- package/lib/typescript/worker/get-issues-worker.js +76 -0
- package/lib/typescript/worker/lib/artifacts.d.ts +4 -0
- package/lib/typescript/worker/lib/artifacts.js +90 -0
- package/lib/typescript/worker/lib/config.d.ts +14 -0
- package/lib/typescript/worker/lib/config.js +114 -0
- package/lib/typescript/worker/lib/dependencies.d.ts +3 -0
- package/lib/typescript/worker/lib/dependencies.js +87 -0
- package/lib/typescript/worker/lib/diagnostics.d.ts +7 -0
- package/lib/typescript/worker/lib/diagnostics.js +100 -0
- package/lib/typescript/worker/lib/extensions.d.ts +3 -0
- package/lib/typescript/worker/lib/extensions.js +11 -0
- package/lib/{typescript-reporter/file-system/FileSystem.d.ts → typescript/worker/lib/file-system/file-system.d.ts} +1 -2
- package/lib/{reporter/Report.js → typescript/worker/lib/file-system/file-system.js} +0 -0
- package/lib/typescript/worker/lib/file-system/mem-file-system.d.ts +5 -0
- package/lib/typescript/worker/lib/file-system/mem-file-system.js +78 -0
- package/lib/typescript/worker/lib/file-system/passive-file-system.d.ts +5 -0
- package/lib/typescript/worker/lib/file-system/passive-file-system.js +65 -0
- package/lib/typescript/worker/lib/file-system/real-file-system.d.ts +5 -0
- package/lib/typescript/worker/lib/file-system/real-file-system.js +187 -0
- package/lib/typescript/worker/lib/host/compiler-host.d.ts +2 -0
- package/lib/typescript/worker/lib/host/compiler-host.js +17 -0
- package/lib/typescript/worker/lib/host/watch-compiler-host.d.ts +2 -0
- package/lib/typescript/worker/lib/host/watch-compiler-host.js +32 -0
- package/lib/typescript/worker/lib/host/watch-solution-builder-host.d.ts +2 -0
- package/lib/typescript/worker/lib/host/watch-solution-builder-host.js +54 -0
- package/lib/typescript/worker/lib/performance.d.ts +3 -0
- package/lib/typescript/worker/lib/performance.js +32 -0
- package/lib/typescript/worker/lib/program/program.d.ts +2 -0
- package/lib/typescript/worker/lib/program/program.js +32 -0
- package/lib/typescript/worker/lib/program/solution-builder.d.ts +2 -0
- package/lib/typescript/worker/lib/program/solution-builder.js +39 -0
- package/lib/typescript/worker/lib/program/watch-program.d.ts +3 -0
- package/lib/typescript/worker/lib/program/watch-program.js +49 -0
- package/lib/{typescript-reporter/reporter/ControlledTypeScriptSystem.d.ts → typescript/worker/lib/system.d.ts} +4 -6
- package/lib/typescript/worker/lib/system.js +209 -0
- package/lib/typescript/worker/lib/tracing.d.ts +4 -0
- package/lib/typescript/worker/lib/tracing.js +28 -0
- package/lib/typescript/worker/lib/tsbuildinfo.d.ts +4 -0
- package/lib/typescript/worker/lib/tsbuildinfo.js +92 -0
- package/lib/typescript/worker/lib/typescript.d.ts +2 -0
- package/lib/typescript/worker/lib/typescript.js +6 -0
- package/lib/typescript/worker/lib/worker-config.d.ts +2 -0
- package/lib/typescript/worker/lib/worker-config.js +5 -0
- package/lib/utils/async/pool.d.ts +1 -1
- package/lib/utils/async/pool.js +3 -14
- package/lib/{rpc/rpc-ipc/error/RpcIpcMessagePortClosedError.d.ts → utils/rpc/error.d.ts} +2 -3
- package/lib/utils/rpc/error.js +12 -0
- package/lib/utils/rpc/expose.d.ts +1 -0
- package/lib/utils/rpc/expose.js +78 -0
- package/lib/utils/rpc/index.d.ts +5 -0
- package/lib/utils/rpc/index.js +12 -0
- package/lib/utils/rpc/types.d.ts +19 -0
- package/lib/{reporter/Reporter.js → utils/rpc/types.js} +0 -0
- package/lib/utils/rpc/worker.d.ts +13 -0
- package/lib/utils/rpc/worker.js +79 -0
- package/lib/utils/rpc/wrap.d.ts +4 -0
- package/lib/utils/rpc/wrap.js +96 -0
- package/lib/watch/InclusiveNodeWatchFileSystem.js +7 -7
- package/package.json +1 -1
- package/lib/error/OperationCanceledError.d.ts +0 -4
- package/lib/error/OperationCanceledError.js +0 -10
- package/lib/hooks/tapStartToConnectAndRunReporter.d.ts +0 -6
- package/lib/hooks/tapStartToConnectAndRunReporter.js +0 -130
- package/lib/hooks/tapStopToDisconnectReporter.d.ts +0 -5
- package/lib/hooks/tapStopToDisconnectReporter.js +0 -30
- package/lib/profile/Performance.d.ts +0 -11
- package/lib/profile/Performance.js +0 -63
- package/lib/reporter/AggregatedReporter.d.ts +0 -6
- package/lib/reporter/AggregatedReporter.js +0 -61
- package/lib/reporter/Report.d.ts +0 -8
- package/lib/reporter/Reporter.d.ts +0 -6
- package/lib/reporter/index.d.ts +0 -7
- package/lib/reporter/index.js +0 -19
- package/lib/reporter/reporter-rpc/ReporterRpcClient.d.ts +0 -10
- package/lib/reporter/reporter-rpc/ReporterRpcClient.js +0 -85
- package/lib/reporter/reporter-rpc/ReporterRpcProcedure.d.ts +0 -13
- package/lib/reporter/reporter-rpc/ReporterRpcProcedure.js +0 -15
- package/lib/reporter/reporter-rpc/ReporterRpcService.d.ts +0 -9
- package/lib/reporter/reporter-rpc/ReporterRpcService.js +0 -77
- package/lib/rpc/RpcClient.d.ts +0 -10
- package/lib/rpc/RpcClient.js +0 -79
- package/lib/rpc/RpcHost.d.ts +0 -6
- package/lib/rpc/RpcHost.js +0 -2
- package/lib/rpc/RpcMessage.d.ts +0 -26
- package/lib/rpc/RpcMessage.js +0 -48
- package/lib/rpc/RpcMessageChannel.d.ts +0 -10
- package/lib/rpc/RpcMessageChannel.js +0 -50
- package/lib/rpc/RpcMessagePort.d.ts +0 -14
- package/lib/rpc/RpcMessagePort.js +0 -2
- package/lib/rpc/RpcProcedure.d.ts +0 -5
- package/lib/rpc/RpcProcedure.js +0 -2
- package/lib/rpc/RpcService.d.ts +0 -12
- package/lib/rpc/RpcService.js +0 -64
- package/lib/rpc/error/RpcMessagePortClosedError.d.ts +0 -3
- package/lib/rpc/error/RpcMessagePortClosedError.js +0 -6
- package/lib/rpc/error/RpcRemoteError.d.ts +0 -6
- package/lib/rpc/error/RpcRemoteError.js +0 -18
- package/lib/rpc/index.d.ts +0 -7
- package/lib/rpc/index.js +0 -19
- package/lib/rpc/rpc-ipc/ProcessLike.d.ts +0 -12
- package/lib/rpc/rpc-ipc/ProcessLike.js +0 -3
- package/lib/rpc/rpc-ipc/RpcIpcMessageChannel.d.ts +0 -3
- package/lib/rpc/rpc-ipc/RpcIpcMessageChannel.js +0 -11
- package/lib/rpc/rpc-ipc/RpcIpcMessagePort.d.ts +0 -5
- package/lib/rpc/rpc-ipc/RpcIpcMessagePort.js +0 -151
- package/lib/rpc/rpc-ipc/error/RpcIpcMessagePortClosedError.js +0 -13
- package/lib/rpc/rpc-ipc/index.d.ts +0 -2
- package/lib/rpc/rpc-ipc/index.js +0 -14
- package/lib/typescript-reporter/file-system/FileSystem.js +0 -2
- package/lib/typescript-reporter/file-system/MemFileSystem.d.ts +0 -8
- package/lib/typescript-reporter/file-system/MemFileSystem.js +0 -83
- package/lib/typescript-reporter/file-system/PassiveFileSystem.d.ts +0 -9
- package/lib/typescript-reporter/file-system/PassiveFileSystem.js +0 -69
- package/lib/typescript-reporter/file-system/RealFileSystem.d.ts +0 -8
- package/lib/typescript-reporter/file-system/RealFileSystem.js +0 -181
- package/lib/typescript-reporter/issue/TypeScriptIssueFactory.d.ts +0 -4
- package/lib/typescript-reporter/issue/TypeScriptIssueFactory.js +0 -57
- package/lib/typescript-reporter/profile/TypeScriptPerformance.d.ts +0 -10
- package/lib/typescript-reporter/profile/TypeScriptPerformance.js +0 -34
- package/lib/typescript-reporter/reporter/ControlledCompilerHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledCompilerHost.js +0 -14
- package/lib/typescript-reporter/reporter/ControlledTypeScriptSystem.js +0 -218
- package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.js +0 -29
- package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.js +0 -51
- package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.d.ts +0 -8
- package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.js +0 -142
- package/lib/typescript-reporter/reporter/TypeScriptReporter.d.ts +0 -4
- package/lib/typescript-reporter/reporter/TypeScriptReporter.js +0 -376
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.d.ts +0 -4
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.js +0 -14
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.d.ts +0 -1
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.js +0 -11
|
@@ -17,7 +17,7 @@ declare class ForkTsCheckerWebpackPlugin {
|
|
|
17
17
|
private readonly options;
|
|
18
18
|
constructor(options?: ForkTsCheckerWebpackPluginOptions);
|
|
19
19
|
static getCompilerHooks(compiler: webpack.Compiler): {
|
|
20
|
-
start: import("tapable").AsyncSeriesWaterfallHook<[import("./
|
|
20
|
+
start: import("tapable").AsyncSeriesWaterfallHook<[import("./files-change").FilesChange, webpack.Compilation], import("tapable").UnsetAdditionalOptions>;
|
|
21
21
|
waiting: import("tapable").SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
22
22
|
canceled: import("tapable").SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
23
23
|
error: import("tapable").SyncHook<[Error, webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
23
|
};
|
|
5
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
25
|
exports.ForkTsCheckerWebpackPlugin = void 0;
|
|
26
|
+
const path = __importStar(require("path"));
|
|
7
27
|
const cosmiconfig_1 = require("cosmiconfig");
|
|
8
28
|
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
9
29
|
const schema_utils_1 = require("schema-utils");
|
|
@@ -17,10 +37,10 @@ const pluginPools_1 = require("./hooks/pluginPools");
|
|
|
17
37
|
const tapAfterCompileToAddDependencies_1 = require("./hooks/tapAfterCompileToAddDependencies");
|
|
18
38
|
const tapAfterEnvironmentToPatchWatching_1 = require("./hooks/tapAfterEnvironmentToPatchWatching");
|
|
19
39
|
const tapErrorToLogMessage_1 = require("./hooks/tapErrorToLogMessage");
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
40
|
+
const tapStartToRunWorkers_1 = require("./hooks/tapStartToRunWorkers");
|
|
41
|
+
const tapStopToTerminateWorkers_1 = require("./hooks/tapStopToTerminateWorkers");
|
|
42
|
+
const TypeScriptSupport_1 = require("./typescript/TypeScriptSupport");
|
|
43
|
+
const rpc_1 = require("./utils/rpc");
|
|
24
44
|
class ForkTsCheckerWebpackPlugin {
|
|
25
45
|
constructor(options = {}) {
|
|
26
46
|
const explorerSync = cosmiconfig_1.cosmiconfigSync('fork-ts-checker');
|
|
@@ -39,12 +59,12 @@ class ForkTsCheckerWebpackPlugin {
|
|
|
39
59
|
const configuration = ForkTsCheckerWebpackPluginConfiguration_1.createForkTsCheckerWebpackPluginConfiguration(compiler, this.options);
|
|
40
60
|
const state = ForkTsCheckerWebpackPluginState_1.createForkTsCheckerWebpackPluginState();
|
|
41
61
|
TypeScriptSupport_1.assertTypeScriptSupport(configuration.typescript);
|
|
42
|
-
const
|
|
43
|
-
const
|
|
62
|
+
const getIssuesWorker = rpc_1.createRpcWorker(path.resolve(__dirname, './typescript/worker/get-issues-worker.js'), configuration.typescript, configuration.typescript.memoryLimit);
|
|
63
|
+
const getDependenciesWorker = rpc_1.createRpcWorker(path.resolve(__dirname, './typescript/worker/get-dependencies-worker.js'), configuration.typescript);
|
|
44
64
|
tapAfterEnvironmentToPatchWatching_1.tapAfterEnvironmentToPatchWatching(compiler, state);
|
|
45
|
-
|
|
65
|
+
tapStartToRunWorkers_1.tapStartToRunWorkers(compiler, getIssuesWorker, getDependenciesWorker, configuration, state);
|
|
46
66
|
tapAfterCompileToAddDependencies_1.tapAfterCompileToAddDependencies(compiler, configuration, state);
|
|
47
|
-
|
|
67
|
+
tapStopToTerminateWorkers_1.tapStopToTerminateWorkers(compiler, getIssuesWorker, getDependenciesWorker, state);
|
|
48
68
|
tapErrorToLogMessage_1.tapErrorToLogMessage(compiler, configuration);
|
|
49
69
|
}
|
|
50
70
|
}
|
|
@@ -52,7 +72,7 @@ exports.ForkTsCheckerWebpackPlugin = ForkTsCheckerWebpackPlugin;
|
|
|
52
72
|
/**
|
|
53
73
|
* Current version of the plugin
|
|
54
74
|
*/
|
|
55
|
-
ForkTsCheckerWebpackPlugin.version = '7.0.0-alpha.
|
|
75
|
+
ForkTsCheckerWebpackPlugin.version = '7.0.0-alpha.11'; // will be replaced by the @semantic-release/exec
|
|
56
76
|
/**
|
|
57
77
|
* Default pools for the plugin concurrency limit
|
|
58
78
|
*/
|
|
@@ -3,7 +3,7 @@ import type { ForkTsCheckerWebpackPluginOptions } from './ForkTsCheckerWebpackPl
|
|
|
3
3
|
import type { FormatterConfiguration } from './formatter';
|
|
4
4
|
import type { IssueConfiguration } from './issue/IssueConfiguration';
|
|
5
5
|
import type { LoggerConfiguration } from './logger/LoggerConfiguration';
|
|
6
|
-
import type { TypeScriptReporterConfiguration } from './typescript
|
|
6
|
+
import type { TypeScriptReporterConfiguration } from './typescript/TypeScriptReporterConfiguration';
|
|
7
7
|
interface ForkTsCheckerWebpackPluginConfiguration {
|
|
8
8
|
async: boolean;
|
|
9
9
|
typescript: TypeScriptReporterConfiguration;
|
|
@@ -4,7 +4,7 @@ exports.createForkTsCheckerWebpackPluginConfiguration = void 0;
|
|
|
4
4
|
const formatter_1 = require("./formatter");
|
|
5
5
|
const IssueConfiguration_1 = require("./issue/IssueConfiguration");
|
|
6
6
|
const LoggerConfiguration_1 = require("./logger/LoggerConfiguration");
|
|
7
|
-
const TypeScriptReporterConfiguration_1 = require("./typescript
|
|
7
|
+
const TypeScriptReporterConfiguration_1 = require("./typescript/TypeScriptReporterConfiguration");
|
|
8
8
|
function createForkTsCheckerWebpackPluginConfiguration(compiler, options = {}) {
|
|
9
9
|
return {
|
|
10
10
|
async: options.async === undefined ? compiler.options.mode === 'development' : options.async,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FormatterOptions } from './formatter';
|
|
2
2
|
import type { IssueOptions } from './issue/IssueOptions';
|
|
3
3
|
import type LoggerOptions from './logger/LoggerOptions';
|
|
4
|
-
import type { TypeScriptReporterOptions } from './typescript
|
|
4
|
+
import type { TypeScriptReporterOptions } from './typescript/TypeScriptReporterOptions';
|
|
5
5
|
interface ForkTsCheckerWebpackPluginOptions {
|
|
6
6
|
async?: boolean;
|
|
7
7
|
typescript?: TypeScriptReporterOptions;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { FullTap } from 'tapable';
|
|
2
|
+
import type { FilesMatch } from './files-match';
|
|
2
3
|
import type { Issue } from './issue';
|
|
3
|
-
import type { FilesMatch, Report } from './reporter';
|
|
4
4
|
interface ForkTsCheckerWebpackPluginState {
|
|
5
|
-
issuesReportPromise: Promise<Report | undefined>;
|
|
6
|
-
dependenciesReportPromise: Promise<Report | undefined>;
|
|
7
5
|
issuesPromise: Promise<Issue[] | undefined>;
|
|
8
6
|
dependenciesPromise: Promise<FilesMatch | undefined>;
|
|
9
7
|
lastDependencies: FilesMatch | undefined;
|
|
10
8
|
watching: boolean;
|
|
11
9
|
initialized: boolean;
|
|
10
|
+
iteration: number;
|
|
12
11
|
webpackDevServerDoneTap: FullTap | undefined;
|
|
13
12
|
}
|
|
14
13
|
declare function createForkTsCheckerWebpackPluginState(): ForkTsCheckerWebpackPluginState;
|
|
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createForkTsCheckerWebpackPluginState = void 0;
|
|
4
4
|
function createForkTsCheckerWebpackPluginState() {
|
|
5
5
|
return {
|
|
6
|
-
issuesReportPromise: Promise.resolve(undefined),
|
|
7
|
-
dependenciesReportPromise: Promise.resolve(undefined),
|
|
8
6
|
issuesPromise: Promise.resolve(undefined),
|
|
9
7
|
dependenciesPromise: Promise.resolve(undefined),
|
|
10
8
|
lastDependencies: undefined,
|
|
11
9
|
watching: false,
|
|
12
10
|
initialized: false,
|
|
11
|
+
iteration: 0,
|
|
13
12
|
webpackDevServerDoneTap: undefined,
|
|
14
13
|
};
|
|
15
14
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type * as webpack from 'webpack';
|
|
2
2
|
interface FilesChange {
|
|
3
3
|
changedFiles?: string[];
|
|
4
4
|
deletedFiles?: string[];
|
|
5
5
|
}
|
|
6
|
-
declare function getFilesChange(compiler: Compiler): FilesChange;
|
|
7
|
-
declare function updateFilesChange(compiler: Compiler, change: FilesChange): void;
|
|
8
|
-
declare function clearFilesChange(compiler: Compiler): void;
|
|
6
|
+
declare function getFilesChange(compiler: webpack.Compiler): FilesChange;
|
|
7
|
+
declare function updateFilesChange(compiler: webpack.Compiler, change: FilesChange): void;
|
|
8
|
+
declare function clearFilesChange(compiler: webpack.Compiler): void;
|
|
9
9
|
/**
|
|
10
10
|
* Computes aggregated files change based on the subsequent files changes.
|
|
11
11
|
*
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.aggregateFilesChanges = exports.clearFilesChange = exports.updateFilesChange = exports.getFilesChange = void 0;
|
|
7
|
-
const substract_1 = __importDefault(require("
|
|
8
|
-
const unique_1 = __importDefault(require("
|
|
7
|
+
const substract_1 = __importDefault(require("./utils/array/substract"));
|
|
8
|
+
const unique_1 = __importDefault(require("./utils/array/unique"));
|
|
9
9
|
const compilerFilesChangeMap = new WeakMap();
|
|
10
10
|
function getFilesChange(compiler) {
|
|
11
11
|
return compilerFilesChangeMap.get(compiler) || { changedFiles: [], deletedFiles: [] };
|
|
File without changes
|
|
File without changes
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.interceptDoneToGetWebpackDevServerTap = void 0;
|
|
4
|
+
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
4
5
|
function interceptDoneToGetWebpackDevServerTap(compiler, configuration, state) {
|
|
6
|
+
const { debug } = infrastructure_logger_1.getInfrastructureLogger(compiler);
|
|
5
7
|
// inspired by https://github.com/ypresto/fork-ts-checker-async-overlay-webpack-plugin
|
|
6
8
|
compiler.hooks.done.intercept({
|
|
7
9
|
register: (tap) => {
|
|
8
10
|
if (tap.name === 'webpack-dev-server' &&
|
|
9
11
|
tap.type === 'sync' &&
|
|
10
12
|
configuration.logger.devServer) {
|
|
13
|
+
debug('Intercepting webpack-dev-server tap.');
|
|
11
14
|
state.webpackDevServerDoneTap = tap;
|
|
12
15
|
}
|
|
13
16
|
return tap;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SyncHook, SyncWaterfallHook, AsyncSeriesWaterfallHook } from 'tapable';
|
|
2
2
|
import type * as webpack from 'webpack';
|
|
3
|
+
import type { FilesChange } from '../files-change';
|
|
3
4
|
import type { Issue } from '../issue';
|
|
4
|
-
import type { FilesChange } from '../reporter';
|
|
5
5
|
declare function createForkTsCheckerWebpackPluginHooks(): {
|
|
6
6
|
start: AsyncSeriesWaterfallHook<[FilesChange, webpack.Compilation], import("tapable").UnsetAdditionalOptions>;
|
|
7
7
|
waiting: SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
@@ -10,13 +10,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.tapAfterCompileToAddDependencies = void 0;
|
|
13
|
+
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
13
14
|
function tapAfterCompileToAddDependencies(compiler, configuration, state) {
|
|
15
|
+
const { debug } = infrastructure_logger_1.getInfrastructureLogger(compiler);
|
|
14
16
|
compiler.hooks.afterCompile.tapPromise('ForkTsCheckerWebpackPlugin', (compilation) => __awaiter(this, void 0, void 0, function* () {
|
|
15
17
|
if (compilation.compiler !== compiler) {
|
|
16
18
|
// run only for the compiler that the plugin was registered for
|
|
17
19
|
return;
|
|
18
20
|
}
|
|
19
21
|
const dependencies = yield state.dependenciesPromise;
|
|
22
|
+
debug(`Got dependencies from the getDependenciesWorker.`, dependencies);
|
|
20
23
|
if (dependencies) {
|
|
21
24
|
state.lastDependencies = dependencies;
|
|
22
25
|
dependencies.files.forEach((file) => {
|
|
@@ -10,10 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.tapAfterCompileToGetIssues = void 0;
|
|
13
|
+
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
13
14
|
const IssueWebpackError_1 = require("../issue/IssueWebpackError");
|
|
14
15
|
const pluginHooks_1 = require("./pluginHooks");
|
|
15
16
|
function tapAfterCompileToGetIssues(compiler, configuration, state) {
|
|
16
17
|
const hooks = pluginHooks_1.getForkTsCheckerWebpackPluginHooks(compiler);
|
|
18
|
+
const { debug } = infrastructure_logger_1.getInfrastructureLogger(compiler);
|
|
17
19
|
compiler.hooks.afterCompile.tapPromise('ForkTsCheckerWebpackPlugin', (compilation) => __awaiter(this, void 0, void 0, function* () {
|
|
18
20
|
if (compilation.compiler !== compiler) {
|
|
19
21
|
// run only for the compiler that the plugin was registered for
|
|
@@ -27,6 +29,7 @@ function tapAfterCompileToGetIssues(compiler, configuration, state) {
|
|
|
27
29
|
hooks.error.call(error, compilation);
|
|
28
30
|
return;
|
|
29
31
|
}
|
|
32
|
+
debug('Got issues from getIssuesWorker.', issues === null || issues === void 0 ? void 0 : issues.length);
|
|
30
33
|
if (!issues) {
|
|
31
34
|
// some error has been thrown or it was canceled
|
|
32
35
|
return;
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.tapAfterEnvironmentToPatchWatching = void 0;
|
|
4
|
+
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
4
5
|
const InclusiveNodeWatchFileSystem_1 = require("../watch/InclusiveNodeWatchFileSystem");
|
|
5
6
|
function tapAfterEnvironmentToPatchWatching(compiler, state) {
|
|
7
|
+
const { debug } = infrastructure_logger_1.getInfrastructureLogger(compiler);
|
|
6
8
|
compiler.hooks.afterEnvironment.tap('ForkTsCheckerWebpackPlugin', () => {
|
|
7
9
|
const watchFileSystem = compiler.watchFileSystem;
|
|
8
10
|
if (watchFileSystem) {
|
|
11
|
+
debug("Overwriting webpack's watch file system.");
|
|
9
12
|
// wrap original watch file system
|
|
10
13
|
compiler.watchFileSystem = new InclusiveNodeWatchFileSystem_1.InclusiveNodeWatchFileSystem(
|
|
11
14
|
// we use some internals here
|
|
12
15
|
watchFileSystem, compiler, state);
|
|
13
16
|
}
|
|
17
|
+
else {
|
|
18
|
+
debug('No watch file system found - plugin may not work correctly.');
|
|
19
|
+
}
|
|
14
20
|
});
|
|
15
21
|
}
|
|
16
22
|
exports.tapAfterEnvironmentToPatchWatching = tapAfterEnvironmentToPatchWatching;
|
|
@@ -15,18 +15,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.tapDoneToAsyncGetIssues = void 0;
|
|
16
16
|
const chalk_1 = __importDefault(require("chalk"));
|
|
17
17
|
const WebpackFormatter_1 = require("../formatter/WebpackFormatter");
|
|
18
|
+
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
18
19
|
const IssueWebpackError_1 = require("../issue/IssueWebpackError");
|
|
19
20
|
const isPending_1 = __importDefault(require("../utils/async/isPending"));
|
|
20
21
|
const wait_1 = __importDefault(require("../utils/async/wait"));
|
|
21
22
|
const pluginHooks_1 = require("./pluginHooks");
|
|
22
23
|
function tapDoneToAsyncGetIssues(compiler, configuration, state) {
|
|
23
24
|
const hooks = pluginHooks_1.getForkTsCheckerWebpackPluginHooks(compiler);
|
|
25
|
+
const { log, debug } = infrastructure_logger_1.getInfrastructureLogger(compiler);
|
|
24
26
|
compiler.hooks.done.tap('ForkTsCheckerWebpackPlugin', (stats) => __awaiter(this, void 0, void 0, function* () {
|
|
25
27
|
if (stats.compilation.compiler !== compiler) {
|
|
26
28
|
// run only for the compiler that the plugin was registered for
|
|
27
29
|
return;
|
|
28
30
|
}
|
|
29
|
-
const reportPromise = state.issuesReportPromise;
|
|
30
31
|
const issuesPromise = state.issuesPromise;
|
|
31
32
|
let issues;
|
|
32
33
|
try {
|
|
@@ -39,6 +40,7 @@ function tapDoneToAsyncGetIssues(compiler, configuration, state) {
|
|
|
39
40
|
yield wait_1.default(10);
|
|
40
41
|
}
|
|
41
42
|
issues = yield issuesPromise;
|
|
43
|
+
debug('Got issues from getIssuesWorker.', issues === null || issues === void 0 ? void 0 : issues.length);
|
|
42
44
|
}
|
|
43
45
|
catch (error) {
|
|
44
46
|
hooks.error.call(error, stats.compilation);
|
|
@@ -48,10 +50,6 @@ function tapDoneToAsyncGetIssues(compiler, configuration, state) {
|
|
|
48
50
|
// some error has been thrown or it was canceled
|
|
49
51
|
return;
|
|
50
52
|
}
|
|
51
|
-
if (reportPromise !== state.issuesReportPromise) {
|
|
52
|
-
// there is a newer report - ignore this one
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
53
|
// filter list of issues by provided issue predicate
|
|
56
54
|
issues = issues.filter(configuration.issue.predicate);
|
|
57
55
|
// modify list of issues in the plugin hooks
|
|
@@ -76,10 +74,11 @@ function tapDoneToAsyncGetIssues(compiler, configuration, state) {
|
|
|
76
74
|
stats.compilation.errors.push(error);
|
|
77
75
|
}
|
|
78
76
|
});
|
|
77
|
+
debug('Sending issues to the webpack-dev-server.');
|
|
79
78
|
state.webpackDevServerDoneTap.fn(stats);
|
|
80
79
|
}
|
|
81
80
|
if (stats.startTime) {
|
|
82
|
-
|
|
81
|
+
log(`Time: ${Math.round(Date.now() - stats.startTime).toString()} ms`);
|
|
83
82
|
}
|
|
84
83
|
}));
|
|
85
84
|
}
|
|
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.tapErrorToLogMessage = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const
|
|
8
|
+
const rpc_1 = require("../utils/rpc");
|
|
9
9
|
const pluginHooks_1 = require("./pluginHooks");
|
|
10
10
|
function tapErrorToLogMessage(compiler, configuration) {
|
|
11
11
|
const hooks = pluginHooks_1.getForkTsCheckerWebpackPluginHooks(compiler);
|
|
12
12
|
hooks.error.tap('ForkTsCheckerWebpackPlugin', (error) => {
|
|
13
13
|
configuration.logger.issues.error(String(error));
|
|
14
|
-
if (error instanceof
|
|
14
|
+
if (error instanceof rpc_1.RpcExitError) {
|
|
15
15
|
if (error.signal === 'SIGINT') {
|
|
16
16
|
configuration.logger.issues.error(chalk_1.default.red('Issues checking service interrupted - If running in a docker container, this may be caused ' +
|
|
17
17
|
"by the container running out of memory. If so, try increasing the container's memory limit " +
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as webpack from 'webpack';
|
|
2
|
+
import type { ForkTsCheckerWebpackPluginConfiguration } from '../ForkTsCheckerWebpackPluginConfiguration';
|
|
3
|
+
import type { ForkTsCheckerWebpackPluginState } from '../ForkTsCheckerWebpackPluginState';
|
|
4
|
+
import type { GetDependenciesWorker } from '../typescript/worker/get-dependencies-worker';
|
|
5
|
+
import type { GetIssuesWorker } from '../typescript/worker/get-issues-worker';
|
|
6
|
+
import type { RpcWorker } from '../utils/rpc';
|
|
7
|
+
declare function tapStartToRunWorkers(compiler: webpack.Compiler, getIssuesWorker: RpcWorker<GetIssuesWorker>, getDependenciesWorker: RpcWorker<GetDependenciesWorker>, config: ForkTsCheckerWebpackPluginConfiguration, 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 interceptDoneToGetWebpackDevServerTap_1 = require("./interceptDoneToGetWebpackDevServerTap");
|
|
16
|
+
const pluginHooks_1 = require("./pluginHooks");
|
|
17
|
+
const pluginPools_1 = require("./pluginPools");
|
|
18
|
+
const tapAfterCompileToGetIssues_1 = require("./tapAfterCompileToGetIssues");
|
|
19
|
+
const tapDoneToAsyncGetIssues_1 = require("./tapDoneToAsyncGetIssues");
|
|
20
|
+
function tapStartToRunWorkers(compiler, getIssuesWorker, getDependenciesWorker, config, state) {
|
|
21
|
+
const hooks = pluginHooks_1.getForkTsCheckerWebpackPluginHooks(compiler);
|
|
22
|
+
const { log, debug } = 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
|
+
tapAfterCompileToGetIssues_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
|
+
tapDoneToAsyncGetIssues_1.tapDoneToAsyncGetIssues(compiler, config, state);
|
|
38
|
+
interceptDoneToGetWebpackDevServerTap_1.interceptDoneToGetWebpackDevServerTap(compiler, config, state);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
debug('Initializing plugin for watch run (not async).');
|
|
42
|
+
tapAfterCompileToGetIssues_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 = files_change_1.getFilesChange(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 = pluginPools_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 = pluginPools_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 '../ForkTsCheckerWebpackPluginState';
|
|
3
|
+
import type { RpcWorker } from '../utils/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 } = 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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type webpack from 'webpack';
|
|
2
|
+
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;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
console.log(compiler.infrastructureLogger);
|
|
7
|
+
return {
|
|
8
|
+
log: logger.log.bind(logger),
|
|
9
|
+
debug: logger.debug.bind(logger),
|
|
10
|
+
error: logger.error.bind(logger),
|
|
11
|
+
warn: logger.warn.bind(logger),
|
|
12
|
+
info: logger.info.bind(logger),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
exports.getInfrastructureLogger = getInfrastructureLogger;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as ts from 'typescript';
|
|
2
|
+
import type { FilesMatch } from '../../files-match';
|
|
2
3
|
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;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionConfiguration.js
RENAMED
|
File without changes
|
package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionOptions.d.ts
RENAMED
|
File without changes
|
package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionOptions.js
RENAMED
|
File without changes
|
package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionSupport.d.ts
RENAMED
|
File without changes
|
package/lib/{typescript-reporter → typescript}/extension/vue/TypeScriptVueExtensionSupport.js
RENAMED
|
File without changes
|
package/lib/{typescript-reporter → typescript}/extension/vue/types/vue-template-compiler.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FilesChange } from '../../files-change';
|
|
2
|
+
import type { FilesMatch } from '../../files-match';
|
|
3
|
+
declare const getDependenciesWorker: ({ changedFiles, deletedFiles, }: FilesChange) => FilesMatch;
|
|
4
|
+
export declare type GetDependenciesWorker = typeof getDependenciesWorker;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const rpc_1 = require("../../utils/rpc");
|
|
4
|
+
const config_1 = require("./lib/config");
|
|
5
|
+
const dependencies_1 = require("./lib/dependencies");
|
|
6
|
+
const system_1 = require("./lib/system");
|
|
7
|
+
const getDependenciesWorker = ({ changedFiles = [], deletedFiles = [], }) => {
|
|
8
|
+
system_1.system.invalidateCache();
|
|
9
|
+
if (config_1.didConfigFileChanged({ changedFiles, deletedFiles })) {
|
|
10
|
+
config_1.invalidateConfig();
|
|
11
|
+
dependencies_1.invalidateDependencies();
|
|
12
|
+
}
|
|
13
|
+
else if (config_1.didRootFilesChanged()) {
|
|
14
|
+
dependencies_1.invalidateDependencies();
|
|
15
|
+
}
|
|
16
|
+
return dependencies_1.getDependencies();
|
|
17
|
+
};
|
|
18
|
+
rpc_1.exposeRpc(getDependenciesWorker);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FilesChange } from '../../files-change';
|
|
2
|
+
import type { Issue } from '../../issue';
|
|
3
|
+
declare const getIssuesWorker: ({ changedFiles, deletedFiles }: FilesChange, watching: boolean) => Promise<Issue[]>;
|
|
4
|
+
export declare type GetIssuesWorker = typeof getIssuesWorker;
|
|
5
|
+
export {};
|