Skip to content

Commit

Permalink
Update changelogs (#177)
Browse files Browse the repository at this point in the history
* Add top-level changelog
* Mention breaking changes in individual changelogs
* Fix grammar in agent-base README
* Fix typos
* Consistency change
  • Loading branch information
jportner committed May 18, 2023
1 parent 8ff9faa commit 65baebf
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 2 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Changelogs

Each package in this monorepo has an individual changelog:

* [`agent-base`](packages/agent-base/CHANGELOG.md)
* [`data-uri-to-buffer`](packages/data-uri-to-buffer/CHANGELOG.md)
* [`degenerator`](packages/degenerator/CHANGELOG.md)
* [`get-uri`](packages/get-uri/CHANGELOG.md)
* [`http-proxy-agent`](packages/http-proxy-agent/CHANGELOG.md)
* [`https-proxy-agent`](packages/https-proxy-agent/CHANGELOG.md)
* [`https-proxy-agent`](packages/https-proxy-agent/CHANGELOG.md)
* [`pac-proxy-agent`](packages/pac-proxy-agent/CHANGELOG.md)
* [`pac-resolver`](packages/pac-resolver/CHANGELOG.md)
* [`proxy`](packages/proxy/CHANGELOG.md)
* [`proxy-agent`](packages/proxy-agent/CHANGELOG.md)
* [`socks-proxy-agent`](packages/socks-proxy-agent/CHANGELOG.md)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ Node.js HTTP Proxy Agents Monorepo
This monorepo contains various Node.js HTTP Agent implementations that operate over proxies using various protocols.

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.

You can find [changelogs here](CHANGELOG.md).
3 changes: 3 additions & 0 deletions packages/agent-base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
### Major Changes

- d99a7c8: Major version bump for all packages
- ⚠️ 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
`http.Agent`. Now this default export has been removed, instead there is a named export for the `Agent` abstract class. See the
[README](README.md) for details on how to use the abstract class.

### Minor Changes

Expand Down
4 changes: 2 additions & 2 deletions packages/agent-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ agent-base

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

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

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

#### Some subclasses:

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

* [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
Expand Down
45 changes: 45 additions & 0 deletions packages/http-proxy-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,51 @@
### Major Changes

- d99a7c8: Major version bump for all packages
- ⚠️ This is a breaking change! The `HttpProxyAgent` constructor argument has been split into two arguments.

#### Upgrading from 5.x to 6.x

In version 5.x, the `HttpProxyAgent` constructor took a single argument of either (A) a `string`, or (B) an object matching the output of
the [deprecated `url.parse()` method](https://nodejs.org/docs/latest-v14.x/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost)
_and_ various extra options.

Now the constructor takes two _separate_ arguments:

* 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)
* Argument 2 (optional): An object with standard [`http.Agent`](https://nodejs.org/docs/latest-v14.x/api/url.html#url_the_whatwg_url_api),
`net.TcpNetConnectOpts`, and `tls.ConnectionOptions` properties.

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
any other options to the second argument.

5.x usage:

```ts
const agent = new HttpProxyAgent({
protocol: 'https:',
host: 'myproxy.mydomain.com'
port: '1234',
auth: 'proxyUser:proxyPass',
timeout: 1000
});
```

Updated 6.x usage:

```ts
const agent = new HttpProxyAgent(
{
protocol: 'https:',
hostname: 'myproxy.mydomain.com'
port: '1234',
username: 'proxyUser',
password: 'proxyPass'
},
{
timeout: 1000
}
);
```

### Minor Changes

Expand Down
47 changes: 47 additions & 0 deletions packages/https-proxy-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,53 @@
### Major Changes

- d99a7c8: Major version bump for all packages
- ⚠️ This is a breaking change! The `HttpsProxyAgent` constructor argument has been split into two arguments.

#### Upgrading from 5.x to 6.x

In version 5.x, the `HttpsProxyAgent` constructor took a single argument of either (A) a `string`, or (B) an object matching the output of
the [deprecated `url.parse()` method](https://nodejs.org/docs/latest-v14.x/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost)
_and_ various extra options.

Now the constructor takes two _separate_ arguments:

* 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)
* Argument 2 (optional): An object with standard [`http.Agent`](https://nodejs.org/docs/latest-v14.x/api/url.html#url_the_whatwg_url_api),
`net.TcpNetConnectOpts`, and `tls.ConnectionOptions` properties and/or custom options supported by this package.

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
any other options to the second argument.

5.x usage:

```ts
const agent = new HttpsProxyAgent({
protocol: 'https:',
host: 'myproxy.mydomain.com'
port: '1234',
auth: 'proxyUser:proxyPass',
timeout: 1000,
headers: { 'trace', 'foo' }
});
```

Updated 6.x usage:

```ts
const agent = new HttpsProxyAgent(
{
protocol: 'https:',
hostname: 'myproxy.mydomain.com'
port: '1234',
username: 'proxyUser',
password: 'proxyPass'
},
{
timeout: 1000,
headers: { 'trace', 'foo' }
}
);
```

### Minor Changes

Expand Down
41 changes: 41 additions & 0 deletions packages/socks-proxy-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,47 @@
### Major Changes

- d99a7c8: Major version bump for all packages
- ⚠️ This is a breaking change! The `SocksProxyAgent` constructor argument has been split into two arguments.

#### Upgrading from 5.x to 6.x

In version 5.x, the `SocksProxyAgent` constructor took a single argument of either (A) a `string`, or (B) an object with specific connection
properties.

Now the constructor takes two _separate_ arguments:

* 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)
* Argument 2 (optional): An object with standard [`http.Agent`](https://nodejs.org/docs/latest-v14.x/api/url.html#url_the_whatwg_url_api)
properties.

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
any other options to the second argument.

7.x usage:

```ts
const agent = new SocksProxyAgent({
hostname: 'myproxy.mydomain.com',
userId: 'proxyUser',
password: 'proxyPass'
timeout: 1000
});
```

Updated 8.x usage:

```ts
const agent = new SocksProxyAgent(
{
hostname: 'myproxy.mydomain.com'
username: 'proxyUser',
password: 'proxyPass'
},
{
timeout: 1000
}
);
```

### Minor Changes

Expand Down

1 comment on commit 65baebf

@vercel
Copy link

@vercel vercel bot commented on 65baebf May 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

proxy-agents – ./

proxy-agents-git-main-tootallnate.vercel.app
proxy-agents.vercel.app
proxy-agents-tootallnate.vercel.app

Please sign in to comment.