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(mikro-orm-adapter): update MikroORM to V6 #10994

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

emulienfou
Copy link

@emulienfou emulienfou commented May 22, 2024

☕️ Reasoning

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

📌 Resources

Copy link

vercel bot commented May 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ❌ Failed (Inspect) Jun 5, 2024 5:52pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Jun 5, 2024 5:52pm

Copy link

vercel bot commented May 22, 2024

@emulienfou is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@ndom91
Copy link
Member

ndom91 commented May 28, 2024

The @auth/mikro-orm-adapter is still on v5 it looks like.

If you'd like to bump the peer dependencies and ensure it still works with v6, etc. we'd really appreciate it though!

@github-actions github-actions bot added adapters Changes related to the core code concerning database adapters mikro-orm @auth/mikro-orm-adapter labels May 30, 2024
@emulienfou
Copy link
Author

Hi @ndom91 Trying to update @auth/mikro-orm-adapter to MikroORM V6, however having one last issue:

src/index.ts(143,28): error TS2345: Argument of type 'AdapterAccount' is not assignable to parameter of type 'AdapterAccount & { readonly [x: string]: never; readonly expires_in?: undefined; }'.
  Type 'AdapterAccount' is not assignable to type '{ readonly [x: string]: never; readonly expires_in?: undefined; }'.
    Types of property 'expires_in' are incompatible.
      Type 'number | undefined' is not assignable to type 'undefined'.
        Type 'number' is not assignable to type 'undefined'.

Seems to be an issue with interface OpenIDTokenEndpointResponse properties:

  • readonly expires_in?: number;
  • readonly [parameter: string]: JsonValue | undefined;

Should I omit them, or do you have any ideas?

@emulienfou emulienfou changed the title Update mikro-orm documentation to reflect v6 Update MikroORM to V6 May 30, 2024
@ndom91 ndom91 changed the title Update MikroORM to V6 fix(mikro-orm-adapter): update MikroORM to V6 May 31, 2024
@ndom91
Copy link
Member

ndom91 commented May 31, 2024

Hi @ndom91 Trying to update @auth/mikro-orm-adapter to MikroORM V6, however having one last issue:

src/index.ts(143,28): error TS2345: Argument of type 'AdapterAccount' is not assignable to parameter of type 'AdapterAccount & { readonly [x: string]: never; readonly expires_in?: undefined; }'.
  Type 'AdapterAccount' is not assignable to type '{ readonly [x: string]: never; readonly expires_in?: undefined; }'.
    Types of property 'expires_in' are incompatible.
      Type 'number | undefined' is not assignable to type 'undefined'.
        Type 'number' is not assignable to type 'undefined'.

Seems to be an issue with interface OpenIDTokenEndpointResponse properties:

  • readonly expires_in?: number;
  • readonly [parameter: string]: JsonValue | undefined;

Should I omit them, or do you have any ideas?

Hmm, where does that expires_in field, for example, even come from? It's not part of the Account default entity, right? I'd almost say you can put a // @ts-expect-error on it, but if you do make sure you test that method 🙏

Copy link

socket-security bot commented May 31, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

# Conflicts:
#	pnpm-lock.yaml
Copy link

socket-security bot commented Jun 1, 2024

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

View full report↗︎

Copy link

vercel bot commented Jun 12, 2024

Deployment failed with the following error:

The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters mikro-orm @auth/mikro-orm-adapter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants