Skip to content

Commit d5f3d3f

Browse files
committed
Update "async-listen" to v3.0.0 for all packages
1 parent 8c320cf commit d5f3d3f

File tree

15 files changed

+43
-48
lines changed

15 files changed

+43
-48
lines changed

packages/agent-base/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@types/node": "^14.18.45",
3737
"@types/semver": "^7.3.13",
3838
"@types/ws": "^6.0.4",
39-
"async-listen": "^2.1.0",
39+
"async-listen": "^3.0.0",
4040
"jest": "^29.5.0",
4141
"ts-jest": "^29.1.0",
4242
"tsconfig": "workspace:*",

packages/agent-base/test/test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -265,14 +265,14 @@ describe('Agent (TypeScript)', () => {
265265
reqCount1++;
266266
res.end();
267267
});
268-
const addr1 = (await listen(server1)) as URL;
268+
const addr1 = await listen(server1);
269269

270270
const server2 = http.createServer((req, res) => {
271271
expect(req.headers.connection).toEqual('keep-alive');
272272
reqCount2++;
273273
res.end();
274274
});
275-
const addr2 = (await listen(server2)) as URL;
275+
const addr2 = await listen(server2);
276276

277277
try {
278278
const res = await req(new URL('/foo', addr1), { agent });
@@ -479,7 +479,7 @@ describe('Agent (TypeScript)', () => {
479479
gotReq = true;
480480
res.end();
481481
});
482-
const addr = (await listen(server)) as URL;
482+
const addr = await listen(server);
483483

484484
try {
485485
const res = await req(new URL('/foo', addr), {

packages/get-uri/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@types/ftpd": "^0.2.35",
4141
"@types/jest": "^29.5.1",
4242
"@types/node": "^14.18.45",
43-
"async-listen": "^2.1.0",
43+
"async-listen": "^3.0.0",
4444
"ftpd": "https://files-jg1s1zt9l.n8.io/ftpd-v0.2.14.tgz",
4545
"jest": "^29.5.0",
4646
"st": "^1.2.2",

packages/http-proxy-agent/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@types/debug": "^4.1.7",
3535
"@types/jest": "^29.5.1",
3636
"@types/node": "^14.18.45",
37-
"async-listen": "^2.1.0",
37+
"async-listen": "^3.0.0",
3838
"jest": "^29.5.0",
3939
"proxy": "workspace:*",
4040
"ts-jest": "^29.1.0",

packages/http-proxy-agent/test/test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ describe('HttpProxyAgent', () => {
2020
beforeAll(async () => {
2121
// setup HTTP proxy server
2222
proxy = createProxy();
23-
proxyUrl = (await listen(proxy)) as URL;
23+
proxyUrl = await listen(proxy);
2424
});
2525

2626
beforeAll(async () => {
2727
// setup target HTTP server
2828
httpServer = http.createServer();
29-
httpServerUrl = (await listen(httpServer)) as URL;
29+
httpServerUrl = await listen(httpServer);
3030
});
3131

3232
beforeAll(async () => {
@@ -36,7 +36,7 @@ describe('HttpProxyAgent', () => {
3636
cert: fs.readFileSync(`${__dirname}/ssl-cert-snakeoil.pem`),
3737
};
3838
sslProxy = createProxy(https.createServer(options));
39-
sslProxyUrl = (await listen(sslProxy)) as URL;
39+
sslProxyUrl = await listen(sslProxy);
4040
});
4141

4242
beforeEach(() => {

packages/https-proxy-agent/test/test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import fs from 'fs';
2-
import net from 'net';
3-
import http from 'http';
4-
import https from 'https';
1+
import * as fs from 'fs';
2+
import * as net from 'net';
3+
import * as http from 'http';
4+
import * as https from 'https';
55
import assert from 'assert';
66
import { once } from 'events';
77
import { listen } from 'async-listen';

packages/pac-proxy-agent/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@types/debug": "^4.1.7",
4444
"@types/jest": "^29.5.1",
4545
"@types/node": "^14.18.45",
46-
"async-listen": "^2.1.0",
46+
"async-listen": "^3.0.0",
4747
"jest": "^29.5.0",
4848
"proxy": "workspace:*",
4949
"socksv5": "0.0.6",

packages/pac-proxy-agent/test/test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ describe('PacProxyAgent', () => {
3333
beforeAll(async () => {
3434
// setup target HTTP server
3535
httpServer = http.createServer();
36-
httpServerUrl = (await listen(httpServer)) as URL;
36+
httpServerUrl = await listen(httpServer);
3737
});
3838

3939
beforeAll(async () => {
4040
// setup target SSL HTTPS server
4141
httpsServer = https.createServer(sslOptions);
42-
httpsServerUrl = (await listen(httpsServer)) as URL;
42+
httpsServerUrl = await listen(httpsServer);
4343
});
4444

4545
beforeAll(async () => {
@@ -57,13 +57,13 @@ describe('PacProxyAgent', () => {
5757
beforeAll(async () => {
5858
// setup HTTP proxy server
5959
proxyServer = createProxy();
60-
proxyServerUrl = (await listen(proxyServer)) as URL;
60+
proxyServerUrl = await listen(proxyServer);
6161
});
6262

6363
beforeAll(async () => {
6464
// setup SSL HTTPS proxy server
6565
proxyHttpsServer = createProxy(https.createServer(sslOptions));
66-
proxyHttpsServerUrl = (await listen(proxyHttpsServer)) as URL;
66+
proxyHttpsServerUrl = await listen(proxyHttpsServer);
6767
});
6868

6969
afterAll(() => {

packages/proxy-agent/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@types/jest": "^29.5.1",
4848
"@types/node": "^14.18.45",
4949
"@types/proxy-from-env": "^1.0.1",
50-
"async-listen": "^2.1.0",
50+
"async-listen": "^3.0.0",
5151
"jest": "^29.5.0",
5252
"proxy": "workspace:*",
5353
"socksv5": "github:TooTallNate/socksv5#fix/dstSock-close-event",

packages/proxy-agent/test/test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ describe('ProxyAgent', () => {
3636
beforeAll(async () => {
3737
// setup target HTTP server
3838
httpServer = http.createServer();
39-
httpServerUrl = (await listen(httpServer)) as URL;
39+
httpServerUrl = await listen(httpServer);
4040
});
4141

4242
beforeAll(async () => {
4343
// setup target SSL HTTPS server
4444
httpsServer = https.createServer(sslOptions);
45-
httpsServerUrl = (await listen(httpsServer)) as URL;
45+
httpsServerUrl = await listen(httpsServer);
4646
});
4747

4848
beforeAll(async () => {
@@ -59,13 +59,13 @@ describe('ProxyAgent', () => {
5959
beforeAll(async () => {
6060
// setup HTTP proxy server
6161
httpProxyServer = createProxy();
62-
httpProxyServerUrl = (await listen(httpProxyServer)) as URL;
62+
httpProxyServerUrl = await listen(httpProxyServer);
6363
});
6464

6565
beforeAll(async () => {
6666
// setup SSL HTTPS proxy server
6767
httpsProxyServer = createProxy(https.createServer(sslOptions));
68-
httpsProxyServerUrl = (await listen(httpsProxyServer)) as URL;
68+
httpsProxyServerUrl = await listen(httpsProxyServer);
6969
});
7070

7171
afterAll(() => {

packages/proxy/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@types/debug": "^4.1.7",
4444
"@types/jest": "^29.5.1",
4545
"@types/node": "^14.18.45",
46-
"async-listen": "^2.1.0",
46+
"async-listen": "^3.0.0",
4747
"jest": "^29.5.0",
4848
"ts-jest": "^29.1.0",
4949
"tsconfig": "workspace:*",

packages/proxy/test/test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ describe('proxy', () => {
1515
beforeAll(async () => {
1616
// setup proxy server
1717
proxy = createProxy(http.createServer());
18-
proxyUrl = (await listen(proxy)) as URL;
18+
proxyUrl = await listen(proxy);
1919
});
2020

2121
beforeAll(async () => {
2222
// setup target server
2323
server = http.createServer();
24-
serverUrl = (await listen(server)) as URL;
24+
serverUrl = await listen(server);
2525
});
2626

2727
afterAll(() => {

packages/socks-proxy-agent/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"@types/dns2": "^2.0.3",
118118
"@types/jest": "^29.5.1",
119119
"@types/node": "^14.18.45",
120-
"async-listen": "^2.1.0",
120+
"async-listen": "^3.0.0",
121121
"async-retry": "^1.3.3",
122122
"cacheable-lookup": "^6.1.0",
123123
"dns2": "^2.1.0",

packages/socks-proxy-agent/test/test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('SocksProxyAgent', () => {
3636
beforeAll(async () => {
3737
// setup target HTTP server
3838
httpServer = http.createServer();
39-
httpServerUrl = (await listen(httpServer)) as URL;
39+
httpServerUrl = await listen(httpServer);
4040
});
4141

4242
beforeAll(async () => {
@@ -50,7 +50,7 @@ describe('SocksProxyAgent', () => {
5050
),
5151
};
5252
httpsServer = https.createServer(options);
53-
httpsServerUrl = (await listen(httpsServer)) as URL;
53+
httpsServerUrl = await listen(httpsServer);
5454
});
5555

5656
afterAll(() => {

pnpm-lock.yaml

+14-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)