fork-ts-checker-webpack-plugin 9.1.1 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/files-change.js +5 -6
- package/lib/formatter/basic-formatter.js +1 -2
- package/lib/formatter/code-frame-formatter.js +1 -2
- package/lib/formatter/formatter-config.js +1 -2
- package/lib/formatter/stats-formatter.js +1 -2
- package/lib/formatter/webpack-formatter.js +1 -2
- package/lib/hooks/intercept-done-to-get-dev-server-tap.js +1 -2
- package/lib/hooks/tap-after-compile-to-add-dependencies.js +1 -2
- package/lib/hooks/tap-after-compile-to-get-issues.js +1 -2
- package/lib/hooks/tap-after-environment-to-patch-watching.js +1 -2
- package/lib/hooks/tap-done-to-async-get-issues.js +1 -2
- package/lib/hooks/tap-error-to-log-message.js +1 -2
- package/lib/hooks/tap-start-to-run-workers.js +1 -2
- package/lib/hooks/tap-stop-to-terminate-workers.js +1 -2
- package/lib/infrastructure-logger.js +1 -2
- package/lib/issue/issue-config.js +1 -2
- package/lib/issue/issue-location.js +2 -3
- package/lib/issue/issue-match.js +3 -4
- package/lib/issue/issue-position.js +1 -2
- package/lib/issue/issue-predicate.js +2 -3
- package/lib/issue/issue-severity.js +2 -3
- package/lib/issue/issue-webpack-error.js +17 -7
- package/lib/issue/issue.js +2 -3
- package/lib/plugin-config.js +1 -2
- package/lib/plugin-hooks.d.ts +4 -4
- package/lib/plugin-hooks.js +1 -2
- package/lib/plugin-pools.js +17 -7
- package/lib/plugin-state.js +1 -2
- package/lib/plugin.d.ts +2 -2
- package/lib/plugin.js +24 -9
- package/lib/rpc/expose-rpc.js +1 -2
- package/lib/rpc/rpc-worker.d.ts +0 -1
- package/lib/rpc/rpc-worker.js +19 -10
- package/lib/rpc/wrap-rpc.d.ts +0 -1
- package/lib/rpc/wrap-rpc.js +1 -2
- package/lib/typescript/type-script-support.js +19 -10
- package/lib/typescript/type-script-worker-config.js +1 -2
- package/lib/typescript/worker/lib/artifacts.js +20 -11
- package/lib/typescript/worker/lib/config.js +47 -19
- package/lib/typescript/worker/lib/dependencies.js +19 -10
- package/lib/typescript/worker/lib/diagnostics.js +35 -13
- package/lib/typescript/worker/lib/emit.js +1 -2
- package/lib/typescript/worker/lib/file-system/file-system.d.ts +0 -1
- package/lib/typescript/worker/lib/file-system/mem-file-system.js +1 -0
- package/lib/typescript/worker/lib/file-system/real-file-system.js +17 -7
- package/lib/typescript/worker/lib/host/compiler-host.js +1 -2
- package/lib/typescript/worker/lib/host/watch-compiler-host.js +1 -2
- package/lib/typescript/worker/lib/host/watch-solution-builder-host.js +1 -2
- package/lib/typescript/worker/lib/performance.js +3 -4
- package/lib/typescript/worker/lib/program/program.js +2 -3
- package/lib/typescript/worker/lib/program/solution-builder.js +2 -3
- package/lib/typescript/worker/lib/program/watch-program.js +3 -4
- package/lib/typescript/worker/lib/tracing.js +3 -4
- package/lib/typescript/worker/lib/tsbuildinfo.js +20 -11
- package/lib/utils/async/controlled-promise.js +1 -2
- package/lib/utils/async/is-pending.js +1 -2
- package/lib/utils/async/pool.js +1 -2
- package/lib/utils/async/wait.js +1 -2
- package/lib/utils/path/forward-slash.js +1 -2
- package/lib/utils/path/is-inside-another-path.js +1 -2
- package/lib/utils/path/relative-to-context.js +1 -2
- package/lib/watch/inclusive-node-watch-file-system.js +2 -2
- package/lib/watch/watch-file-system.d.ts +0 -1
- package/package.json +38 -40
package/lib/files-change.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getFilesChange = getFilesChange;
|
|
4
|
+
exports.consumeFilesChange = consumeFilesChange;
|
|
5
|
+
exports.updateFilesChange = updateFilesChange;
|
|
6
|
+
exports.clearFilesChange = clearFilesChange;
|
|
7
|
+
exports.aggregateFilesChanges = aggregateFilesChanges;
|
|
4
8
|
// we ignore package.json file because of https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/674
|
|
5
9
|
const IGNORED_FILES = ['package.json'];
|
|
6
10
|
const isIgnoredFile = (file) => IGNORED_FILES.some((ignoredFile) => file.endsWith(`/${ignoredFile}`) || file.endsWith(`\\${ignoredFile}`));
|
|
@@ -15,21 +19,17 @@ function getFilesChange(compiler) {
|
|
|
15
19
|
deletedFiles: deletedFiles.filter((deletedFile) => !isIgnoredFile(deletedFile)),
|
|
16
20
|
};
|
|
17
21
|
}
|
|
18
|
-
exports.getFilesChange = getFilesChange;
|
|
19
22
|
function consumeFilesChange(compiler) {
|
|
20
23
|
const change = getFilesChange(compiler);
|
|
21
24
|
clearFilesChange(compiler);
|
|
22
25
|
return change;
|
|
23
26
|
}
|
|
24
|
-
exports.consumeFilesChange = consumeFilesChange;
|
|
25
27
|
function updateFilesChange(compiler, change) {
|
|
26
28
|
compilerFilesChangeMap.set(compiler, aggregateFilesChanges([getFilesChange(compiler), change]));
|
|
27
29
|
}
|
|
28
|
-
exports.updateFilesChange = updateFilesChange;
|
|
29
30
|
function clearFilesChange(compiler) {
|
|
30
31
|
compilerFilesChangeMap.delete(compiler);
|
|
31
32
|
}
|
|
32
|
-
exports.clearFilesChange = clearFilesChange;
|
|
33
33
|
/**
|
|
34
34
|
* Computes aggregated files change based on the subsequent files changes.
|
|
35
35
|
*
|
|
@@ -54,4 +54,3 @@ function aggregateFilesChanges(changes) {
|
|
|
54
54
|
deletedFiles: Array.from(deletedFilesSet),
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
exports.aggregateFilesChanges = aggregateFilesChanges;
|
|
@@ -3,11 +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.createBasicFormatter =
|
|
6
|
+
exports.createBasicFormatter = createBasicFormatter;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
function createBasicFormatter() {
|
|
9
9
|
return function basicFormatter(issue) {
|
|
10
10
|
return chalk_1.default.grey(issue.code + ': ') + issue.message;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
exports.createBasicFormatter = createBasicFormatter;
|
|
@@ -3,7 +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.createCodeFrameFormatter =
|
|
6
|
+
exports.createCodeFrameFormatter = createCodeFrameFormatter;
|
|
7
7
|
const os_1 = __importDefault(require("os"));
|
|
8
8
|
const code_frame_1 = require("@babel/code-frame");
|
|
9
9
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
@@ -26,4 +26,3 @@ function createCodeFrameFormatter(options) {
|
|
|
26
26
|
return lines.join(os_1.default.EOL);
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
exports.createCodeFrameFormatter = createCodeFrameFormatter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFormatterConfig =
|
|
3
|
+
exports.createFormatterConfig = createFormatterConfig;
|
|
4
4
|
const basic_formatter_1 = require("./basic-formatter");
|
|
5
5
|
const code_frame_formatter_1 = require("./code-frame-formatter");
|
|
6
6
|
function createFormatterConfig(options) {
|
|
@@ -33,4 +33,3 @@ function createFormatterConfig(options) {
|
|
|
33
33
|
}
|
|
34
34
|
throw new Error(`Unknown "${type}" formatter. Available types are: "basic", "codeframe" or a custom function.`);
|
|
35
35
|
}
|
|
36
|
-
exports.createFormatterConfig = createFormatterConfig;
|
|
@@ -3,7 +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.statsFormatter =
|
|
6
|
+
exports.statsFormatter = statsFormatter;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
// mimics webpack's stats summary formatter
|
|
9
9
|
function statsFormatter(issues, stats) {
|
|
@@ -25,4 +25,3 @@ function statsFormatter(issues, stats) {
|
|
|
25
25
|
'.',
|
|
26
26
|
].join('');
|
|
27
27
|
}
|
|
28
|
-
exports.statsFormatter = statsFormatter;
|
|
@@ -3,7 +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.createWebpackFormatter =
|
|
6
|
+
exports.createWebpackFormatter = createWebpackFormatter;
|
|
7
7
|
const os_1 = __importDefault(require("os"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const chalk_1 = __importDefault(require("chalk"));
|
|
@@ -29,4 +29,3 @@ function createWebpackFormatter(formatter, pathType) {
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
exports.createWebpackFormatter = createWebpackFormatter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.interceptDoneToGetDevServerTap =
|
|
3
|
+
exports.interceptDoneToGetDevServerTap = interceptDoneToGetDevServerTap;
|
|
4
4
|
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
5
5
|
function interceptDoneToGetDevServerTap(compiler, config, state) {
|
|
6
6
|
const { debug } = (0, infrastructure_logger_1.getInfrastructureLogger)(compiler);
|
|
@@ -15,4 +15,3 @@ function interceptDoneToGetDevServerTap(compiler, config, state) {
|
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
exports.interceptDoneToGetDevServerTap = interceptDoneToGetDevServerTap;
|
|
@@ -9,7 +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.tapAfterCompileToAddDependencies =
|
|
12
|
+
exports.tapAfterCompileToAddDependencies = tapAfterCompileToAddDependencies;
|
|
13
13
|
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
14
14
|
function tapAfterCompileToAddDependencies(compiler, config, state) {
|
|
15
15
|
const { debug } = (0, infrastructure_logger_1.getInfrastructureLogger)(compiler);
|
|
@@ -28,4 +28,3 @@ function tapAfterCompileToAddDependencies(compiler, config, state) {
|
|
|
28
28
|
}
|
|
29
29
|
}));
|
|
30
30
|
}
|
|
31
|
-
exports.tapAfterCompileToAddDependencies = tapAfterCompileToAddDependencies;
|
|
@@ -9,7 +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.tapAfterCompileToGetIssues =
|
|
12
|
+
exports.tapAfterCompileToGetIssues = tapAfterCompileToGetIssues;
|
|
13
13
|
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
14
14
|
const issue_webpack_error_1 = require("../issue/issue-webpack-error");
|
|
15
15
|
const plugin_hooks_1 = require("../plugin-hooks");
|
|
@@ -49,4 +49,3 @@ function tapAfterCompileToGetIssues(compiler, config, state) {
|
|
|
49
49
|
});
|
|
50
50
|
}));
|
|
51
51
|
}
|
|
52
|
-
exports.tapAfterCompileToGetIssues = tapAfterCompileToGetIssues;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tapAfterEnvironmentToPatchWatching =
|
|
3
|
+
exports.tapAfterEnvironmentToPatchWatching = tapAfterEnvironmentToPatchWatching;
|
|
4
4
|
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
5
5
|
const inclusive_node_watch_file_system_1 = require("../watch/inclusive-node-watch-file-system");
|
|
6
6
|
function tapAfterEnvironmentToPatchWatching(compiler, state) {
|
|
@@ -19,4 +19,3 @@ function tapAfterEnvironmentToPatchWatching(compiler, state) {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
exports.tapAfterEnvironmentToPatchWatching = tapAfterEnvironmentToPatchWatching;
|
|
@@ -12,7 +12,7 @@ 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.tapDoneToAsyncGetIssues =
|
|
15
|
+
exports.tapDoneToAsyncGetIssues = tapDoneToAsyncGetIssues;
|
|
16
16
|
const chalk_1 = __importDefault(require("chalk"));
|
|
17
17
|
const stats_formatter_1 = require("../formatter/stats-formatter");
|
|
18
18
|
const webpack_formatter_1 = require("../formatter/webpack-formatter");
|
|
@@ -83,4 +83,3 @@ function tapDoneToAsyncGetIssues(compiler, config, state) {
|
|
|
83
83
|
}
|
|
84
84
|
}));
|
|
85
85
|
}
|
|
86
|
-
exports.tapDoneToAsyncGetIssues = tapDoneToAsyncGetIssues;
|
|
@@ -3,7 +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.tapErrorToLogMessage =
|
|
6
|
+
exports.tapErrorToLogMessage = tapErrorToLogMessage;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const plugin_hooks_1 = require("../plugin-hooks");
|
|
9
9
|
const rpc_1 = require("../rpc");
|
|
@@ -29,4 +29,3 @@ function tapErrorToLogMessage(compiler, config) {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
exports.tapErrorToLogMessage = tapErrorToLogMessage;
|
|
@@ -9,7 +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.tapStartToRunWorkers =
|
|
12
|
+
exports.tapStartToRunWorkers = tapStartToRunWorkers;
|
|
13
13
|
const node_abort_controller_1 = require("node-abort-controller");
|
|
14
14
|
const files_change_1 = require("../files-change");
|
|
15
15
|
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
@@ -129,4 +129,3 @@ function tapStartToRunWorkers(compiler, getIssuesWorker, getDependenciesWorker,
|
|
|
129
129
|
})); // don't pass abortController.signal because getDependencies() is blocking
|
|
130
130
|
}));
|
|
131
131
|
}
|
|
132
|
-
exports.tapStartToRunWorkers = tapStartToRunWorkers;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tapStopToTerminateWorkers =
|
|
3
|
+
exports.tapStopToTerminateWorkers = tapStopToTerminateWorkers;
|
|
4
4
|
const infrastructure_logger_1 = require("../infrastructure-logger");
|
|
5
5
|
function tapStopToTerminateWorkers(compiler, getIssuesWorker, getDependenciesWorker, state) {
|
|
6
6
|
const { debug } = (0, infrastructure_logger_1.getInfrastructureLogger)(compiler);
|
|
@@ -23,4 +23,3 @@ function tapStopToTerminateWorkers(compiler, getIssuesWorker, getDependenciesWor
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
exports.tapStopToTerminateWorkers = tapStopToTerminateWorkers;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInfrastructureLogger =
|
|
3
|
+
exports.getInfrastructureLogger = getInfrastructureLogger;
|
|
4
4
|
function getInfrastructureLogger(compiler) {
|
|
5
5
|
const logger = compiler.getInfrastructureLogger('ForkTsCheckerWebpackPlugin');
|
|
6
6
|
return {
|
|
@@ -11,4 +11,3 @@ function getInfrastructureLogger(compiler) {
|
|
|
11
11
|
info: logger.info.bind(logger),
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
exports.getInfrastructureLogger = getInfrastructureLogger;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createIssueConfig =
|
|
3
|
+
exports.createIssueConfig = createIssueConfig;
|
|
4
4
|
const issue_match_1 = require("./issue-match");
|
|
5
5
|
const issue_predicate_1 = require("./issue-predicate");
|
|
6
6
|
function createIssuePredicateFromOption(context, option) {
|
|
@@ -26,4 +26,3 @@ function createIssueConfig(compiler, options) {
|
|
|
26
26
|
predicate: (issue) => include(issue) && !exclude(issue),
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
exports.createIssueConfig = createIssueConfig;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.compareIssueLocations = compareIssueLocations;
|
|
4
|
+
exports.formatIssueLocation = formatIssueLocation;
|
|
4
5
|
const issue_position_1 = require("./issue-position");
|
|
5
6
|
function compareIssueLocations(locationA, locationB) {
|
|
6
7
|
if (locationA === locationB) {
|
|
@@ -15,8 +16,6 @@ function compareIssueLocations(locationA, locationB) {
|
|
|
15
16
|
return ((0, issue_position_1.compareIssuePositions)(locationA.start, locationB.start) ||
|
|
16
17
|
(0, issue_position_1.compareIssuePositions)(locationA.end, locationB.end));
|
|
17
18
|
}
|
|
18
|
-
exports.compareIssueLocations = compareIssueLocations;
|
|
19
19
|
function formatIssueLocation(location) {
|
|
20
20
|
return `${location.start.line}:${location.start.column}`;
|
|
21
21
|
}
|
|
22
|
-
exports.formatIssueLocation = formatIssueLocation;
|
package/lib/issue/issue-match.js
CHANGED
|
@@ -3,9 +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
|
-
exports.createIssuePredicateFromIssueMatch =
|
|
6
|
+
exports.createIssuePredicateFromIssueMatch = createIssuePredicateFromIssueMatch;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const minimatch_1 =
|
|
8
|
+
const minimatch_1 = require("minimatch");
|
|
9
9
|
const forward_slash_1 = require("../utils/path/forward-slash");
|
|
10
10
|
function createIssuePredicateFromIssueMatch(context, match) {
|
|
11
11
|
return (issue) => {
|
|
@@ -13,8 +13,7 @@ function createIssuePredicateFromIssueMatch(context, match) {
|
|
|
13
13
|
const matchesCode = !match.code || match.code === issue.code;
|
|
14
14
|
const matchesFile = !issue.file ||
|
|
15
15
|
(!!issue.file &&
|
|
16
|
-
(!match.file || (0, minimatch_1.
|
|
16
|
+
(!match.file || (0, minimatch_1.minimatch)((0, forward_slash_1.forwardSlash)(path_1.default.relative(context, issue.file)), match.file)));
|
|
17
17
|
return matchesSeverity && matchesCode && matchesFile;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
exports.createIssuePredicateFromIssueMatch = createIssuePredicateFromIssueMatch;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compareIssuePositions =
|
|
3
|
+
exports.compareIssuePositions = compareIssuePositions;
|
|
4
4
|
function compareIssuePositions(positionA, positionB) {
|
|
5
5
|
if (positionA === positionB) {
|
|
6
6
|
return 0;
|
|
@@ -13,4 +13,3 @@ function compareIssuePositions(positionA, positionB) {
|
|
|
13
13
|
}
|
|
14
14
|
return (Math.sign(positionA.line - positionB.line) || Math.sign(positionA.column - positionB.column));
|
|
15
15
|
}
|
|
16
|
-
exports.compareIssuePositions = compareIssuePositions;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createTrivialIssuePredicate = createTrivialIssuePredicate;
|
|
4
|
+
exports.composeIssuePredicates = composeIssuePredicates;
|
|
4
5
|
function createTrivialIssuePredicate(result) {
|
|
5
6
|
return () => result;
|
|
6
7
|
}
|
|
7
|
-
exports.createTrivialIssuePredicate = createTrivialIssuePredicate;
|
|
8
8
|
function composeIssuePredicates(predicates) {
|
|
9
9
|
return (issue) => predicates.some((predicate) => predicate(issue));
|
|
10
10
|
}
|
|
11
|
-
exports.composeIssuePredicates = composeIssuePredicates;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isIssueSeverity = isIssueSeverity;
|
|
4
|
+
exports.compareIssueSeverities = compareIssueSeverities;
|
|
4
5
|
function isIssueSeverity(value) {
|
|
5
6
|
return ['error', 'warning'].includes(value);
|
|
6
7
|
}
|
|
7
|
-
exports.isIssueSeverity = isIssueSeverity;
|
|
8
8
|
function compareIssueSeverities(severityA, severityB) {
|
|
9
9
|
const [priorityA, priorityB] = [severityA, severityB].map((severity) => ['warning' /* 0 */, 'error' /* 1 */].indexOf(severity));
|
|
10
10
|
return Math.sign(priorityB - priorityA);
|
|
11
11
|
}
|
|
12
|
-
exports.compareIssueSeverities = compareIssueSeverities;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
package/lib/issue/issue.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isIssue = isIssue;
|
|
4
|
+
exports.deduplicateAndSortIssues = deduplicateAndSortIssues;
|
|
4
5
|
const issue_location_1 = require("./issue-location");
|
|
5
6
|
const issue_severity_1 = require("./issue-severity");
|
|
6
7
|
function isIssue(value) {
|
|
@@ -10,7 +11,6 @@ function isIssue(value) {
|
|
|
10
11
|
!!value.code &&
|
|
11
12
|
!!value.message);
|
|
12
13
|
}
|
|
13
|
-
exports.isIssue = isIssue;
|
|
14
14
|
function compareStrings(stringA, stringB) {
|
|
15
15
|
if (stringA === stringB) {
|
|
16
16
|
return 0;
|
|
@@ -38,4 +38,3 @@ function deduplicateAndSortIssues(issues) {
|
|
|
38
38
|
const sortedIssues = issues.filter(isIssue).sort(compareIssues);
|
|
39
39
|
return sortedIssues.filter((issue, index) => index === 0 || !equalsIssues(issue, sortedIssues[index - 1]));
|
|
40
40
|
}
|
|
41
|
-
exports.deduplicateAndSortIssues = deduplicateAndSortIssues;
|
package/lib/plugin-config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPluginConfig =
|
|
3
|
+
exports.createPluginConfig = createPluginConfig;
|
|
4
4
|
const formatter_1 = require("./formatter");
|
|
5
5
|
const infrastructure_logger_1 = require("./infrastructure-logger");
|
|
6
6
|
const issue_config_1 = require("./issue/issue-config");
|
|
@@ -23,4 +23,3 @@ function createPluginConfig(compiler, options = {}) {
|
|
|
23
23
|
devServer: options.devServer !== false,
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
exports.createPluginConfig = createPluginConfig;
|
package/lib/plugin-hooks.d.ts
CHANGED
|
@@ -3,18 +3,18 @@ import type * as webpack from 'webpack';
|
|
|
3
3
|
import type { FilesChange } from './files-change';
|
|
4
4
|
import type { Issue } from './issue';
|
|
5
5
|
declare function createPluginHooks(): {
|
|
6
|
-
start: AsyncSeriesWaterfallHook<[FilesChange, webpack.Compilation], import("tapable").UnsetAdditionalOptions>;
|
|
6
|
+
start: AsyncSeriesWaterfallHook<[FilesChange, webpack.Compilation], FilesChange, import("tapable").UnsetAdditionalOptions>;
|
|
7
7
|
waiting: SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
8
8
|
canceled: SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
9
9
|
error: SyncHook<[unknown, webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
10
|
-
issues: SyncWaterfallHook<[Issue[], webpack.Compilation | undefined],
|
|
10
|
+
issues: SyncWaterfallHook<[Issue[], webpack.Compilation | undefined], Issue[], import("tapable").UnsetAdditionalOptions>;
|
|
11
11
|
};
|
|
12
12
|
type ForkTsCheckerWebpackPluginHooks = ReturnType<typeof createPluginHooks>;
|
|
13
13
|
declare function getPluginHooks(compiler: webpack.Compiler | webpack.MultiCompiler): {
|
|
14
|
-
start: AsyncSeriesWaterfallHook<[FilesChange, webpack.Compilation], import("tapable").UnsetAdditionalOptions>;
|
|
14
|
+
start: AsyncSeriesWaterfallHook<[FilesChange, webpack.Compilation], FilesChange, import("tapable").UnsetAdditionalOptions>;
|
|
15
15
|
waiting: SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
16
16
|
canceled: SyncHook<[webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
17
17
|
error: SyncHook<[unknown, webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
18
|
-
issues: SyncWaterfallHook<[Issue[], webpack.Compilation | undefined],
|
|
18
|
+
issues: SyncWaterfallHook<[Issue[], webpack.Compilation | undefined], Issue[], import("tapable").UnsetAdditionalOptions>;
|
|
19
19
|
};
|
|
20
20
|
export { getPluginHooks, ForkTsCheckerWebpackPluginHooks };
|
package/lib/plugin-hooks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPluginHooks =
|
|
3
|
+
exports.getPluginHooks = getPluginHooks;
|
|
4
4
|
const tapable_1 = require("tapable");
|
|
5
5
|
const compilerHookMap = new WeakMap();
|
|
6
6
|
function createPluginHooks() {
|
|
@@ -42,4 +42,3 @@ function getPluginHooks(compiler) {
|
|
|
42
42
|
}
|
|
43
43
|
return hooks;
|
|
44
44
|
}
|
|
45
|
-
exports.getPluginHooks = getPluginHooks;
|
package/lib/plugin-pools.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.dependenciesPool = exports.issuesPool = void 0;
|
|
27
37
|
const os = __importStar(require("os"));
|
package/lib/plugin-state.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPluginState =
|
|
3
|
+
exports.createPluginState = createPluginState;
|
|
4
4
|
function createPluginState() {
|
|
5
5
|
return {
|
|
6
6
|
issuesPromise: Promise.resolve(undefined),
|
|
@@ -14,4 +14,3 @@ function createPluginState() {
|
|
|
14
14
|
webpackDevServerDoneTap: undefined,
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
exports.createPluginState = createPluginState;
|
package/lib/plugin.d.ts
CHANGED
|
@@ -17,11 +17,11 @@ 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("./files-change").FilesChange, webpack.Compilation], import("tapable").UnsetAdditionalOptions>;
|
|
20
|
+
start: import("tapable").AsyncSeriesWaterfallHook<[import("./files-change").FilesChange, webpack.Compilation], import("./files-change").FilesChange, 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<[unknown, webpack.Compilation], void, import("tapable").UnsetAdditionalOptions>;
|
|
24
|
-
issues: import("tapable").SyncWaterfallHook<[import("./issue
|
|
24
|
+
issues: import("tapable").SyncWaterfallHook<[import("./issue").Issue[], webpack.Compilation | undefined], import("./issue").Issue[], import("tapable").UnsetAdditionalOptions>;
|
|
25
25
|
};
|
|
26
26
|
apply(compiler: webpack.Compiler): void;
|
|
27
27
|
}
|
package/lib/plugin.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -45,7 +55,12 @@ const rpc_1 = require("./rpc");
|
|
|
45
55
|
const type_script_support_1 = require("./typescript/type-script-support");
|
|
46
56
|
class ForkTsCheckerWebpackPlugin {
|
|
47
57
|
constructor(options = {}) {
|
|
48
|
-
const explorerSync = (0, cosmiconfig_1.cosmiconfigSync)('fork-ts-checker'
|
|
58
|
+
const explorerSync = (0, cosmiconfig_1.cosmiconfigSync)('fork-ts-checker', {
|
|
59
|
+
// keep searching parent directories up to the home directory, as cosmiconfig did before v9
|
|
60
|
+
// TODO: in the next major release, drop this option to use the cosmiconfig default (no search in
|
|
61
|
+
// parent directories) - it's a breaking change
|
|
62
|
+
searchStrategy: 'global',
|
|
63
|
+
});
|
|
49
64
|
const { config: externalOptions } = explorerSync.search() || {};
|
|
50
65
|
// first validate options directly passed to the constructor
|
|
51
66
|
const config = { name: 'ForkTsCheckerWebpackPlugin' };
|
|
@@ -74,7 +89,7 @@ exports.ForkTsCheckerWebpackPlugin = ForkTsCheckerWebpackPlugin;
|
|
|
74
89
|
/**
|
|
75
90
|
* Current version of the plugin
|
|
76
91
|
*/
|
|
77
|
-
ForkTsCheckerWebpackPlugin.version = '9.
|
|
92
|
+
ForkTsCheckerWebpackPlugin.version = '9.2.0'; // will be replaced by the @semantic-release/exec
|
|
78
93
|
/**
|
|
79
94
|
* Default pools for the plugin concurrency limit
|
|
80
95
|
*/
|
package/lib/rpc/expose-rpc.js
CHANGED
|
@@ -12,7 +12,7 @@ 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.exposeRpc =
|
|
15
|
+
exports.exposeRpc = exposeRpc;
|
|
16
16
|
const process_1 = __importDefault(require("process"));
|
|
17
17
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
18
|
function exposeRpc(fn) {
|
|
@@ -75,4 +75,3 @@ function exposeRpc(fn) {
|
|
|
75
75
|
});
|
|
76
76
|
process_1.default.on('message', handleMessage);
|
|
77
77
|
}
|
|
78
|
-
exports.exposeRpc = exposeRpc;
|
package/lib/rpc/rpc-worker.d.ts
CHANGED
package/lib/rpc/rpc-worker.js
CHANGED
|
@@ -15,15 +15,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
36
|
+
exports.createRpcWorker = createRpcWorker;
|
|
37
|
+
exports.getRpcWorkerData = getRpcWorkerData;
|
|
27
38
|
const child_process = __importStar(require("child_process"));
|
|
28
39
|
const process = __importStar(require("process"));
|
|
29
40
|
const wrap_rpc_1 = require("./wrap-rpc");
|
|
@@ -76,8 +87,6 @@ function createRpcWorker(modulePath, data, memoryLimit) {
|
|
|
76
87
|
return remoteMethod(...args);
|
|
77
88
|
}, worker);
|
|
78
89
|
}
|
|
79
|
-
exports.createRpcWorker = createRpcWorker;
|
|
80
90
|
function getRpcWorkerData() {
|
|
81
91
|
return JSON.parse(process.env[WORKER_DATA_ENV_KEY] || '{}');
|
|
82
92
|
}
|
|
83
|
-
exports.getRpcWorkerData = getRpcWorkerData;
|
package/lib/rpc/wrap-rpc.d.ts
CHANGED