7.3.1 (2020-08-10)
- bson: fixes regression where string _ids were no longer supported (1487195)
7.3.0 (2020-05-06)
- find: add optional hint parameter for the cursor (17616da)
7.2.1 (2020-05-06)
-
7.2.0 Add support for
COLLATIONconfiguration parameter. -
7.1.0 Add support for
aggregate. -
7.0.1 Update base64-url to fix security issue (mixmaxhq#41 - thanks @pwiebe).
-
7.0.0 Add findWithReq overrideFields support. Breaking: now throws errors on unusable
fields/overrideFields, so check your inputs. Also changes our intersection mechanism, so it could cause backwards-incompatible changes to fields resolution. If causes unexpected backwards-incompatible changes, please file an issue! -
6.3.0 Can be used as a Mongoose plugin
-
6.2.0 Added support for 'after' and 'before' parameters - thanks @lirbank
-
6.1.0 Added support for native mongodb driver (mixmaxhq#24 - thanks @lirbank)
-
6.0.1 Fix issue where calling
findwith a paginated field that has dot notation e.g.start.dateTimeproduces an invalidnexttoken. -
6.0.0 Breaking API change:
mongo-cursor-paginationrequires a Promise enabled mongodb instance frommongoistand returns Promises fromfind,findWithReq, andsearchrather than handling callbacks. Note: Although the library now usesasync/await, it is still useable in node >= 6.9.0. -
5.0.0 Now
50results are returned by default, and up to300results can be returned if thelimitparameter is used. These can be overridden by settingmongoPaging.config.DEFAULT_LIMITandmongoPaging.config.MAX_LIMITrespectively. -
4.1.1 Fixed bug that would overwrite
$orin queries passed in. -
4.1.0 Adds
sortAscendingoption to sort by thepaginatedFieldascending. Defaults to false (existing behavior). -
4.0.0 Breaking API change:
nextandpreviousattributes are now always returned with every response (in case the client wants to poll for new changes). New attributeshasPreviousandhasNextshould now be used know if there are more results in the previous or next page. Before the change,nextandpreviouslycould not be replied upon to know if there were more pages. -
3.1.1 Don't use
letfor backwards compatibility. -
3.1.0
findInReq()now accepts dot notation for fields. So you can pass?fields=users.userIdto only turn theuserIdproperty forusersin the response. -
3.0.1 Fixed bug where the _id field was always returned when a paginatedField was used.
-
3.0.0 Breaking API change:
find()no longer accepts a string forlimit. AddedfindWithReq. -
2.0.0 Changed API to so you now set global config on the config object instead of the root export itself (e.g.
require('mongo-cursor-pagination').config.MAX_LIMIT = 100). The defaultMAX_LIMITis now a more reasonable 25 instead of 100. Addedsearch(). Fixed edge case where pages will be incorrect if paginatedField has duplicate values. -
1.1.0 Add
MAX_LIMITglobal setting to clamp -
1.0.0 Initial release