Skip to content

Commit

Permalink
chore: remove node-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jun 30, 2024
1 parent a68460d commit 219f9b6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
3 changes: 1 addition & 2 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const versioning = require('./util/versioning.js');
const napi = require('./util/napi.js');
const makeDir = require('make-dir');
// for fetching binaries
const fetch = require('node-fetch');
const tar = require('tar');

let npgVersion = 'unknown';
Expand Down Expand Up @@ -61,7 +60,7 @@ function place_binary(uri, targetDir, opts, callback) {
log.http('download', 'proxy agent configured using: "%s"', proxyUrl);
}

fetch(sanitized, { agent })
fetch(sanitized, { dispatcher: agent })
.then((res) => {
if (!res.ok) {
throw new Error(`response status ${res.status} ${res.statusText} on ${sanitized}`);
Expand Down
19 changes: 13 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"detect-libc": "^2.0.0",
"https-proxy-agent": "^5.0.0",
"make-dir": "^3.1.0",
"node-fetch": "^2.6.7",
"nopt": "^7.2.1",
"npmlog": "^7.0.1",
"rimraf": "^5.0.5",
Expand Down

0 comments on commit 219f9b6

Please sign in to comment.