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 2.1.0 to 2.1.1

3

CHANGELOG.md

@@ -0,1 +1,4 @@

- 2020-05-13 - v2.1.1
- Bug fix for **teeToStdout**
- devDependencies update
- 2020-04-29 - v2.1.0

@@ -2,0 +5,0 @@ - **teeToStdout** option added

8

index.d.ts

@@ -7,3 +7,3 @@ /// <reference types="node" />

compress?: boolean | string | Compressor;
encoding?: string;
encoding?: BufferEncoding;
history?: string;

@@ -24,3 +24,3 @@ immutable?: boolean;

compress?: string | Compressor;
encoding?: string;
encoding?: BufferEncoding;
history?: string;

@@ -45,3 +45,3 @@ immutable?: boolean;

chunk: Buffer;
encoding: string;
encoding: BufferEncoding;
next: Chunk;

@@ -82,3 +82,3 @@ }

_final(callback: Callback): void;
_write(chunk: Buffer, encoding: string, callback: Callback): void;
_write(chunk: Buffer, encoding: BufferEncoding, callback: Callback): void;
_writev(chunks: Chunk[], callback: Callback): void;

@@ -85,0 +85,0 @@ private rewrite;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createStream = exports.RotatingFileStream = void 0;
const child_process_1 = require("child_process");

@@ -19,3 +20,3 @@ const zlib_1 = require("zlib");

const { encoding, history, maxFiles, maxSize, path } = options;
super({ decodeStrings: true, defaultEncoding: encoding });
super({ decodeStrings: true, defaultencoding: encoding });
this.createGzip = zlib_1.createGzip;

@@ -99,4 +100,4 @@ this.exec = child_process_1.exec;

});
if (this.options.teeToStdout)
process.stdout.write(chunk.chunk, chunk.encoding, () => { });
if (this.options.teeToStdout && !process.stdout.destroyed)
process.stdout.write(chunk.chunk, chunk.encoding);
};

@@ -103,0 +104,0 @@ if (this.stream) {

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

@@ -43,11 +43,11 @@ "scripts": {

"@types/mocha": "7.0.2",
"@types/node": "13.13.4",
"@typescript-eslint/eslint-plugin": "2.30.0",
"@typescript-eslint/parser": "2.30.0",
"eslint": "6.8.0",
"@types/node": "14.0.1",
"@typescript-eslint/eslint-plugin": "2.33.0",
"@typescript-eslint/parser": "2.33.0",
"eslint": "7.0.0",
"mocha": "7.1.2",
"nyc": "15.0.1",
"ts-node": "8.9.1",
"typescript": "3.8.3"
"ts-node": "8.10.1",
"typescript": "3.9.2"
}
}

@@ -86,2 +86,3 @@ # rotating-file-stream

- [size](#size)
- [teeToStdout](#teeToStdout)
- [Rotation logic](#rotation-logic)

@@ -541,3 +542,3 @@ - [Under the hood](#under-the-hood)

compress?: boolean | string | Compressor;
encoding?: string;
encoding?: BufferEncoding;
history?: string;

@@ -544,0 +545,0 @@ immutable?: boolean;

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