Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongoose-paginate-v2

Package Overview
Dependencies
Maintainers
0
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-paginate-v2 - npm Package Compare versions

Comparing version 1.8.4 to 1.8.5

4

CHANGELOG.md
# Changelog
## v1.8.5
[2024-09-29]
* Fix: correct PaginateDocument type parameters and merge PaginateModel interface
## v1.8.4

@@ -4,0 +8,0 @@ [2024-09-26]

33

index.d.ts

@@ -94,3 +94,3 @@ declare module 'mongoose' {

TMethods,
TVirtuals,
TQueryHelpers,
O extends PaginateOptions = {}

@@ -101,3 +101,3 @@ > = O['lean'] extends true

: T
: HydratedDocument<T, TMethods, TVirtuals>;
: HydratedDocument<T, TMethods, TQueryHelpers>;

@@ -111,10 +111,7 @@ interface PaginateModel<T, TQueryHelpers = {}, TMethods = {}>

err: any,
result: PaginateResult<PaginateDocument<T, TMethods, O>>
result: PaginateResult<PaginateDocument<T, TMethods, TQueryHelpers, O>>
) => void
): Promise<PaginateResult<PaginateDocument<T, TMethods, O>>>;
}
): Promise<PaginateResult<PaginateDocument<T, TMethods, TQueryHelpers, O>>>;
interface PaginateModel<T, TQueryHelpers = {}, TMethods = {}>
extends Model<T, TQueryHelpers, TMethods> {
paginate<UserType = T, O extends PaginateOptions = PaginateOptions >(
paginate<UserType = T, O extends PaginateOptions = PaginateOptions>(
query?: FilterQuery<T>,

@@ -124,9 +121,6 @@ options?: O,

err: any,
result: PaginateResult<PaginateDocument<UserType, TMethods, O>>
result: PaginateResult<PaginateDocument<UserType, TMethods, TQueryHelpers, O>>
) => void
): Promise<PaginateResult<PaginateDocument<UserType, TMethods, O>>>;
}
): Promise<PaginateResult<PaginateDocument<UserType, TMethods, TQueryHelpers, O>>>;
interface PaginateModel<T, TQueryHelpers = {}, TMethods = {}>
extends Model<T, TQueryHelpers, TMethods> {
paginate<UserType = T>(

@@ -137,8 +131,7 @@ query?: FilterQuery<T>,

err: any,
result: PaginateResult<PaginateDocument<UserType, TMethods, PaginateOptions>>
result: PaginateResult<PaginateDocument<UserType, TMethods, TQueryHelpers, PaginateOptions>>
) => void
): Promise<PaginateResult<PaginateDocument<UserType, TMethods, PaginateOptions>>>;
): Promise<PaginateResult<PaginateDocument<UserType, TMethods, TQueryHelpers, PaginateOptions>>>;
}
// @ts-expect-error overwriting of mongoose Query interface
interface Query<

@@ -154,9 +147,9 @@ ResultType,

options?: O
): Promise<PaginateResult<PaginateDocument<RawDocType, TInstanceMethods, O>>>
): Promise<PaginateResult<PaginateDocument<RawDocType, TInstanceMethods, THelpers, O>>>
paginate<UserType = ResultType, O extends PaginateOptions = PaginateOptions>(
options?: O
): Promise<PaginateResult<PaginateDocument<UserType, TInstanceMethods, O>>>
): Promise<PaginateResult<PaginateDocument<UserType, TInstanceMethods, THelpers, O>>>
paginate<UserType = ResultType>(
options?: PaginateOptions
): Promise<PaginateResult<PaginateDocument<UserType, TInstanceMethods, PaginateOptions>>>
): Promise<PaginateResult<PaginateDocument<UserType, TInstanceMethods, THelpers, PaginateOptions>>>
}

@@ -163,0 +156,0 @@ }

{
"name": "mongoose-paginate-v2",
"version": "1.8.4",
"version": "1.8.5",
"description": "A custom pagination library for Mongoose with customizable labels.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc