Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

tail-file

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tail-file - npm Package Compare versions

Comparing version
1.4.9
to
1.4.10
+1
-1
package.json
{
"name": "tail-file",
"version": "1.4.9",
"version": "1.4.10",
"description": "Tail files fast, easy, persistent, fault tolerant and flexible",

@@ -5,0 +5,0 @@ "main": "tail.js",

@@ -48,3 +48,3 @@ # tail-file

if( reason == 'TRUNCATE' ) console.log("The file got smaller. I will go up and continue");
if( reason == 'CATCHUP' ) console.log("We found a start in an earlier file and are now moving to the nextt one in the list");
if( reason == 'CATCHUP' ) console.log("We found a start in an earlier file and are now moving to the next one in the list");
});

@@ -64,3 +64,3 @@

* When switching to a new file, it will start from the beginning, as to not miss any rows.
* except if the new file actually was copied or moved into place, with too many existing rows, in which case it will continue from the bottom.
* Optionally skipping to the bottom if the file is larger than a given limit.
* You can let tail-file search for the starting position, and it will continue at that position, even if it's in the secondary file.

@@ -67,0 +67,0 @@ * It will never throw exceptions. No matter what type of errors. All errors are emitted as messages.

+13
-2

@@ -94,2 +94,3 @@ 'use strict';

reading: false,
readable: false, // only used by checkDir
fd: null,

@@ -538,3 +539,6 @@ buf: null,

// It will decide if it's time to switch over
if( this.fd ) return this.readStuff();
if( this.fd ){
this.readable = true;
return this.readStuff();
}

@@ -545,3 +549,3 @@ const basename = path.basename( this.filename );

this._stop();
this.setCharPos(0);
this.setBytePos(0);
this.emit('restart','PRIMEFOUND');

@@ -613,2 +617,3 @@ return this.start();

// Stops without waiting on current task
_stop(){

@@ -681,2 +686,3 @@ if( this.started ){

this.reading = true;
this.readable = false;

@@ -713,2 +719,3 @@ // debug("Starts reading at " + this.pos);

decode( chunk, cnt ){
// cnt is for debug
// this.reading = false;

@@ -807,3 +814,5 @@

self.reading = true;
fs.stat(self.filename, (err,stat) =>{
self.reading = false;
if( err ){

@@ -835,2 +844,4 @@ debug( err );

if( self.readable ) return self.readStuff();
self.emit('eof', self.pos);

@@ -837,0 +848,0 @@ });