diff --git a/package.json b/package.json index 37e12768d30..0e962e8e48a 100644 --- a/package.json +++ b/package.json @@ -297,9 +297,8 @@ "jest-json-schema": "^6.1.0", "jest-watch-typeahead": "^2.2.2", "mini-css-extract-plugin": "^2.9.4", - "mock-express-request": "^0.2.0", - "mock-express-response": "^0.3.0", "node-fetch": "^3.3.2", + "node-mocks-http": "^1.17.2", "nodemon": "^3.1.10", "pino-devtools": "^2.8.0", "pino-pretty": "^13.1.1", diff --git a/tests/unit/amo/middleware/test_HstsMiddleware.js b/tests/unit/amo/middleware/test_HstsMiddleware.js index 546c71ce330..4e59bd0d486 100644 --- a/tests/unit/amo/middleware/test_HstsMiddleware.js +++ b/tests/unit/amo/middleware/test_HstsMiddleware.js @@ -1,5 +1,4 @@ -import MockExpressRequest from 'mock-express-request'; -import MockExpressResponse from 'mock-express-response'; +import httpMocks from 'node-mocks-http'; import { hsts } from 'amo/middleware'; @@ -7,8 +6,8 @@ describe(__filename, () => { it('provides the expected HSTS headers', () => { const middleware = hsts(); const nextSpy = sinon.stub(); - const req = new MockExpressRequest(); - const res = new MockExpressResponse(); + const req = httpMocks.createRequest(); + const res = httpMocks.createResponse(); middleware(req, res, nextSpy); diff --git a/tests/unit/amo/middleware/test_cspMiddleware.js b/tests/unit/amo/middleware/test_cspMiddleware.js index e7233e99444..c48ee3e0ac8 100644 --- a/tests/unit/amo/middleware/test_cspMiddleware.js +++ b/tests/unit/amo/middleware/test_cspMiddleware.js @@ -1,5 +1,4 @@ -import MockExpressRequest from 'mock-express-request'; -import MockExpressResponse from 'mock-express-response'; +import httpMocks from 'node-mocks-http'; import parse from 'content-security-policy-parser'; import { csp } from 'amo/middleware'; @@ -122,8 +121,8 @@ describe(__filename, () => { const config = require('config'); const middleware = csp({ _config: config }); const nextSpy = sinon.stub(); - const req = new MockExpressRequest(); - const res = new MockExpressResponse(); + const req = httpMocks.createRequest(); + const res = httpMocks.createResponse(); middleware(req, res, nextSpy); const cspHeader = res.get('content-security-policy'); const policy = parse(cspHeader); @@ -140,8 +139,8 @@ describe(__filename, () => { const middleware = csp({ _config: getFakeConfig({ CSP: false }), _log }); const nextSpy = sinon.stub(); - const req = new MockExpressRequest(); - const res = new MockExpressResponse(); + const req = httpMocks.createRequest(); + const res = httpMocks.createResponse(); middleware(req, res, nextSpy); @@ -157,8 +156,8 @@ describe(__filename, () => { const middleware = csp({ _config: getFakeConfig({ CSP: false }), _log }); const nextSpy = sinon.stub(); - const req = new MockExpressRequest(); - const res = new MockExpressResponse(); + const req = httpMocks.createRequest(); + const res = httpMocks.createResponse(); middleware(req, res, nextSpy); diff --git a/tests/unit/amo/middleware/test_frameguardMiddleware.js b/tests/unit/amo/middleware/test_frameguardMiddleware.js index e7f36411ff2..0982f007508 100644 --- a/tests/unit/amo/middleware/test_frameguardMiddleware.js +++ b/tests/unit/amo/middleware/test_frameguardMiddleware.js @@ -1,5 +1,4 @@ -import MockExpressRequest from 'mock-express-request'; -import MockExpressResponse from 'mock-express-response'; +import httpMocks from 'node-mocks-http'; import { frameguard } from 'amo/middleware'; @@ -17,8 +16,8 @@ describe(__filename, () => { const conf = require('config'); const middleware = frameguard({ _config: conf }); const nextSpy = sinon.stub(); - const req = new MockExpressRequest(); - const res = new MockExpressResponse(); + const req = httpMocks.createRequest(); + const res = httpMocks.createResponse(); middleware(req, res, nextSpy); expect(res.get('x-frame-options')).toEqual('DENY'); sinon.assert.calledOnce(nextSpy); diff --git a/tests/unit/amo/middleware/test_requestId.js b/tests/unit/amo/middleware/test_requestId.js index 7dd4ba46da4..727bf3ca3cf 100644 --- a/tests/unit/amo/middleware/test_requestId.js +++ b/tests/unit/amo/middleware/test_requestId.js @@ -1,16 +1,15 @@ /** * @jest-environment node */ -import MockExpressRequest from 'mock-express-request'; -import MockExpressResponse from 'mock-express-response'; +import httpMocks from 'node-mocks-http'; import { AMO_REQUEST_ID_HEADER } from 'amo/constants'; import requestId from 'amo/middleware/requestId'; describe(__filename, () => { function _requestId({ - req = new MockExpressRequest(), - res = new MockExpressResponse(), + req = httpMocks.createRequest(), + res = httpMocks.createResponse(), next = sinon.stub(), _httpContext = { set: sinon.stub(), @@ -20,7 +19,7 @@ describe(__filename, () => { } it('adds a generated request ID to the HTTP context and response', () => { - const res = new MockExpressResponse(); + const res = httpMocks.createResponse(); const next = sinon.stub(); const _httpContext = { set: sinon.stub(), @@ -38,8 +37,8 @@ describe(__filename, () => { }); it('uses the request ID from the request when available', () => { - const req = new MockExpressRequest(); - const res = new MockExpressResponse(); + const req = httpMocks.createRequest(); + const res = httpMocks.createResponse(); const _httpContext = { set: sinon.stub(), }; @@ -54,7 +53,7 @@ describe(__filename, () => { }); it('ensures the request has AMO_REQUEST_ID_HEADER', () => { - const req = new MockExpressRequest(); + const req = httpMocks.createRequest(); expect(req.get(AMO_REQUEST_ID_HEADER)).not.toBeDefined(); _requestId({ req }); diff --git a/tests/unit/amo/utils/test_server.js b/tests/unit/amo/utils/test_server.js index 49a8a16676a..6a7672f59e8 100644 --- a/tests/unit/amo/utils/test_server.js +++ b/tests/unit/amo/utils/test_server.js @@ -1,7 +1,8 @@ import path from 'path'; +import EventEmitter from 'events'; import fs from 'fs-extra'; -import MockExpressResponse from 'mock-express-response'; +import httpMocks from 'node-mocks-http'; import { viewFrontendVersionHandler, @@ -19,16 +20,16 @@ describe(__filename, () => { const _config = getFakeConfig({ basePath }); const handler = viewFrontendVersionHandler({ _config }); - const res = new MockExpressResponse(); + const res = httpMocks.createResponse({ + eventEmitter: EventEmitter, + }); handler(null, res); - res.on('finish', () => { + res.on('end', () => { expect(res.statusCode).toEqual(200); - expect(res.get('content-type')).toEqual( - 'application/json; charset=utf-8', - ); + expect(res.get('content-type')).toEqual('application/json'); expect(res.get('access-control-allow-origin')).toEqual('*'); - expect(res._getJSON()).toMatchObject(versionJson); + expect(res._getJSONData()).toMatchObject(versionJson); done(); }); @@ -50,11 +51,13 @@ describe(__filename, () => { ); const handler = viewFrontendVersionHandler({ _config }); - const res = new MockExpressResponse(); + const res = httpMocks.createResponse({ + eventEmitter: EventEmitter, + }); handler(null, res); - res.on('finish', () => { - expect(res._getJSON()).toMatchObject({ + res.on('end', () => { + expect(res._getJSONData()).toMatchObject({ ...versionJson, experiments, feature_flags: { @@ -73,10 +76,12 @@ describe(__filename, () => { const handler = viewFrontendVersionHandler({ _config, _log }); - const res = new MockExpressResponse(); + const res = httpMocks.createResponse({ + eventEmitter: EventEmitter, + }); handler(null, res); - res.on('finish', () => { + res.on('end', () => { expect(res.statusCode).toEqual(415); sinon.assert.calledOnce(_log.error); @@ -94,7 +99,7 @@ describe(__filename, () => { const _fetch = jest.fn().mockResolvedValue({ status: 200 }); const handler = viewHeartbeatHandler({ _config, _fetch }); - const res = new MockExpressResponse(); + const res = httpMocks.createResponse(); await handler(null, res); expect(_fetch).toHaveBeenCalledWith( @@ -107,7 +112,7 @@ describe(__filename, () => { const _fetch = jest.fn().mockResolvedValue({ status: 400 }); const handler = viewHeartbeatHandler({ _fetch }); - const res = new MockExpressResponse(); + const res = httpMocks.createResponse(); await handler(null, res); expect(res.statusCode).toEqual(500); @@ -117,7 +122,7 @@ describe(__filename, () => { const _fetch = jest.fn().mockRejectedValue(); const handler = viewHeartbeatHandler({ _fetch }); - const res = new MockExpressResponse(); + const res = httpMocks.createResponse(); await handler(null, res); expect(res.statusCode).toEqual(500); diff --git a/yarn.lock b/yarn.lock index f44f2538dce..8f15c2ccad3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2189,7 +2189,7 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -accepts@^1.3.4: +accepts@^1.3.7: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== @@ -3316,7 +3316,7 @@ confusing-browser-globals@^1.0.10: resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== -content-disposition@^0.5.2: +content-disposition@^0.5.3: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== @@ -3335,7 +3335,7 @@ content-security-policy-parser@^0.6.0: resolved "https://registry.yarnpkg.com/content-security-policy-parser/-/content-security-policy-parser-0.6.0.tgz#b361d8587dee0e92def19d308cb23e8d32cc26f6" integrity sha512-wejtC/p+HLNQ7uaWgg1o3CKHhE8QXC9fJ2GCY0X82L5HUNtZSq1dmUvNSHHEb6R7LS02fpmRBq/vP8i4/+9KCg== -content-type@^1.0.4, content-type@^1.0.5: +content-type@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== @@ -3350,16 +3350,11 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== -cookie-signature@^1.0.6, cookie-signature@^1.2.1: +cookie-signature@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.2.2.tgz#57c7fc3cc293acab9fec54d73e15690ebe4a1793" integrity sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg== -cookie@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - integrity sha512-+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw== - cookie@^0.7.1, cookie@^0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7" @@ -3820,7 +3815,7 @@ depd@2.0.0, depd@^2.0.0, depd@~2.0.0: resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -depd@^1.1.1, depd@~1.1.2: +depd@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== @@ -3830,11 +3825,6 @@ dequal@^2.0.3: resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg== - detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" @@ -4070,11 +4060,6 @@ encodeurl@^2.0.0: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - encoding@^0.1.12: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -4520,7 +4505,7 @@ escalade@^3.2.0: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== -escape-html@^1.0.3, escape-html@~1.0.3: +escape-html@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== @@ -4852,7 +4837,7 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@^1.8.1, etag@~1.8.1: +etag@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== @@ -5210,7 +5195,7 @@ fraction.js@^4.3.7: resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7" integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew== -fresh@0.5.2, fresh@^0.5.2: +fresh@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== @@ -5801,16 +5786,6 @@ http-errors@2.0.0, http-errors@^2.0.0: statuses "2.0.1" toidentifier "1.0.1" -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - http-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" @@ -5971,11 +5946,6 @@ inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== - ini@^1.3.5: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" @@ -7292,7 +7262,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== -lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4: +lodash@^4.17.20, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -7440,6 +7410,11 @@ meow@^10.1.5: type-fest "^1.2.2" yargs-parser "^20.2.9" +merge-descriptors@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== + merge-descriptors@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-2.0.0.tgz#ea922f660635a2249ee565e0449f951e6b603808" @@ -7492,16 +7467,16 @@ mime-types@^3.0.0, mime-types@^3.0.1: dependencies: mime-db "^1.54.0" -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - mime@2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== +mime@^1.3.4: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -7560,50 +7535,6 @@ minipass@^7.1.2: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -mock-express-request@^0.2.0, mock-express-request@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/mock-express-request/-/mock-express-request-0.2.2.tgz#4bb8a2ea055d1c700013542c2d551c11771733f0" - integrity sha512-EymHjY1k1jWIsaVaCsPdFterWO18gcNwQMb99OryhSBtIA33SZJujOLeOe03Rf2DTV997xLPyl2I098WCFm/mA== - dependencies: - accepts "^1.3.4" - fresh "^0.5.2" - lodash "^4.17.4" - mock-req "^0.2.0" - parseurl "^1.3.2" - range-parser "^1.2.0" - type-is "^1.6.15" - -mock-express-response@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/mock-express-response/-/mock-express-response-0.3.0.tgz#d97c299a69b1f813f3a198b78de0359a689ec0d4" - integrity sha512-1rw9Ccd4+7eI8uaM5AX3NCP63o5g5DFLtpusJziPO1b42WTZxgVaN95LsWBJSrpslp6Eg2Qc2xM27wxC7GMeVg== - dependencies: - content-disposition "^0.5.2" - content-type "^1.0.4" - cookie "^0.3.1" - cookie-signature "^1.0.6" - depd "^1.1.1" - escape-html "^1.0.3" - etag "^1.8.1" - mock-express-request "^0.2.2" - mock-res "^0.5.0" - on-finished "^2.3.0" - proxy-addr "^2.0.2" - qs "^6.5.1" - send "^0.16.1" - utils-merge "^1.0.1" - vary "^1.1.2" - -mock-req@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/mock-req/-/mock-req-0.2.0.tgz#749446804d2c006169342ee7be6bba1cffd534c2" - integrity sha512-IUuwS0W5GjoPyjhuXPQJXpaHfHW7UYFRia8Cchm/xRuyDDclpSQdEoakt3krOpSYvgVlQsbnf0ePDsTRDfp7Dg== - -mock-res@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/mock-res/-/mock-res-0.5.0.tgz#98368beb09df753f64f66d94e5536a97b36a2430" - integrity sha512-KBTRmramDPSr1TwsTy54uzm50QUAdyLTy6CXcHwwPN9pMVH90S12rwbAvXf3Bghr2TNPEuLmz227ClR8SIwQNQ== - moment@2.30.1: version "2.30.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" @@ -7716,6 +7647,22 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== +node-mocks-http@^1.17.2: + version "1.17.2" + resolved "https://registry.yarnpkg.com/node-mocks-http/-/node-mocks-http-1.17.2.tgz#e947d9b94defb13e3775414a8200c848f6b2fc74" + integrity sha512-HVxSnjNzE9NzoWMx9T9z4MLqwMpLwVvA0oVZ+L+gXskYXEJ6tFn3Kx4LargoB6ie7ZlCLplv7QbWO6N+MysWGA== + dependencies: + accepts "^1.3.7" + content-disposition "^0.5.3" + depd "^1.1.0" + fresh "^0.5.2" + merge-descriptors "^1.0.1" + methods "^1.1.2" + mime "^1.3.4" + parseurl "^1.3.3" + range-parser "^1.2.0" + type-is "^1.6.18" + node-releases@^2.0.19: version "2.0.19" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" @@ -7909,20 +7856,13 @@ on-exit-leak-free@^2.1.0: resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz#5c703c968f7e7f851885f6459bf8a8a57edc9cc4" integrity sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w== -on-finished@^2.3.0, on-finished@^2.4.1: +on-finished@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== dependencies: ee-first "1.1.1" -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== - dependencies: - ee-first "1.1.1" - on-headers@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.1.0.tgz#59da4f91c45f5f989c6e4bcedc5a3b0aed70ff65" @@ -8069,7 +8009,7 @@ parse5@^7.0.0, parse5@^7.1.1, parse5@^7.2.1: dependencies: entities "^4.5.0" -parseurl@^1.3.2, parseurl@^1.3.3: +parseurl@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== @@ -8678,7 +8618,7 @@ prop-types@15.8.1, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, p object-assign "^4.1.1" react-is "^16.13.1" -proxy-addr@^2.0.2, proxy-addr@^2.0.7: +proxy-addr@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== @@ -8731,7 +8671,7 @@ qhistory@1.1.0: dependencies: invariant "^2.2.2" -qs@6.14.0, qs@^6.1.0, qs@^6.11.2, qs@^6.12.3, qs@^6.14.0, qs@^6.5.1: +qs@6.14.0, qs@^6.1.0, qs@^6.11.2, qs@^6.12.3, qs@^6.14.0: version "6.14.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.14.0.tgz#c63fa40680d2c5c941412a0e899c89af60c0a930" integrity sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w== @@ -8765,7 +8705,7 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -range-parser@^1.2.0, range-parser@^1.2.1, range-parser@~1.2.0: +range-parser@^1.2.0, range-parser@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== @@ -9763,25 +9703,6 @@ semver@^7.3.4, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@^7.6.2, semve resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== -send@^0.16.1: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - send@^1.1.0, send@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/send/-/send-1.2.0.tgz#32a7554fb777b831dfa828370f773a3808d37212" @@ -9871,11 +9792,6 @@ set-proto@^1.0.0: es-errors "^1.3.0" es-object-atoms "^1.0.0" -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - setprototypeof@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" @@ -10119,21 +10035,11 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== - statuses@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382" integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw== -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -10850,7 +10756,7 @@ type-fest@^3.0.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.4.0.tgz#64a35b7748ab4a96b3e0c324475ea66643c5f9df" integrity sha512-PEPg6RHlB9cFwoTMNENNrQFL0cXX04voWr2UPwQBJ3pVs7Mt8Y1oLWdUeMdGEwZE8HFFlujq8gS9enmyiQ8pLg== -type-is@^1.6.15: +type-is@^1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== @@ -11229,11 +11135,6 @@ utila@~0.4: resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" integrity sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA== -utils-merge@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - uuid@11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-11.1.0.tgz#9549028be1753bb934fc96e2bca09bb4105ae912"