Visitar URL original
Update changelogs (#177) · TooTallNate/proxy-agents@65baebf · GitHub
Skip to content

Commit 65baebf

Browse files
authored
Update changelogs (#177)
* Add top-level changelog * Mention breaking changes in individual changelogs * Fix grammar in agent-base README * Fix typos * Consistency change
1 parent 8ff9faa commit 65baebf

7 files changed

Lines changed: 156 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelogs
2+
3+
Each package in this monorepo has an individual changelog:
4+
5+
* [`agent-base`](packages/agent-base/CHANGELOG.md)
6+
* [`data-uri-to-buffer`](packages/data-uri-to-buffer/CHANGELOG.md)
7+
* [`degenerator`](packages/degenerator/CHANGELOG.md)
8+
* [`get-uri`](packages/get-uri/CHANGELOG.md)
9+
* [`http-proxy-agent`](packages/http-proxy-agent/CHANGELOG.md)
10+
* [`https-proxy-agent`](packages/https-proxy-agent/CHANGELOG.md)
11+
* [`https-proxy-agent`](packages/https-proxy-agent/CHANGELOG.md)
12+
* [`pac-proxy-agent`](packages/pac-proxy-agent/CHANGELOG.md)
13+
* [`pac-resolver`](packages/pac-resolver/CHANGELOG.md)
14+
* [`proxy`](packages/proxy/CHANGELOG.md)
15+
* [`proxy-agent`](packages/proxy-agent/CHANGELOG.md)
16+
* [`socks-proxy-agent`](packages/socks-proxy-agent/CHANGELOG.md)

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ Node.js HTTP Proxy Agents Monorepo
55
This monorepo contains various Node.js HTTP Agent implementations that operate over proxies using various protocols.
66

77
For the most common use-cases, you should be using the [`proxy-agent`](./packages/proxy-agent) module, which utilizes the other, more low-level, agent implementations.
8+
9+
You can find [changelogs here](CHANGELOG.md).

‎packages/agent-base/CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
### Major Changes
1212

1313
- d99a7c8: Major version bump for all packages
14+
- ⚠️ This is a breaking change! In version 6.x, this package had a default export of a function that could be used to construct an
15+
`http.Agent`. Now this default export has been removed, instead there is a named export for the `Agent` abstract class. See the
16+
[README](README.md) for details on how to use the abstract class.
1417

1518
### Minor Changes
1619

‎packages/agent-base/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ agent-base
44

55
This module is a thin wrapper around the base `http.Agent` class.
66

7-
It provides an absract class that must define a `connect()` function,
7+
It provides an abstract class that must define a `connect()` function,
88
which is responsible for creating the underlying socket that the HTTP
99
client requests will use.
1010

@@ -19,7 +19,7 @@ to determine what type of socket should be returned.
1919

2020
#### Some subclasses:
2121

22-
Here's some more interesting uses of `agent-base`.
22+
Here are some more interesting uses of `agent-base`.
2323
Send a pull request to list yours!
2424

2525
* [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints

‎packages/http-proxy-agent/CHANGELOG.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,51 @@
1313
### Major Changes
1414

1515
- d99a7c8: Major version bump for all packages
16+
- ⚠️ This is a breaking change! The `HttpProxyAgent` constructor argument has been split into two arguments.
17+
18+
#### Upgrading from 5.x to 6.x
19+
20+
In version 5.x, the `HttpProxyAgent` constructor took a single argument of either (A) a `string`, or (B) an object matching the output of
21+
the [deprecated `url.parse()` method](https://nodejs.org/docs/latest-v14.x/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost)
22+
_and_ various extra options.
23+
24+
Now the constructor takes two _separate_ arguments:
25+
26+
* Argument 1: Either (A) a `string`, or (B) a [WHATWG `URL` object](https://nodejs.org/docs/latest-v14.x/api/url.html#url_the_whatwg_url_api)
27+
* Argument 2 (optional): An object with standard [`http.Agent`](https://nodejs.org/docs/latest-v14.x/api/url.html#url_the_whatwg_url_api),
28+
`net.TcpNetConnectOpts`, and `tls.ConnectionOptions` properties.
29+
30+
If you were using an object argument in 5.x, you'll need to change the first argument to match the structure of the `URL` class, and move
31+
any other options to the second argument.
32+
33+
5.x usage:
34+
35+
```ts
36+
const agent = new HttpProxyAgent({
37+
protocol: 'https:',
38+
host: 'myproxy.mydomain.com'
39+
port: '1234',
40+
auth: 'proxyUser:proxyPass',
41+
timeout: 1000
42+
});
43+
```
44+
45+
Updated 6.x usage:
46+
47+
```ts
48+
const agent = new HttpProxyAgent(
49+
{
50+
protocol: 'https:',
51+
hostname: 'myproxy.mydomain.com'
52+
port: '1234',
53+
username: 'proxyUser',
54+
password: 'proxyPass'
55+
},
56+
{
57+
timeout: 1000
58+
}
59+
);
60+
```
1661

1762
### Minor Changes
1863

‎packages/https-proxy-agent/CHANGELOG.md‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,53 @@
1818
### Major Changes
1919

2020
- d99a7c8: Major version bump for all packages
21+
- ⚠️ This is a breaking change! The `HttpsProxyAgent` constructor argument has been split into two arguments.
22+
23+
#### Upgrading from 5.x to 6.x
24+
25+
In version 5.x, the `HttpsProxyAgent` constructor took a single argument of either (A) a `string`, or (B) an object matching the output of
26+
the [deprecated `url.parse()` method](https://nodejs.org/docs/latest-v14.x/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost)
27+
_and_ various extra options.
28+
29+
Now the constructor takes two _separate_ arguments:
30+
31+
* Argument 1: Either (A) a `string`, or (B) a [WHATWG `URL` object](https://nodejs.org/docs/latest-v14.x/api/url.html#url_the_whatwg_url_api)
32+
* Argument 2 (optional): An object with standard [`http.Agent`](https://nodejs.org/docs/latest-v14.x/api/url.html#url_the_whatwg_url_api),
33+
`net.TcpNetConnectOpts`, and `tls.ConnectionOptions` properties and/or custom options supported by this package.
34+
35+
If you were using an object argument in 5.x, you'll need to change the first argument to match the structure of the `URL` class, and move
36+
any other options to the second argument.
37+
38+
5.x usage:
39+
40+
```ts
41+
const agent = new HttpsProxyAgent({
42+
protocol: 'https:',
43+
host: 'myproxy.mydomain.com'
44+
port: '1234',
45+
auth: 'proxyUser:proxyPass',
46+
timeout: 1000,
47+
headers: { 'trace', 'foo' }
48+
});
49+
```
50+
51+
Updated 6.x usage:
52+
53+
```ts
54+
const agent = new HttpsProxyAgent(
55+
{
56+
protocol: 'https:',
57+
hostname: 'myproxy.mydomain.com'
58+
port: '1234',
59+
username: 'proxyUser',
60+
password: 'proxyPass'
61+
},
62+
{
63+
timeout: 1000,
64+
headers: { 'trace', 'foo' }
65+
}
66+
);
67+
```
2168

2269
### Minor Changes
2370

‎packages/socks-proxy-agent/CHANGELOG.md‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,47 @@
1313
### Major Changes
1414

1515
- d99a7c8: Major version bump for all packages
16+
- ⚠️ This is a breaking change! The `SocksProxyAgent` constructor argument has been split into two arguments.
17+
18+
#### Upgrading from 5.x to 6.x
19+
20+
In version 5.x, the `SocksProxyAgent` constructor took a single argument of either (A) a `string`, or (B) an object with specific connection
21+
properties.
22+
23+
Now the constructor takes two _separate_ arguments:
24+
25+
* Argument 1: Either (A) a `string`, or (B) a [WHATWG `URL` object](https://nodejs.org/docs/latest-v14.x/api/url.html#url_the_whatwg_url_api)
26+
* Argument 2 (optional): An object with standard [`http.Agent`](https://nodejs.org/docs/latest-v14.x/api/url.html#url_the_whatwg_url_api)
27+
properties.
28+
29+
If you were using an object argument in 7.x, you'll need to change the first argument to match the structure of the `URL` class, and move
30+
any other options to the second argument.
31+
32+
7.x usage:
33+
34+
```ts
35+
const agent = new SocksProxyAgent({
36+
hostname: 'myproxy.mydomain.com',
37+
userId: 'proxyUser',
38+
password: 'proxyPass'
39+
timeout: 1000
40+
});
41+
```
42+
43+
Updated 8.x usage:
44+
45+
```ts
46+
const agent = new SocksProxyAgent(
47+
{
48+
hostname: 'myproxy.mydomain.com'
49+
username: 'proxyUser',
50+
password: 'proxyPass'
51+
},
52+
{
53+
timeout: 1000
54+
}
55+
);
56+
```
1657

1758
### Minor Changes
1859

0 commit comments

Comments
 (0)