File tree Expand file tree Collapse file tree 6 files changed +28
-7
lines changed Expand file tree Collapse file tree 6 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Next
4
4
5
+ ## v2.0.1
6
+ * FIX: Compatibility with TypeScript 1.3 exit codes (#189 ).
7
+ * FIX: Show issue count in red if failOnTypeError option is set and there are non-emit preventing errors (#189 ).
8
+ * FIX: Fixed bad ` failontypeerror ` test. (Used incorrect location for parameter in Gruntfile.js).
9
+
5
10
## v2.0.0
6
11
* DOCS: Major documentation overhaul (https://github.com/TypeStrong/grunt-ts/pull/185 )
7
12
* DOCS: More sample config for gruntfile (https://github.com/TypeStrong/grunt-ts/pull/166 )
Original file line number Diff line number Diff line change @@ -321,6 +321,14 @@ module.exports = function (grunt) {
321
321
compiler : './customcompiler/tsc'
322
322
}
323
323
} ,
324
+ continueIfTypeErrorAndNoFailOnTypeErrors : {
325
+ test : true ,
326
+ src : [ 'test/failontypeerror/**/*.ts' ] ,
327
+ outDir : 'test/failontypeerror/js' ,
328
+ options : {
329
+ failOnTypeErrors : false
330
+ }
331
+ } ,
324
332
fail : {
325
333
fail : true , // a designed to fail target
326
334
src : [ 'test/fail/**/*.ts' ] ,
@@ -331,11 +339,13 @@ module.exports = function (grunt) {
331
339
sourcemap : false
332
340
}
333
341
} ,
334
- failontypeerror : {
342
+ failOnTypeErrors : {
335
343
fail : true ,
336
- failOnTypeError : true ,
337
344
src : [ 'test/failontypeerror/**/*.ts' ] ,
338
345
outDir : 'test/failontypeerror/js' ,
346
+ options : {
347
+ failOnTypeErrors : true
348
+ }
339
349
} ,
340
350
files_testfailedcompilation : {
341
351
fail : true , // a designed to fail target
Original file line number Diff line number Diff line change @@ -795,6 +795,7 @@ $ grunt upgrade
795
795
796
796
### Publishing Checklist
797
797
798
+ * Run ` grunt release ` and ensure it comes back clean (should finish but with warnings).
798
799
* Update the version in package.json.
799
800
* Update CHANGELOG.md.
800
801
* Commit to master.
Original file line number Diff line number Diff line change 2
2
"author" : " basarat" ,
3
3
"name" : " grunt-ts" ,
4
4
"description" : " Compile and manage your TypeScript project" ,
5
- "version" : " 2.0.0 " ,
5
+ "version" : " 2.0.1 " ,
6
6
"homepage" : " https://github.com/grunt-ts/grunt-ts" ,
7
7
"repository" : {
8
8
"type" : " git" ,
Original file line number Diff line number Diff line change @@ -302,6 +302,9 @@ function pluginFn(grunt: IGrunt) {
302
302
return false ;
303
303
}
304
304
305
+ // In TypeScript 1.3 and above, the result code corresponds to the ExitCode enum in
306
+ // TypeScript/src/compiler/sys.ts
307
+
305
308
var isError = ( result . code !== 0 ) ;
306
309
307
310
// If the compilation errors contain only type errors, JS files are still
@@ -333,7 +336,7 @@ function pluginFn(grunt: IGrunt) {
333
336
334
337
// Log error summary
335
338
if ( level1ErrorCount + level5ErrorCount + nonEmitPreventingWarningCount > 0 ) {
336
- if ( level1ErrorCount + level5ErrorCount > 0 ) {
339
+ if ( ( level1ErrorCount + level5ErrorCount > 0 ) || options . failOnTypeErrors ) {
337
340
grunt . log . write ( ( '>> ' ) . red ) ;
338
341
} else {
339
342
grunt . log . write ( ( '>> ' ) . green ) ;
@@ -355,7 +358,7 @@ function pluginFn(grunt: IGrunt) {
355
358
356
359
grunt . log . writeln ( '' ) ;
357
360
358
- if ( isOnlyTypeErrors ) {
361
+ if ( isOnlyTypeErrors && ! options . failOnTypeErrors ) {
359
362
grunt . log . write ( ( '>> ' ) . green ) ;
360
363
grunt . log . writeln ( 'Type errors only.' ) ;
361
364
}
You can’t perform that action at this time.
0 commit comments