Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rotating-file-stream

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rotating-file-stream - npm Package Compare versions

Comparing version 1.4.4 to 1.4.5

6

CHANGELOG.md

@@ -0,1 +1,7 @@

- 2019-10-18 - v1.4.5
- Fixed a [bug](https://github.com/iccicci/rotating-file-stream/issues/39) when **immutable** and **history** are both set.
- devDependencies update
- 2019-10-01 - v1.4.4
- Fixed a [bug](https://github.com/iccicci/rotating-file-stream/issues/42) occurring adding properties to **Array.prototype**
- devDependencies update
- 2019-07-23 - v1.4.3

@@ -2,0 +8,0 @@ - Exported the options interface

7

index.js

@@ -53,6 +53,9 @@ "use strict";

this.stream.on("finish", done);
this.stream.end();
this.stream.end(() => this.emit("close"));
this.stream = null;
}
else done();
else {
this.emit("close");
done();
}
};

@@ -59,0 +62,0 @@

{
"name": "rotating-file-stream",
"version": "1.4.4",
"version": "1.4.5",
"description": "Opens a stream.Writable to a file rotated by interval and/or size. A logrotate alternative.",

@@ -8,2 +8,3 @@ "scripts": {

"coverage": "TZ=\"Europe/Rome\" ./node_modules/.bin/nyc -r lcov -r text -r text-summary npm test",
"debug": "node --inspect-brk ./node_modules/.bin/_mocha test",
"eslint": "./node_modules/.bin/eslint *.js test/*js",

@@ -39,7 +40,7 @@ "npmignore": "echo '.codeclimate.yml\\n.eslintrc\\n.gitignore\\n.gitattributes\\n.travis.yml\\n.vscode\\nCHANGELOG.md\\nREADME.md\\ntest' > .npmignore ; cat .gitignore >> .npmignore",

"eslint": "6.5.1",
"mocha": "6.2.1",
"mocha": "6.2.2",
"nyc": "14.1.1",
"typescript": "3.6.3",
"@types/node": "12.7.8"
"typescript": "3.6.4",
"@types/node": "12.11.1"
}
}

@@ -283,5 +283,7 @@ # rotating-file-stream

If set to **true**, names of generated files never changes. In other words the _rotated file name generator_ is never
called with a **null** _time_ parameter and new files are immediately generated with their rotated name.
**rotation** _event_ now has a _filename_ parameter with the newly created file name.
If set to **true**, names of generated files never changes. New files are immediately generated with their rotated
name. In other words the _rotated file name generator_ is never called with a **null** _time_ parameter unless to
determinate the _history file_ name; this can happen if **maxFiles** or **maxSize** are used without **history**
option. **rotation** _event_ now has a _filename_ parameter with the newly created file name.
Useful to send logs to logstash through filebeat.

@@ -308,3 +310,3 @@

size of rotated files should not exceed a given limit, the package needs a file where to store this information. This
option specifies the name of that file. This option takes effect only if at least one of **maxFiles** or **maxSize**
option specifies the name _history file_. This option takes effect only if at least one of **maxFiles** or **maxSize**
is used. If **null**, the _not rotated filename_ with the '.txt' suffix is used.

@@ -329,2 +331,6 @@

stream.on('close', function() {
// the stream have been closed
});
stream.on('error', function(err) {

@@ -331,0 +337,0 @@ // here are reported blocking errors

@@ -225,3 +225,3 @@ "use strict";

if((self.options.maxFiles || self.options.maxSize) && ! self.options.rotate) self.on("rotated", self.history.bind(self));
if((self.options.maxFiles || self.options.maxSize) && ! self.options.rotate) self.on(self.options.immutable ? "open" : "rotated", self.history.bind(self));
}

@@ -228,0 +228,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc