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

undici

Package Overview
Dependencies
Maintainers
3
Versions
235
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

undici - npm Package Compare versions

Comparing version 4.10.4 to 4.11.0

4

docs/api/Dispatcher.md

@@ -439,2 +439,6 @@ # Dispatcher

`body` contains the following additional extentions:
- `dump({ limit: Integer })`, dump the response by reading up to `limit` bytes without killing the socket (optional) - Default: 262144.
#### Example 1 - Basic GET Request

@@ -441,0 +445,0 @@

@@ -147,2 +147,16 @@ // Ported from https://github.com/nodejs/undici/pull/907

}
async dump(opts) {
let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144
try {
for await (const chunk of this) {
limit -= Buffer.byteLength(chunk)
if (limit < 0) {
return
}
}
} catch {
// Do nothing...
}
}
}

@@ -223,5 +237,5 @@

if (type === 'text') {
resolve(body.join(''))
resolve(Buffer.concat(body))
} else if (type === 'json') {
resolve(JSON.parse(body.join('')))
resolve(JSON.parse(Buffer.concat(body)))
} else if (type === 'arrayBuffer') {

@@ -228,0 +242,0 @@ const dst = new Uint8Array(length)

2

package.json
{
"name": "undici",
"version": "4.10.4",
"version": "4.11.0",
"description": "An HTTP/1.1 client, written from scratch for Node.js",

@@ -5,0 +5,0 @@ "homepage": "https://undici.nodejs.org",

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