mongodb 3.4.0 → 3.4.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 CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ <a name="3.4.1"></a>
6
+ ## [3.4.1](https://github.com/mongodb/node-mongodb-native/compare/v3.4.0...v3.4.1) (2019-12-19)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **bulk:** use original indexes as map for current op index ([20800ac](https://github.com/mongodb/node-mongodb-native/commit/20800ac))
12
+ * always check for network errors during SCRAM conversation ([e46a70e](https://github.com/mongodb/node-mongodb-native/commit/e46a70e))
13
+
14
+
15
+
5
16
  <a name="3.4.0"></a>
6
17
  # [3.4.0](https://github.com/mongodb/node-mongodb-native/compare/v3.3.5...v3.4.0) (2019-12-10)
7
18
 
@@ -475,7 +475,7 @@ function mergeBatchResults(batch, bulkResult, err, result) {
475
475
  if (Array.isArray(result.writeErrors)) {
476
476
  for (let i = 0; i < result.writeErrors.length; i++) {
477
477
  const writeError = {
478
- index: batch.originalIndexes[i],
478
+ index: batch.originalIndexes[result.writeErrors[i].index],
479
479
  code: result.writeErrors[i].code,
480
480
  errmsg: result.writeErrors[i].errmsg,
481
481
  op: batch.operations[result.writeErrors[i].index]
@@ -236,7 +236,7 @@ class ScramSHA extends AuthProvider {
236
236
  };
237
237
 
238
238
  sendAuthCommand(connection, `${db}.$cmd`, saslContinueCmd, (err, r) => {
239
- if (r && typeof r.ok === 'number' && r.ok === 0) {
239
+ if (err || (r && typeof r.ok === 'number' && r.ok === 0)) {
240
240
  callback(err, r);
241
241
  return;
242
242
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongodb",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "The official MongoDB driver for Node.js",
5
5
  "main": "index.js",
6
6
  "files": [