From 8610c66ccea38b2438b3bebe9292b73cfc44f224 Mon Sep 17 00:00:00 2001 From: Stuart Small Date: Mon, 2 Oct 2023 18:01:03 -0600 Subject: [PATCH] Update various dependencies This doesn't update all dependencies or get everything to the newest versions. The goal was to eliminate current critical and high vulens in the tree. There are still a few mediums kicking around that could be squashed too. I also opportunistically bump other versions when possible --- lib/tunnel.js | 2 +- package.json | 10 ++++---- tests/test-cookies.js | 54 +++++++++++++++++++++--------------------- tests/test-headers.js | 16 ++++++------- tests/test-redirect.js | 18 +++++++------- 5 files changed, 50 insertions(+), 50 deletions(-) diff --git a/lib/tunnel.js b/lib/tunnel.js index 4479003f6..5fac71845 100644 --- a/lib/tunnel.js +++ b/lib/tunnel.js @@ -114,7 +114,7 @@ function Tunnel (request) { Tunnel.prototype.isEnabled = function () { var self = this var request = self.request - // Tunnel HTTPS by default. Allow the user to override this setting. + // Tunnel HTTPS by default. Allow the user to override this setting. // If self.tunnelOverride is set (the user specified a value), use it. if (typeof self.tunnelOverride !== 'undefined') { diff --git a/package.json b/package.json index 7aca181b4..af6fa184f 100644 --- a/package.json +++ b/package.json @@ -33,18 +33,18 @@ "combined-stream": "~1.0.6", "extend": "~3.0.2", "forever-agent": "~0.6.1", - "form-data": "~2.3.2", + "form-data": "^4.0.0", "http-signature": "~1.3.6", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "6.10.4", + "qs": "^6.11.2", "safe-buffer": "^5.1.2", "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", - "uuid": "^8.3.2" + "uuid": "^9.0.1" }, "scripts": { "test": "npm run lint && npm run test-ci && npm run test-browser", @@ -61,7 +61,7 @@ "codecov": "^3.0.4", "coveralls": "^3.0.2", "function-bind": "^1.0.2", - "karma": "^3.0.0", + "karma": "^6.4.2", "karma-browserify": "^5.0.1", "karma-cli": "^2.0.0", "karma-coverage": "^2.0.3", @@ -71,7 +71,7 @@ "phantomjs-prebuilt": "^2.1.3", "rimraf": "^2.2.8", "server-destroy": "^1.0.1", - "standard": "^9.0.0", + "standard": "^11.0.1", "tap": "^15.1.5", "tape": "^4.6.0" }, diff --git a/tests/test-cookies.js b/tests/test-cookies.js index 6bebcaf12..34e5f8f12 100644 --- a/tests/test-cookies.js +++ b/tests/test-cookies.js @@ -50,17 +50,17 @@ tape('after server sends a cookie', function (t) { url: validUrl, jar: jar1 }, - function (error, response, body) { - t.equal(error, null) - t.equal(jar1.getCookieString(validUrl), 'foo=bar') - t.equal(body, 'okay') + function (error, response, body) { + t.equal(error, null) + t.equal(jar1.getCookieString(validUrl), 'foo=bar') + t.equal(body, 'okay') - var cookies = jar1.getCookies(validUrl) - t.equal(cookies.length, 1) - t.equal(cookies[0].key, 'foo') - t.equal(cookies[0].value, 'bar') - t.end() - }) + var cookies = jar1.getCookies(validUrl) + t.equal(cookies.length, 1) + t.equal(cookies[0].key, 'foo') + t.equal(cookies[0].value, 'bar') + t.end() + }) }) tape('after server sends a malformed cookie', function (t) { @@ -70,17 +70,17 @@ tape('after server sends a malformed cookie', function (t) { url: malformedUrl, jar: jar }, - function (error, response, body) { - t.equal(error, null) - t.equal(jar.getCookieString(malformedUrl), 'foo') - t.equal(body, 'okay') + function (error, response, body) { + t.equal(error, null) + t.equal(jar.getCookieString(malformedUrl), 'foo') + t.equal(body, 'okay') - var cookies = jar.getCookies(malformedUrl) - t.equal(cookies.length, 1) - t.equal(cookies[0].key, '') - t.equal(cookies[0].value, 'foo') - t.end() - }) + var cookies = jar.getCookies(malformedUrl) + t.equal(cookies.length, 1) + t.equal(cookies[0].key, '') + t.equal(cookies[0].value, 'foo') + t.end() + }) }) tape('after server sends a cookie for a different domain', function (t) { @@ -90,13 +90,13 @@ tape('after server sends a cookie for a different domain', function (t) { url: invalidUrl, jar: jar2 }, - function (error, response, body) { - t.equal(error, null) - t.equal(jar2.getCookieString(validUrl), '') - t.deepEqual(jar2.getCookies(validUrl), []) - t.equal(body, 'okay') - t.end() - }) + function (error, response, body) { + t.equal(error, null) + t.equal(jar2.getCookieString(validUrl), '') + t.deepEqual(jar2.getCookies(validUrl), []) + t.equal(body, 'okay') + t.end() + }) }) tape('make sure setCookie works', function (t) { diff --git a/tests/test-headers.js b/tests/test-headers.js index 68b748691..732ac65ec 100644 --- a/tests/test-headers.js +++ b/tests/test-headers.js @@ -240,10 +240,10 @@ tape('catch invalid characters error - GET', function (t) { }, function (err, res, body) { t.true(isExpectedHeaderCharacterError('test', err)) }) - .on('error', function (err) { - t.true(isExpectedHeaderCharacterError('test', err)) - t.end() - }) + .on('error', function (err) { + t.true(isExpectedHeaderCharacterError('test', err)) + t.end() + }) }) tape('catch invalid characters error - POST', function (t) { @@ -257,10 +257,10 @@ tape('catch invalid characters error - POST', function (t) { }, function (err, res, body) { t.true(isExpectedHeaderCharacterError('test', err)) }) - .on('error', function (err) { - t.true(isExpectedHeaderCharacterError('test', err)) - t.end() - }) + .on('error', function (err) { + t.true(isExpectedHeaderCharacterError('test', err)) + t.end() + }) }) if (hasIPv6interface) { diff --git a/tests/test-redirect.js b/tests/test-redirect.js index b3b581c21..20344e499 100644 --- a/tests/test-redirect.js +++ b/tests/test-redirect.js @@ -478,9 +478,9 @@ tape('should have referer header by default when following redirect', function ( t.equal(res.statusCode, 200) t.end() }) - .on('redirect', function () { - t.equal(this.headers.referer, s.url + '/temp') - }) + .on('redirect', function () { + t.equal(this.headers.referer, s.url + '/temp') + }) }) tape('should not have referer header when removeRefererHeader is true', function (t) { @@ -495,9 +495,9 @@ tape('should not have referer header when removeRefererHeader is true', function t.equal(res.statusCode, 200) t.end() }) - .on('redirect', function () { - t.equal(this.headers.referer, undefined) - }) + .on('redirect', function () { + t.equal(this.headers.referer, undefined) + }) }) tape('should preserve referer header set in the initial request when removeRefererHeader is true', function (t) { @@ -512,9 +512,9 @@ tape('should preserve referer header set in the initial request when removeRefer t.equal(res.statusCode, 200) t.end() }) - .on('redirect', function () { - t.equal(this.headers.referer, 'http://awesome.com') - }) + .on('redirect', function () { + t.equal(this.headers.referer, 'http://awesome.com') + }) }) tape('should use same agent class on redirect', function (t) {