Skip to content

Commit b88ab46

Browse files
fix: URL imports for Node 14 (#289)
1 parent d8a4fba commit b88ab46

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.changeset/strong-cups-listen.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"http-proxy-agent": patch
3+
"https-proxy-agent": patch
4+
---
5+
6+
Import `url` instead of `node:url` 🤷‍♂️

packages/http-proxy-agent/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as http from 'http';
44
import createDebug from 'debug';
55
import { once } from 'events';
66
import { Agent, AgentConnectOpts } from 'agent-base';
7-
import { URL } from 'node:url';
7+
import { URL } from 'url';
88
import type { OutgoingHttpHeaders } from 'http';
99

1010
const debug = createDebug('http-proxy-agent');

packages/https-proxy-agent/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as http from 'http';
44
import assert from 'assert';
55
import createDebug from 'debug';
66
import { Agent, AgentConnectOpts } from 'agent-base';
7-
import { URL } from 'node:url';
7+
import { URL } from 'url';
88
import { parseProxyResponse } from './parse-proxy-response';
99
import type { OutgoingHttpHeaders } from 'http';
1010

0 commit comments

Comments
 (0)