Comparing version 6.20.1 to 6.21.0
@@ -223,2 +223,7 @@ 'use strict' | ||
function onConnectTimeout (socket, opts) { | ||
// The socket could be already garbage collected | ||
if (socket == null) { | ||
return | ||
} | ||
let message = 'Connect Timeout Error' | ||
@@ -225,0 +230,0 @@ if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { |
@@ -232,3 +232,3 @@ 'use strict' | ||
const { start, size, end = size } = contentRange | ||
const { start, size, end = size - 1 } = contentRange | ||
@@ -256,3 +256,3 @@ assert(this.start === start, 'content-range mismatch') | ||
const { start, size, end = size } = range | ||
const { start, size, end = size - 1 } = range | ||
assert( | ||
@@ -271,3 +271,3 @@ start != null && Number.isFinite(start), | ||
const contentLength = headers['content-length'] | ||
this.end = contentLength != null ? Number(contentLength) : null | ||
this.end = contentLength != null ? Number(contentLength) - 1 : null | ||
} | ||
@@ -274,0 +274,0 @@ |
@@ -40,2 +40,3 @@ 'use strict' | ||
webidl.util.markAsUncloneable(this) | ||
this.#relevantRequestResponseList = arguments[1] | ||
@@ -42,0 +43,0 @@ } |
@@ -19,2 +19,4 @@ 'use strict' | ||
} | ||
webidl.util.markAsUncloneable(this) | ||
} | ||
@@ -21,0 +23,0 @@ |
@@ -108,2 +108,4 @@ 'use strict' | ||
webidl.util.markAsUncloneable(this) | ||
const prefix = 'EventSource constructor' | ||
@@ -110,0 +112,0 @@ webidl.argumentLengthCheck(arguments, 1, prefix) |
@@ -17,2 +17,4 @@ 'use strict' | ||
constructor (form) { | ||
webidl.util.markAsUncloneable(this) | ||
if (form !== undefined) { | ||
@@ -19,0 +21,0 @@ throw webidl.errors.conversionFailed({ |
@@ -362,2 +362,4 @@ // https://github.com/Ethan-Arrowood/undici-fetch | ||
constructor (init = undefined) { | ||
webidl.util.markAsUncloneable(this) | ||
if (init === kConstruct) { | ||
@@ -364,0 +366,0 @@ return |
@@ -85,2 +85,3 @@ /* globals AbortController */ | ||
constructor (input, init = {}) { | ||
webidl.util.markAsUncloneable(this) | ||
if (input === kConstruct) { | ||
@@ -87,0 +88,0 @@ return |
@@ -113,2 +113,3 @@ 'use strict' | ||
constructor (body = null, init = {}) { | ||
webidl.util.markAsUncloneable(this) | ||
if (body === kConstruct) { | ||
@@ -115,0 +116,0 @@ return |
'use strict' | ||
const { types, inspect } = require('node:util') | ||
const { markAsUncloneable } = require('node:worker_threads') | ||
const { toUSVString } = require('../../core/util') | ||
@@ -89,2 +90,3 @@ | ||
webidl.util.markAsUncloneable = markAsUncloneable || (() => {}) | ||
// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint | ||
@@ -91,0 +93,0 @@ webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) { |
@@ -17,2 +17,3 @@ 'use strict' | ||
super(arguments[1], arguments[2]) | ||
webidl.util.markAsUncloneable(this) | ||
return | ||
@@ -30,2 +31,3 @@ } | ||
this.#eventInit = eventInitDict | ||
webidl.util.markAsUncloneable(this) | ||
} | ||
@@ -117,2 +119,3 @@ | ||
this.#eventInit = eventInitDict | ||
webidl.util.markAsUncloneable(this) | ||
} | ||
@@ -148,2 +151,3 @@ | ||
super(type, eventInitDict) | ||
webidl.util.markAsUncloneable(this) | ||
@@ -150,0 +154,0 @@ type = webidl.converters.DOMString(type, prefix, 'type') |
@@ -54,2 +54,4 @@ 'use strict' | ||
webidl.util.markAsUncloneable(this) | ||
const prefix = 'WebSocket constructor' | ||
@@ -56,0 +58,0 @@ webidl.argumentLengthCheck(arguments, 1, prefix) |
{ | ||
"name": "undici", | ||
"version": "6.20.1", | ||
"version": "6.21.0", | ||
"description": "An HTTP/1.1 client, written from scratch for Node.js", | ||
@@ -5,0 +5,0 @@ "homepage": "https://undici.nodejs.org", |
@@ -70,2 +70,8 @@ // These types are not exported, and are only used internally | ||
Stringify (V: any): string | ||
/** | ||
* Mark a value as uncloneable for Node.js. | ||
* This is only effective in some newer Node.js versions. | ||
*/ | ||
markAsUncloneable (V: any): void | ||
} | ||
@@ -72,0 +78,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1158357
24524