File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## v0.3.0 2018-02-03
4
+
5
+ * Implemented ` _final ` method which calls ` end ` on file stream.
6
+
3
7
## v0.2.0 2018-02-02
4
8
5
9
* Only public interface of Writable is used.
Original file line number Diff line number Diff line change @@ -55,13 +55,21 @@ class FileTimestampStream extends Writable {
55
55
}
56
56
}
57
57
58
+ _final ( callback ) {
59
+ if ( this . stream ) {
60
+ this . stream . end ( callback )
61
+ } else {
62
+ callback ( )
63
+ }
64
+ }
65
+
58
66
_destroy ( err , callback ) {
59
67
if ( this . stream ) {
60
68
this . stream . destroy ( )
61
69
this . stream . removeListener ( 'error' , this . _streamErrorHandler )
62
70
this . stream = undefined
63
71
}
64
- super . _destroy ( err , callback )
72
+ callback ( err )
65
73
}
66
74
}
67
75
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " file-timestamp-stream" ,
3
- "version" : " 0.2 .0" ,
3
+ "version" : " 0.3 .0" ,
4
4
"description" : " Writing stream with file rotating based on timestamp" ,
5
5
"main" : " lib/file-timestamp-stream.js" ,
6
6
"typings" : " lib/file-timestamp-stream.d.ts" ,
You can’t perform that action at this time.
0 commit comments