async-flumelog
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "async-flumelog", | ||
"description": "An async flumelog", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"homepage": "https://github.com/flumedb/async-flumelog", | ||
@@ -35,3 +35,4 @@ "repository": { | ||
"author": "Anders Rune Jensen <arj03@protonmail.ch>", | ||
"license": "Beerware" | ||
"contributors": ["Andre Staltz <contact@staltz.com>"], | ||
"license": "LGPL-3.0" | ||
} |
@@ -149,3 +149,3 @@ var ltgt = require('ltgt') | ||
if (~i) this.blocks.streams.splice(i, 1) | ||
if (!this.sink.ended) | ||
if (!this.sink.ended && this.sink.end) | ||
this.sink.end(err === true ? null : err) | ||
@@ -152,0 +152,0 @@ } |
@@ -75,4 +75,5 @@ var tape = require('tape') | ||
tape('live', function (t) { | ||
var sink = collect(function () { | ||
throw new Error('live stream should not end') | ||
var sink = collect(function (err) { | ||
if (err === 'tape-ended') return | ||
else throw new Error('live stream should not end') | ||
}) | ||
@@ -83,2 +84,3 @@ log.stream({live: true, seqs: false}).pipe(sink) | ||
t.deepEqual(sink.array, [v1, v2, v3]) | ||
sink.end('tape-ended') | ||
t.end() | ||
@@ -146,4 +148,5 @@ }) | ||
var v4 = B(0x40, 40) | ||
var sink = collect(function () { | ||
throw new Error('live stream should not end') | ||
var sink = collect(function (err) { | ||
if (err === 'tape-ended') return | ||
else throw new Error('live stream should not end') | ||
}) | ||
@@ -156,2 +159,3 @@ log.stream({ live: true, seqs: false, gt: 10 + 2 + 20 + 2 }).pipe(sink) | ||
t.deepEqual(sink.array, [v4]) | ||
sink.end('tape-ended') | ||
t.end() | ||
@@ -183,1 +187,11 @@ }, 200) | ||
}) | ||
tape('close', function (t) { | ||
log.stream({seqs: false}).pipe({ | ||
paused: false, | ||
write: function () { }, | ||
}) | ||
log.close(() => { | ||
t.end() | ||
}) | ||
}) |
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
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
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
45576
14
1062
2
70