mongodb 2.2.26 → 2.2.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/utils.js CHANGED
@@ -91,25 +91,25 @@ var formattedOrderClause = exports.formattedOrderClause = function(sortValue) {
91
91
 
92
92
  var checkCollectionName = function checkCollectionName (collectionName) {
93
93
  if('string' !== typeof collectionName) {
94
- throw Error("collection name must be a String");
94
+ throw new MongoError("collection name must be a String");
95
95
  }
96
96
 
97
97
  if(!collectionName || collectionName.indexOf('..') != -1) {
98
- throw Error("collection names cannot be empty");
98
+ throw new MongoError("collection names cannot be empty");
99
99
  }
100
100
 
101
101
  if(collectionName.indexOf('$') != -1 &&
102
102
  collectionName.match(/((^\$cmd)|(oplog\.\$main))/) == null) {
103
- throw Error("collection names must not contain '$'");
103
+ throw new MongoError("collection names must not contain '$'");
104
104
  }
105
105
 
106
106
  if(collectionName.match(/^\.|\.$/) != null) {
107
- throw Error("collection names must not start or end with '.'");
107
+ throw new MongoError("collection names must not start or end with '.'");
108
108
  }
109
109
 
110
110
  // Validate that we are not passing 0x00 in the colletion name
111
111
  if(!!~collectionName.indexOf("\x00")) {
112
- throw new Error("collection names cannot contain a null character");
112
+ throw new MongoError("collection names cannot contain a null character");
113
113
  }
114
114
  };
115
115
 
@@ -262,7 +262,7 @@ var mergeOptions = function(target, source) {
262
262
  var translateOptions = function(target, source) {
263
263
  var translations = {
264
264
  // SSL translation options
265
- 'sslCA': 'ca', 'sslCRL': 'crl', 'sslValidate': 'rejectUnauthorized', 'sslKey': 'key',
265
+ 'sslCA': 'ca', 'sslCRL': 'crl', 'sslValidate': 'rejectUnauthorized', 'sslKey': 'key',
266
266
  'sslCert': 'cert', 'sslPass': 'passphrase',
267
267
  // SocketTimeout translation options
268
268
  'socketTimeoutMS': 'socketTimeout', 'connectTimeoutMS': 'connectionTimeout',
@@ -339,7 +339,7 @@ var mergeOptionsAndWriteConcern = function(targetOptions, sourceOptions, keys, m
339
339
  var found = false;
340
340
  for(var i = 0; i < writeConcernKeys.length; i++) {
341
341
  if(targetOptions[writeConcernKeys[i]]) {
342
- found = true;
342
+ found = true;
343
343
  break;
344
344
  }
345
345
  }
@@ -349,7 +349,7 @@ var mergeOptionsAndWriteConcern = function(targetOptions, sourceOptions, keys, m
349
349
  if(sourceOptions[writeConcernKeys[i]]) {
350
350
  targetOptions[writeConcernKeys[i]] = sourceOptions[writeConcernKeys[i]];
351
351
  }
352
- }
352
+ }
353
353
  }
354
354
 
355
355
  return targetOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongodb",
3
- "version": "2.2.26",
3
+ "version": "2.2.30",
4
4
  "description": "The official MongoDB driver for Node.js",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "dependencies": {
16
16
  "es6-promise": "3.2.1",
17
- "mongodb-core": "2.1.10",
17
+ "mongodb-core": "2.1.14",
18
18
  "readable-stream": "2.2.7"
19
19
  },
20
20
  "devDependencies": {