chore(release): 39.1.1 [skip ci]

This commit is contained in:
semantic-release-bot 2023-10-26 00:09:35 +00:00
parent 2084187203
commit 5c6c06aa0e
2 changed files with 41 additions and 30 deletions

69
dist/index.js vendored
View file

@ -5823,6 +5823,10 @@ class StreamHandler extends AsyncResource {
{ callback, body: res, contentType, statusCode, statusMessage, headers } { callback, body: res, contentType, statusCode, statusMessage, headers }
) )
} else { } else {
if (factory === null) {
return
}
res = this.runInAsyncScope(factory, null, { res = this.runInAsyncScope(factory, null, {
statusCode, statusCode,
headers, headers,
@ -5871,7 +5875,7 @@ class StreamHandler extends AsyncResource {
onData (chunk) { onData (chunk) {
const { res } = this const { res } = this
return res.write(chunk) return res ? res.write(chunk) : true
} }
onComplete (trailers) { onComplete (trailers) {
@ -5879,6 +5883,10 @@ class StreamHandler extends AsyncResource {
removeSignal(this) removeSignal(this)
if (!res) {
return
}
this.trailers = util.parseHeaders(trailers) this.trailers = util.parseHeaders(trailers)
res.end() res.end()
@ -6335,7 +6343,7 @@ function consumeEnd (consume) {
pos += buf.byteLength pos += buf.byteLength
} }
resolve(dst) resolve(dst.buffer)
} else if (type === 'blob') { } else if (type === 'blob') {
if (!Blob) { if (!Blob) {
Blob = (__nccwpck_require__(4300).Blob) Blob = (__nccwpck_require__(4300).Blob)
@ -8771,7 +8779,9 @@ function onParserTimeout (parser) {
function onSocketReadable () { function onSocketReadable () {
const { [kParser]: parser } = this const { [kParser]: parser } = this
parser.readMore() if (parser) {
parser.readMore()
}
} }
function onSocketError (err) { function onSocketError (err) {
@ -15305,7 +15315,7 @@ class Fetch extends EE {
} }
// https://fetch.spec.whatwg.org/#fetch-method // https://fetch.spec.whatwg.org/#fetch-method
async function fetch (input, init = {}) { function fetch (input, init = {}) {
webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' }) webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' })
// 1. Let p be a new promise. // 1. Let p be a new promise.
@ -15388,7 +15398,7 @@ async function fetch (input, init = {}) {
const processResponse = (response) => { const processResponse = (response) => {
// 1. If locallyAborted is true, terminate these substeps. // 1. If locallyAborted is true, terminate these substeps.
if (locallyAborted) { if (locallyAborted) {
return return Promise.resolve()
} }
// 2. If responses aborted flag is set, then: // 2. If responses aborted flag is set, then:
@ -15401,7 +15411,7 @@ async function fetch (input, init = {}) {
// deserializedError. // deserializedError.
abortFetch(p, request, responseObject, controller.serializedAbortReason) abortFetch(p, request, responseObject, controller.serializedAbortReason)
return return Promise.resolve()
} }
// 3. If response is a network error, then reject p with a TypeError // 3. If response is a network error, then reject p with a TypeError
@ -15410,7 +15420,7 @@ async function fetch (input, init = {}) {
p.reject( p.reject(
Object.assign(new TypeError('fetch failed'), { cause: response.error }) Object.assign(new TypeError('fetch failed'), { cause: response.error })
) )
return return Promise.resolve()
} }
// 4. Set responseObject to the result of creating a Response object, // 4. Set responseObject to the result of creating a Response object,
@ -15960,13 +15970,13 @@ async function mainFetch (fetchParams, recursive = false) {
// https://fetch.spec.whatwg.org/#concept-scheme-fetch // https://fetch.spec.whatwg.org/#concept-scheme-fetch
// given a fetch params fetchParams // given a fetch params fetchParams
async function schemeFetch (fetchParams) { function schemeFetch (fetchParams) {
// Note: since the connection is destroyed on redirect, which sets fetchParams to a // Note: since the connection is destroyed on redirect, which sets fetchParams to a
// cancelled state, we do not want this condition to trigger *unless* there have been // cancelled state, we do not want this condition to trigger *unless* there have been
// no redirects. See https://github.com/nodejs/undici/issues/1776 // no redirects. See https://github.com/nodejs/undici/issues/1776
// 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.
if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) {
return makeAppropriateNetworkError(fetchParams) return Promise.resolve(makeAppropriateNetworkError(fetchParams))
} }
// 2. Let request be fetchParamss request. // 2. Let request be fetchParamss request.
@ -15982,7 +15992,7 @@ async function schemeFetch (fetchParams) {
// and body is the empty byte sequence as a body. // and body is the empty byte sequence as a body.
// Otherwise, return a network error. // Otherwise, return a network error.
return makeNetworkError('about scheme is not supported') return Promise.resolve(makeNetworkError('about scheme is not supported'))
} }
case 'blob:': { case 'blob:': {
if (!resolveObjectURL) { if (!resolveObjectURL) {
@ -15995,7 +16005,7 @@ async function schemeFetch (fetchParams) {
// https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56
// Buffer.resolveObjectURL does not ignore URL queries. // Buffer.resolveObjectURL does not ignore URL queries.
if (blobURLEntry.search.length !== 0) { if (blobURLEntry.search.length !== 0) {
return makeNetworkError('NetworkError when attempting to fetch resource.') return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.'))
} }
const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()) const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString())
@ -16003,7 +16013,7 @@ async function schemeFetch (fetchParams) {
// 2. If requests method is not `GET`, blobURLEntry is null, or blobURLEntrys // 2. If requests method is not `GET`, blobURLEntry is null, or blobURLEntrys
// object is not a Blob object, then return a network error. // object is not a Blob object, then return a network error.
if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) { if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) {
return makeNetworkError('invalid method') return Promise.resolve(makeNetworkError('invalid method'))
} }
// 3. Let bodyWithType be the result of safely extracting blobURLEntrys object. // 3. Let bodyWithType be the result of safely extracting blobURLEntrys object.
@ -16030,7 +16040,7 @@ async function schemeFetch (fetchParams) {
response.body = body response.body = body
return response return Promise.resolve(response)
} }
case 'data:': { case 'data:': {
// 1. Let dataURLStruct be the result of running the // 1. Let dataURLStruct be the result of running the
@ -16041,7 +16051,7 @@ async function schemeFetch (fetchParams) {
// 2. If dataURLStruct is failure, then return a // 2. If dataURLStruct is failure, then return a
// network error. // network error.
if (dataURLStruct === 'failure') { if (dataURLStruct === 'failure') {
return makeNetworkError('failed to fetch the data URL') return Promise.resolve(makeNetworkError('failed to fetch the data URL'))
} }
// 3. Let mimeType be dataURLStructs MIME type, serialized. // 3. Let mimeType be dataURLStructs MIME type, serialized.
@ -16050,28 +16060,28 @@ async function schemeFetch (fetchParams) {
// 4. Return a response whose status message is `OK`, // 4. Return a response whose status message is `OK`,
// header list is « (`Content-Type`, mimeType) », // header list is « (`Content-Type`, mimeType) »,
// and body is dataURLStructs body as a body. // and body is dataURLStructs body as a body.
return makeResponse({ return Promise.resolve(makeResponse({
statusText: 'OK', statusText: 'OK',
headersList: [ headersList: [
['content-type', { name: 'Content-Type', value: mimeType }] ['content-type', { name: 'Content-Type', value: mimeType }]
], ],
body: safelyExtractBody(dataURLStruct.body)[0] body: safelyExtractBody(dataURLStruct.body)[0]
}) }))
} }
case 'file:': { case 'file:': {
// For now, unfortunate as it is, file URLs are left as an exercise for the reader. // For now, unfortunate as it is, file URLs are left as an exercise for the reader.
// When in doubt, return a network error. // When in doubt, return a network error.
return makeNetworkError('not implemented... yet...') return Promise.resolve(makeNetworkError('not implemented... yet...'))
} }
case 'http:': case 'http:':
case 'https:': { case 'https:': {
// Return the result of running HTTP fetch given fetchParams. // Return the result of running HTTP fetch given fetchParams.
return await httpFetch(fetchParams) return httpFetch(fetchParams)
.catch((err) => makeNetworkError(err)) .catch((err) => makeNetworkError(err))
} }
default: { default: {
return makeNetworkError('unknown scheme') return Promise.resolve(makeNetworkError('unknown scheme'))
} }
} }
} }
@ -16090,7 +16100,7 @@ function finalizeResponse (fetchParams, response) {
} }
// https://fetch.spec.whatwg.org/#fetch-finale // https://fetch.spec.whatwg.org/#fetch-finale
async function fetchFinale (fetchParams, response) { function fetchFinale (fetchParams, response) {
// 1. If response is a network error, then: // 1. If response is a network error, then:
if (response.type === 'error') { if (response.type === 'error') {
// 1. Set responses URL list to « fetchParamss requests URL list[0] ». // 1. Set responses URL list to « fetchParamss requests URL list[0] ».
@ -16174,8 +16184,9 @@ async function fetchFinale (fetchParams, response) {
} else { } else {
// 4. Otherwise, fully read responses body given processBody, processBodyError, // 4. Otherwise, fully read responses body given processBody, processBodyError,
// and fetchParamss task destination. // and fetchParamss task destination.
await fullyReadBody(response.body, processBody, processBodyError) return fullyReadBody(response.body, processBody, processBodyError)
} }
return Promise.resolve()
} }
} }
@ -16283,7 +16294,7 @@ async function httpFetch (fetchParams) {
} }
// https://fetch.spec.whatwg.org/#http-redirect-fetch // https://fetch.spec.whatwg.org/#http-redirect-fetch
async function httpRedirectFetch (fetchParams, response) { function httpRedirectFetch (fetchParams, response) {
// 1. Let request be fetchParamss request. // 1. Let request be fetchParamss request.
const request = fetchParams.request const request = fetchParams.request
@ -16309,18 +16320,18 @@ async function httpRedirectFetch (fetchParams, response) {
} }
} catch (err) { } catch (err) {
// 5. If locationURL is failure, then return a network error. // 5. If locationURL is failure, then return a network error.
return makeNetworkError(err) return Promise.resolve(makeNetworkError(err))
} }
// 6. If locationURLs scheme is not an HTTP(S) scheme, then return a network // 6. If locationURLs scheme is not an HTTP(S) scheme, then return a network
// error. // error.
if (!urlIsHttpHttpsScheme(locationURL)) { if (!urlIsHttpHttpsScheme(locationURL)) {
return makeNetworkError('URL scheme must be a HTTP(S) scheme') return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme'))
} }
// 7. If requests redirect count is 20, then return a network error. // 7. If requests redirect count is 20, then return a network error.
if (request.redirectCount === 20) { if (request.redirectCount === 20) {
return makeNetworkError('redirect count exceeded') return Promise.resolve(makeNetworkError('redirect count exceeded'))
} }
// 8. Increase requests redirect count by 1. // 8. Increase requests redirect count by 1.
@ -16334,7 +16345,7 @@ async function httpRedirectFetch (fetchParams, response) {
(locationURL.username || locationURL.password) && (locationURL.username || locationURL.password) &&
!sameOrigin(request, locationURL) !sameOrigin(request, locationURL)
) { ) {
return makeNetworkError('cross origin not allowed for request mode "cors"') return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"'))
} }
// 10. If requests response tainting is "cors" and locationURL includes // 10. If requests response tainting is "cors" and locationURL includes
@ -16343,9 +16354,9 @@ async function httpRedirectFetch (fetchParams, response) {
request.responseTainting === 'cors' && request.responseTainting === 'cors' &&
(locationURL.username || locationURL.password) (locationURL.username || locationURL.password)
) { ) {
return makeNetworkError( return Promise.resolve(makeNetworkError(
'URL cannot contain credentials for request mode "cors"' 'URL cannot contain credentials for request mode "cors"'
) ))
} }
// 11. If actualResponses status is not 303, requests body is non-null, // 11. If actualResponses status is not 303, requests body is non-null,
@ -16355,7 +16366,7 @@ async function httpRedirectFetch (fetchParams, response) {
request.body != null && request.body != null &&
request.body.source == null request.body.source == null
) { ) {
return makeNetworkError() return Promise.resolve(makeNetworkError())
} }
// 12. If one of the following is true // 12. If one of the following is true

View file

@ -1,6 +1,6 @@
{ {
"name": "github-action", "name": "github-action",
"version": "39.1.0", "version": "39.1.1",
"private": true, "private": true,
"description": "GitHub Action to run Renovate self-hosted.", "description": "GitHub Action to run Renovate self-hosted.",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",