Socket
Socket
Sign inDemoInstall

thread-stream

Package Overview
Dependencies
1
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.0 to 2.4.0

test/never-drain.test.js

3

index.js

@@ -181,2 +181,5 @@ 'use strict'

break
case 'WARNING':
process.emitWarning(msg.err)
break
default:

@@ -183,0 +186,0 @@ destroy(stream, new Error('this should not happen: ' + msg.code))

@@ -154,1 +154,17 @@ 'use strict'

})
process.once('exit', exitCode => {
if (exitCode !== 0) {
process.exit(exitCode)
return
}
if (destination?.writableNeedDrain && !destination?.writableEnded) {
parentPort.postMessage({
code: 'WARNING',
err: new Error('ThreadStream: process exited before destination stream was drained. this may indicate that the destination stream try to write to a another missing stream')
})
}
process.exit(0)
})

11

package.json
{
"name": "thread-stream",
"version": "2.3.0",
"version": "2.4.0",
"description": "A streaming way to send data to a Node.js Worker Thread",

@@ -11,3 +11,3 @@ "main": "index.js",

"devDependencies": {
"@types/node": "^18.0.0",
"@types/node": "^20.1.0",
"@types/tap": "^15.0.0",

@@ -17,2 +17,3 @@ "desm": "^1.3.0",

"husky": "^8.0.1",
"pino-elasticsearch": "^6.0.0",
"sonic-boom": "^3.0.0",

@@ -34,3 +35,7 @@ "standard": "^17.0.0",

},
"standard": { "ignore": ["test/ts/**/*"] },
"standard": {
"ignore": [
"test/ts/**/*"
]
},
"repository": {

@@ -37,0 +42,0 @@ "type": "git",

@@ -6,5 +6,4 @@ 'use strict'

const ThreadStream = require('..')
require('why-is-node-running')
test('event propagate', (t) => {
test('event propagate', t => {
const stream = new ThreadStream({

@@ -11,0 +10,0 @@ filename: join(__dirname, 'emit-event.js'),

@@ -6,3 +6,2 @@ 'use strict'

const { unlinkSync } = require('fs')
const why = require('why-is-node-running')
const t = require('tap')

@@ -34,2 +33,5 @@

setInterval(why, 10000).unref()
if (process.env.SKIP_PROCESS_EXIT_CHECK !== 'true') {
const why = require('why-is-node-running')
setInterval(why, 10000).unref()
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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