node_modules: update (#134)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurla
2026-01-30 14:02:58 +01:00
committed by GitHub
parent 38a0e05fb9
commit 6c0a4f8651
232 changed files with 12826 additions and 9342 deletions

View File

@@ -1,7 +1,8 @@
'use strict'
const { AsyncResource } = require('async_hooks')
const { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors')
const assert = require('node:assert')
const { AsyncResource } = require('node:async_hooks')
const { InvalidArgumentError, SocketError } = require('../core/errors')
const util = require('../core/util')
const { addSignal, removeSignal } = require('./abort-signal')
@@ -32,10 +33,13 @@ class ConnectHandler extends AsyncResource {
}
onConnect (abort, context) {
if (!this.callback) {
throw new RequestAbortedError()
if (this.reason) {
abort(this.reason)
return
}
assert(this.callback)
this.abort = abort
this.context = context
}
@@ -96,7 +100,7 @@ function connect (opts, callback) {
if (typeof callback !== 'function') {
throw err
}
const opaque = opts && opts.opaque
const opaque = opts?.opaque
queueMicrotask(() => callback(err, { opaque }))
}
}