monguito

Lightweight MongoDB Abstract Repository implementation for Node.js apps

MIT License

Downloads
166
Stars
31
Committers
2

Bot releases are hidden (Show)

monguito - 2.0.0

Published by Josuto over 1 year ago

Fresh news! 🔥

Custom repository instantiation is now completely free from Mongoose's Model dependency! Simply type:

const repository = new YourCustomRepository();

and you are done! That will connect your custom repository to Mongooses default connection to MongoDB. But if you like, you can provide the constructor with a specific instance of Mongoose Connection:

const repository = new YourCustomRepository(connection);

This allows you to specify different MongoDB connections for your custom repositories 🚀

What's Changed

Full Changelog: https://github.com/Josuto/node-abstract-repository/compare/1.1.0...2.0.0

monguito - 1.1.0

Published by Josuto over 1 year ago

We are pleased to announce that discriminator keys (i.e., __t fields) are not anymore required at domain model definition! 🥳. This way our persistence logic is completely decoupled from your domain logic, which in turn means that your application is less married to our library, as Uncle Bob would say.

If you already specified a discriminator key in your domain object types, do not panic! The new version of the library is backward compatible, so you can safely update it anyways 😉

For more information please check out the README file and the test sample code in the library.

monguito - 1.0.0

Published by Josuto over 1 year ago

Mongoose dependency upgrade from v6.x to v7.x. Please also update the Mongoose version in your Node.js project as it introduces breaking changes.

monguito - 0.1.2

Published by Josuto over 1 year ago

Updated MongooseRepository with some changes at some functions TS definition and some optimisation on the usage of Optional.

monguito - 0.1.1

Published by Josuto over 1 year ago

🥳🎉 We are pleased to announce the first release of node-abstract-repository! 🎉🥳

You may find some interesting examples on how to use it at the book.repository.test.ts file, which also serves as documentation for the library.

You may also find a full example of how to use this library in NestJS + Mongoose app at nestjs-mongoose-book-manager.