loopback-connector-mongodb
Advanced tools
Comparing version 1.4.5 to 1.5.0
@@ -1,4 +0,10 @@ | ||
2014-11-27, Version 1.4.5 | ||
2015-01-14, Version 1.5.0 | ||
========================= | ||
* Fix the test case (Raymond Feng) | ||
* Upgrade to mongodb node driver 2.x (Raymond Feng) | ||
* Fix bad CLA URL in CONTRIBUTING.md (Ryan Graham) | ||
* test: Use mongodb on localhost under CI (Ryan Graham) | ||
@@ -146,2 +152,6 @@ | ||
2014-03-18, Version 1.2.0 | ||
========================= | ||
* Set default options for background/unique (Raymond Feng) | ||
@@ -279,3 +289,3 @@ | ||
2013-09-05, Version strongloopsuite-1.0.0-0 | ||
2013-09-05, Version strongloopsuite-1.0.0-1 | ||
=========================================== | ||
@@ -285,11 +295,5 @@ | ||
2013-09-05, Version strongloopsuite-1.0.0-1 | ||
2013-09-05, Version strongloopsuite-1.0.0-0 | ||
=========================================== | ||
* Updated to use tagged version strongloopsuite-1.0.0-0 of dependencies (cgole) | ||
2013-09-04, Version 1.2.0 | ||
========================= | ||
* First release! |
@@ -17,3 +17,3 @@ ### Contributing ### | ||
* Sign the [Contributor License Agreement](https://cla.strongloop.com/strongloop/loopback-connector-mongodb) | ||
* Sign the [Contributor License Agreement](https://cla.strongloop.com/agreements/strongloop/loopback-connector-mongodb) | ||
@@ -20,0 +20,0 @@ * Submit a pull request through Github. |
@@ -199,5 +199,5 @@ /*! | ||
} | ||
this.collection(model).insert(data, {safe: true}, function (err, m) { | ||
this.collection(model).insert(data, {safe: true}, function (err, result) { | ||
if (self.debug) { | ||
debug('create.callback', model, err, m); | ||
debug('create.callback', model, err, result); | ||
} | ||
@@ -207,3 +207,3 @@ if(err) { | ||
} | ||
idValue = m[0]._id; | ||
idValue = result.ops[0]._id; | ||
var modelClass = self._models[model]; | ||
@@ -251,3 +251,3 @@ var idType = modelClass.properties[idName].type; | ||
} | ||
callback && callback(err, result); | ||
callback && callback(err, result.ops); | ||
}); | ||
@@ -334,6 +334,7 @@ }; | ||
['_id', 'asc'] | ||
], {$set: data}, {upsert: true, new: true}, function (err, object) { | ||
], {$set: data}, {upsert: true, new: true}, function (err, result) { | ||
if (self.debug) { | ||
debug('updateOrCreate.callback', model, id, err, object); | ||
debug('updateOrCreate.callback', model, id, err, result); | ||
} | ||
var object = result.value; | ||
if (!err && !object) { | ||
@@ -365,3 +366,3 @@ // No result | ||
} | ||
callback && callback(err, result); | ||
callback && callback(err, result.ops); | ||
}); | ||
@@ -575,3 +576,4 @@ }; | ||
} | ||
callback && callback(err, result); | ||
var count = result && result.result && result.result.n || 0; | ||
callback && callback(err, count); | ||
}); | ||
@@ -618,6 +620,7 @@ }; | ||
['_id', 'asc'] | ||
], {$set: data}, {}, function (err, object) { | ||
], {$set: data}, {}, function (err, result) { | ||
if (self.debug) { | ||
debug('updateAttributes.callback', model, id, err, object); | ||
debug('updateAttributes.callback', model, id, err, result); | ||
} | ||
var object = result.value; | ||
if (!err && !object) { | ||
@@ -651,6 +654,7 @@ // No result | ||
this.collection(model).update(where, {$set: data}, {multi: true, upsert: false}, | ||
function (err, count) { | ||
function (err, result) { | ||
if (self.debug) { | ||
debug('updateAll.callback', model, where, data, err, count); | ||
debug('updateAll.callback', model, where, data, err, result); | ||
} | ||
var count = result && result.result && result.result.n || 0; | ||
cb && cb(err, count); | ||
@@ -657,0 +661,0 @@ }); |
{ | ||
"name": "loopback-connector-mongodb", | ||
"version": "1.4.5", | ||
"version": "1.5.0", | ||
"description": "LoopBack MongoDB Connector", | ||
@@ -18,11 +18,11 @@ "keywords": [ | ||
"loopback-connector": "1.x", | ||
"mongodb": "~1.4.7", | ||
"async": "~0.9.0", | ||
"debug": "~1.0.2" | ||
"mongodb": "^2.0.13", | ||
"async": "^0.9.0", | ||
"debug": "^2.1.1" | ||
}, | ||
"devDependencies": { | ||
"loopback-datasource-juggler": "^2.10.2", | ||
"loopback-datasource-juggler": "^2.13.0", | ||
"should": "~1.2.2", | ||
"mocha": "~1.20.1", | ||
"rc": "~0.4.0" | ||
"mocha": "^2.1.0", | ||
"rc": "^0.5.5" | ||
}, | ||
@@ -36,6 +36,3 @@ "repository": { | ||
"url": "https://github.com/strongloop/loopback-connector-mongodb/blob/master/LICENSE" | ||
}, | ||
"optionalDependencies": { | ||
"sl-blip": "http://blip.strongloop.com/loopback-connector-mongodb@1.4.5" | ||
} | ||
} |
@@ -91,3 +91,3 @@ // This test written in mocha+should.js | ||
(!!err).should.be.true; | ||
err.message.should.be.equal('failed to connect to [localhost:4]'); | ||
err.message.should.be.equal('connect ECONNREFUSED'); | ||
done(); | ||
@@ -128,3 +128,2 @@ }); | ||
should.not.exist(err); | ||
should.not.exist(person.id); | ||
person._id.should.be.equal(3); | ||
@@ -144,3 +143,2 @@ | ||
should.not.exist(err); | ||
should.not.exist(person.id); | ||
person._id.should.be.equal(4); | ||
@@ -147,0 +145,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
93218
4
19
1684
0
+ Addedbson@1.0.9(transitive)
+ Addedbuffer-shims@1.0.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addedes6-promise@3.2.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedmongodb@2.2.36(transitive)
+ Addedmongodb-core@2.1.20(transitive)
+ Addedprocess-nextick-args@1.0.7(transitive)
+ Addedreadable-stream@2.2.7(transitive)
+ Addedrequire_optional@1.0.1(transitive)
+ Addedresolve-from@2.0.0(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedstring_decoder@1.0.3(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedabort-controller@3.0.0(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbson@0.2.22(transitive)
- Removedbuffer@6.0.3(transitive)
- Removeddebug@1.0.5(transitive)
- Removedevent-target-shim@5.0.1(transitive)
- Removedevents@3.3.0(transitive)
- Removedieee754@1.2.1(transitive)
- Removedkerberos@0.0.11(transitive)
- Removedmongodb@1.4.40(transitive)
- Removednan@1.8.4(transitive)
- Removedprocess@0.11.10(transitive)
- Removedreadable-stream@4.7.0(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
Updatedasync@^0.9.0
Updateddebug@^2.1.1
Updatedmongodb@^2.0.13