mongodb 2.2.23 → 2.2.24
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/HISTORY.md +4 -0
- package/conf.json +4 -1
- package/lib/mongo_client.js +7 -3
- package/package.json +2 -2
package/HISTORY.md
CHANGED
package/conf.json
CHANGED
|
@@ -36,7 +36,10 @@
|
|
|
36
36
|
"node_modules/bson/lib/bson/symbol.js",
|
|
37
37
|
"node_modules/bson/lib/bson/timestamp.js",
|
|
38
38
|
"node_modules/bson/lib/bson/max_key.js",
|
|
39
|
-
"node_modules/bson/lib/bson/min_key.js"
|
|
39
|
+
"node_modules/bson/lib/bson/min_key.js",
|
|
40
|
+
"node_modules/bson/lib/bson/decimal128.js",
|
|
41
|
+
"node_modules/bson/lib/bson/int_32.js",
|
|
42
|
+
"node_modules/bson/lib/bson/regexp.js"
|
|
40
43
|
]
|
|
41
44
|
},
|
|
42
45
|
"templates": {
|
package/lib/mongo_client.js
CHANGED
|
@@ -34,7 +34,7 @@ var validOptionNames = ['poolSize', 'ssl', 'sslValidate', 'sslCA', 'sslCert',
|
|
|
34
34
|
'serializeFunctions', 'ignoreUndefined', 'raw', 'promoteLongs', 'bufferMaxEntries',
|
|
35
35
|
'readPreference', 'pkFactory', 'promiseLibrary', 'readConcern', 'maxStalenessSeconds',
|
|
36
36
|
'loggerLevel', 'logger', 'promoteValues', 'promoteBuffers', 'promoteLongs',
|
|
37
|
-
'domainsEnabled', 'keepAliveInitialDelay', 'checkServerIdentity'];
|
|
37
|
+
'domainsEnabled', 'keepAliveInitialDelay', 'checkServerIdentity', 'validateOptions'];
|
|
38
38
|
var ignoreOptionNames = ['native_parser'];
|
|
39
39
|
var legacyOptionNames = ['server', 'replset', 'replSet', 'mongos', 'db'];
|
|
40
40
|
|
|
@@ -46,11 +46,13 @@ function validOptions(options) {
|
|
|
46
46
|
continue;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
if(_validOptions.indexOf(name) == -1) {
|
|
49
|
+
if(_validOptions.indexOf(name) == -1 && options.validateOptions) {
|
|
50
50
|
return new MongoError(f('option %s is not supported', name));
|
|
51
|
+
} else if(_validOptions.indexOf(name) == -1) {
|
|
52
|
+
console.warn(f('the options [%s] is not supported', name));
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
if(legacyOptionNames.indexOf(name)
|
|
55
|
+
if(legacyOptionNames.indexOf(name) != -1) {
|
|
54
56
|
console.warn(f('the server/replset/mongos options are deprecated, '
|
|
55
57
|
+ 'all their options are supported at the top level of the options object [%s]', validOptionNames));
|
|
56
58
|
}
|
|
@@ -121,6 +123,7 @@ function MongoClient() {
|
|
|
121
123
|
* @param {number} [options.maxStalenessSeconds=undefined] The max staleness to secondary reads (values under 10 seconds cannot be guaranteed);
|
|
122
124
|
* @param {string} [options.loggerLevel=undefined] The logging level (error/warn/info/debug)
|
|
123
125
|
* @param {object} [options.logger=undefined] Custom logger object
|
|
126
|
+
* @param {object} [options.validateOptions=false] Validate MongoClient passed in options for correctness.
|
|
124
127
|
* @param {MongoClient~connectCallback} [callback] The command result callback
|
|
125
128
|
* @return {Promise} returns Promise if no callback passed
|
|
126
129
|
*/
|
|
@@ -181,6 +184,7 @@ var define = MongoClient.define = new Define('MongoClient', MongoClient, false);
|
|
|
181
184
|
* @param {number} [options.maxStalenessSeconds=undefined] The max staleness to secondary reads (values under 10 seconds cannot be guaranteed);
|
|
182
185
|
* @param {string} [options.loggerLevel=undefined] The logging level (error/warn/info/debug)
|
|
183
186
|
* @param {object} [options.logger=undefined] Custom logger object
|
|
187
|
+
* @param {object} [options.validateOptions=false] Validate MongoClient passed in options for correctness.
|
|
184
188
|
* @param {MongoClient~connectCallback} [callback] The command result callback
|
|
185
189
|
* @return {Promise} returns Promise if no callback passed
|
|
186
190
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.24",
|
|
4
4
|
"description": "The official MongoDB driver for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"JSONStream": "^1.0.7",
|
|
22
22
|
"betterbenchmarks": "^0.1.0",
|
|
23
23
|
"bluebird": "3.4.6",
|
|
24
|
-
"bson": "
|
|
24
|
+
"bson": "latest",
|
|
25
25
|
"cli-table": "^0.3.1",
|
|
26
26
|
"co": "4.6.0",
|
|
27
27
|
"colors": "^1.1.2",
|