Comparing version 2.6.3 to 2.6.4
@@ -10,2 +10,6 @@ var Immutable = require('./immutable'); | ||
builder.defineMethod('inspect', function () { | ||
return '[Immutable|bson.ObjectId] ' + data.inspect(); | ||
}); | ||
builder.defineMethod('toHexString', function () { | ||
@@ -22,2 +26,6 @@ return data.toHexString(); | ||
}); | ||
builder.defineProperty('id', function () { | ||
return data.id; | ||
}); | ||
}; |
@@ -181,3 +181,4 @@ var q = require('q'); | ||
if('undefined' !== typeof(obj._id)){ // is not a new object | ||
obj.__original = original.__original || original.toObject(); | ||
obj.__original = original.toObject(); | ||
if(obj.__original.__original){ obj.__original = obj.__original.__original; } | ||
} | ||
@@ -184,0 +185,0 @@ }; |
{ | ||
"name": "cosa", | ||
"version": "2.6.3", | ||
"version": "2.6.4", | ||
"description": "Cosa Models for MongoDB", | ||
@@ -21,14 +21,14 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"bson": "^0.4.11", | ||
"clone": "^1.0.2", | ||
"debug": "^2.1.1", | ||
"defaults": "^1.0.2", | ||
"bson": "1.0.1", | ||
"clone": "^2.1.0", | ||
"debug": "^2.6.0", | ||
"defaults": "^1.0.3", | ||
"error": "^7.0.2", | ||
"etag": "^1.7.0", | ||
"joi": "^6.4.3", | ||
"mongodb": "^2.0.45", | ||
"mongodb-extended-json": "^1.6.0", | ||
"object-assign": "^4.0.1", | ||
"mongodb": "^2.2.16", | ||
"mongodb-extended-json": "^1.9.0", | ||
"object-assign": "^4.1.0", | ||
"object-path": "^0.9.2", | ||
"q": "^1.1.2" | ||
"q": "^1.4.1" | ||
}, | ||
@@ -35,0 +35,0 @@ "devDependencies": { |
@@ -519,3 +519,3 @@ var chai = require('chai'); | ||
newModel = model; | ||
return newModel.set('str', 'test update').save(); | ||
return newModel.set('str', 'test update').set('num', 2).save(); | ||
}) | ||
@@ -797,3 +797,3 @@ .then(function (model) { | ||
expect(result.modifiedCount).to.equal(3); | ||
return FullTestModel.find({}); | ||
return FullTestModel.find({}, { sort: { str: 1 } }); | ||
}) | ||
@@ -804,7 +804,7 @@ .then(function (cursor) { | ||
.then(function (docs) { | ||
expect(docs[0].str).to.equal('foo'); | ||
expect(docs[0].str).to.equal('bar'); | ||
expect(docs[0].any).to.equal('any'); | ||
expect(docs[1].str).to.equal('bar'); | ||
expect(docs[1].str).to.equal('blah'); | ||
expect(docs[1].any).to.equal('any'); | ||
expect(docs[2].str).to.equal('blah'); | ||
expect(docs[2].str).to.equal('foo'); | ||
expect(docs[2].any).to.equal('any'); | ||
@@ -811,0 +811,0 @@ done(); |
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
91500
2623
+ Addedbson@1.0.1(transitive)
+ Addedclone@2.1.2(transitive)
- Removedbson@0.4.231.1.6(transitive)
Updatedbson@1.0.1
Updatedclone@^2.1.0
Updateddebug@^2.6.0
Updateddefaults@^1.0.3
Updatedmongodb@^2.2.16
Updatedmongodb-extended-json@^1.9.0
Updatedobject-assign@^4.1.0
Updatedq@^1.4.1