fork-ts-checker-webpack-plugin 0.2.6 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/service.js CHANGED
@@ -1,52 +1,42 @@
1
- var ts = require('typescript');
2
- var process = require('process');
3
- var IncrementalChecker = require('./IncrementalChecker');
4
- var CancellationToken = require('./CancellationToken');
5
-
6
- var checker = new IncrementalChecker(
7
- process.env.TSCONFIG,
8
- process.env.TSLINT === '' ? false : process.env.TSLINT,
9
- process.env.WATCH === '' ? [] : process.env.WATCH.split('|'),
10
- parseInt(process.env.WORK_NUMBER, 10),
11
- parseInt(process.env.WORK_DIVISION, 10)
12
- );
13
-
14
- function run (cancellationToken) {
15
- var diagnostics = [];
16
- var lints = [];
17
-
18
- checker.nextIteration();
19
-
20
- try {
21
- diagnostics = checker.getDiagnostics(cancellationToken);
22
- if (checker.hasLinter()) {
23
- lints = checker.getLints(cancellationToken);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var process = require("process");
4
+ var ts = require("typescript");
5
+ var IncrementalChecker = require("./IncrementalChecker");
6
+ var CancellationToken = require("./CancellationToken");
7
+ var checker = new IncrementalChecker(process.env.TSCONFIG, process.env.TSLINT === '' ? false : process.env.TSLINT, process.env.WATCH === '' ? [] : process.env.WATCH.split('|'), parseInt(process.env.WORK_NUMBER, 10), parseInt(process.env.WORK_DIVISION, 10), process.env.CHECK_SYNTACTIC_ERRORS === 'true');
8
+ function run(cancellationToken) {
9
+ var diagnostics = [];
10
+ var lints = [];
11
+ checker.nextIteration();
12
+ try {
13
+ diagnostics = checker.getDiagnostics(cancellationToken);
14
+ if (checker.hasLinter()) {
15
+ lints = checker.getLints(cancellationToken);
16
+ }
24
17
  }
25
- } catch (error) {
26
- if (error instanceof ts.OperationCanceledException) {
27
- return;
18
+ catch (error) {
19
+ if (error instanceof ts.OperationCanceledException) {
20
+ return;
21
+ }
22
+ throw error;
28
23
  }
29
-
30
- throw error;
31
- }
32
-
33
- if (!cancellationToken.isCancellationRequested()) {
34
- try {
35
- process.send({
36
- diagnostics: diagnostics,
37
- lints: lints
38
- });
39
- } catch (e) {
40
- // channel closed...
41
- process.exit();
24
+ if (!cancellationToken.isCancellationRequested()) {
25
+ try {
26
+ process.send({
27
+ diagnostics: diagnostics,
28
+ lints: lints
29
+ });
30
+ }
31
+ catch (e) {
32
+ // channel closed...
33
+ process.exit();
34
+ }
42
35
  }
43
- }
44
36
  }
45
-
46
37
  process.on('message', function (message) {
47
- run(CancellationToken.createFromJSON(message));
38
+ run(CancellationToken.createFromJSON(message));
48
39
  });
49
-
50
40
  process.on('SIGINT', function () {
51
- process.exit();
41
+ process.exit();
52
42
  });
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "fork-ts-checker-webpack-plugin",
3
- "version": "0.2.6",
3
+ "version": "0.2.10",
4
4
  "description": "Runs typescript type checker and linter on separate process.",
5
5
  "main": "lib/index.js",
6
6
  "files": [
7
7
  "lib"
8
8
  ],
9
9
  "scripts": {
10
+ "build": "tsc --version && tsc --project \"./src\"",
10
11
  "test:unit": "mocha -R spec ./test/unit",
11
12
  "test:integration": "mocha -R spec ./test/integration && rimraf tmp",
12
- "test": "npm run test:unit && npm run test:integration",
13
+ "test": "npm run build && npm run test:unit && npm run test:integration",
13
14
  "test:watch": "mocha -R spec --watch ./test/unit",
14
- "test:coverage": "rimraf coverage && istanbul cover -root lib --include-all-sources node_modules/.bin/_mocha -- -R spec ./test/unit ./test/integration",
15
+ "test:coverage": "rimraf coverage && istanbul cover -root lib --include-all-sources mocha -- -R spec ./test/unit ./test/integration",
15
16
  "lint": "eslint ./lib ./test",
16
17
  "lint:fix": "eslint ./lib ./test --fix"
17
18
  },
@@ -40,6 +41,16 @@
40
41
  "url": "https://github.com/Realytics/fork-ts-checker-webpack-plugin/issues"
41
42
  },
42
43
  "devDependencies": {
44
+ "@types/babel-code-frame": "^6.20.1",
45
+ "@types/chalk": "^0.4.31",
46
+ "@types/chokidar": "^1.7.2",
47
+ "@types/lodash.endswith": "^4.2.3",
48
+ "@types/lodash.isfunction": "^3.0.3",
49
+ "@types/lodash.isstring": "^4.0.3",
50
+ "@types/lodash.startswith": "^4.2.3",
51
+ "@types/minimatch": "^3.0.1",
52
+ "@types/node": "^8.0.26",
53
+ "@types/webpack": "^3.0.10",
43
54
  "chai": "^3.5.0",
44
55
  "eslint": "^3.19.0",
45
56
  "istanbul": "^0.4.5",
@@ -55,7 +66,7 @@
55
66
  },
56
67
  "peerDependencies": {
57
68
  "typescript": "^2.1.0",
58
- "webpack": "^2.0.0 || ^3.0.0"
69
+ "webpack": "^2.3.0 || ^3.0.0"
59
70
  },
60
71
  "dependencies": {
61
72
  "babel-code-frame": "^6.22.0",
@@ -64,6 +75,7 @@
64
75
  "lodash.endswith": "^4.2.1",
65
76
  "lodash.isfunction": "^3.0.8",
66
77
  "lodash.isstring": "^4.0.1",
67
- "lodash.startswith": "^4.2.1"
78
+ "lodash.startswith": "^4.2.1",
79
+ "minimatch": "^3.0.4"
68
80
  }
69
81
  }