Friday, February 2, 2024

MikroORM 6 is Released

 After over a year of development, I'm excited to announce the stable release of the next major version of MikroORM. This version introduces numerous enhancements across the entire system, placing a strong emphasis on type-safety and strictness.



For those unfamiliar with MikroORM, it is a TypeScript data-mapper ORM featuring Unit of Work and Identity Map. It currently supports MongoDB, MySQL, PostgreSQL, and SQLite drivers. Key features include implicit transactions, ChangeSet-based persistence, and Identity map.


In the preceding 5.x releases, notable additions included em.upsert() and em.upsertMany(), a custom pivot table entity, automatic relation discovery, full-text search support, explicit serialization, rel() and ref() helpers, and new Collection helpers such as map, filter, reduce, exists, find, indexBy, among others.


However, looking ahead to version 6, the focus is on improved type safety. Building upon the foundation laid by v5 with strict populate hints and the Loaded type, v6 introduces a comprehensive overhaul of internal types to enhance both strictness and autocomplete capabilities. These changes mark a significant leap toward ensuring a more robust and reliable typing system.

0 comments:

Post a Comment