Socket
Socket
Sign inDemoInstall

file-timestamp-stream

Package Overview
Dependencies
15
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.1 to 2.2.2

4

CHANGELOG.md
# Changelog
## v2.2.2 2019-07-08
- Updated dependencies.
## v2.2.1 2019-06-25

@@ -4,0 +8,0 @@

9

lib/file-timestamp-stream.d.ts

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

export declare class FileTimestampStream extends Writable {
private options;
static readonly CLOSE_UNUSED_FILE_AFTER = 1000;

@@ -23,7 +24,7 @@ readonly flags: string;

private destroyed;
private streams;
private streamCancelFinishers;
private streamErrorHandlers;
private readonly streams;
private readonly streamCancelFinishers;
private readonly streamErrorHandlers;
private readonly closers;
private closer?;
private closers;
constructor(options?: FileTimestampStreamOptions);

@@ -30,0 +31,0 @@ _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;

@@ -12,2 +12,6 @@ "use strict";

super(options);
this.options = options;
this.flags = this.options.flags || "a";
this.fs = this.options.fs || fs_1.default;
this.path = this.options.path || "out.log";
this.destroyed = false;

@@ -18,5 +22,2 @@ this.streams = new Map();

this.closers = new Map();
this.flags = options.flags || "a";
this.fs = options.fs || fs_1.default;
this.path = options.path || "out.log";
}

@@ -23,0 +24,0 @@ _write(chunk, encoding, callback) {

{
"name": "file-timestamp-stream",
"version": "2.2.1",
"version": "2.2.2",
"description": "Writing stream with file rotating based on timestamp",

@@ -31,25 +31,25 @@ "main": "lib/file-timestamp-stream.js",

"devDependencies": {
"@types/chai": "^4.1.7",
"@types/dirty-chai": "^2.0.0",
"@types/mocha": "^5.2.7",
"@types/node": "^12.0.10",
"@types/ultra-strftime": "^1.0.0",
"chai": "^4.2.0",
"coveralls": "^3.0.4",
"cross-env": "^5.2.0",
"dirty-chai": "^2.0.1",
"eslint": "^6.0.1",
"eslint-config-prettier": "^5.1.0",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-promise": "^4.1.1",
"markdownlint-cli": "^0.17.0",
"mocha": "^6.1.4",
"nyc": "^14.1.1",
"prettier": "^1.18.2",
"shx": "^0.3.2",
"ts-node": "^8.3.0",
"tslint": "^5.18.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.5.2"
"@types/chai": "4.1.7",
"@types/dirty-chai": "2.0.0",
"@types/mocha": "5.2.7",
"@types/node": "12.6.1",
"@types/ultra-strftime": "1.0.0",
"chai": "4.2.0",
"coveralls": "3.0.4",
"cross-env": "5.2.0",
"dirty-chai": "2.0.1",
"eslint": "6.0.1",
"eslint-config-prettier": "6.0.0",
"eslint-plugin-import": "2.18.0",
"eslint-plugin-node": "9.1.0",
"eslint-plugin-promise": "4.2.1",
"markdownlint-cli": "0.17.0",
"mocha": "6.1.4",
"nyc": "14.1.1",
"prettier": "1.18.2",
"shx": "0.3.2",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"tslint-config-prettier": "1.18.0",
"typescript": "3.5.2"
},

@@ -67,6 +67,5 @@ "scripts": {

"test": "npm run test:spec",
"test:spec": "npm run ts-mocha -- \"test/*.ts\"",
"test:coverage": "npm run clean:coverage && cross-env NYC=\"nyc --no-clean --reporter=lcov\" npm run test:spec && nyc report --reporter=text-summary --color",
"ts-mocha": "$NYC mocha --use_strict --throw-deprecation --require source-map-support/register --require ts-node/register --timeout 90000"
"test:spec": "$NYC mocha \"test/*.ts\"",
"test:coverage": "npm run clean:coverage && cross-env NYC=\"nyc --no-clean --reporter=lcov\" npm run test:spec && nyc report --reporter=text-summary --color"
}
}

@@ -20,5 +20,5 @@ /// <reference types="node" />

readonly flags: string
readonly fs: typeof fs
readonly path: string
readonly flags = this.options.flags || "a"
readonly fs = this.options.fs || fs
readonly path = this.options.path || "out.log"

@@ -31,14 +31,12 @@ /** contains last opened filename */

private destroyed = false
private streams: Map<string, WriteStream> = new Map()
private streamCancelFinishers: Map<string, () => void> = new Map()
private streamErrorHandlers: Map<string, (err: Error) => void> = new Map()
private readonly streams: Map<string, WriteStream> = new Map()
private readonly streamCancelFinishers: Map<string, () => void> = new Map()
private readonly streamErrorHandlers: Map<string, (err: Error) => void> = new Map()
private readonly closers: Map<string, NodeJS.Timer> = new Map()
private closer?: NodeJS.Timer
private closers: Map<string, NodeJS.Timer> = new Map()
constructor(options: FileTimestampStreamOptions = {}) {
constructor(private options: FileTimestampStreamOptions = {}) {
super(options)
this.flags = options.flags || "a"
this.fs = options.fs || fs
this.path = options.path || "out.log"
}

@@ -45,0 +43,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc