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.12.0 to 4.12.1

4

lib/balanced-pool.js

@@ -12,3 +12,3 @@ 'use strict'

kRemoveClient,
kDispatch
kGetDispatcher
} = require('./pool-base')

@@ -69,3 +69,3 @@ const Pool = require('./pool')

[kDispatch] () {
[kGetDispatcher] () {
// We validate that pools is greater than 0,

@@ -72,0 +72,0 @@ // otherwise we would have to wait until an upstream

@@ -1019,3 +1019,3 @@ 'use strict'

function onSocketReadable (data) {
function onSocketReadable () {
const { [kParser]: parser } = this

@@ -1022,0 +1022,0 @@ parser.readMore()

@@ -266,3 +266,7 @@ 'use strict'

function isReadable (body) {
return !!(body && /state: 'readable'/.test(nodeUtil.inspect(body)))
return !!(body && (
stream.isReadable
? stream.isReadable(body)
: /state: 'readable'/.test(nodeUtil.inspect(body)
)))
}

@@ -269,0 +273,0 @@

@@ -49,2 +49,3 @@ // https://github.com/Ethan-Arrowood/undici-fetch

const { isErrored, isReadable } = require('../core/util')
const { kIsMockActive } = require('../mock/mock-symbols')

@@ -1625,3 +1626,3 @@ let ReadableStream

method: request.method,
body,
body: context.dispatcher[kIsMockActive] ? request.body && request.body.source : body,
headers: request.headersList,

@@ -1628,0 +1629,0 @@ maxRedirections: 0

'use strict'
const { MockNotMatchedError } = require('./mock-errors')
const { kHeadersList } = require('../core/symbols')
const {

@@ -33,4 +34,7 @@ kDispatches,

}
for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) {
if (!matchValue(matchHeaderValue, headers[matchHeaderName])) {
const header = typeof headers.get === 'function' ? headers.get(matchHeaderName) : headers[matchHeaderName]
if (!matchValue(matchHeaderValue, header)) {
return false

@@ -37,0 +41,0 @@ }

@@ -23,3 +23,3 @@ 'use strict'

const kQueued = Symbol('queued')
const kDispatch = Symbol('dispatch')
const kGetDispatcher = Symbol('get dispatcher')
const kAddClient = Symbol('add client')

@@ -194,3 +194,3 @@ const kRemoveClient = Symbol('remove client')

const dispatcher = this[kDispatch]()
const dispatcher = this[kGetDispatcher]()

@@ -203,7 +203,3 @@ if (!dispatcher) {

dispatcher[kNeedDrain] = true
this[kNeedDrain] = this[kClients].some(dispatcher => (
!dispatcher[kNeedDrain] &&
dispatcher.closed !== true &&
dispatcher.destroyed !== true
))
this[kNeedDrain] = !this[kGetDispatcher]()
}

@@ -263,3 +259,3 @@ } catch (err) {

kRemoveClient,
kDispatch
kGetDispatcher
}

@@ -8,3 +8,3 @@ 'use strict'

kAddClient,
kDispatch
kGetDispatcher
} = require('./pool-base')

@@ -68,3 +68,3 @@ const Client = require('./client')

[kDispatch] () {
[kGetDispatcher] () {
let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain])

@@ -71,0 +71,0 @@

{
"name": "undici",
"version": "4.12.0",
"version": "4.12.1",
"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