typeorm-seeding
typeorm-seeding copied to clipboard
Seeder superclass warning and error
This will warn users about inoperable seeder classes, throwing on the worst case that all seeders are inoperable.
Migrating from the fork origin, I found that I had implements Seeder instead of extends Seeder, which is compilable but invalid. The CLI said it could find the seeders, and that it had executed them. But I had no results. This was because the seeders sent to useSeeders was an empty array.
It might be worth adding a similar check in useSeeders to keep it reusable but up to you 🤷
Hey @jorgebodega, thanks for providing a migration path to latest typeorm. This is a small DX improvement I found along the way. Let me know if you want to go in a different direction.
Hi! Those changes are okay, but probably some tests are going to fail.
In any case, you have to update the branch and add some test to cover that new case.