diff --git a/history.md b/history.md new file mode 100644 index 0000000..bb13a7f --- /dev/null +++ b/history.md @@ -0,0 +1,12 @@ +# 0.2.3 / 2014-02-11 + +* Changed use of private Mongoose query method `execFind` to public method `exec` +* Now compatible with Mongoose 3.7x and above + +# 0.2.2 / 2013-06-17 + +* Fixed issue to allow count to accept a value of `0` + +# 0.2.1 / 2013-04-23 + +* Initial release to public \ No newline at end of file diff --git a/lib/page.js b/lib/page.js index d48c527..14ad161 100644 --- a/lib/page.js +++ b/lib/page.js @@ -33,7 +33,7 @@ module.exports = function(mongoose) { query .skip(options.start) .limit(options.count) - .execFind(function (err, results) { + .exec(function (err, results) { if (err) { return callback(err); } diff --git a/package.json b/package.json index 370c9be..77cfc14 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name" : "mongoose-middleware", "description" : "Middleware for mongoose that makes filtering, sorting, pagination and projection chainable and simple to apply", - "version" : "0.2.2", + "version" : "0.2.3", "scripts" : { "pretest" : "rm -rf lib-cov ; jshint lib/*.js ; jscoverage lib lib-cov", "test" : "mocha --check-leaks -R spec -r ./test/common.js -u bdd ./test/lib/*.js", @@ -14,7 +14,7 @@ "jshint" : "*", "mocha" : "*", "mocha-lcov-reporter" : "*", - "mongoose" : "~3.6.11" + "mongoose" : "~3.8.7" }, "keywords" : ["mongo", "mongoose", "mongoose middlware", "mongoose-middleware"], "repository" : { diff --git a/test/lib/index.js b/test/lib/index.js index 61fd0d2..de3e760 100644 --- a/test/lib/index.js +++ b/test/lib/index.js @@ -15,7 +15,7 @@ describe('index', function () { countCallback(null, 0); }; - mongoose.Query.prototype.execFind = function (findCallback) { + mongoose.Query.prototype.exec = function (findCallback) { findCallback(null, []); }; diff --git a/test/lib/page.js b/test/lib/page.js index c14e23c..5431e78 100644 --- a/test/lib/page.js +++ b/test/lib/page.js @@ -16,7 +16,7 @@ describe('page', function () { countCallback(countError, total); }; - mongoose.Query.prototype.execFind = function (findCallback) { + mongoose.Query.prototype.exec = function (findCallback) { search = this._conditions; findCallback(execError, []); };