fork-ts-checker-webpack-plugin 0.4.14 → 0.5.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +3 -0
  3. package/lib/{types/CancellationToken.d.ts → CancellationToken.d.ts} +4 -4
  4. package/lib/CancellationToken.js +28 -27
  5. package/lib/{types/FilesRegister.d.ts → FilesRegister.d.ts} +9 -14
  6. package/lib/FilesRegister.js +24 -24
  7. package/lib/{types/FilesWatcher.d.ts → FilesWatcher.d.ts} +4 -7
  8. package/lib/FilesWatcher.js +27 -29
  9. package/lib/FsHelper.d.ts +5 -0
  10. package/lib/FsHelper.js +20 -0
  11. package/lib/IncrementalChecker.d.ts +34 -0
  12. package/lib/IncrementalChecker.js +97 -109
  13. package/lib/{types/Message.d.ts → Message.d.ts} +0 -0
  14. package/lib/{types/NormalizedMessage.d.ts → NormalizedMessage.d.ts} +16 -23
  15. package/lib/NormalizedMessage.js +76 -86
  16. package/lib/{types/VueProgram.d.ts → VueProgram.d.ts} +0 -0
  17. package/lib/VueProgram.js +62 -77
  18. package/lib/{types/WorkResult.d.ts → WorkResult.d.ts} +6 -6
  19. package/lib/WorkResult.js +22 -25
  20. package/lib/{types/WorkSet.d.ts → WorkSet.d.ts} +6 -6
  21. package/lib/WorkSet.js +6 -7
  22. package/lib/{types/cluster.d.ts → cluster.d.ts} +0 -0
  23. package/lib/cluster.js +19 -19
  24. package/lib/{types/formatter → formatter}/codeframeFormatter.d.ts +0 -0
  25. package/lib/formatter/codeframeFormatter.js +17 -16
  26. package/lib/{types/formatter → formatter}/defaultFormatter.d.ts +0 -0
  27. package/lib/formatter/defaultFormatter.js +9 -9
  28. package/lib/index.d.ts +98 -0
  29. package/lib/index.js +183 -192
  30. package/lib/{types/service.d.ts → service.d.ts} +0 -0
  31. package/lib/service.js +11 -11
  32. package/package.json +14 -18
  33. package/lib/types/IncrementalChecker.d.ts +0 -43
  34. package/lib/types/index.d.ts +0 -101
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "fork-ts-checker-webpack-plugin",
3
- "version": "0.4.14",
3
+ "version": "0.5.2",
4
4
  "description": "Runs typescript type checker and linter on separate process.",
5
5
  "main": "lib/index.js",
6
- "types": "lib/types/index.d.ts",
6
+ "types": "lib/index.d.ts",
7
7
  "files": [
8
8
  "lib"
9
9
  ],
@@ -51,33 +51,31 @@
51
51
  "devDependencies": {
52
52
  "@types/babel-code-frame": "^6.20.1",
53
53
  "@types/chokidar": "^1.7.5",
54
- "@types/lodash": "^4.14.117",
55
54
  "@types/micromatch": "^3.1.0",
56
55
  "@types/minimatch": "^3.0.1",
57
- "@types/node": "^8.0.26",
58
- "@types/resolve": "0.0.4",
59
- "@types/webpack": "^4.4.9",
60
- "chai": "^3.5.0",
61
- "css-loader": "^0.28.7",
56
+ "@types/node": "^8.10.38",
57
+ "@types/webpack": "^4.4.19",
58
+ "chai": "^4.2.0",
59
+ "css-loader": "0.28.11",
62
60
  "eslint": "^5.7.0",
63
- "husky": "^1.1.2",
61
+ "husky": "^1.1.4",
64
62
  "istanbul": "^0.4.5",
65
- "lint-staged": "^7.3.0",
63
+ "lint-staged": "^8.0.5",
66
64
  "mocha": "^5.2.0",
67
65
  "mock-fs": "^4.3.0",
68
- "mock-require": "^2.0.2",
66
+ "mock-require": "^3.0.2",
69
67
  "prettier": "^1.14.3",
70
68
  "rimraf": "^2.5.4",
71
- "sinon": "^2.3.1",
72
- "ts-loader": "^3.4.0",
69
+ "sinon": "^7.1.1",
70
+ "ts-loader": "^5.0.0",
73
71
  "tslint": "^5.11.0",
74
- "tslint-config-prettier": "^1.15.0",
72
+ "tslint-config-prettier": "^1.16.0",
75
73
  "typescript": "^3.0.1",
76
74
  "vue": "^2.5.16",
77
75
  "vue-class-component": "^6.1.1",
78
- "vue-loader": "^13.5.0",
76
+ "vue-loader": "^15.2.4",
79
77
  "vue-template-compiler": "^2.5.16",
80
- "webpack": "^3.10.0"
78
+ "webpack": "^4.0.0"
81
79
  },
82
80
  "peerDependencies": {
83
81
  "tslint": "^4.0.0 || ^5.0.0",
@@ -88,10 +86,8 @@
88
86
  "babel-code-frame": "^6.22.0",
89
87
  "chalk": "^2.4.1",
90
88
  "chokidar": "^2.0.4",
91
- "lodash": "^4.17.11",
92
89
  "micromatch": "^3.1.10",
93
90
  "minimatch": "^3.0.4",
94
- "resolve": "^1.5.0",
95
91
  "tapable": "^1.0.0"
96
92
  },
97
93
  "husky": {
@@ -1,43 +0,0 @@
1
- import * as ts from 'typescript';
2
- import { Configuration, Linter } from 'tslint';
3
- import { FilesRegister } from './FilesRegister';
4
- import { FilesWatcher } from './FilesWatcher';
5
- import { NormalizedMessage } from './NormalizedMessage';
6
- import { CancellationToken } from './CancellationToken';
7
- import * as minimatch from 'minimatch';
8
- interface ConfigurationFile extends Configuration.IConfigurationFile {
9
- linterOptions?: {
10
- typeCheck?: boolean;
11
- exclude?: string[];
12
- };
13
- }
14
- export declare class IncrementalChecker {
15
- programConfigFile: string;
16
- compilerOptions: object;
17
- linterConfigFile: string | false;
18
- watchPaths: string[];
19
- workNumber: number;
20
- workDivision: number;
21
- checkSyntacticErrors: boolean;
22
- files: FilesRegister;
23
- linter: Linter;
24
- linterConfig: ConfigurationFile;
25
- linterExclusions: minimatch.IMinimatch[];
26
- program: ts.Program;
27
- programConfig: ts.ParsedCommandLine;
28
- watcher: FilesWatcher;
29
- vue: boolean;
30
- constructor(programConfigFile: string, compilerOptions: object, linterConfigFile: string | false, watchPaths: string[], workNumber: number, workDivision: number, checkSyntacticErrors: boolean, vue: boolean);
31
- static loadProgramConfig(configFile: string, compilerOptions: object): ts.ParsedCommandLine;
32
- static loadLinterConfig(configFile: string): ConfigurationFile;
33
- static createProgram(programConfig: ts.ParsedCommandLine, files: FilesRegister, watcher: FilesWatcher, oldProgram: ts.Program): ts.Program;
34
- static createLinter(program: ts.Program): any;
35
- static isFileExcluded(filePath: string, linterExclusions: minimatch.IMinimatch[]): boolean;
36
- nextIteration(): void;
37
- loadVueProgram(): ts.Program;
38
- loadDefaultProgram(): ts.Program;
39
- hasLinter(): boolean;
40
- getDiagnostics(cancellationToken: CancellationToken): NormalizedMessage[];
41
- getLints(cancellationToken: CancellationToken): NormalizedMessage[];
42
- }
43
- export {};
@@ -1,101 +0,0 @@
1
- /// <reference types="node" />
2
- import * as childProcess from 'child_process';
3
- import { Chalk } from 'chalk';
4
- import * as webpack from 'webpack';
5
- import { CancellationToken } from './CancellationToken';
6
- import { NormalizedMessage } from './NormalizedMessage';
7
- import { Message } from './Message';
8
- type Formatter = (message: NormalizedMessage, useColors: boolean) => string;
9
- interface Logger {
10
- error(message?: any): void;
11
- warn(message?: any): void;
12
- info(message?: any): void;
13
- }
14
- interface Options {
15
- tsconfig: string;
16
- compilerOptions: object;
17
- tslint: string | true;
18
- watch: string | string[];
19
- async: boolean;
20
- ignoreDiagnostics: number[];
21
- ignoreLints: string[];
22
- reportFiles: string[];
23
- colors: boolean;
24
- logger: Logger;
25
- formatter: 'default' | 'codeframe' | Formatter;
26
- formatterOptions: any;
27
- silent: boolean;
28
- checkSyntacticErrors: boolean;
29
- memoryLimit: number;
30
- workers: number;
31
- vue: boolean;
32
- }
33
- /**
34
- * ForkTsCheckerWebpackPlugin
35
- * Runs typescript type checker and linter (tslint) on separate process.
36
- * This speed-ups build a lot.
37
- *
38
- * Options description in README.md
39
- */
40
- declare class ForkTsCheckerWebpackPlugin {
41
- static DEFAULT_MEMORY_LIMIT: number;
42
- static ONE_CPU: number;
43
- static ALL_CPUS: number;
44
- static ONE_CPU_FREE: number;
45
- static TWO_CPUS_FREE: number;
46
- options: Partial<Options>;
47
- tsconfig: string;
48
- compilerOptions: object;
49
- tslint: string | true;
50
- watch: string[];
51
- ignoreDiagnostics: number[];
52
- ignoreLints: string[];
53
- reportFiles: string[];
54
- logger: Logger;
55
- silent: boolean;
56
- async: boolean;
57
- checkSyntacticErrors: boolean;
58
- workersNumber: number;
59
- memoryLimit: number;
60
- useColors: boolean;
61
- colors: Chalk;
62
- formatter: Formatter;
63
- tsconfigPath: string;
64
- tslintPath: string;
65
- watchPaths: string[];
66
- compiler: any;
67
- started: [number, number];
68
- elapsed: [number, number];
69
- cancellationToken: CancellationToken;
70
- isWatching: boolean;
71
- checkDone: boolean;
72
- compilationDone: boolean;
73
- diagnostics: NormalizedMessage[];
74
- lints: NormalizedMessage[];
75
- emitCallback: () => void;
76
- doneCallback: () => void;
77
- typescriptVersion: any;
78
- tslintVersion: any;
79
- service: childProcess.ChildProcess;
80
- vue: boolean;
81
- constructor(options?: Partial<Options>);
82
- static createFormatter(type: 'default' | 'codeframe', options: any): (message: NormalizedMessage, useColors: boolean) => string;
83
- apply(compiler: webpack.Compiler): void;
84
- computeContextPath(filePath: string): string;
85
- pluginStart(): void;
86
- pluginStop(): void;
87
- registerCustomHooks(): void;
88
- pluginCompile(): void;
89
- pluginEmit(): void;
90
- pluginDone(): void;
91
- spawnService(): void;
92
- killService(): void;
93
- handleServiceMessage(message: Message): void;
94
- handleServiceExit(_code: string | number, signal: string): void;
95
- createEmitCallback(compilation: any, callback: () => void): (this: ForkTsCheckerWebpackPlugin) => void;
96
- createNoopEmitCallback(): () => void;
97
- createDoneCallback(): (this: ForkTsCheckerWebpackPlugin) => void;
98
- }
99
- export = ForkTsCheckerWebpackPlugin;
100
- declare namespace ForkTsCheckerWebpackPlugin {
101
- }