File tree Expand file tree Collapse file tree 6 files changed +248
-209
lines changed Expand file tree Collapse file tree 6 files changed +248
-209
lines changed Original file line number Diff line number Diff line change 4
4
5
5
skip_cleanup : true
6
6
api_key :
7
- secure : RdoLwtLDz3PI8fhTg0wXeRuL9JAffNJSTJvNExk9Q+fcccBl8yaNU4AId5OcuDwO3pnb59nKv8fIidW9VzemZ8/eCqCBbCx4qzGFxN2uCB+aBwQ7Svu6GAJV0JIEgIXG+dkByRawd9hCIyvi6IvhIA/XbVbboV5ngjwSW317SA0lbznGHQmIT4o93+YpUuT+pkGC04eJGIH6cgAe61QGwN6WyGx8hfJ+K+OCksZ5A4RIeSkRHY4zRgmlGGtSwOutUPh3OMIdG40E0UXLn3MRdANzekMFSowMZ8aFliqhDsgk/zk8IC/X6OlPFSTAmO1IkKqZiJsr1rxmeJvC9GDxvRZ3Vyv3GncoteEQVjKFsYRlTvmEouECSxafl2aOqa1i2TqU8if5GjgB6mm+pTjDTzF4KB3QkEtRKgTuB47+EUc5zXIBrgIAb3sWu+QgaSFOreG49cGccCsU0viLe2WHbjzuNUP3IMO0x9tL/rm0RQmP3FjQSWlDg6VXYjJs5UcpiQLabgL3u4tso9aYprqTKihqfQkyfi0R5qH872ncGlASkzwbcZxiUeWau3yx46iZdckPNTAKw0afeodmr7aL6B+xEWHfZv9OBn0UE5I23jvIlI+wzyWHWUgeVikBx1ZZV4OqAHOTdEMHQivbir4eYGGAYtY6yxzLpyfD4g0xIzM =
7
+ secure : L1iiDkvSgk7uIhdeglWijy8GqSQ63Uu7F/3TB1LEJN2xQ0YgbrBBW2Y1WFzBuVncaLzGV7YtS4eSGT1tjTqEl/c2I4vMdlsusFMSRuA3vDOYc0Uqwn3cjT1X23Exv0foj/Ifltv0idn21TVFWKNy3RSpf1IZ1ZyX9PTBn1QCeUpmlPm5f9HRMOrV7jBPOxS3eS7eeuZvzMk+EsA1XwLhJIhasd0gGXDnItLnCGN+7hrrGEppOQCQhKFfv3cA5hScLSoYUtHwGxryddyhia+UyOfcliXtfb2lvuzJ6rJjRrW6Gce33m1MEXYpOAqkCoF5BXrCLhEfCN+MkfaF9hd8Ytj3DEbIwetcj4XH7rPaiIjN9yKBYkOWeUPUeQ9HRbJ3Nwvapn6od3bHfRr0qCGlltEOtBcMKkARBWd3CiMEJolgoZ1q+w25DZYi9D76jBf8m8MDf2rAt2RapSnBpn70wkPWrcw/+vj/Y5ZQJDj6hzyk/sGTVNOemwtBDa/ishJKVugEQgW+F3mdqoFAfMZrg40yPgj3X34RRUgtTPDGSRZ5+Q57Mt61vcSkNmJWS/oU2zJyHiZEsz0mKOyjko4bip/zkc7oP81GONQ/+EESWuBJusF2ypG/6FJChfgz3XS18jzSRvtihUqLbN30Mvt2mkCeh7GxChVNJVyclCM5HKE =
8
8
on :
9
9
tags : true
10
10
branch : master
Original file line number Diff line number Diff line change
1
+ ## v0.2.10
2
+ * Fix #80 "Cannot read property 'getLineAndCharacterOfPosition' of undefined"
3
+ * Fix #76 "TypeError: Cannot read property '0' of undefined"
4
+
1
5
## v0.2.9
2
6
* Make errors formatting closer to ` ts-loader ` style
3
7
* Handle tslint exclude option
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " fork-ts-checker-webpack-plugin" ,
3
- "version" : " 0.2.9 " ,
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" : [
Original file line number Diff line number Diff line change @@ -44,16 +44,24 @@ class NormalizedMessage {
44
44
// message types
45
45
static createFromDiagnostic ( diagnostic : tsTypes . Diagnostic ) {
46
46
const ts : typeof tsTypes = require ( 'typescript' ) ;
47
- const position = diagnostic . file . getLineAndCharacterOfPosition ( diagnostic . start ) ;
47
+ let file : string ;
48
+ let line : number ;
49
+ let character : number ;
50
+ if ( diagnostic . file ) {
51
+ file = diagnostic . file . fileName ;
52
+ const position = diagnostic . file . getLineAndCharacterOfPosition ( diagnostic . start ) ;
53
+ line = position . line + 1 ;
54
+ character = position . character + 1 ;
55
+ }
48
56
49
57
return new NormalizedMessage ( {
50
58
type : NormalizedMessage . TYPE_DIAGNOSTIC ,
51
59
code : diagnostic . code ,
52
60
severity : ts . DiagnosticCategory [ diagnostic . category ] . toLowerCase ( ) as Severity ,
53
61
content : ts . flattenDiagnosticMessageText ( diagnostic . messageText , '\n' ) ,
54
- file : diagnostic . file . fileName ,
55
- line : position . line + 1 ,
56
- character : position . character + 1
62
+ file : file ,
63
+ line : line ,
64
+ character : character
57
65
} ) ;
58
66
}
59
67
Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ class ForkTsCheckerWebpackPlugin {
423
423
}
424
424
425
425
createEmitCallback ( compilation : any , callback : ( ) => void ) {
426
- const emitCallback = ( ) => {
426
+ return function emitCallback ( this : ForkTsCheckerWebpackPlugin ) {
427
427
const elapsed = Math . round ( this . elapsed [ 0 ] * 1E9 + this . elapsed [ 1 ] ) ;
428
428
429
429
this . compiler . applyPlugins (
@@ -457,8 +457,6 @@ class ForkTsCheckerWebpackPlugin {
457
457
458
458
callback ( ) ;
459
459
} ;
460
-
461
- return emitCallback ;
462
460
}
463
461
464
462
createNoopEmitCallback ( ) {
@@ -467,7 +465,7 @@ class ForkTsCheckerWebpackPlugin {
467
465
}
468
466
469
467
createDoneCallback ( ) {
470
- const doneCallback = ( ) => {
468
+ return function doneCallback ( this : ForkTsCheckerWebpackPlugin ) {
471
469
const elapsed = Math . round ( this . elapsed [ 0 ] * 1E9 + this . elapsed [ 1 ] ) ;
472
470
473
471
if ( this . compiler ) {
@@ -499,7 +497,6 @@ class ForkTsCheckerWebpackPlugin {
499
497
this . logger . info ( 'Time: ' + this . colors . bold ( Math . round ( elapsed / 1E6 ) . toString ( ) ) + 'ms' ) ;
500
498
}
501
499
} ;
502
- return doneCallback ;
503
500
}
504
501
}
505
502
You can’t perform that action at this time.
0 commit comments