hagopj13 / node-express-boilerplate

A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose
MIT License
7k stars 2.05k forks source link

Paginate Plugin fixed #107

Closed Salman9000 closed 3 years ago

Salman9000 commented 3 years ago

Added Readme for paginate

trasherdk commented 3 years ago

There's a mismatch between yarn.lock, package-lock.json and package.json that need fixing.

Doing a rm -fr node_modules && npm ci probably fixes that. Don't forget to push the lock files too.

trasherdk commented 3 years ago

The checks are failing because the yarn.lock file has not been updated.

I'm using node 14.16.1 and npm 7.10 and running npm ci or npm update will update both lock-files.

$ yarn --frozen-lockfile

yarn install v1.22.4

warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.

[1/5] Validating package.json...

[2/5] Resolving packages...

ongoose-paginate-v2@^1.3.17ongoose-paginate-v2@^1.3.17ongoose-paginate-v2@^1.3.17ongoose-paginate-v2@^1.3.17ongoose-paginate-v2@^1.3.17ongoose-paginate-v2@^1.3.17ongoose-paginate-v2@^1.3.17ongoose-paginate-v2@^1.3.17ongoose-paginate-v2@^1.3.17error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.

info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
trasherdk commented 3 years ago

Okay. I give up.

Salman9000 commented 3 years ago

I give up.

hagopj13 commented 3 years ago

Hi @Salman9000 and @trasherdk. Sorry for the late response on this. Thank you both for your contributions.

@Salman9000 I see that you created this pull request to solve #106. The boilerplate is not using any external packages for the paginate plug in. What it is actually using is a custom plugin that I've created. We can surely extend that to support more features. That explains why tests were failing.

Let's take it over to the issue (#106 ) and we can discuss potential improvements to the existing plugin there.