mongodb 3.1.9 → 3.1.10

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,21 @@
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.1.10"></a>
6
+ ## [3.1.10](https://github.com/mongodb/node-mongodb-native/compare/v3.1.9...v3.1.10) (2018-11-16)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **auth:** remember to default to admin database ([c7dec28](https://github.com/mongodb/node-mongodb-native/commit/c7dec28))
12
+
13
+
14
+ ### Features
15
+
16
+ * **core:** update to mongodb-core v3.1.9 ([bd3355b](https://github.com/mongodb/node-mongodb-native/commit/bd3355b))
17
+
18
+
19
+
5
20
  <a name="3.1.9"></a>
6
21
  ## [3.1.9](https://github.com/mongodb/node-mongodb-native/compare/v3.1.8...v3.1.9) (2018-11-06)
7
22
 
@@ -109,7 +109,7 @@ const validOptions = require('./operations/mongo_client_ops').validOptions;
109
109
  * @param {boolean} [options.auto_reconnect=true] Enable auto reconnecting for single server instances
110
110
  * @param {boolean} [options.monitorCommands=false] Enable command monitoring for this client
111
111
  * @param {number} [options.minSize] If present, the connection pool will be initialized with minSize connections, and will never dip below minSize connections
112
- * @param {boolean} [options.useNewUrlParser=false] Determines whether or not to use the new url parser
112
+ * @param {boolean} [options.useNewUrlParser=false] Determines whether or not to use the new url parser. Enables the new, spec-compliant, url parser shipped in the core driver. This url parser fixes a number of problems with the original parser, and aims to outright replace that parser in the near future.
113
113
  * @param {MongoClient~connectCallback} [callback] The command result callback
114
114
  * @return {MongoClient} a MongoClient instance
115
115
  */
@@ -560,6 +560,10 @@ function transformUrlOptions(_object) {
560
560
  object.auth = auth;
561
561
  object.user = auth.username;
562
562
  }
563
+
564
+ if (auth.db) {
565
+ object.authSource = object.authSource || auth.db;
566
+ }
563
567
  }
564
568
 
565
569
  if (_object.defaultDatabase) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongodb",
3
- "version": "3.1.9",
3
+ "version": "3.1.10",
4
4
  "description": "The official MongoDB driver for Node.js",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -17,7 +17,7 @@
17
17
  "official"
18
18
  ],
19
19
  "dependencies": {
20
- "mongodb-core": "3.1.8",
20
+ "mongodb-core": "3.1.9",
21
21
  "safe-buffer": "^5.1.2"
22
22
  },
23
23
  "devDependencies": {