I recently moved from [email protected] to version 0.3 and there is this sentence on the docs of the release: https://github.com/typeorm/typeorm/releases/tag/0.3.0 that doesn't make much sense to me (under the section of DEPRECATED):
entities, migrations, subscribers options inside DataSourceOptions accepting string directories support is deprecated. You'll be only able to pass entity references in the future versions.
From this I get that we now must specify the entities and can not use (or better said, won't be able to use in the future) wildcard paths i.e. entities: ['dist/**/*.entity.{ts,js}'] instead we must use: entities: [User, AnoherEntity...]
but does this apply for migrations too? I find it confusing because migrations are generated by the cli of typeorm, meaning we must generate the migration i.e. 1652169197705-SomeMigration and then add that file name with its full path into the DataSource's migrations? migrations: ['1652169197705-SomeMigration'...]
Thanks!
Yes it does :)
I agree the documentation is in need of some serious love and old examples have been updated but their readmes have not - this is causing some significant confusion.