-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 for ES Module detection using npm@7 (#4295) #4296
Conversation
@richardsimko Bunch of previous tests seem to be failing, see https://github.com/knex/knex/pull/4296/checks?check_run_id=1904682577 |
Yeah I don't think my approach to mocking the env vars was good. I'll try another way but if that doesn't work I'm not sure it's possible to add tests for this code in a good way. |
@richardsimko Unit tests are fixed, but it looks like something in migration loading logic might be broken, judging by non-mysql integration tests. |
I think what's most likely happening is that I've uncovered latent issues where |
Which in turn is used in many places without knex/lib/migrations/migrate/Migrator.js Line 493 in 2cc3247
knex/lib/migrations/migrate/Migrator.js Line 145 in 2cc3247
knex/lib/migrations/migrate/Migrator.js Line 84 in 2cc3247
|
@richardsimko Yeah, noticed same thing:
getMigration is used to ensure we await properly.
|
I can slap |
@richardsimko You might need to make few more functions async (e. g. |
It worked 🎉 I added a note in the changelog as well. Do you want me to squash the commits? |
@richardsimko Thanks a lot! |
@kibertoad Is there anything I have to do in order to get this backported to 0.21.x? |
@richardsimko There is a 0.21 branch, just open a PR targetting that. |
Thanks, I opened #4308 |
No description provided.