From 80c0354a05e291445015e2b0eb0b4ed88b392295 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 17 May 2024 12:55:01 -0500 Subject: [PATCH] Deps: Replace request devDependency with @sailshq/request (#7339) * Update package.json * Update package.json * update tests to use @sailshq/request --- package.json | 2 +- test/benchmarks/sails.request.generic.test.js | 2 +- test/helpers/test-spawning-sails-child-process-in-cwd.js | 2 +- test/helpers/test-spawning-sails-lift-child-process-in-cwd.js | 2 +- test/hooks/http/initialize.test.js | 2 +- test/hooks/views/skipAssets.test.js | 2 +- test/integration/helpers/httpHelper.js | 2 +- test/integration/lift.https.test.js | 2 +- test/integration/lift.test.js | 2 +- test/integration/middleware.404.test.js | 4 ++-- test/integration/middleware.500.test.js | 4 ++-- test/integration/middleware.compression.test.js | 2 +- test/integration/middleware.cookieParser.test.js | 2 +- test/integration/middleware.favicon.test.js | 4 ++-- test/integration/middleware.handleBodyParserError.test.js | 4 ++-- test/integration/middleware.sails.test.js | 2 +- test/integration/middleware.session.redis.test.js | 2 +- test/integration/middleware.session.test.js | 2 +- test/integration/middleware.startRequestTimer.test.js | 4 ++-- test/integration/middleware.static.test.js | 4 ++-- 20 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index dbf857bd8a..daa5a5e073 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "mocha": "3.0.2", "nunjucks": "3.0.1", "portfinder": "1.0.13", - "request": "2.83.0", + "@sailshq/request": "2.88.3", "root-require": "0.3.1", "sails-hook-orm": "^4.0.2", "sails-hook-sockets": "^3.0.0", diff --git a/test/benchmarks/sails.request.generic.test.js b/test/benchmarks/sails.request.generic.test.js index 3afee9eda3..28c1be1e8d 100644 --- a/test/benchmarks/sails.request.generic.test.js +++ b/test/benchmarks/sails.request.generic.test.js @@ -6,7 +6,7 @@ var util = require('util'); var assert = require('assert'); var tmp = require('tmp'); var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Filesystem = require('machinepack-fs'); diff --git a/test/helpers/test-spawning-sails-child-process-in-cwd.js b/test/helpers/test-spawning-sails-child-process-in-cwd.js index 8f7618c302..f591b725fc 100644 --- a/test/helpers/test-spawning-sails-child-process-in-cwd.js +++ b/test/helpers/test-spawning-sails-child-process-in-cwd.js @@ -4,7 +4,7 @@ var path = require('path'); var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var MProcess = require('machinepack-process'); diff --git a/test/helpers/test-spawning-sails-lift-child-process-in-cwd.js b/test/helpers/test-spawning-sails-lift-child-process-in-cwd.js index 85774717be..fa2b11a004 100644 --- a/test/helpers/test-spawning-sails-lift-child-process-in-cwd.js +++ b/test/helpers/test-spawning-sails-lift-child-process-in-cwd.js @@ -4,7 +4,7 @@ var path = require('path'); var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var MProcess = require('machinepack-process'); var testSpawningSailsChildProcessInCwd = require('./test-spawning-sails-child-process-in-cwd'); diff --git a/test/hooks/http/initialize.test.js b/test/hooks/http/initialize.test.js index f2acbdcd0f..18ca70e06c 100644 --- a/test/hooks/http/initialize.test.js +++ b/test/hooks/http/initialize.test.js @@ -6,7 +6,7 @@ var assert = require('assert'); var util = require('util'); var Sails = require('../../../lib').Sails; var $Router = require('../../helpers/router'); -var request = require('request'); +var request = require('@sailshq/request'); describe('HTTP hook', function (){ diff --git a/test/hooks/views/skipAssets.test.js b/test/hooks/views/skipAssets.test.js index 96c96c97c6..fd7e2e5e10 100644 --- a/test/hooks/views/skipAssets.test.js +++ b/test/hooks/views/skipAssets.test.js @@ -6,7 +6,7 @@ var path = require('path'); var util = require('util'); var _ = require('@sailshq/lodash'); var tmp = require('tmp'); -var request = require('request'); +var request = require('@sailshq/request'); var MProcess = require('machinepack-process'); var MFilesystem = require('machinepack-fs'); var testSpawningSailsLiftChildProcessInCwd = require('../../helpers/test-spawning-sails-lift-child-process-in-cwd'); diff --git a/test/integration/helpers/httpHelper.js b/test/integration/helpers/httpHelper.js index 085855962d..8be38a86d7 100644 --- a/test/integration/helpers/httpHelper.js +++ b/test/integration/helpers/httpHelper.js @@ -1,4 +1,4 @@ -var request = require('request'); +var request = require('@sailshq/request'); var fs = require('fs'); diff --git a/test/integration/lift.https.test.js b/test/integration/lift.https.test.js index 2e86f16713..de4dbe1919 100644 --- a/test/integration/lift.https.test.js +++ b/test/integration/lift.https.test.js @@ -1,6 +1,6 @@ var assert = require('assert'); var fs = require('fs'); -var request = require('request'); +var request = require('@sailshq/request'); var appHelper = require('./helpers/appHelper'); var path = require('path'); diff --git a/test/integration/lift.test.js b/test/integration/lift.test.js index 63fea0d635..3501ea0cc1 100644 --- a/test/integration/lift.test.js +++ b/test/integration/lift.test.js @@ -5,7 +5,7 @@ var path = require('path'); var util = require('util'); var tmp = require('tmp'); -var request = require('request'); +var request = require('@sailshq/request'); var assert = require('assert'); var _ = require('@sailshq/lodash'); var MProcess = require('machinepack-process'); diff --git a/test/integration/middleware.404.test.js b/test/integration/middleware.404.test.js index 2653566a46..9bc95b7a39 100644 --- a/test/integration/middleware.404.test.js +++ b/test/integration/middleware.404.test.js @@ -1,9 +1,9 @@ var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); var fs = require('fs-extra'); -var request = require('request'); +var request = require('@sailshq/request'); var appHelper = require('./helpers/appHelper'); var path = require('path'); diff --git a/test/integration/middleware.500.test.js b/test/integration/middleware.500.test.js index 3b37c2d674..ae49c3e535 100644 --- a/test/integration/middleware.500.test.js +++ b/test/integration/middleware.500.test.js @@ -1,9 +1,9 @@ var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); var fs = require('fs-extra'); -var request = require('request'); +var request = require('@sailshq/request'); var appHelper = require('./helpers/appHelper'); var path = require('path'); diff --git a/test/integration/middleware.compression.test.js b/test/integration/middleware.compression.test.js index a8ae7731d9..a7202dc393 100644 --- a/test/integration/middleware.compression.test.js +++ b/test/integration/middleware.compression.test.js @@ -1,5 +1,5 @@ var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); diff --git a/test/integration/middleware.cookieParser.test.js b/test/integration/middleware.cookieParser.test.js index 35d5463bbf..6d669fc87c 100644 --- a/test/integration/middleware.cookieParser.test.js +++ b/test/integration/middleware.cookieParser.test.js @@ -3,7 +3,7 @@ */ var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); diff --git a/test/integration/middleware.favicon.test.js b/test/integration/middleware.favicon.test.js index 559cc132f2..19469854f2 100644 --- a/test/integration/middleware.favicon.test.js +++ b/test/integration/middleware.favicon.test.js @@ -1,9 +1,9 @@ var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); var fs = require('fs-extra'); -var request = require('request'); +var request = require('@sailshq/request'); var appHelper = require('./helpers/appHelper'); var path = require('path'); diff --git a/test/integration/middleware.handleBodyParserError.test.js b/test/integration/middleware.handleBodyParserError.test.js index 3f93c965c4..a10b59d7ec 100644 --- a/test/integration/middleware.handleBodyParserError.test.js +++ b/test/integration/middleware.handleBodyParserError.test.js @@ -1,9 +1,9 @@ var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); var fs = require('fs-extra'); -var request = require('request'); +var request = require('@sailshq/request'); var appHelper = require('./helpers/appHelper'); var path = require('path'); diff --git a/test/integration/middleware.sails.test.js b/test/integration/middleware.sails.test.js index de58fa082e..64d1356801 100644 --- a/test/integration/middleware.sails.test.js +++ b/test/integration/middleware.sails.test.js @@ -2,7 +2,7 @@ * Module dependencies */ -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); diff --git a/test/integration/middleware.session.redis.test.js b/test/integration/middleware.session.redis.test.js index 2c9422b213..ceb0eaaeda 100644 --- a/test/integration/middleware.session.redis.test.js +++ b/test/integration/middleware.session.redis.test.js @@ -1,5 +1,5 @@ var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); var cookie = require('cookie'); diff --git a/test/integration/middleware.session.test.js b/test/integration/middleware.session.test.js index b1e87fb649..2b24184870 100644 --- a/test/integration/middleware.session.test.js +++ b/test/integration/middleware.session.test.js @@ -1,5 +1,5 @@ var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); var cookie = require('cookie'); diff --git a/test/integration/middleware.startRequestTimer.test.js b/test/integration/middleware.startRequestTimer.test.js index 4afd5ba1eb..20882913a8 100644 --- a/test/integration/middleware.startRequestTimer.test.js +++ b/test/integration/middleware.startRequestTimer.test.js @@ -1,9 +1,9 @@ var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); var fs = require('fs-extra'); -var request = require('request'); +var request = require('@sailshq/request'); var appHelper = require('./helpers/appHelper'); var path = require('path'); diff --git a/test/integration/middleware.static.test.js b/test/integration/middleware.static.test.js index aa48896e4d..bd3e25daf1 100644 --- a/test/integration/middleware.static.test.js +++ b/test/integration/middleware.static.test.js @@ -3,11 +3,11 @@ */ var _ = require('@sailshq/lodash'); -var request = require('request'); +var request = require('@sailshq/request'); var Sails = require('../../lib').Sails; var assert = require('assert'); var fs = require('fs-extra'); -var request = require('request'); +var request = require('@sailshq/request'); var appHelper = require('./helpers/appHelper'); var path = require('path');