Comparing version 0.9.9 to 1.0.0
@@ -20,2 +20,12 @@ ## [Unreleased] | ||
## [1.0.0] - 2018-07-02 | ||
### Added | ||
- Updated mongodb native release [https://www.npmjs.com/package/mongodb](3.1.0) | ||
### Changed | ||
- Conection handler to make it compatible with new parser from MongoDB Native Driver | ||
## [0.9.9] - 2018-07-02 | ||
@@ -495,2 +505,3 @@ | ||
[1.0.0]: https://github.com/Yonirt/moltyjs/compare/v0.9.9...v1.0.0 | ||
[0.9.9]: https://github.com/Yonirt/moltyjs/compare/v0.9.8...v0.9.9 | ||
@@ -497,0 +508,0 @@ [0.9.8]: https://github.com/Yonirt/moltyjs/compare/v0.9.7...v0.9.8 |
@@ -34,6 +34,10 @@ 'use strict'; | ||
const connectionOptions = Object.assign({}, defaultOptions, options.connection); | ||
const poolOptions = Object.assign({}, defaultOptions, { | ||
uri: options.uri, | ||
engine: options.engine | ||
}); | ||
const uri = connectionOptions.uri; | ||
const uri = options.uri; | ||
const i = uri.indexOf('://'); | ||
@@ -58,6 +62,8 @@ if (i < 0) { | ||
create: () => new Promise((resolve, reject) => { | ||
MongoDBClient.connect(uri, { | ||
//console.log(uri); | ||
MongoDBClient.connect(uri, _extends({ | ||
poolSize: 1, | ||
native_parser: true | ||
}).then(client => { | ||
useNewUrlParser: true | ||
}, options.connection), (err, client) => { | ||
if (err) reject(err); | ||
resolve(client); | ||
@@ -71,3 +77,3 @@ }); | ||
}) | ||
}, connectionOptions); | ||
}, poolOptions); | ||
} | ||
@@ -74,0 +80,0 @@ |
@@ -16,3 +16,2 @@ 'use strict'; | ||
this.connection = null; | ||
this; | ||
@@ -19,0 +18,0 @@ // Binding methods |
{ | ||
"name": "moltyjs", | ||
"version": "0.9.9", | ||
"version": "1.0.0", | ||
"description": "A tiny ODM for MongoDB with multy tenancy support.", | ||
@@ -55,4 +55,4 @@ "main": "lib/index.js", | ||
"mongo-oplog": "^2.1.0", | ||
"mongodb": "^3.0.0-rc0" | ||
"mongodb": "^3.1.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
132013
2453
0
Updatedmongodb@^3.1.0