diff --git a/.changeset/neat-rules-brake.md b/.changeset/neat-rules-brake.md new file mode 100644 index 00000000..28c51b60 --- /dev/null +++ b/.changeset/neat-rules-brake.md @@ -0,0 +1,6 @@ +--- +"http-proxy-agent": patch +"https-proxy-agent": patch +--- + +Add missing `URL` type import diff --git a/packages/http-proxy-agent/src/index.ts b/packages/http-proxy-agent/src/index.ts index e373c749..b0e5f3ef 100644 --- a/packages/http-proxy-agent/src/index.ts +++ b/packages/http-proxy-agent/src/index.ts @@ -3,8 +3,9 @@ import * as tls from 'tls'; import * as http from 'http'; import createDebug from 'debug'; import { once } from 'events'; -import type { OutgoingHttpHeaders } from 'http'; import { Agent, AgentConnectOpts } from 'agent-base'; +import { URL } from 'node:url'; +import type { OutgoingHttpHeaders } from 'http'; const debug = createDebug('http-proxy-agent'); diff --git a/packages/https-proxy-agent/src/index.ts b/packages/https-proxy-agent/src/index.ts index b626c65b..d0332a66 100644 --- a/packages/https-proxy-agent/src/index.ts +++ b/packages/https-proxy-agent/src/index.ts @@ -3,9 +3,10 @@ import * as tls from 'tls'; import * as http from 'http'; import assert from 'assert'; import createDebug from 'debug'; -import type { OutgoingHttpHeaders } from 'http'; import { Agent, AgentConnectOpts } from 'agent-base'; +import { URL } from 'node:url'; import { parseProxyResponse } from './parse-proxy-response'; +import type { OutgoingHttpHeaders } from 'http'; const debug = createDebug('https-proxy-agent');