-
-
Notifications
You must be signed in to change notification settings - Fork 3.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(mikro-orm): re-enable tests #5316
fix(mikro-orm): re-enable tests #5316
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
2757d33
to
4d71f81
Compare
6751a6c
to
3738674
Compare
513cce1
to
24574e0
Compare
d0ef0ca
to
a87b9db
Compare
This comment was marked as outdated.
This comment was marked as outdated.
44a3271
to
64bd3b6
Compare
@balazsorban44 as we previously had a broken schema that was unusable for sso providers as I see it, we should make this a breaking change - users will need to run a migration that updates fields to their new types. |
b47141a
to
e74105a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I skimmed the PR, it looks pretty good to me. Before we merge it, I'd like t ask for @ndom91's review
Is there anything I can do to speed this up? |
b32e590
to
3627e89
Compare
@ndom91 and @balazsorban44 should I rebase this? don't want it to go stale again... |
a5726a7
to
1b60daa
Compare
While I have a working setup for tests with swc using 'next/jest', I struggle getting a working setup here. So I installed ts-jest and some missing peer dependencies.
BREAKING CHANGE: apparently oauth providers were not working previously, as two important fields had the wrong types. this change will require users to run an appropriate migration. closes nextauthjs#5286
BREAKING CHANGE in mikro-orm prior to 4.2 collections emit a type `Collection<Session, unknown>` this makes them essentially incompatible (read: unextendable) by the newest mikro-orm versions. In newer versions this always should be `Collection<Session, object>`, hence enforcing this for older mikro- orm versions.
1b60daa
to
f2b2c65
Compare
added another fix on top and updated some versions. perhaps you could have another look @ThangHuuVu ? |
Yeah this also looks good to me! Just approved another round of CI to double check the tests pass 👍 |
Cool, thank you @boredland @ndom91, merging it now 🙌 |
BREAKING CHANGE: See #5316
swc/jest and decorators seems to be a hard nut to crack. But probably having reflection based metadata on our schema (and thus putting assumptions on the users setup) has not been a good idea to begin with. So I decided to follow the approach in an upstream PR and inserted reflection-less meta-data everywhere.
☕️ Reasoning
Aims to re-enable the tests, as I'd like to make some changes and need working regression tests.
closes #5286 as a side-effect.
🧢 Checklist