Skip to content

Commit

Permalink
fix: URL imports for Node 14 (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbankhead authored Feb 15, 2024
1 parent d8a4fba commit b88ab46
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/strong-cups-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"http-proxy-agent": patch
"https-proxy-agent": patch
---

Import `url` instead of `node:url` 🤷‍♂️
2 changes: 1 addition & 1 deletion packages/http-proxy-agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as http from 'http';
import createDebug from 'debug';
import { once } from 'events';
import { Agent, AgentConnectOpts } from 'agent-base';
import { URL } from 'node:url';
import { URL } from 'url';
import type { OutgoingHttpHeaders } from 'http';

const debug = createDebug('http-proxy-agent');
Expand Down
2 changes: 1 addition & 1 deletion packages/https-proxy-agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as http from 'http';
import assert from 'assert';
import createDebug from 'debug';
import { Agent, AgentConnectOpts } from 'agent-base';
import { URL } from 'node:url';
import { URL } from 'url';
import { parseProxyResponse } from './parse-proxy-response';
import type { OutgoingHttpHeaders } from 'http';

Expand Down

0 comments on commit b88ab46

Please sign in to comment.