Lightweight MongoDB Abstract Repository implementation for Node.js apps
MIT License
Bot releases are visible (Hide)
Hello monguito
ers! π
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! ποΈ
Full Changelog: https://github.com/Josuto/monguito/compare/5.1.2...6.0.0
Published by Josuto 5 months ago
Not much really, we just updated several dependencies this time π¦
Something new is coming, so stay tuned! πΊ
Full Changelog: https://github.com/Josuto/monguito/compare/5.1.1...5.1.2
Published by Josuto 5 months ago
Hello monguito
ers!
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! π€
Full Changelog: https://github.com/Josuto/monguito/compare/5.1.0...5.1.1
Published by Josuto 6 months ago
Hey monguito
ers!
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! π
Full Changelog: https://github.com/Josuto/monguito/compare/5.0.1...5.1.0
Published by Josuto 6 months ago
Hello monguito
ers! π
This release is the result of sweeping the house a bit π§Ή. Here is what we did:
options
parameter to the findOne
operation in case you want to include it in your own transactional operationsfindOne
filters
parameter for operation syntax consistency; now you can define filters
as part of options
insteadconnection
property from all monguito
operations' options
parameter, as it is no longer requiredmonguito
operations to better explain each options
parameter, among other thingsAs always, enjoy monguito
and happy coding! π©βπ»
Full Changelog: https://github.com/Josuto/monguito/compare/5.0.0...5.0.1
Published by Josuto 6 months ago
Good Saturday, monguito
ers!
π£ 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! π
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:
userId
optional parameter has been removed from the save
operationSearchOptions
type has been renamed to FindAllOptions
for naming convention purposesTypeData
type has been renamed to SybtypeData
package.json
as a dependencyFull Changelog: https://github.com/Josuto/monguito/compare/4.8.0...5.0.0
Published by Josuto 7 months ago
Hey monguito
ers!
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! π
Full Changelog: https://github.com/Josuto/monguito/compare/4.7.0...4.8.0
Published by Josuto 7 months ago
Full Changelog: https://github.com/Josuto/monguito/compare/4.6.1...4.7.0
Published by Josuto 7 months ago
Full Changelog: https://github.com/Josuto/monguito/compare/4.6.1...4.6.1
Published by Josuto 7 months ago
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!
Full Changelog: https://github.com/Josuto/monguito/compare/4.5.0...4.6.0
Published by Josuto 8 months ago
Morning monguito
ers! π
π 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
Published by Josuto 8 months ago
Full Changelog: https://github.com/Josuto/monguito/compare/4.4.0...4.4.1
Published by Josuto 8 months ago
Full Changelog: https://github.com/Josuto/monguito/compare/4.3.0...4.4.0
Published by Josuto 8 months ago
π 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
Published by Josuto 9 months ago
Full Changelog: https://github.com/Josuto/monguito/compare/4.1.1...4.2.0
Published by Josuto 9 months ago
Full Changelog: https://github.com/Josuto/monguito/compare/4.1.0...4.1.1
Published by Josuto 10 months ago
Full Changelog: https://github.com/Josuto/monguito/compare/4.0.0...4.1.0
Published by Josuto 10 months ago
β οΈ This release may include some breaking changes in your code:
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 πValidationException
instead of an IllegalArgumentException
Good news is that we also:
extendSchema
to allow you to invoke it with a base and an extension Mongoose Schema
monguito
API JSDoc to improve your development experienceHere are the two involved PRs:
Full Changelog: https://github.com/Josuto/monguito/compare/3.4.1...4.0.0
Published by Josuto 10 months ago
extendSchema
by @Josuto in https://github.com/Josuto/monguito/pull/167
Full Changelog: https://github.com/Josuto/monguito/compare/3.4.0...3.4.1
Published by Josuto 10 months ago
ValidationException
by @Josuto in https://github.com/Josuto/monguito/pull/164
Full Changelog: https://github.com/Josuto/monguito/compare/3.3.1...3.4.0