Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump mongodb driver to 5.9.1 #254

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -26,9 +26,9 @@
* @param {Array} optParents Object's parents
* @returns {Object} Adjusted clone of object
*/
function cloneMeta(node, optParents) {

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, 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 (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 (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, 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

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 (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 (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 (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
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 All @@ -42,7 +42,7 @@
optParents.push(node);
for (const key in node) {
if (!Object.prototype.hasOwnProperty.call(node, key)) {
continue;

Check warning on line 45 in lib/helpers.js

View workflow job for this annotation

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

Unexpected use of continue statement

Check warning on line 45 in lib/helpers.js

View workflow job for this annotation

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

Unexpected use of continue statement

Check warning on line 45 in lib/helpers.js

View workflow job for this annotation

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

Unexpected use of continue statement

Check warning on line 45 in lib/helpers.js

View workflow job for this annotation

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

Unexpected use of continue statement

Check warning on line 45 in lib/helpers.js

View workflow job for this annotation

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

Unexpected use of continue statement

Check warning on line 45 in lib/helpers.js

View workflow job for this annotation

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

Unexpected use of continue statement

Check warning on line 45 in lib/helpers.js

View workflow job for this annotation

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

Unexpected use of continue statement

Check warning on line 45 in lib/helpers.js

View workflow job for this annotation

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

Unexpected use of continue statement

Check warning on line 45 in lib/helpers.js

View workflow job for this annotation

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

Unexpected use of continue statement
}
const value = node[key];
let newKey = key;
Expand Down
3 changes: 1 addition & 2 deletions lib/winston-mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* @param {number} options.expireAfterSeconds Seconds before the entry is removed.
* Do not use if capped is set.
*/
const MongoDB = exports.MongoDB = function (options) {

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (37). Maximum allowed is 15

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has a complexity of 15. Maximum allowed is 11

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (37). Maximum allowed is 15

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has a complexity of 15. Maximum allowed is 11

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (37). Maximum allowed is 15

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has a complexity of 15. Maximum allowed is 11

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (37). Maximum allowed is 15

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has a complexity of 15. Maximum allowed is 11

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (37). Maximum allowed is 15

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has a complexity of 15. Maximum allowed is 11

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (37). Maximum allowed is 15

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has a complexity of 15. Maximum allowed is 11

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (37). Maximum allowed is 15

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has a complexity of 15. Maximum allowed is 11

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (37). Maximum allowed is 15

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has a complexity of 15. Maximum allowed is 11

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (37). Maximum allowed is 15

Check warning on line 57 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has a complexity of 15. Maximum allowed is 11
Transport.call(this, options);
options = (options || {});
if (!options.db) {
Expand All @@ -66,8 +66,7 @@
this.options = options.options;
if (!this.options) {
this.options = {
poolSize: 2,
autoReconnect: true,
maxPoolSize: 2,
useNewUrlParser: true
};
}
Expand All @@ -90,7 +89,7 @@
const self = this;

function setupDatabaseAndEmptyQueue(db) {
return createCollection(db).then(db => {

Check warning on line 92 in lib/winston-mongodb.js

View workflow job for this annotation

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

'db' is already declared in the upper scope on line 91 column 39

Check warning on line 92 in lib/winston-mongodb.js

View workflow job for this annotation

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

'db' is already declared in the upper scope on line 91 column 39

Check warning on line 92 in lib/winston-mongodb.js

View workflow job for this annotation

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

'db' is already declared in the upper scope on line 91 column 39

Check warning on line 92 in lib/winston-mongodb.js

View workflow job for this annotation

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

'db' is already declared in the upper scope on line 91 column 39

Check warning on line 92 in lib/winston-mongodb.js

View workflow job for this annotation

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

'db' is already declared in the upper scope on line 91 column 39

Check warning on line 92 in lib/winston-mongodb.js

View workflow job for this annotation

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

'db' is already declared in the upper scope on line 91 column 39

Check warning on line 92 in lib/winston-mongodb.js

View workflow job for this annotation

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

'db' is already declared in the upper scope on line 91 column 39

Check warning on line 92 in lib/winston-mongodb.js

View workflow job for this annotation

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

'db' is already declared in the upper scope on line 91 column 39

Check warning on line 92 in lib/winston-mongodb.js

View workflow job for this annotation

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

'db' is already declared in the upper scope on line 91 column 39
self.logDb = db;
processOpQueue();
}, err => {
Expand Down Expand Up @@ -289,7 +288,7 @@
* @param {Stream} stream Pass in a pre-existing stream.
* @returns {Stream} Log stream for the transport
*/
MongoDB.prototype.stream = function (options, stream) {

Check warning on line 291 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (17). Maximum allowed is 15

Check warning on line 291 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (17). Maximum allowed is 15

Check warning on line 291 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (17). Maximum allowed is 15

Check warning on line 291 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (17). Maximum allowed is 15

Check warning on line 291 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (17). Maximum allowed is 15

Check warning on line 291 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (17). Maximum allowed is 15

Check warning on line 291 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (17). Maximum allowed is 15

Check warning on line 291 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (17). Maximum allowed is 15

Check warning on line 291 in lib/winston-mongodb.js

View workflow job for this annotation

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

Function has too many statements (17). Maximum allowed is 15
options = options || {};
stream = stream || new Stream();
let start = options.start;
Expand Down
Loading