mongodb 3.1.2 → 3.1.3
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 +10 -0
- package/lib/bulk/common.js +3 -6
- package/lib/topologies/topology_base.js +2 -13
- package/package.json +2 -2
package/HISTORY.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
<a name="3.1.3"></a>
|
|
2
|
+
## [3.1.3](https://github.com/mongodb/node-mongodb-native/compare/v3.1.2...v3.1.3) (2018-08-13)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **core:** update to mongodb-core 3.1.2 ([337cb79](https://github.com/mongodb/node-mongodb-native/commit/337cb79))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
<a name="3.1.2"></a>
|
|
2
12
|
## [3.1.2](https://github.com/mongodb/node-mongodb-native/compare/v3.0.6...v3.1.2) (2018-08-13)
|
|
3
13
|
|
package/lib/bulk/common.js
CHANGED
|
@@ -696,14 +696,11 @@ class BulkOperationBase {
|
|
|
696
696
|
const bson = topology.bson;
|
|
697
697
|
|
|
698
698
|
// Set max byte size
|
|
699
|
+
const isMaster = topology.lastIsMaster();
|
|
699
700
|
const maxBatchSizeBytes =
|
|
700
|
-
|
|
701
|
-
? topology.isMasterDoc.maxBsonObjectSize
|
|
702
|
-
: 1024 * 1024 * 16;
|
|
701
|
+
isMaster && isMaster.maxBsonObjectSize ? isMaster.maxBsonObjectSize : 1024 * 1024 * 16;
|
|
703
702
|
const maxWriteBatchSize =
|
|
704
|
-
|
|
705
|
-
? topology.isMasterDoc.maxWriteBatchSize
|
|
706
|
-
: 1000;
|
|
703
|
+
isMaster && isMaster.maxWriteBatchSize ? isMaster.maxWriteBatchSize : 1000;
|
|
707
704
|
|
|
708
705
|
// Get the write concern
|
|
709
706
|
let writeConcern = applyWriteConcern(
|
|
@@ -358,12 +358,8 @@ class TopologyBase extends EventEmitter {
|
|
|
358
358
|
return this.s.coreTopology.lastIsMaster();
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
|
|
362
|
-
return this.s.coreTopology.
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
getConnection(options) {
|
|
366
|
-
return this.s.coreTopology.getConnection(options);
|
|
361
|
+
selectServer(selector, options, callback) {
|
|
362
|
+
return this.s.coreTopology.selectServer(selector, options, callback);
|
|
367
363
|
}
|
|
368
364
|
|
|
369
365
|
/**
|
|
@@ -417,13 +413,6 @@ class TopologyBase extends EventEmitter {
|
|
|
417
413
|
}
|
|
418
414
|
|
|
419
415
|
// Properties
|
|
420
|
-
Object.defineProperty(TopologyBase.prototype, 'isMasterDoc', {
|
|
421
|
-
enumerable: true,
|
|
422
|
-
get: function() {
|
|
423
|
-
return this.s.coreTopology.lastIsMaster();
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
|
|
427
416
|
Object.defineProperty(TopologyBase.prototype, 'bson', {
|
|
428
417
|
enumerable: true,
|
|
429
418
|
get: function() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"description": "The official MongoDB driver for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"official"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"mongodb-core": "3.1.
|
|
16
|
+
"mongodb-core": "3.1.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"bluebird": "3.5.0",
|