monguito

Lightweight MongoDB Abstract Repository implementation for Node.js apps

MIT License

Downloads
166
Stars
31
Committers
2

Bot releases are visible (Hide)

monguito - 6.0.0 Latest Release

Published by Josuto 4 months ago

What's Changed

Hello monguitoers! πŸ––

Some proper description for this release will be set here soon, apologies!

In the meantime, this changelog explains all the changes introduced in Monguito v6 🎁.

Happy summer! πŸ–οΈ

Pull Requests

Full Changelog: https://github.com/Josuto/monguito/compare/5.1.2...6.0.0

monguito - 5.1.2

Published by Josuto 5 months ago

What's Changed

Not much really, we just updated several dependencies this time πŸ“¦

Something new is coming, so stay tuned! πŸ“Ί

Pull Requests

Full Changelog: https://github.com/Josuto/monguito/compare/5.1.1...5.1.2

monguito - 5.1.1

Published by Josuto 5 months ago

What's Changed

Hello monguitoers!

This new release includes some refactoring at MongooseRepository to improve code readability as well as an Architecture Decision Record (ADR) to explain why we chose to disallow secondary key-based domain object storage (TL;DR: we decided to support partial domain object updates while guaranteeing loose coupling between persistence and application/domain logic).

Keep on rocking! 🀘

Pull Requests

Full Changelog: https://github.com/Josuto/monguito/compare/5.1.0...5.1.1

monguito - 5.1.0

Published by Josuto 6 months ago

What's Changed

Hey monguitoers!

This new release enables you to register any standalone Mongoose plugin of your liking during the creation of your schemas 🎁. All you need to do is to invoke the extendSchema function passing an array of plugins as value for options.plugins, as illustrated in this example. Hope you find it useful!

Happy Saturday to y'all! πŸ‘‹

Pull Requests

Full Changelog: https://github.com/Josuto/monguito/compare/5.0.1...5.1.0

monguito - 5.0.1

Published by Josuto 6 months ago

What's Changed

Hello monguitoers! πŸ‘‹

This release is the result of sweeping the house a bit 🧹. Here is what we did:

  • πŸ“¦ added some new options parameter to the findOne operation in case you want to include it in your own transactional operations
  • ⚠️ deprecated findOne filters parameter for operation syntax consistency; now you can define filters as part of options instead
  • ⚠️ deprecated the connection property from all monguito operations' options parameter, as it is no longer required
  • πŸ“š improved the documentation on monguito operations to better explain each options parameter, among other things

As always, enjoy monguito and happy coding! πŸ‘©β€πŸ’»

Pull Requests

Full Changelog: https://github.com/Josuto/monguito/compare/5.0.0...5.0.1

monguito - 5.0.0

Published by Josuto 6 months ago

What's Changed

Good Saturday, monguitoers!

πŸ“£ We are happy to announce the publication of runInTransaction, the transactional helper function used by the saveAll and deleteAll to ensure operation atomicity. Now it is available to you (dear developer) can now use to easily implement your own custom atomic operations! 🎁. You can check it action at this soft deleteAll version.

Furthermore, all the basic and transactional CRUD operations included in this new version specify an options optional parameter to enable extra configuration πŸ‘―. You may find the definition of each operation options parameter here. Related to this topic, we decided to finally remove the userId parameter specified at the save operation. If you need to track the userId value for entity operation auditing purposes, please include it as part of the the save operation options parameter.

Last but not least, we also decided to make Mongoose a peer dependency for monguito. This way you are now in control of the Mongoose version, giving you higher capability of choice, under one condition: it must be higher or equals to v8.0.0.

We hope you keep on enjoying monguito, and as always, if you have any comment, doubt or concern, do not hesitate to create an issue πŸ™.

Happy weekend and happy coding! πŸ––

Breaking Changes ⚠️

Bringing new features to you does not come without a cost, unfortunately. That being said, we believe and hope they won't impact your code much.

This is the list of breaking changes introduced in this release:

  • The userId optional parameter has been removed from the save operation
  • The SearchOptions type has been renamed to FindAllOptions for naming convention purposes
  • The TypeData type has been renamed to SybtypeData
  • Mongoose must now be included in your package.json as a dependency

Pull Requests

Full Changelog: https://github.com/Josuto/monguito/compare/4.8.0...5.0.0

monguito - 4.8.0

Published by Josuto 7 months ago

What's Changed

Hey monguitoers!

Where you missing the classic Mongoose findOne operation? Well, no need to implement it in your custom repositories anymore, as this new release is bringing it to you! 🎁

Happy weekend, and happy coding! πŸ™Œ

Pull Requests

Full Changelog: https://github.com/Josuto/monguito/compare/4.7.0...4.8.0

monguito - 4.7.0

Published by Josuto 7 months ago

What's Changed

Full Changelog: https://github.com/Josuto/monguito/compare/4.6.1...4.7.0

monguito - 4.6.1

Published by Josuto 7 months ago

What's Changed

Full Changelog: https://github.com/Josuto/monguito/compare/4.6.1...4.6.1

monguito - 4.6.0

Published by Josuto 7 months ago

What's Changed

Ever wanted to specify an abstract class as the root type of your domain model (also known as the Default type)? This new release allows you to do so! πŸ•Ί

Additionally, we improved the type definitions of the map defined at the constructor function of any custom repository so that you get better IDE type support πŸ‘©β€πŸ’»

Enjoy monguito 4.6.0!

All Changes

Full Changelog: https://github.com/Josuto/monguito/compare/4.5.0...4.6.0

monguito - 4.5.0

Published by Josuto 8 months ago

What's Changed

Morning monguitoers! 🌞

🎁 This new release brings an atomic version of the save operation. This means that now it is safe to update entities in a concurrent environment. All you need to do is switch to a MongoDB cluster (e.g., replica set) instance if you have not done it so far, make your custom repository extend MongooseTransactionalRepository, and you are good to go! πŸ˜‰

🎁 Also, the insert and update operations are now available to custom repository developers as protected reusable functions, should you need them πŸ₯³

Hope you enjoy this new version of monguito!

Full Changelog: https://github.com/Josuto/monguito/compare/4.4.1...4.5.0

monguito - 4.4.1

Published by Josuto 8 months ago

What's Changed

Full Changelog: https://github.com/Josuto/monguito/compare/4.4.0...4.4.1

monguito - 4.4.0

Published by Josuto 8 months ago

What's Changed

Full Changelog: https://github.com/Josuto/monguito/compare/4.3.0...4.4.0

monguito - 4.3.0

Published by Josuto 8 months ago

What's Changed

🎊 Exciting news from monguito! πŸŽ‰

🎁 We are releasing the first two transactional operations: saveAll and deleteAll! These operations allow you to seamlessly store and delete a bunch of entities in your MongoDB collections, respectively. But, wait, why are these operations transactional? Well, because they need to be executed in a MongoDB transaction to ensure operation atomicity. In other words, they must guarantee that either all entities are stored (or deleted) in the database, or none is.

⚠️ There is, however, a drawback to transactional logic: it cannot be executed in a MongoDB standalone instance. You need to use a MongoDB cluster such as a sharded cluster or a replica set. Good news is that this is a common and recommended practice, specially for production environments πŸ€“.

πŸ“š We have updated our library documentation and coding examples to teach you how to use a MongoDB replica set. Moreover, we have also updated our sample NestJS application with MongoDB replica set so that you can learn how to configure and run yours.

πŸ”” But these are not the only plans we have for transactional operations. We will soon release a new resource to help you developing your own custom transactional operations, so stay tuned!

❗Last but not least, we have also done some refactoring around operation options to convey an homogeneous way to handle any extra optional parameters. Please beware that the optional userId of the save operation has been deprecated. Thus, we would recommend you updating your code to use save(<an entity instance>, { userId: <a user ID value> }) instead. You can find all new operation options definition here.

πŸ“¬ Hope you are enjoying monguito, and please feel free to open any discussion with us around these new features or any other matter!

Full Changelog: https://github.com/Josuto/monguito/compare/4.2.0...4.3.0

monguito - 4.2.0

Published by Josuto 9 months ago

What's Changed

Full Changelog: https://github.com/Josuto/monguito/compare/4.1.1...4.2.0

monguito - 4.1.1

Published by Josuto 9 months ago

What's Changed

Full Changelog: https://github.com/Josuto/monguito/compare/4.1.0...4.1.1

monguito - 4.1.0

Published by Josuto 10 months ago

What's Changed

Full Changelog: https://github.com/Josuto/monguito/compare/4.0.0...4.1.0

monguito - 4.0.0

Published by Josuto 10 months ago

What's Changed

⚠️ This release may include some breaking changes in your code:

  • As of v3.4.1, new type definition on extendSchema enables requested Schema type reasoning on client code. Despite your code can now be sounder, we however discovered that, in some cases, the invocation of this function requires some extra type definition. Apologies for that πŸ™
  • Any attempt to store an entity that specifies content meant to be unique results in a ValidationException instead of an IllegalArgumentException

Good news is that we also:

  • 🎁 Overloaded extendSchema to allow you to invoke it with a base and an extension Mongoose Schema
  • πŸ“— Extended monguito API JSDoc to improve your development experience

Here are the two involved PRs:

Full Changelog: https://github.com/Josuto/monguito/compare/3.4.1...4.0.0

monguito - 3.4.1

Published by Josuto 10 months ago

What's Changed

Full Changelog: https://github.com/Josuto/monguito/compare/3.4.0...3.4.1

monguito - 3.4.0

Published by Josuto 10 months ago

What's Changed

Full Changelog: https://github.com/Josuto/monguito/compare/3.3.1...3.4.0