mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-02-01 11:49:32 +07:00
Run npm ci --ignore-scripts to update dependencies (#254)
* Initial plan * Run npm ci --ignore-scripts to update dependencies Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com> * Convert CommonJS to ESM (#255) * Initial plan * Convert CommonJS imports to ESM Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com> * Use node: protocol prefix for built-in modules Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
19
node_modules/undici/lib/api/api-upgrade.js
generated
vendored
19
node_modules/undici/lib/api/api-upgrade.js
generated
vendored
@@ -1,10 +1,10 @@
|
||||
'use strict'
|
||||
|
||||
const { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors')
|
||||
const { AsyncResource } = require('async_hooks')
|
||||
const { InvalidArgumentError, SocketError } = require('../core/errors')
|
||||
const { AsyncResource } = require('node:async_hooks')
|
||||
const util = require('../core/util')
|
||||
const { addSignal, removeSignal } = require('./abort-signal')
|
||||
const assert = require('assert')
|
||||
const assert = require('node:assert')
|
||||
|
||||
class UpgradeHandler extends AsyncResource {
|
||||
constructor (opts, callback) {
|
||||
@@ -34,10 +34,13 @@ class UpgradeHandler 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 = null
|
||||
}
|
||||
@@ -47,9 +50,9 @@ class UpgradeHandler extends AsyncResource {
|
||||
}
|
||||
|
||||
onUpgrade (statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context } = this
|
||||
assert(statusCode === 101)
|
||||
|
||||
assert.strictEqual(statusCode, 101)
|
||||
const { callback, opaque, context } = this
|
||||
|
||||
removeSignal(this)
|
||||
|
||||
@@ -97,7 +100,7 @@ function upgrade (opts, callback) {
|
||||
if (typeof callback !== 'function') {
|
||||
throw err
|
||||
}
|
||||
const opaque = opts && opts.opaque
|
||||
const opaque = opts?.opaque
|
||||
queueMicrotask(() => callback(err, { opaque }))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user