New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jsenv/server

Package Overview
Dependencies
Maintainers
2
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/server - npm Package Compare versions

Comparing version 12.5.7 to 12.5.8

7

package.json
{
"name": "@jsenv/server",
"version": "12.5.7",
"version": "12.5.8",
"description": "Write your Node.js server using pure functions",

@@ -19,3 +19,4 @@ "license": "MIT",

"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org"
},

@@ -71,2 +72,2 @@ "type": "module",

}
}
}

@@ -47,2 +47,30 @@ import http from "node:http"

await new Promise((resolve) => {
const observable = bodyMethods.asObservable()
const subscription = observable.subscribe({
next: (data) => {
try {
responseStream.write(data)
} catch (e) {
// Something inside Node.js sometimes puts stream
// in a state where .write() throw despites nodeResponse.destroyed
// being undefined and "close" event not being emitted.
// I have tested if we are the one calling destroy
// (I have commented every .destroy() call)
// but issue still occurs
// For the record it's "hard" to reproduce but can be by running
// a lot of tests against a browser in the context of @jsenv/core testing
if (e.code === "ERR_HTTP2_INVALID_STREAM") {
return
}
responseStream.emit("error", e)
}
},
error: (value) => {
responseStream.emit("error", value)
},
complete: () => {
responseStream.end()
},
})
raceCallbacks(

@@ -108,30 +136,2 @@ {

)
const observable = bodyMethods.asObservable()
const subscription = observable.subscribe({
next: (data) => {
try {
responseStream.write(data)
} catch (e) {
// Something inside Node.js sometimes puts stream
// in a state where .write() throw despites nodeResponse.destroyed
// being undefined and "close" event not being emitted.
// I have tested if we are the one calling destroy
// (I have commented every .destroy() call)
// but issue still occurs
// For the record it's "hard" to reproduce but can be by running
// a lot of tests against a browser in the context of @jsenv/core testing
if (e.code === "ERR_HTTP2_INVALID_STREAM") {
return
}
responseStream.emit("error", e)
}
},
error: (value) => {
responseStream.emit("error", value)
},
complete: () => {
responseStream.end()
},
})
})

@@ -138,0 +138,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc