Skip to content

Commit f79e000

Browse files
committed
Bump mongodb to 6.5.0
1 parent 83c1202 commit f79e000

7 files changed

+2034
-813
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The MongoDB transport takes the following options. Only option `db` is required:
5757
| ------ | :----------------------------------------------- |
5858
| db | **REQUIRED**. MongoDB connection uri, pre-connected `MongoClient` object or promise which resolves to a pre-connected `MongoClient` object. |
5959
| dbname | The database name to connect to, defaults to DB name based on connection URI if not provided, ignored if using a pre-connected connection. |
60-
| options| MongoDB connection parameters.<br/>Defaults to `{poolSize: 2, autoReconnect: true, useNewUrlParser: true}`). |
60+
| options| MongoDB connection parameters.<br/>Defaults to `{maxPoolSize: 2}`). |
6161
| collection | The name of the collection you want to store log messages in.<br/>Defaults to `log`. |
6262
| level | Level of messages that this transport should log.<br/>Defaults to `info`. |
6363
| silent | Boolean flag indicating whether to suppress output.<br/>Defaults to `false`. |

lib/helpers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @author [email protected] (Yurij Mikhalevich)
66
*/
77
'use strict';
8-
const ObjectID = require('mongodb').ObjectID;
8+
const ObjectId = require('mongodb').ObjectId;
99

1010

1111
/**
@@ -28,7 +28,7 @@ exports.prepareMetaData = meta => {
2828
*/
2929
function cloneMeta(node, optParents) {
3030
if (!((node !== null && typeof node === 'object') || typeof node === 'function')
31-
|| (node instanceof ObjectID) || (node instanceof Buffer)) {
31+
|| (node instanceof ObjectId) || (node instanceof Buffer)) {
3232
return node;
3333
}
3434
let copy = Array.isArray(node) ? [] : {};

lib/winston-mongodb.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ const MongoDB = exports.MongoDB = function (options) {
6666
this.options = options.options;
6767
if (!this.options) {
6868
this.options = {
69-
poolSize: 2,
70-
autoReconnect: true,
71-
useNewUrlParser: true
69+
maxPoolSize: 2
7270
};
7371
}
7472
this.collection = (options.collection || 'log');

0 commit comments

Comments
 (0)