Skip to content

Commit ca92343

Browse files
authored
make it compile with TypeScript 3.2.2 (#189)
* make it compile with TypeScript 3.2.2 * add node 10 to test matrix * update package.json / CHANGELOG
1 parent 5f5d967 commit ca92343

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
language: node_js
22
node_js:
3-
- '6'
3+
- '10'
44
- '8'
5+
- '6'
56
install:
67
- yarn install
78
- yarn build

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
## v0.5.1
2+
3+
* [Make the checker compile with TypeScript 3.2](https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/189)
4+
15
## 0.5.0
6+
27
* Removed unused dependency `resolve`.
38
* Replace `lodash` usage with native calls.
49
* ** Breaking Changes**:
@@ -8,7 +13,6 @@
813
* Enable all strict type checks
914
* Update dev dependencies
1015

11-
1216
## v0.4.15
1317

1418
* [Add `tslintAutoFix` option to be passed on to tslint to auto format typescript files](https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/174) (#174)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fork-ts-checker-webpack-plugin",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Runs typescript type checker and linter on separate process.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

src/IncrementalChecker.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ export class IncrementalChecker {
4848
private workNumber: number = 0,
4949
private workDivision: number = 1,
5050
private checkSyntacticErrors: boolean = false,
51-
private vue: boolean = false,
52-
) {
53-
}
51+
private vue: boolean = false
52+
) {}
5453

5554
public static loadProgramConfig(configFile: string, compilerOptions: object) {
5655
const tsconfig = ts.readConfigFile(configFile, ts.sys.readFile).config;
@@ -238,16 +237,14 @@ export class IncrementalChecker {
238237

239238
const diagnosticsToRegister: ReadonlyArray<ts.Diagnostic> = this
240239
.checkSyntacticErrors
241-
? program.getSemanticDiagnostics(sourceFile, cancellationToken)
242-
.concat(
243-
program.getSyntacticDiagnostics(
244-
sourceFile,
245-
cancellationToken
246-
)
247-
)
240+
? program
241+
.getSemanticDiagnostics(sourceFile, cancellationToken)
242+
.concat(
243+
program.getSyntacticDiagnostics(sourceFile, cancellationToken)
244+
)
248245
: program.getSemanticDiagnostics(sourceFile, cancellationToken);
249246

250-
diagnostics.push.apply(diagnostics, diagnosticsToRegister);
247+
diagnostics.push(...diagnosticsToRegister);
251248
});
252249

253250
// normalize and deduplicate diagnostics

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4698,9 +4698,9 @@ typedarray@^0.0.6:
46984698
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
46994699

47004700
typescript@^3.0.1:
4701-
version "3.1.6"
4702-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.6.tgz#b6543a83cfc8c2befb3f4c8fba6896f5b0c9be68"
4703-
integrity sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==
4701+
version "3.2.2"
4702+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5"
4703+
integrity sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==
47044704

47054705
uglify-es@^3.3.4:
47064706
version "3.3.9"

0 commit comments

Comments
 (0)