Skip to content

Commit

Permalink
make it compile with TypeScript 3.2.2 (#189)
Browse files Browse the repository at this point in the history
* make it compile with TypeScript 3.2.2

* add node 10 to test matrix

* update package.json / CHANGELOG
  • Loading branch information
johnnyreilly committed Dec 11, 2018
1 parent 5f5d967 commit ca92343
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: node_js
node_js:
- '6'
- '10'
- '8'
- '6'
install:
- yarn install
- yarn build
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
## v0.5.1

* [Make the checker compile with TypeScript 3.2](https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/189)

## 0.5.0

* Removed unused dependency `resolve`.
* Replace `lodash` usage with native calls.
* ** Breaking Changes**:
Expand All @@ -8,7 +13,6 @@
* Enable all strict type checks
* Update dev dependencies


## v0.4.15

* [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)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fork-ts-checker-webpack-plugin",
"version": "0.5.0",
"version": "0.5.1",
"description": "Runs typescript type checker and linter on separate process.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
19 changes: 8 additions & 11 deletions src/IncrementalChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ export class IncrementalChecker {
private workNumber: number = 0,
private workDivision: number = 1,
private checkSyntacticErrors: boolean = false,
private vue: boolean = false,
) {
}
private vue: boolean = false
) {}

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

const diagnosticsToRegister: ReadonlyArray<ts.Diagnostic> = this
.checkSyntacticErrors
? program.getSemanticDiagnostics(sourceFile, cancellationToken)
.concat(
program.getSyntacticDiagnostics(
sourceFile,
cancellationToken
)
)
? program
.getSemanticDiagnostics(sourceFile, cancellationToken)
.concat(
program.getSyntacticDiagnostics(sourceFile, cancellationToken)
)
: program.getSemanticDiagnostics(sourceFile, cancellationToken);

diagnostics.push.apply(diagnostics, diagnosticsToRegister);
diagnostics.push(...diagnosticsToRegister);
});

// normalize and deduplicate diagnostics
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4698,9 +4698,9 @@ typedarray@^0.0.6:
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

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

uglify-es@^3.3.4:
version "3.3.9"
Expand Down

0 comments on commit ca92343

Please sign in to comment.