core: update to mongodb5 (#514)

This commit is contained in:
undefined authored and GitHub committed 2023-02-27 18:31:24 +08:00
1 parent 5a02010120
commit 0685b88066
59 files changed
+610 -601

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@ import { Duplex } from 'stream';
import { inspect } from 'util';
import fs from 'fs-extra';
import moment, { isMoment, Moment } from 'moment-timezone';
import { ObjectID } from 'mongodb';
import { ObjectId } from 'mongodb';
import Logger from 'reggol';
export * as yaml from 'js-yaml';
export * as fs from 'fs-extra';
@@ -128,7 +128,7 @@ export namespace Time {
else if (isMoment(timestamp)) _timestamp = timestamp.toDate().getTime();
else _timestamp = timestamp.getTime();
const hexSeconds = Math.floor(_timestamp / 1000).toString(16);
return new ObjectID(`${hexSeconds}${allZero ? '0000000000000000' : new ObjectID().toHexString().substr(8)}`);
return new ObjectId(`${hexSeconds}${allZero ? '0000000000000000' : new ObjectId().toHexString().substr(8)}`);
}
}
+4 -4
View File
@@ -9,14 +9,14 @@
"preferUnplugged": true,
"dependencies": {
"cac": "^6.7.14",
"esbuild": "0.16.16",
"esbuild": "0.17.10",
"fs-extra": "^11.1.0",
"js-yaml": "^4.1.0",
"moment-timezone": "^0.5.40",
"mongodb": "^3.7.3",
"moment-timezone": "^0.5.41",
"mongodb": "^5.1.0",
"reggol": "^1.3.5",
"source-map-support": "^0.5.21",
"systeminformation": "^5.17.9"
"systeminformation": "^5.17.10"
},
"devDependencies": {
"@types/fs-extra": "^11.0.1",