thread-stream 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +1 -1
- package/README.md +0 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/test/base.test.js +3 -1
package/.github/workflows/ci.yml
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
[](https://www.npmjs.com/package/thread-stream)
|
|
3
3
|
[](https://github.com/pinojs/thread-stream/actions)
|
|
4
4
|
[](https://snyk.io/test/github/pinojs/thread-stream)
|
|
5
|
-
[](https://coveralls.io/github/pinojs/thread-stream?branch=master)
|
|
6
5
|
[](https://standardjs.com/)
|
|
7
6
|
|
|
8
7
|
A streaming way to send data to a Node.js Worker Thread.
|
package/index.js
CHANGED
|
@@ -251,7 +251,7 @@ class ThreadStream extends EventEmitter {
|
|
|
251
251
|
|
|
252
252
|
end () {
|
|
253
253
|
if (this[kImpl].destroyed) {
|
|
254
|
-
|
|
254
|
+
return
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
this[kImpl].ending = true
|
|
@@ -286,7 +286,7 @@ class ThreadStream extends EventEmitter {
|
|
|
286
286
|
|
|
287
287
|
flushSync () {
|
|
288
288
|
if (this[kImpl].destroyed) {
|
|
289
|
-
|
|
289
|
+
return
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
writeSync(this)
|
package/package.json
CHANGED
package/test/base.test.js
CHANGED
|
@@ -248,7 +248,7 @@ test('pass down MessagePorts', async function (t) {
|
|
|
248
248
|
})
|
|
249
249
|
|
|
250
250
|
test('destroy does not error', function (t) {
|
|
251
|
-
t.plan(
|
|
251
|
+
t.plan(5)
|
|
252
252
|
|
|
253
253
|
const dest = file()
|
|
254
254
|
const stream = new ThreadStream({
|
|
@@ -267,5 +267,7 @@ test('destroy does not error', function (t) {
|
|
|
267
267
|
stream.flush((err) => {
|
|
268
268
|
t.equal(err.message, 'the worker has exited')
|
|
269
269
|
})
|
|
270
|
+
t.doesNotThrow(() => stream.flushSync())
|
|
271
|
+
t.doesNotThrow(() => stream.end())
|
|
270
272
|
})
|
|
271
273
|
})
|