rotating-file-stream
Advanced tools
Comparing version 2.1.5 to 2.1.6
@@ -0,1 +1,5 @@ | ||
- 2021-09-26 - v2.1.6 | ||
- Made the [package compliant with Node.js v14 and v16](https://github.com/iccicci/rotating-file-stream/issues/63) | ||
- Removed duplicated description for initialRotation option (thanks to [ttoomm318](https://github.com/ttoomm318)) | ||
- devDependencies update | ||
- 2021-02-19 - v2.1.5 | ||
@@ -2,0 +6,0 @@ - Changed \_writev to make it compliant with Node.js v14; this should solve [#67](https://github.com/iccicci/rotating-file-stream/issues/67) |
10
index.js
@@ -74,4 +74,4 @@ "use strict"; | ||
const destroy = (error) => { | ||
this.destroy(); | ||
return callback(error); | ||
this.destroy(error); | ||
return callback(); | ||
}; | ||
@@ -144,3 +144,3 @@ const rewrite = () => { | ||
makePath(name, callback) { | ||
const dir = path_1.parse(name).dir; | ||
const dir = (0, path_1.parse)(name).dir; | ||
this.fsMkdir(dir, (error) => { | ||
@@ -365,3 +365,3 @@ if (error) { | ||
return this.rotate(error => (this.error = error)); | ||
this.timer = timers_1.setTimeout(set, time > this.maxTimeout ? this.maxTimeout : time); | ||
this.timer = (0, timers_1.setTimeout)(set, time > this.maxTimeout ? this.maxTimeout : time); | ||
this.timer.unref(); | ||
@@ -405,3 +405,3 @@ }; | ||
}; | ||
this.fsWrite(fd, cont, "utf8", (error) => { | ||
this.fsWrite(fd, cont, (error) => { | ||
this.fsClose(fd, (error2) => { | ||
@@ -408,0 +408,0 @@ if (error) { |
{ | ||
"name": "rotating-file-stream", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "Opens a stream.Writable to a file rotated by interval and/or size. A logrotate alternative.", | ||
@@ -43,12 +43,12 @@ "scripts": { | ||
"devDependencies": { | ||
"@types/mocha": "8.2.1", | ||
"@types/node": "14.14.30", | ||
"@typescript-eslint/eslint-plugin": "4.15.1", | ||
"@typescript-eslint/parser": "4.15.1", | ||
"eslint": "7.20.0", | ||
"mocha": "8.3.0", | ||
"@types/mocha": "9.0.0", | ||
"@types/node": "16.10.1", | ||
"@typescript-eslint/eslint-plugin": "4.31.2", | ||
"@typescript-eslint/parser": "4.31.2", | ||
"eslint": "7.32.0", | ||
"mocha": "9.1.2", | ||
"nyc": "15.1.0", | ||
"prettier": "2.2.1", | ||
"ts-node": "9.1.1", | ||
"typescript": "4.1.5" | ||
"prettier": "2.4.1", | ||
"ts-node": "10.2.1", | ||
"typescript": "4.4.3" | ||
}, | ||
@@ -55,0 +55,0 @@ "prettier": { |
@@ -33,3 +33,3 @@ # rotating-file-stream | ||
[travis-badge]: https://badgen.net/travis/iccicci/rotating-file-stream?icon=travis | ||
[travis-url]: https://travis-ci.org/iccicci/rotating-file-stream?branch=master | ||
[travis-url]: https://app.travis-ci.com/github/iccicci/rotating-file-stream | ||
[types-badge]: https://badgen.net/npm/types/rotating-file-stream?color=green&icon=typescript | ||
@@ -380,12 +380,2 @@ | ||
### initialRotation | ||
When program stops in a rotation period then restarts in a new rotation period, logs of different rotation period will | ||
go in the next rotated file; in a few words: a rotation job is lost. If this option is set to `true` an initial check | ||
is performed against the _not-rotated file_ timestamp and, if it falls in a previous rotation period, an initial | ||
rotation job is done as well. | ||
**Note:** | ||
this option has effect only if [`options.intervalBoundary`](#intervalboundary) is used. | ||
### compress | ||
@@ -392,0 +382,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60842
568