node_modules: update (#138)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurla
2026-03-14 08:44:29 +01:00
committed by GitHub
parent c1f089fb01
commit 126642a1c6
12 changed files with 178 additions and 22 deletions
+23 -2
View File
@@ -44,6 +44,9 @@ class WebSocket extends EventTarget {
/** @type {SendQueue} */
#sendQueue
/** @type {{ maxDecompressedMessageSize?: number }} */
#options
/**
* @param {string} url
* @param {string|string[]} protocols
@@ -117,6 +120,11 @@ class WebSocket extends EventTarget {
// 10. Set this's url to urlRecord.
this[kWebSocketURL] = new URL(urlRecord.href)
// Store options for later use (e.g., maxDecompressedMessageSize)
this.#options = {
maxDecompressedMessageSize: options.maxDecompressedMessageSize
}
// 11. Let client be this's relevant settings object.
const client = environmentSettingsObject.settingsObject
@@ -431,11 +439,11 @@ class WebSocket extends EventTarget {
* @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol
*/
#onConnectionEstablished (response, parsedExtensions) {
// processResponse is called when the "responses header list has been received and initialized."
// processResponse is called when the "response's header list has been received and initialized."
// once this happens, the connection is open
this[kResponse] = response
const parser = new ByteParser(this, parsedExtensions)
const parser = new ByteParser(this, parsedExtensions, this.#options)
parser.on('drain', onParserDrain)
parser.on('error', onParserError.bind(this))
@@ -538,6 +546,19 @@ webidl.converters.WebSocketInit = webidl.dictionaryConverter([
{
key: 'headers',
converter: webidl.nullableConverter(webidl.converters.HeadersInit)
},
{
key: 'maxDecompressedMessageSize',
converter: webidl.nullableConverter((V) => {
V = webidl.converters['unsigned long long'](V)
if (V <= 0) {
throw webidl.errors.exception({
header: 'WebSocket constructor',
message: 'maxDecompressedMessageSize must be greater than 0'
})
}
return V
})
}
])