fork-ts-checker-webpack-plugin 9.0.0 → 9.0.2
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/hooks/intercept-done-to-get-dev-server-tap.d.ts +1 -1
- package/lib/hooks/tap-after-compile-to-add-dependencies.d.ts +1 -1
- package/lib/hooks/tap-after-compile-to-get-issues.d.ts +1 -1
- package/lib/hooks/tap-after-environment-to-patch-watching.d.ts +1 -1
- package/lib/hooks/tap-done-to-async-get-issues.d.ts +1 -1
- package/lib/hooks/tap-error-to-log-message.d.ts +1 -1
- package/lib/hooks/tap-stop-to-terminate-workers.d.ts +1 -1
- package/lib/infrastructure-logger.d.ts +1 -1
- package/lib/issue/issue-config.d.ts +1 -1
- package/lib/issue/issue-webpack-error.d.ts +1 -1
- package/lib/issue/issue-webpack-error.js +22 -4
- package/lib/plugin-config.d.ts +1 -1
- package/lib/plugin.d.ts +1 -1
- package/lib/plugin.js +1 -1
- package/lib/typescript/type-script-worker-config.d.ts +1 -1
- package/lib/typescript/worker/lib/diagnostics.js +25 -10
- package/lib/watch/watch-file-system.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type webpack from 'webpack';
|
|
1
|
+
import type * as webpack from 'webpack';
|
|
2
2
|
import type { ForkTsCheckerWebpackPluginConfig } from '../plugin-config';
|
|
3
3
|
import type { ForkTsCheckerWebpackPluginState } from '../plugin-state';
|
|
4
4
|
declare function interceptDoneToGetDevServerTap(compiler: webpack.Compiler, config: ForkTsCheckerWebpackPluginConfig, state: ForkTsCheckerWebpackPluginState): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type webpack from 'webpack';
|
|
1
|
+
import type * as webpack from 'webpack';
|
|
2
2
|
import type { ForkTsCheckerWebpackPluginConfig } from '../plugin-config';
|
|
3
3
|
import type { ForkTsCheckerWebpackPluginState } from '../plugin-state';
|
|
4
4
|
declare function tapAfterCompileToAddDependencies(compiler: webpack.Compiler, config: ForkTsCheckerWebpackPluginConfig, state: ForkTsCheckerWebpackPluginState): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type webpack from 'webpack';
|
|
1
|
+
import type * as webpack from 'webpack';
|
|
2
2
|
import type { ForkTsCheckerWebpackPluginConfig } from '../plugin-config';
|
|
3
3
|
import type { ForkTsCheckerWebpackPluginState } from '../plugin-state';
|
|
4
4
|
declare function tapAfterCompileToGetIssues(compiler: webpack.Compiler, config: ForkTsCheckerWebpackPluginConfig, state: ForkTsCheckerWebpackPluginState): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type webpack from 'webpack';
|
|
1
|
+
import type * as webpack from 'webpack';
|
|
2
2
|
import type { ForkTsCheckerWebpackPluginState } from '../plugin-state';
|
|
3
3
|
declare function tapAfterEnvironmentToPatchWatching(compiler: webpack.Compiler, state: ForkTsCheckerWebpackPluginState): void;
|
|
4
4
|
export { tapAfterEnvironmentToPatchWatching };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type webpack from 'webpack';
|
|
1
|
+
import type * as webpack from 'webpack';
|
|
2
2
|
import type { ForkTsCheckerWebpackPluginConfig } from '../plugin-config';
|
|
3
3
|
import type { ForkTsCheckerWebpackPluginState } from '../plugin-state';
|
|
4
4
|
declare function tapDoneToAsyncGetIssues(compiler: webpack.Compiler, config: ForkTsCheckerWebpackPluginConfig, state: ForkTsCheckerWebpackPluginState): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type webpack from 'webpack';
|
|
1
|
+
import type * as webpack from 'webpack';
|
|
2
2
|
import type { ForkTsCheckerWebpackPluginConfig } from '../plugin-config';
|
|
3
3
|
declare function tapErrorToLogMessage(compiler: webpack.Compiler, config: ForkTsCheckerWebpackPluginConfig): void;
|
|
4
4
|
export { tapErrorToLogMessage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type webpack from 'webpack';
|
|
1
|
+
import type * as webpack from 'webpack';
|
|
2
2
|
import type { ForkTsCheckerWebpackPluginState } from '../plugin-state';
|
|
3
3
|
import type { RpcWorker } from '../rpc';
|
|
4
4
|
declare function tapStopToTerminateWorkers(compiler: webpack.Compiler, getIssuesWorker: RpcWorker, getDependenciesWorker: RpcWorker, state: ForkTsCheckerWebpackPluginState): void;
|
|
@@ -1,16 +1,34 @@
|
|
|
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.IssueWebpackError = void 0;
|
|
7
26
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const
|
|
9
|
-
const webpack_1 = __importDefault(require("webpack"));
|
|
27
|
+
const webpack = __importStar(require("webpack"));
|
|
10
28
|
const forward_slash_1 = require("../utils/path/forward-slash");
|
|
11
29
|
const relative_to_context_1 = require("../utils/path/relative-to-context");
|
|
12
30
|
const issue_location_1 = require("./issue-location");
|
|
13
|
-
class IssueWebpackError extends
|
|
31
|
+
class IssueWebpackError extends webpack.WebpackError {
|
|
14
32
|
constructor(message, pathType, issue) {
|
|
15
33
|
super(message);
|
|
16
34
|
this.issue = issue;
|
|
@@ -24,7 +42,7 @@ class IssueWebpackError extends webpack_1.default.WebpackError {
|
|
|
24
42
|
? (0, forward_slash_1.forwardSlash)(path_1.default.resolve(issue.file))
|
|
25
43
|
: (0, relative_to_context_1.relativeToContext)(issue.file, process.cwd());
|
|
26
44
|
if (issue.location) {
|
|
27
|
-
this.file += `:${
|
|
45
|
+
this.file += `:${(0, issue_location_1.formatIssueLocation)(issue.location)}`;
|
|
28
46
|
}
|
|
29
47
|
}
|
|
30
48
|
Error.captureStackTrace(this, this.constructor);
|
package/lib/plugin-config.d.ts
CHANGED
package/lib/plugin.d.ts
CHANGED
package/lib/plugin.js
CHANGED
|
@@ -70,7 +70,7 @@ exports.ForkTsCheckerWebpackPlugin = ForkTsCheckerWebpackPlugin;
|
|
|
70
70
|
/**
|
|
71
71
|
* Current version of the plugin
|
|
72
72
|
*/
|
|
73
|
-
ForkTsCheckerWebpackPlugin.version = '9.0.
|
|
73
|
+
ForkTsCheckerWebpackPlugin.version = '9.0.2'; // will be replaced by the @semantic-release/exec
|
|
74
74
|
/**
|
|
75
75
|
* Default pools for the plugin concurrency limit
|
|
76
76
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type webpack from 'webpack';
|
|
1
|
+
import type * as webpack from 'webpack';
|
|
2
2
|
import type { TypeScriptConfigOverwrite } from './type-script-config-overwrite';
|
|
3
3
|
import type { TypeScriptDiagnosticsOptions } from './type-script-diagnostics-options';
|
|
4
4
|
import type { TypeScriptWorkerOptions } from './type-script-worker-options';
|
|
@@ -43,17 +43,32 @@ function invalidateDiagnostics() {
|
|
|
43
43
|
exports.invalidateDiagnostics = invalidateDiagnostics;
|
|
44
44
|
function getDiagnosticsOfProgram(program) {
|
|
45
45
|
const programDiagnostics = [];
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
try {
|
|
47
|
+
if (worker_config_1.config.diagnosticOptions.syntactic) {
|
|
48
|
+
programDiagnostics.push(...program.getSyntacticDiagnostics());
|
|
49
|
+
}
|
|
50
|
+
if (worker_config_1.config.diagnosticOptions.global) {
|
|
51
|
+
programDiagnostics.push(...program.getGlobalDiagnostics());
|
|
52
|
+
}
|
|
53
|
+
if (worker_config_1.config.diagnosticOptions.semantic) {
|
|
54
|
+
programDiagnostics.push(...program.getSemanticDiagnostics());
|
|
55
|
+
}
|
|
56
|
+
if (worker_config_1.config.diagnosticOptions.declaration) {
|
|
57
|
+
programDiagnostics.push(...program.getDeclarationDiagnostics());
|
|
58
|
+
}
|
|
54
59
|
}
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
catch (e) {
|
|
61
|
+
if (e instanceof Error) {
|
|
62
|
+
programDiagnostics.push({
|
|
63
|
+
code: 1,
|
|
64
|
+
category: 1,
|
|
65
|
+
messageText: `TSC compiler crashed: ${e.message}
|
|
66
|
+
${e.stack}`,
|
|
67
|
+
file: undefined,
|
|
68
|
+
start: undefined,
|
|
69
|
+
length: undefined,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
57
72
|
}
|
|
58
73
|
return programDiagnostics;
|
|
59
74
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { EventEmitter } from 'events';
|
|
3
|
-
import type webpack from 'webpack';
|
|
3
|
+
import type * as webpack from 'webpack';
|
|
4
4
|
interface Watchpack extends EventEmitter {
|
|
5
5
|
_onChange(item: string, mtime: number, file: string, type?: string): void;
|
|
6
6
|
_onRemove(item: string, file: string, type?: string): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fork-ts-checker-webpack-plugin",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.2",
|
|
4
4
|
"description": "Runs typescript type checker and linter on separate process.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@babel/code-frame": "^7.16.7",
|
|
59
59
|
"chalk": "^4.1.2",
|
|
60
60
|
"chokidar": "^3.5.3",
|
|
61
|
-
"cosmiconfig": "^
|
|
61
|
+
"cosmiconfig": "^8.2.0",
|
|
62
62
|
"deepmerge": "^4.2.2",
|
|
63
63
|
"fs-extra": "^10.0.0",
|
|
64
64
|
"memfs": "^3.4.1",
|