mongodb 3.1.0 → 3.1.1
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 +13 -0
- package/README.md +1 -1
- package/lib/collection.js +2 -2
- package/lib/cursor.js +1 -1
- package/lib/db.js +1 -1
- package/lib/operations/collection_ops.js +1 -1
- package/lib/operations/mongo_client_ops.js +6 -8
- package/lib/topologies/server.js +0 -1
- package/package.json +1 -1
- package/yarn.lock +12 -12
package/HISTORY.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
<a name="3.1.1"></a>
|
|
2
|
+
## [3.1.1](https://github.com/mongodb/node-mongodb-native/compare/v3.1.0...v3.1.1) (2018-07-05)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **client-ops:** return transform map to map rather than function ([b8b4bfa](https://github.com/mongodb/node-mongodb-native/commit/b8b4bfa))
|
|
8
|
+
* **collection:** correctly shallow clone passed in options ([2e6c4fa](https://github.com/mongodb/node-mongodb-native/commit/2e6c4fa))
|
|
9
|
+
* **collection:** countDocuments throws error when query doesn't match docs ([4e83556](https://github.com/mongodb/node-mongodb-native/commit/4e83556))
|
|
10
|
+
* **server:** remove unnecessary print statement ([20e11b3](https://github.com/mongodb/node-mongodb-native/commit/20e11b3))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
1
14
|
<a name="3.1.0"></a>
|
|
2
15
|
# [3.1.0](https://github.com/mongodb/node-mongodb-native/compare/v3.0.6...v3.1.0) (2018-06-27)
|
|
3
16
|
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ The official [MongoDB](https://www.mongodb.com/) driver for Node.js. Provides a
|
|
|
15
15
|
| what | where |
|
|
16
16
|
|---------------|------------------------------------------------|
|
|
17
17
|
| documentation | http://mongodb.github.io/node-mongodb-native |
|
|
18
|
-
| api-doc | http://mongodb.github.io/node-mongodb-native/3.
|
|
18
|
+
| api-doc | http://mongodb.github.io/node-mongodb-native/3.1/api |
|
|
19
19
|
| source | https://github.com/mongodb/node-mongodb-native |
|
|
20
20
|
| mongodb | http://www.mongodb.org |
|
|
21
21
|
|
package/lib/collection.js
CHANGED
|
@@ -2039,7 +2039,7 @@ Collection.prototype.mapReduce = function(map, reduce, options, callback) {
|
|
|
2039
2039
|
};
|
|
2040
2040
|
|
|
2041
2041
|
/**
|
|
2042
|
-
* Initiate
|
|
2042
|
+
* Initiate an Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order.
|
|
2043
2043
|
*
|
|
2044
2044
|
* @method
|
|
2045
2045
|
* @param {object} [options] Optional settings.
|
|
@@ -2056,7 +2056,7 @@ Collection.prototype.initializeUnorderedBulkOp = function(options) {
|
|
|
2056
2056
|
};
|
|
2057
2057
|
|
|
2058
2058
|
/**
|
|
2059
|
-
* Initiate an In order bulk write operation
|
|
2059
|
+
* Initiate an In order bulk write operation. Operations will be serially executed in the order they are added, creating a new operation for each switch in types.
|
|
2060
2060
|
*
|
|
2061
2061
|
* @method
|
|
2062
2062
|
* @param {object} [options] Optional settings.
|
package/lib/cursor.js
CHANGED
|
@@ -799,7 +799,7 @@ Cursor.prototype.setReadPreference = function(readPreference) {
|
|
|
799
799
|
|
|
800
800
|
/**
|
|
801
801
|
* Returns an array of documents. The caller is responsible for making sure that there
|
|
802
|
-
* is enough memory to store the results. Note that the array only
|
|
802
|
+
* is enough memory to store the results. Note that the array only contains partial
|
|
803
803
|
* results when this cursor had been previouly accessed. In that case,
|
|
804
804
|
* cursor.rewind() can be used to reset the cursor.
|
|
805
805
|
* @method
|
package/lib/db.js
CHANGED
|
@@ -313,7 +313,7 @@ const collectionKeys = [
|
|
|
313
313
|
Db.prototype.collection = function(name, options, callback) {
|
|
314
314
|
if (typeof options === 'function') (callback = options), (options = {});
|
|
315
315
|
options = options || {};
|
|
316
|
-
Object.assign({}, options);
|
|
316
|
+
options = Object.assign({}, options);
|
|
317
317
|
|
|
318
318
|
// Set the promise library
|
|
319
319
|
options.promiseLibrary = this.s.promiseLibrary;
|
|
@@ -234,7 +234,7 @@ function countDocuments(coll, query, options, callback) {
|
|
|
234
234
|
if (err) return handleCallback(callback, err);
|
|
235
235
|
result.toArray((err, docs) => {
|
|
236
236
|
if (err) handleCallback(err);
|
|
237
|
-
handleCallback(callback, null, docs[0].n);
|
|
237
|
+
handleCallback(callback, null, docs.length ? docs[0].n : 0);
|
|
238
238
|
});
|
|
239
239
|
});
|
|
240
240
|
}
|
|
@@ -508,10 +508,15 @@ function replayEvents(mongoClient, events) {
|
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
+
const LEGACY_OPTIONS_MAP = validOptionNames.reduce((obj, name) => {
|
|
512
|
+
obj[name.toLowerCase()] = name;
|
|
513
|
+
return obj;
|
|
514
|
+
}, {});
|
|
515
|
+
|
|
511
516
|
function transformUrlOptions(_object) {
|
|
512
517
|
let object = Object.assign({ servers: _object.hosts }, _object.options);
|
|
513
518
|
for (let name in object) {
|
|
514
|
-
const camelCaseName =
|
|
519
|
+
const camelCaseName = LEGACY_OPTIONS_MAP[name];
|
|
515
520
|
if (camelCaseName) {
|
|
516
521
|
object[camelCaseName] = object[name];
|
|
517
522
|
}
|
|
@@ -595,11 +600,4 @@ function validOptions(options) {
|
|
|
595
600
|
}
|
|
596
601
|
}
|
|
597
602
|
|
|
598
|
-
function validOptionsLowerCaseToCamelCase() {
|
|
599
|
-
validOptionNames.reduce((obj, name) => {
|
|
600
|
-
obj[name.toLowerCase()] = name;
|
|
601
|
-
return obj;
|
|
602
|
-
}, {});
|
|
603
|
-
}
|
|
604
|
-
|
|
605
603
|
module.exports = { connectOp, logout, validOptions };
|
package/lib/topologies/server.js
CHANGED
package/package.json
CHANGED
package/yarn.lock
CHANGED
|
@@ -218,8 +218,8 @@ base64-js@0.0.8:
|
|
|
218
218
|
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-0.0.8.tgz#1101e9544f4a76b1bc3b26d452ca96d7a35e7978"
|
|
219
219
|
|
|
220
220
|
bcrypt-pbkdf@^1.0.0:
|
|
221
|
-
version "1.0.
|
|
222
|
-
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.
|
|
221
|
+
version "1.0.2"
|
|
222
|
+
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
|
|
223
223
|
dependencies:
|
|
224
224
|
tweetnacl "^0.14.3"
|
|
225
225
|
|
|
@@ -500,8 +500,8 @@ commander@2.9.0:
|
|
|
500
500
|
graceful-readlink ">= 1.0.0"
|
|
501
501
|
|
|
502
502
|
commander@^2.9.0:
|
|
503
|
-
version "2.
|
|
504
|
-
resolved "https://registry.yarnpkg.com/commander/-/commander-2.
|
|
503
|
+
version "2.16.0"
|
|
504
|
+
resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50"
|
|
505
505
|
|
|
506
506
|
commander@~2.8.1:
|
|
507
507
|
version "2.8.1"
|
|
@@ -2298,7 +2298,7 @@ mongodb-core@3.1.0, mongodb-core@^3.0.0-rc0:
|
|
|
2298
2298
|
optionalDependencies:
|
|
2299
2299
|
saslprep "^1.0.0"
|
|
2300
2300
|
|
|
2301
|
-
mongodb-download-url@^0.3.
|
|
2301
|
+
mongodb-download-url@^0.3.3:
|
|
2302
2302
|
version "0.3.3"
|
|
2303
2303
|
resolved "https://registry.yarnpkg.com/mongodb-download-url/-/mongodb-download-url-0.3.3.tgz#e3a8a548f13eb20f5a0cdf863cbc063421a3934c"
|
|
2304
2304
|
dependencies:
|
|
@@ -2355,8 +2355,8 @@ mongodb-version-list@^1.0.0:
|
|
|
2355
2355
|
semver "^5.0.1"
|
|
2356
2356
|
|
|
2357
2357
|
mongodb-version-manager@^1.0.7:
|
|
2358
|
-
version "1.1.
|
|
2359
|
-
resolved "https://registry.yarnpkg.com/mongodb-version-manager/-/mongodb-version-manager-1.1.
|
|
2358
|
+
version "1.1.3"
|
|
2359
|
+
resolved "https://registry.yarnpkg.com/mongodb-version-manager/-/mongodb-version-manager-1.1.3.tgz#7cf543a9b33b663d09cf6f8ca91264b408418209"
|
|
2360
2360
|
dependencies:
|
|
2361
2361
|
ampersand-state "^5.0.1"
|
|
2362
2362
|
async "^2.1.2"
|
|
@@ -2369,7 +2369,7 @@ mongodb-version-manager@^1.0.7:
|
|
|
2369
2369
|
get-mongodb-version "^1.0.0"
|
|
2370
2370
|
lodash.defaults "^4.2.0"
|
|
2371
2371
|
lodash.difference "^4.1.1"
|
|
2372
|
-
mongodb-download-url "^0.3.
|
|
2372
|
+
mongodb-download-url "^0.3.3"
|
|
2373
2373
|
mongodb-version-list "^1.0.0"
|
|
2374
2374
|
semver "^5.3.0"
|
|
2375
2375
|
tildify "^1.2.0"
|
|
@@ -3401,8 +3401,8 @@ uuid@^2.0.1:
|
|
|
3401
3401
|
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
|
|
3402
3402
|
|
|
3403
3403
|
uuid@^3.0.0, uuid@^3.1.0:
|
|
3404
|
-
version "3.3.
|
|
3405
|
-
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.
|
|
3404
|
+
version "3.3.2"
|
|
3405
|
+
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
|
|
3406
3406
|
|
|
3407
3407
|
validate-npm-package-license@^3.0.1:
|
|
3408
3408
|
version "3.0.3"
|
|
@@ -3518,8 +3518,8 @@ yargs@~3.10.0:
|
|
|
3518
3518
|
window-size "0.1.0"
|
|
3519
3519
|
|
|
3520
3520
|
yauzl@^2.4.2:
|
|
3521
|
-
version "2.
|
|
3522
|
-
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.
|
|
3521
|
+
version "2.10.0"
|
|
3522
|
+
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
|
|
3523
3523
|
dependencies:
|
|
3524
3524
|
buffer-crc32 "~0.2.3"
|
|
3525
3525
|
fd-slicer "~1.1.0"
|