From d033bb52b3c1c37b3152c6258e5f54e2465701b9 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 7 Jan 2025 15:22:26 +0800 Subject: [PATCH] fix: update mongodb binary version to 6 --- __tests__/setup/.test-env | 2 +- __tests__/setup/database.js | 2 +- package-lock.json | 97 ++++++++++++++++++++++++------------- package.json | 2 +- 4 files changed, 65 insertions(+), 38 deletions(-) diff --git a/__tests__/setup/.test-env b/__tests__/setup/.test-env index 552f85f4b1..9f82d34d31 100644 --- a/__tests__/setup/.test-env +++ b/__tests__/setup/.test-env @@ -63,7 +63,7 @@ PAYMENT_PROOF_S3_BUCKET=local-payment-proof-bucket NODE_ENV=test FORMSG_SDK_MODE=test -MONGO_BINARY_VERSION=4.0.22 +MONGO_BINARY_VERSION=6.0.19 MOCK_WEBHOOK_CONFIG_FILE=webhook-server-config.csv MOCK_WEBHOOK_PORT=4000 diff --git a/__tests__/setup/database.js b/__tests__/setup/database.js index dca8bcd048..ae6ec57654 100644 --- a/__tests__/setup/database.js +++ b/__tests__/setup/database.js @@ -4,7 +4,7 @@ class MemoryDatabaseServer { constructor() { this.mongod = new MongoMemoryServer({ binary: { - version: process.env.MONGO_BINARY_VERSION || '4.0.22', + version: process.env.MONGO_BINARY_VERSION || '6.0.19', checkMD5: true, }, instance: {}, diff --git a/package-lock.json b/package-lock.json index 4475a629e1..7533a0b42a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,7 +69,7 @@ "libphonenumber-js": "^1.10.59", "lodash": "^4.17.21", "moment-timezone": "0.5.41", - "mongodb-memory-server-core": "^9.1.7", + "mongodb-memory-server-core": "^9.5.0", "mongodb-uri": "^0.9.7", "mongoose": "^6.12.0", "multer": "^1.4.5-lts.1", @@ -14164,9 +14164,9 @@ "license": "MIT" }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", @@ -19612,34 +19612,31 @@ } }, "node_modules/mongodb-memory-server-core": { - "version": "9.1.7", - "resolved": "https://registry.npmjs.org/mongodb-memory-server-core/-/mongodb-memory-server-core-9.1.7.tgz", - "integrity": "sha512-q8geqCmt5hGuxaDhRo03ZUB0ITr6lnJ3jffdNiC4nDq13WbHUfY2A1RQq3OHDbdrY6aRYvZphx2bcXYBFRis3A==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/mongodb-memory-server-core/-/mongodb-memory-server-core-9.5.0.tgz", + "integrity": "sha512-Jb/V80JeYAKWaF4bPFme7SmTR6ew1PWgkpPUepLDfRraeN49i1cruxICeA4zz4T33W/o31N+zazP8wI8ebf7yw==", "dependencies": { - "async-mutex": "^0.4.0", + "async-mutex": "^0.4.1", "camelcase": "^6.3.0", - "debug": "^4.3.4", + "debug": "^4.3.7", "find-cache-dir": "^3.3.2", - "follow-redirects": "^1.15.3", - "https-proxy-agent": "^7.0.2", - "mongodb": "^5.9.1", + "follow-redirects": "^1.15.9", + "https-proxy-agent": "^7.0.5", + "mongodb": "^5.9.2", "new-find-package-json": "^2.0.0", - "semver": "^7.5.4", - "tar-stream": "^3.0.0", - "tslib": "^2.6.2", - "yauzl": "^2.10.0" + "semver": "^7.6.3", + "tar-stream": "^3.1.7", + "tslib": "^2.6.3", + "yauzl": "^3.1.3" }, "engines": { "node": ">=14.20.1" } }, "node_modules/mongodb-memory-server-core/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "dependencies": { - "debug": "^4.3.4" - }, + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", "engines": { "node": ">= 14" } @@ -19654,6 +19651,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mongodb-memory-server-core/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/mongodb-memory-server-core/node_modules/find-cache-dir": { "version": "3.3.2", "license": "MIT", @@ -19670,11 +19683,11 @@ } }, "node_modules/mongodb-memory-server-core/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "4" }, "engines": { @@ -19702,6 +19715,11 @@ "semver": "bin/semver.js" } }, + "node_modules/mongodb-memory-server-core/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/mongodb-memory-server-core/node_modules/pkg-dir": { "version": "4.2.0", "license": "MIT", @@ -19713,12 +19731,9 @@ } }, "node_modules/mongodb-memory-server-core/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "bin": { "semver": "bin/semver.js" }, @@ -19727,9 +19742,21 @@ } }, "node_modules/mongodb-memory-server-core/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/mongodb-memory-server-core/node_modules/yauzl": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.2.0.tgz", + "integrity": "sha512-Ow9nuGZE+qp1u4JIPvg+uCiUr7xGQWdff7JQSk5VGYTAZMDe2q8lxJ10ygv10qmSj031Ty/6FNJpLO4o1Sgc+w==", + "dependencies": { + "buffer-crc32": "~0.2.3", + "pend": "~1.2.0" + }, + "engines": { + "node": ">=12" + } }, "node_modules/mongodb-uri": { "version": "0.9.7", diff --git a/package.json b/package.json index 5af2f59281..0e6cfb4390 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "libphonenumber-js": "^1.10.59", "lodash": "^4.17.21", "moment-timezone": "0.5.41", - "mongodb-memory-server-core": "^9.1.7", + "mongodb-memory-server-core": "^9.5.0", "mongodb-uri": "^0.9.7", "mongoose": "^6.12.0", "multer": "^1.4.5-lts.1",