From c3c405ee03748af5d3a863bec00c13e5a1b75051 Mon Sep 17 00:00:00 2001 From: Dimitri DO BAIRRO Date: Mon, 8 Jan 2024 18:55:34 +0100 Subject: [PATCH] fix: URL types were missing (#268) --- .changeset/neat-rules-brake.md | 6 ++++++ packages/http-proxy-agent/src/index.ts | 3 ++- packages/https-proxy-agent/src/index.ts | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changeset/neat-rules-brake.md 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');