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.
@@ -56,6 +56,6 @@ jobs:
56
56
  needs: test
57
57
  runs-on: ubuntu-latest
58
58
  steps:
59
- - uses: fastify/github-action-merge-dependabot@v2.7.1
59
+ - uses: fastify/github-action-merge-dependabot@v3.0.2
60
60
  with:
61
61
  github-token: ${{ secrets.GITHUB_TOKEN }}
package/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
  [![npm version](https://img.shields.io/npm/v/thread-stream)](https://www.npmjs.com/package/thread-stream)
3
3
  [![Build Status](https://img.shields.io/github/workflow/status/pinojs/thread-stream/CI)](https://github.com/pinojs/thread-stream/actions)
4
4
  [![Known Vulnerabilities](https://snyk.io/test/github/pinojs/thread-stream/badge.svg)](https://snyk.io/test/github/pinojs/thread-stream)
5
- [![Coverage Status](https://coveralls.io/repos/github/pinojs/thread-stream/badge.svg?branch=master)](https://coveralls.io/github/pinojs/thread-stream?branch=master)
6
5
  [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](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
- throw new Error('the worker has exited')
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
- throw new Error('the worker has exited')
289
+ return
290
290
  }
291
291
 
292
292
  writeSync(this)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thread-stream",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "A streaming way to send data to a Node.js Worker Thread",
5
5
  "main": "index.js",
6
6
  "dependencies": {
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(3)
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
  })