Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/dispatcher/proxy-agent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict'

const { kProxy, kClose, kDestroy, kDispatch } = require('../core/symbols')
const { URL } = require('node:url')
const Agent = require('./agent')
const Pool = require('./pool')
const DispatcherBase = require('./dispatcher-base')
Expand Down Expand Up @@ -208,7 +207,7 @@ class ProxyAgent extends DispatcherBase {
}

/**
* @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts
* @param {import('../../types/proxy-agent').ProxyAgent.Options | string | URL} opts
* @returns {URL}
*/
#getUrl (opts) {
Expand Down
8 changes: 4 additions & 4 deletions lib/web/cache/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const { createDeferredPromise } = require('../../util/promise')
* @property {'delete' | 'put'} type
* @property {any} request
* @property {any} response
* @property {import('../../types/cache').CacheQueryOptions} options
* @property {import('../../../types/cache').CacheQueryOptions} options
*/

/**
Expand Down Expand Up @@ -452,7 +452,7 @@ class Cache {
/**
* @see https://w3c.github.io/ServiceWorker/#dom-cache-keys
* @param {any} request
* @param {import('../../types/cache').CacheQueryOptions} options
* @param {import('../../../types/cache').CacheQueryOptions} options
* @returns {Promise<readonly Request[]>}
*/
async keys (request = undefined, options = {}) {
Expand Down Expand Up @@ -670,7 +670,7 @@ class Cache {
/**
* @see https://w3c.github.io/ServiceWorker/#query-cache
* @param {any} requestQuery
* @param {import('../../types/cache').CacheQueryOptions} options
* @param {import('../../../types/cache').CacheQueryOptions} options
* @param {requestResponseList} targetStorage
* @returns {requestResponseList}
*/
Expand All @@ -695,7 +695,7 @@ class Cache {
* @param {any} requestQuery
* @param {any} request
* @param {any | null} response
* @param {import('../../types/cache').CacheQueryOptions | undefined} options
* @param {import('../../../types/cache').CacheQueryOptions | undefined} options
* @returns {boolean}
*/
#requestMatchesCachedItem (requestQuery, request, response = null, options) {
Expand Down
5 changes: 3 additions & 2 deletions lib/web/fetch/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const { webidl } = require('../webidl')
const { URLSerializer } = require('./data-url')
const { kConstruct } = require('../../core/symbols')
const assert = require('node:assert')
const { types } = require('node:util')

const { isArrayBuffer } = nodeUtil.types

const textEncoder = new TextEncoder('utf-8')

Expand Down Expand Up @@ -576,7 +577,7 @@ webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) {
return V
}

if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) {
if (ArrayBuffer.isView(V) || isArrayBuffer(V)) {
return V
}

Expand Down
4 changes: 2 additions & 2 deletions lib/web/websocket/stream/websocketstream.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { states, opcodes, sentCloseFrameState } = require('../constants')
const { webidl } = require('../../webidl')
const { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = require('../util')
const { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = require('../connection')
const { types } = require('node:util')
const { isArrayBuffer } = require('node:util/types')
const { channels } = require('../../../core/diagnostics')
const { WebsocketFrameSend } = require('../frame')
const { ByteParser } = require('../receiver')
Expand Down Expand Up @@ -210,7 +210,7 @@ class WebSocketStream {
let opcode = null

// 4. If chunk is a BufferSource ,
if (ArrayBuffer.isView(chunk) || types.isArrayBuffer(chunk)) {
if (ArrayBuffer.isView(chunk) || isArrayBuffer(chunk)) {
// 4.1. Set data to a copy of the bytes given chunk .
data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk)

Expand Down
6 changes: 3 additions & 3 deletions lib/web/websocket/websocket.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'

const { isArrayBuffer } = require('node:util/types')
const { webidl } = require('../webidl')
const { URLSerializer } = require('../fetch/data-url')
const { environmentSettingsObject } = require('../fetch/util')
Expand All @@ -19,7 +20,6 @@ const { establishWebSocketConnection, closeWebSocketConnection, failWebsocketCon
const { ByteParser } = require('./receiver')
const { kEnumerableProperty } = require('../../core/util')
const { getGlobalDispatcher } = require('../../global')
const { types } = require('node:util')
const { ErrorEvent, CloseEvent, createFastMessageEvent } = require('./events')
const { SendQueue } = require('./sender')
const { WebsocketFrameSend } = require('./frame')
Expand Down Expand Up @@ -257,7 +257,7 @@ class WebSocket extends EventTarget {
this.#sendQueue.add(buffer, () => {
this.#bufferedAmount -= buffer.byteLength
}, sendHints.text)
} else if (types.isArrayBuffer(data)) {
} else if (isArrayBuffer(data)) {
// If the WebSocket connection is established, and the WebSocket
// closing handshake has not yet started, then the user agent must
// send a WebSocket Message comprised of data using a binary frame
Expand Down Expand Up @@ -735,7 +735,7 @@ webidl.converters.WebSocketSendData = function (V) {
return V
}

if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) {
if (ArrayBuffer.isView(V) || isArrayBuffer(V)) {
return V
}
}
Expand Down
Loading