Skip to content

Commit

Permalink
feat: add minimal node-request
Browse files Browse the repository at this point in the history
Adds a stripped down `node-request` to stop deprecated
warnings from bubbling up to the user.
  • Loading branch information
imatlopez committed Aug 23, 2020
1 parent c603796 commit 098907d
Show file tree
Hide file tree
Showing 3 changed files with 458 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ const path = require('path')
const crypto = require('crypto')
const log = require('npmlog')
const semver = require('semver')
const request = require('request')
const processRelease = require('./process-release')
const win = process.platform === 'win32'
const getProxyFromURI = require('./proxy')
const Request = require('./request-shim')

function install (fs, gyp, argv, callback) {
var release = processRelease(argv, gyp, process.version, process.release)
Expand Down Expand Up @@ -420,7 +420,7 @@ function download (gyp, env, url) {
}
}

var req = request(requestOpts)
var req = new Request(requestOpts)
req.on('response', function (res) {
log.http(res.statusCode, url)
})
Expand Down
Loading

0 comments on commit 098907d

Please sign in to comment.