Mikro-orm different package versions compatability

142 views Asked by At

How does different mikro-orm packages versions correspond to each other? Could I possibly use @mikro-orm/core 4.0.0 and @mikro-orm/nestjs 3.1.0 or other variations of different @mikro-orm packages and their versions? Should all @mikro-orm packages be installed with same version?

It's 3 questions but I feel they are pretty much the same since they try to clarify concept of version matching in mikro-orm for me.

1

There are 1 answers

1
Martin Adámek On BEST ANSWER

All packages that come from the main repository are released together, you should always align their versions.

https://github.com/mikro-orm/mikro-orm/tree/master/packages

The rest is not dependent on exact version, but in general, use the most up to date one. There are currently 3 packages that live outside of the main repo, the nest adapter you mentioned and 2 highlighters.

Btw there is no such release as @mikro-orm/nestjs 3.1.0, first release was 4.0.0 and current is 4.2.0.

edit: apparently lerna is aligning only minor/feature releases, so it can happen that some packages are not on the very latest patch version, example of that are mongo and reflection packages, that are still on 4.1.0, while the rest is on 4.1.1. but again, use the latest everywhere and you will be fine. Your IDE should guide you in knowing the latest versions.