Skip to content

Commit 054cbe5

Browse files
authored
fix: update Dependencies (#281)
closes #280
1 parent d78ca69 commit 054cbe5

File tree

5 files changed

+1850
-74
lines changed

5 files changed

+1850
-74
lines changed

packages/mongodb-memory-server-core/package.json

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,38 +31,50 @@
3131
},
3232
"homepage": "https://github.com/nodkz/mongodb-memory-server",
3333
"devDependencies": {
34-
"rimraf": "^3.0.0"
34+
"@types/jest": "25.1.4",
35+
"@types/mongodb": "3.5.2",
36+
"@typescript-eslint/eslint-plugin": "2.23.0",
37+
"@typescript-eslint/parser": "2.23.0",
38+
"cross-env": "^7.0.2",
39+
"eslint": "6.8.0",
40+
"eslint-config-prettier": "6.10.0",
41+
"jest": "^25.1.0",
42+
"lerna": "3.20.2",
43+
"mongodb": "3.5.4",
44+
"rimraf": "^3.0.2",
45+
"ts-jest": "^25.2.1",
46+
"typescript": "^3.8.3"
3547
},
3648
"dependencies": {
3749
"@types/cross-spawn": "^6.0.1",
3850
"@types/debug": "^4.1.5",
3951
"@types/decompress": "^4.2.3",
4052
"@types/dedent": "^0.7.0",
41-
"@types/find-cache-dir": "^2.0.0",
42-
"@types/find-package-json": "^1.1.0",
53+
"@types/find-cache-dir": "^3.2.0",
54+
"@types/find-package-json": "^1.1.1",
4355
"@types/get-port": "^4.0.1",
4456
"@types/lockfile": "^1.0.1",
45-
"@types/md5-file": "^4.0.0",
46-
"@types/mkdirp": "^0.5.2",
57+
"@types/md5-file": "^4.0.1",
58+
"@types/mkdirp": "^1.0.0",
4759
"@types/tmp": "0.1.0",
48-
"@types/uuid": "3.4.6",
60+
"@types/uuid": "7.0.0",
4961
"camelcase": "^5.3.1",
5062
"cross-spawn": "^7.0.1",
5163
"debug": "^4.1.1",
5264
"decompress": "^4.2.0",
5365
"dedent": "^0.7.0",
54-
"find-cache-dir": "3.2.0",
66+
"find-cache-dir": "3.3.1",
5567
"find-package-json": "^1.2.0",
56-
"get-port": "5.0.0",
57-
"https-proxy-agent": "4.0.0",
68+
"get-port": "5.1.1",
69+
"https-proxy-agent": "5.0.0",
5870
"lockfile": "^1.0.4",
5971
"md5-file": "^4.0.0",
60-
"mkdirp": "^0.5.1",
72+
"mkdirp": "^1.0.3",
6173
"tmp": "^0.1.0",
62-
"uuid": "^3.3.3"
74+
"uuid": "^7.0.2"
6375
},
6476
"optionalDependencies": {
65-
"mongodb": "^3.2.7"
77+
"mongodb": "^3.5.4"
6678
},
6779
"scripts": {
6880
"cleanup": "rimraf tmp lib coverage node_modules/.cache",

packages/mongodb-memory-server-core/src/util/MongoBinary.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,7 @@ export default class MongoBinary {
5454
static async getDownloadPath(options: any): Promise<string> {
5555
const { downloadDir, platform, arch, version } = options;
5656
// create downloadDir if not exists
57-
await new Promise((resolve, reject) => {
58-
mkdirp(downloadDir, (err: any) => {
59-
if (err) reject(err);
60-
else resolve();
61-
});
62-
});
57+
await mkdirp(downloadDir);
6358

6459
const lockfile = path.resolve(downloadDir, `${version}.lock`);
6560
// wait lock

packages/mongodb-memory-server-core/src/util/MongoBinaryDownload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import decompress from 'decompress'; // 💩💩💩 this package does not work
88
import MongoBinaryDownloadUrl from './MongoBinaryDownloadUrl';
99
import { DownloadProgressT } from '../types';
1010
import { LATEST_VERSION } from './MongoBinary';
11-
import HttpsProxyAgent from 'https-proxy-agent';
11+
import { HttpsProxyAgent } from 'https-proxy-agent';
1212
import { promisify } from 'util';
1313
import resolveConfig, { envToBool } from './resolve-config';
1414
import debug from 'debug';

packages/mongodb-memory-server-core/src/util/db_util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import uuid from 'uuid/v4';
1+
import { v4 as uuidv4 } from 'uuid';
22

33
/**
44
* Returns a database name string.
55
* @param {string} dbName
66
*/
77
export function generateDbName(dbName?: string): string {
8-
return dbName || uuid();
8+
return dbName || uuidv4();
99
}
1010

1111
/**

0 commit comments

Comments
 (0)