migrate-mongoose
migrate-mongoose copied to clipboard
Extension agnostic migrations
Currently migrate-mongoose made only for using with migration files with js
extension. This changes make possible:
- Creating new migrations files with the same extension as template file.
- Using extension other than
js
, likets
for example in development mode (withts-node
for example).
Sorry for irrelevant changes like removing extra spaces (thanks to my editor) – I can reset their if it matters.
@tenorok have you tested this with a TS project?
Yes, I faced with a problem of usage migrate-mongoose into typescript-project working on ts-node in development mode and currently use my fork for it.
Migrations continue works well after compiling project into javascript.
Tried your fork on our own TS project and it works well! Though I think it would make more sense if rather than omitting the extension altogether it was kept throughout, I guess by passing the extension variable around. That will make it more explicit and less prone to error. Do you think you can make those changes? Thanks!
I have not understood what specific problems this will solve? Lack of binding to a specific extension works flexibly with any files, without the need to enter redundant options and hardcode extensions.
I wrote email to @balmasi about this pull request but so far he is silent. Not sure that it’s possible to merge it in at all :-(