8.1.2 (2022-08-26)
- use the transpiled version in node 12 (a705377)
8.1.1 (2022-08-26)
- properly page through undefs and nulls (0eb28e7)
8.1.0 (2022-08-25)
- update babel to v7 (6a86084)
8.0.1 (2022-08-24)
- remove uses of the spread operator (7e8a8c9)
8.0.0 (2022-08-24)
- functional fixes and possible performance changes in
aggregate
.
- force a major release (9c73e07)
7.8.0 (2022-08-23)
- improve documentation and skip commit (e33a493)
7.7.0 (2022-08-16)
- allow collation as arg on find and aggregate (cdfcfcb)
- turn global collation off for single query (c2ff6da)
7.6.1 (2021-11-18)
7.6.0 (2021-08-26)
- add support for aggregation
hint
s (b90acd4)
7.5.0 (2021-08-26)
- extract/expose a function to encode pagination tokens (04dc7fa)
- only export the function we need (8f80382)
7.4.0 (2021-03-08)
- mongoose-plugin: add search function (0efd73c)
- skip bad commit message (4c85357)
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
COLLATION
configuration 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
find
with a paginated field that has dot notation e.g.start.dateTime
produces an invalidnext
token. -
6.0.0 Breaking API change:
mongo-cursor-pagination
requires a Promise enabled mongodb instance frommongoist
and returns Promises fromfind
,findWithReq
, andsearch
rather than handling callbacks. Note: Although the library now usesasync/await
, it is still useable in node >= 6.9.0. -
5.0.0 Now
50
results are returned by default, and up to300
results can be returned if thelimit
parameter is used. These can be overridden by settingmongoPaging.config.DEFAULT_LIMIT
andmongoPaging.config.MAX_LIMIT
respectively. -
4.1.1 Fixed bug that would overwrite
$or
in queries passed in. -
4.1.0 Adds
sortAscending
option to sort by thepaginatedField
ascending. Defaults to false (existing behavior). -
4.0.0 Breaking API change:
next
andprevious
attributes are now always returned with every response (in case the client wants to poll for new changes). New attributeshasPrevious
andhasNext
should now be used know if there are more results in the previous or next page. Before the change,next
andpreviously
could not be replied upon to know if there were more pages. -
3.1.1 Don't use
let
for backwards compatibility. -
3.1.0
findInReq()
now accepts dot notation for fields. So you can pass?fields=users.userId
to only turn theuserId
property forusers
in 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_LIMIT
is 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_LIMIT
global setting to clamp -
1.0.0 Initial release