Skip to content

Commit

Permalink
Bump mongodb to 6.5.0 (#290)
Browse files Browse the repository at this point in the history
* Bump mongodb to 6.5.0

* Added ip as dev package
  • Loading branch information
Bharat94389 authored Sep 16, 2024
1 parent 83c1202 commit da74841
Show file tree
Hide file tree
Showing 7 changed files with 1,805 additions and 576 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The MongoDB transport takes the following options. Only option `db` is required:
| ------ | :----------------------------------------------- |
| db | **REQUIRED**. MongoDB connection uri, pre-connected `MongoClient` object or promise which resolves to a pre-connected `MongoClient` object. |
| 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. |
| options| MongoDB connection parameters.<br/>Defaults to `{poolSize: 2, autoReconnect: true, useNewUrlParser: true}`). |
| options| MongoDB connection parameters.<br/>Defaults to `{maxPoolSize: 2}`). |
| collection | The name of the collection you want to store log messages in.<br/>Defaults to `log`. |
| level | Level of messages that this transport should log.<br/>Defaults to `info`. |
| silent | Boolean flag indicating whether to suppress output.<br/>Defaults to `false`. |
Expand Down
4 changes: 2 additions & 2 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @author 0@39.yt (Yurij Mikhalevich)
*/
'use strict';
const ObjectID = require('mongodb').ObjectID;
const ObjectId = require('mongodb').ObjectId;


/**
Expand All @@ -28,7 +28,7 @@ exports.prepareMetaData = meta => {
*/
function cloneMeta(node, optParents) {

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (20, v5.0-latest)

Function 'cloneMeta' has too many statements (22). Maximum allowed is 15

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (20, v5.0-latest)

Function 'cloneMeta' has a complexity of 18. Maximum allowed is 11

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (20, v4.4-latest)

Function 'cloneMeta' has too many statements (22). Maximum allowed is 15

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (20, v4.4-latest)

Function 'cloneMeta' has a complexity of 18. Maximum allowed is 11

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (20, v6.0-latest)

Function 'cloneMeta' has too many statements (22). Maximum allowed is 15

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (20, v6.0-latest)

Function 'cloneMeta' has a complexity of 18. Maximum allowed is 11

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (16, v5.0-latest)

Function 'cloneMeta' has too many statements (22). Maximum allowed is 15

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (16, v5.0-latest)

Function 'cloneMeta' has a complexity of 18. Maximum allowed is 11

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (16, v4.4-latest)

Function 'cloneMeta' has too many statements (22). Maximum allowed is 15

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (16, v4.4-latest)

Function 'cloneMeta' has a complexity of 18. Maximum allowed is 11

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (18, v4.4-latest)

Function 'cloneMeta' has too many statements (22). Maximum allowed is 15

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (18, v4.4-latest)

Function 'cloneMeta' has a complexity of 18. Maximum allowed is 11

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (16, v6.0-latest)

Function 'cloneMeta' has too many statements (22). Maximum allowed is 15

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (16, v6.0-latest)

Function 'cloneMeta' has a complexity of 18. Maximum allowed is 11

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (18, v6.0-latest)

Function 'cloneMeta' has too many statements (22). Maximum allowed is 15

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (18, v6.0-latest)

Function 'cloneMeta' has a complexity of 18. Maximum allowed is 11

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (18, v5.0-latest)

Function 'cloneMeta' has too many statements (22). Maximum allowed is 15

Check warning on line 29 in lib/helpers.js

View workflow job for this annotation

GitHub Actions / unit-tests (18, v5.0-latest)

Function 'cloneMeta' has a complexity of 18. Maximum allowed is 11
if (!((node !== null && typeof node === 'object') || typeof node === 'function')
|| (node instanceof ObjectID) || (node instanceof Buffer)) {
|| (node instanceof ObjectId) || (node instanceof Buffer)) {
return node;
}
let copy = Array.isArray(node) ? [] : {};
Expand Down
4 changes: 1 addition & 3 deletions lib/winston-mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ const MongoDB = exports.MongoDB = function (options) {
this.options = options.options;
if (!this.options) {
this.options = {
poolSize: 2,
autoReconnect: true,
useNewUrlParser: true
maxPoolSize: 2
};
}
this.collection = (options.collection || 'log');
Expand Down
Loading

0 comments on commit da74841

Please sign in to comment.