Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: load seeders classes using typeorm (#324) #339

Merged

Conversation

alumni
Copy link

@alumni alumni commented Jul 22, 2024

Fixes #324 by loading the seeder classes in the same way typeorm loads entities, subscribers or migrations classes.

@alumni
Copy link
Author

alumni commented Jul 22, 2024

I also tested this build in my repo (>100 seeders) and it works fine.

Also, since it relies on TypeORM loading the classes, there's no need to use default exports.

@alumni alumni force-pushed the fix/load-seeder-classes-using-typeorm branch from eb79f0a to 7b79a3c Compare September 26, 2024 11:34
@alumni alumni force-pushed the fix/load-seeder-classes-using-typeorm branch from 7b79a3c to 9b58477 Compare September 26, 2024 11:40
@alumni
Copy link
Author

alumni commented Sep 26, 2024

@jorgebodega Could you please review this PR?

FYI, I left the formatting in package.json unchanged on purpose, but I can also fix it easily if need be.

@jorgebodega
Copy link
Owner

I'll check this later, and if you can fix the format step would be great!

@alumni alumni force-pushed the fix/load-seeder-classes-using-typeorm branch from 9e3f4da to 56153a5 Compare September 26, 2024 14:55
@jorgebodega jorgebodega merged commit a2590cc into jorgebodega:next Oct 4, 2024
7 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 4, 2024
# [7.1.0-next.3](v7.1.0-next.2...v7.1.0-next.3) (2024-10-04)

### Bug Fixes

* load seeders classes using typeorm ([#324](#324)) ([#339](#339)) ([a2590cc](a2590cc))
github-actions bot pushed a commit that referenced this pull request Oct 4, 2024
# [7.1.0](v7.0.0...v7.1.0) (2024-10-04)

### Bug Fixes

* load seeders classes using typeorm ([#324](#324)) ([#339](#339)) ([a2590cc](a2590cc))
* update dependency glob to v11 ([#342](#342)) ([e5fb787](e5fb787))

### Features

* install biome as formatter and linter ([#335](#335)) ([a195c27](a195c27))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot use import statement outside a module
2 participants