Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: filenames should use kebab-case #2873

Merged
merged 1 commit into from
Feb 28, 2024
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
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ const MockClient = require('./lib/mock/mock-client')
const MockAgent = require('./lib/mock/mock-agent')
const MockPool = require('./lib/mock/mock-pool')
const mockErrors = require('./lib/mock/mock-errors')
const RetryHandler = require('./lib/handler/RetryHandler')
const RetryHandler = require('./lib/handler/retry-handler')
const { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global')
const DecoratorHandler = require('./lib/handler/DecoratorHandler')
const RedirectHandler = require('./lib/handler/RedirectHandler')
const createRedirectInterceptor = require('./lib/interceptor/redirectInterceptor')
const DecoratorHandler = require('./lib/handler/decorator-handler')
const RedirectHandler = require('./lib/handler/redirect-handler')
const createRedirectInterceptor = require('./lib/interceptor/redirect-interceptor')

Object.assign(Dispatcher.prototype, api)

Expand Down Expand Up @@ -134,7 +134,7 @@ module.exports.getCookies = getCookies
module.exports.getSetCookies = getSetCookies
module.exports.setCookie = setCookie

const { parseMIMEType, serializeAMimeType } = require('./lib/web/fetch/dataURL')
const { parseMIMEType, serializeAMimeType } = require('./lib/web/fetch/data-url')

module.exports.parseMIMEType = parseMIMEType
module.exports.serializeAMimeType = serializeAMimeType
Expand Down
2 changes: 1 addition & 1 deletion lib/dispatcher/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const DispatcherBase = require('./dispatcher-base')
const Pool = require('./pool')
const Client = require('./client')
const util = require('../core/util')
const createRedirectInterceptor = require('../interceptor/redirectInterceptor')
const createRedirectInterceptor = require('../interceptor/redirect-interceptor')

const kOnConnect = Symbol('onConnect')
const kOnDisconnect = Symbol('onDisconnect')
Expand Down
2 changes: 1 addition & 1 deletion lib/dispatcher/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class Client extends DispatcherBase {
}
}

const createRedirectInterceptor = require('../interceptor/redirectInterceptor.js')
const createRedirectInterceptor = require('../interceptor/redirect-interceptor.js')

function onError (client, err) {
if (
Expand Down
2 changes: 1 addition & 1 deletion lib/dispatcher/retry-agent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const Dispatcher = require('./dispatcher')
const RetryHandler = require('../handler/RetryHandler')
const RetryHandler = require('../handler/retry-handler')

class RetryAgent extends Dispatcher {
#agent = null
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const RedirectHandler = require('../handler/RedirectHandler')
const RedirectHandler = require('../handler/redirect-handler')

function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) {
return (dispatch) => {
Expand Down
2 changes: 1 addition & 1 deletion lib/web/cache/util.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const assert = require('node:assert')
const { URLSerializer } = require('../fetch/dataURL')
const { URLSerializer } = require('../fetch/data-url')
const { isValidHeaderName } = require('../fetch/util')

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/web/cookies/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const { maxNameValuePairSize, maxAttributeValueSize } = require('./constants')
const { isCTLExcludingHtab } = require('./util')
const { collectASequenceOfCodePointsFast } = require('../fetch/dataURL')
const { collectASequenceOfCodePointsFast } = require('../fetch/data-url')
const assert = require('node:assert')

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/web/eventsource/eventsource.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { makeRequest } = require('../fetch/request')
const { getGlobalOrigin } = require('../fetch/global')
const { webidl } = require('../fetch/webidl')
const { EventSourceStream } = require('./eventsource-stream')
const { parseMIMEType } = require('../fetch/dataURL')
const { parseMIMEType } = require('../fetch/data-url')
const { MessageEvent } = require('../websocket/events')
const { isNetworkError } = require('../fetch/response')
const { delay } = require('./util')
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const assert = require('node:assert')
const { isErrored } = require('../../core/util')
const { isArrayBuffer } = require('node:util/types')
const { File: UndiciFile } = require('./file')
const { serializeAMimeType } = require('./dataURL')
const { serializeAMimeType } = require('./data-url')
const { Readable } = require('node:stream')

/** @type {globalThis['File']} */
Expand Down
2 changes: 2 additions & 0 deletions lib/web/fetch/dataURL.js → lib/web/fetch/data-url.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

const assert = require('node:assert')

const encoder = new TextEncoder()
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { types } = require('node:util')
const { kState } = require('./symbols')
const { isBlobLike } = require('./util')
const { webidl } = require('./webidl')
const { parseMIMEType, serializeAMimeType } = require('./dataURL')
const { parseMIMEType, serializeAMimeType } = require('./data-url')
const { kEnumerableProperty } = require('../../core/util')
const encoder = new TextEncoder()

Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const {
const EE = require('node:events')
const { Readable, pipeline } = require('node:stream')
const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor, bufferToLowerCasedHeaderName } = require('../../core/util')
const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require('./dataURL')
const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require('./data-url')
const { getGlobalDispatcher } = require('../../global')
const { webidl } = require('./webidl')
const { STATUS_CODES } = require('node:http')
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const { kEnumerableProperty } = util
const { kHeaders, kSignal, kState, kGuard, kRealm, kDispatcher } = require('./symbols')
const { webidl } = require('./webidl')
const { getGlobalOrigin } = require('./global')
const { URLSerializer } = require('./dataURL')
const { URLSerializer } = require('./data-url')
const { kHeadersList, kConstruct } = require('../../core/symbols')
const assert = require('node:assert')
const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('node:events')
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const { kState, kHeaders, kGuard, kRealm } = require('./symbols')
const { webidl } = require('./webidl')
const { FormData } = require('./formdata')
const { getGlobalOrigin } = require('./global')
const { URLSerializer } = require('./dataURL')
const { URLSerializer } = require('./data-url')
const { kHeadersList, kConstruct } = require('../../core/symbols')
const assert = require('node:assert')
const { types } = require('node:util')
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { Transform } = require('node:stream')
const zlib = require('node:zlib')
const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require('./constants')
const { getGlobalOrigin } = require('./global')
const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require('./dataURL')
const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require('./data-url')
const { performance } = require('node:perf_hooks')
const { isBlobLike, ReadableStreamFrom, isValidHTTPToken } = require('../../core/util')
const assert = require('node:assert')
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fileapi/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
} = require('./symbols')
const { ProgressEvent } = require('./progressevent')
const { getEncoding } = require('./encoding')
const { serializeAMimeType, parseMIMEType } = require('../fetch/dataURL')
const { serializeAMimeType, parseMIMEType } = require('../fetch/data-url')
const { types } = require('node:util')
const { StringDecoder } = require('string_decoder')
const { btoa } = require('node:buffer')
Expand Down
2 changes: 1 addition & 1 deletion lib/web/websocket/websocket.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const { webidl } = require('../fetch/webidl')
const { URLSerializer } = require('../fetch/dataURL')
const { URLSerializer } = require('../fetch/data-url')
const { getGlobalOrigin } = require('../fetch/global')
const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = require('./constants')
const {
Expand Down
2 changes: 1 addition & 1 deletion test/fetch/data-uri.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
stringPercentDecode,
parseMIMEType,
collectAnHTTPQuotedString
} = require('../../lib/web/fetch/dataURL')
} = require('../../lib/web/fetch/data-url')
const { fetch } = require('../..')

test('https://url.spec.whatwg.org/#concept-url-serializer', async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion test/jest/interceptor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const { createServer } = require('node:http')
const { Agent, request } = require('../../index')
const DecoratorHandler = require('../../lib/handler/DecoratorHandler')
const DecoratorHandler = require('../../lib/handler/decorator-handler')
/* global expect */

const defaultOpts = { keepAliveTimeout: 10, keepAliveMaxTimeout: 10 }
Expand Down
Loading