Skip to content

Commit f764208

Browse files
chore: Upgrade proxy-agent
1 parent 9917e88 commit f764208

File tree

3 files changed

+471
-233
lines changed

3 files changed

+471
-233
lines changed

gatsby-plugin-s3/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gatsby-plugin-s3",
3-
"version": "0.4.1",
3+
"version": "0.4.2",
44
"description": "Enables you to deploy your gatsby site to a S3 bucket.",
55
"main": "index.js",
66
"bin": {
@@ -54,7 +54,7 @@
5454
"minimatch": "^3.0.4",
5555
"ora": "^3.0.0",
5656
"pretty-error": "^2.1.1",
57-
"proxy-agent": "^4.0.0",
57+
"proxy-agent": "^6.4.0",
5858
"stream-to-promise": "^2.2.0",
5959
"yargs": "^15.4.0"
6060
},

gatsby-plugin-s3/src/bin.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { createHash } from 'crypto';
2424
import isCI from 'is-ci';
2525
import { getS3WebsiteDomainUrl, withoutLeadingSlash } from './util';
2626
import { AsyncFunction, asyncify, parallelLimit } from 'async';
27-
import proxy from 'proxy-agent';
27+
import { ProxyAgent } from 'proxy-agent';
2828

2929
const pe = new PrettyError();
3030

@@ -133,12 +133,12 @@ export const deploy = async ({ yes, bucket, userAgent }: DeployArguments = {}) =
133133
let httpOptions = {};
134134
if (process.env.HTTP_PROXY) {
135135
httpOptions = {
136-
agent: proxy(process.env.HTTP_PROXY),
136+
agent: new ProxyAgent(),
137137
};
138138
}
139139

140140
httpOptions = {
141-
agent: process.env.HTTP_PROXY ? proxy(process.env.HTTP_PROXY) : undefined,
141+
agent: process.env.HTTP_PROXY ? new ProxyAgent() : undefined,
142142
timeout: config.timeout,
143143
connectTimeout: config.connectTimeout,
144144
...httpOptions,

0 commit comments

Comments
 (0)