Socket
Socket
Sign inDemoInstall

mongodb-core

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-core - npm Package Compare versions

Comparing version 1.2.10 to 1.2.11

6

HISTORY.md

@@ -0,1 +1,7 @@

1.2.11 08-31-2015
-----------------
- NODE-535 If connectWithNoPrimary is true then primary-only connection is not allowed.
- NODE-534 Passive secondaries are not allowed for secondaryOnlyConnectionAllowed.
- Fixed filtering bug for logging (Issue 30, https://github.com/christkv/mongodb-core/issues/30).
1.2.10 08-14-2015

@@ -2,0 +8,0 @@ -----------------

13

lib/connection/logger.js

@@ -56,4 +56,5 @@ "use strict";

Logger.prototype.debug = function(message, object) {
if(this.isDebug()
&& classFilters[this.className] && (filteredClasses[this.className] || Object.keys(filteredClasses).length == 0)) {
if(this.isDebug()
&& ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
|| (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
var dateTime = new Date().getTime();

@@ -78,3 +79,4 @@ var msg = f("[%s-%s:%s] %s %s", 'DEBUG', this.className, pid, dateTime, message);

if(this.isInfo()
&& classFilters[this.className] && (filteredClasses[this.className] || Object.keys(filteredClasses).length == 0)) {
&& ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
|| (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
var dateTime = new Date().getTime();

@@ -98,4 +100,5 @@ var msg = f("[%s-%s:%s] %s %s", 'INFO', this.className, pid, dateTime, message);

Logger.prototype.error = function(message, object) {
if(this.isError()
&& classFilters[this.className] && (filteredClasses[this.className] || Object.keys(filteredClasses).length == 0)) {
if(this.isError()
&& ((Object.keys(filteredClasses).length > 0 && filteredClasses[this.className])
|| (Object.keys(filteredClasses).length == 0 && classFilters[this.className]))) {
var dateTime = new Date().getTime();

@@ -102,0 +105,0 @@ var msg = f("[%s-%s:%s] %s %s", 'ERROR', this.className, pid, dateTime, message);

@@ -8,3 +8,3 @@ "use strict";

* @param {string} message The error message
* @return {MongoError} A cursor instance
* @return {MongoError} A MongoError instance
*/

@@ -19,5 +19,5 @@ function MongoError(message) {

* Creates a new MongoError object
* @class
* @method
* @param {object} options The error options
* @return {MongoError} A cursor instance
* @return {MongoError} A MongoError instance
*/

@@ -24,0 +24,0 @@ MongoError.create = function(options) {

@@ -450,2 +450,10 @@ "use strict";

self.replSet.emit('joined', 'passive', server);
// If we have secondaryOnlyConnectionAllowed and just a passive it's
// still a valid connection
if(self.secondaryOnlyConnectionAllowed && self.state == CONNECTING) {
self.state = CONNECTED;
self.replSet.emit('connect', self.replSet);
}
return true;

@@ -458,3 +466,3 @@ };

if(self.addSecondary(server)) {
if(self.logger.isInfo()) self.logger.info(f('[%s] promoting %s to passive', self.id, ismaster.me));
if(self.logger.isInfo()) self.logger.info(f('[%s] promoting %s to secondary', self.id, ismaster.me));
self.replSet.emit('joined', 'secondary', server);

@@ -461,0 +469,0 @@

@@ -667,3 +667,4 @@ "use strict";

if(this.s.secondaryOnlyConnectionAllowed) return this.s.replState.isSecondaryConnected();
if(this.s.secondaryOnlyConnectionAllowed
&& this.s.replState.isSecondaryConnected()) return true;
return this.s.replState.isPrimaryConnected();

@@ -670,0 +671,0 @@ }

@@ -138,6 +138,6 @@ "use strict";

var createWireProtocolHandler = function(result) {
// // 3.2 wire protocol handler
// if(result && result.maxWireVersion >= 4) {
// return new ThreeTwoWireProtocolSupport(new TwoSixWireProtocolSupport());
// }
// 3.2 wire protocol handler
if(result && result.maxWireVersion >= 4) {
return new ThreeTwoWireProtocolSupport(new TwoSixWireProtocolSupport());
}

@@ -144,0 +144,0 @@ // 2.6 wire protocol handler

{
"name": "mongodb-core",
"version": "1.2.10",
"version": "1.2.11",
"description": "Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc