mongoose-paginate
mongoose-paginate copied to clipboard
ES6 6.0 / Node v4.2.4+ Peer Review for v6.0.0
- mostly ready, needs to return a promise always
- checking for ES5 legacy code
- MORE tests
- 2 space indents on everything
- Documentation - up to date?
If you guys have a few mins! @Jokero @niftylettuce @tsm91 @MatthewRayfield @connected-dalmer @villesau @shime - also please make sure that you are in contributors in package.json
, thanks!
@Jokero - made the changes, need to figure out why tests are failing with some debugging later today. Thanks for the review!
@Jokero Check it out, all tests passing. Looks pretty sexy. We can make some code smaller but it seems to be working great now. Thoughts on release as v6.0.0
?
@Jokero I added back paginate.options, the id field is back. One issue left is the limit : 0
. The test was passing because of how the query was built. I think that no one will ever use limit as zero. Thoughts? Otherwise I think that we're good to go. :8ball:
Also all tests passing except with limit zero.
I use limit: 0
because it's useful in rest api to get only metadata (page, total, but not documents). Maybe anyone else uses this functionality
Yeah limit:0 in MongoDB defaults to all docs as the default behavior. I'll make sure that there is a note of it in the docs.
Pagination is fetching and counting. If we set limit: 0
we disable fetching. It's very cool
@Jokero limit:0 back to original ... :8ball:
Is this due to be merged sometime soon?
Reason being is that I want to start adding a feature but I don't want to do it on the old codebase and end up in merge hell :)
@antony see #93 — wanna continue bringing this PR forward?
Ah that's terrible news. Sorry to hear it.
@simison I can have a look at getting this PR finalised, I'm quite time constrained so I don't know how soon I'll be able to do it, but I'll update this ticket as I progress.