next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

fix(mikro-orm-adapter): update MikroORM to V6

Open emulienfou opened this issue 1 year ago • 9 comments

☕️ Reasoning

  • Updating documentation to reflect changing from V5 to V6 when initializing Mikro-ORM: https://mikro-orm.io/docs/upgrading-v5-to-v6#the-type-option-is-removed-in-favour-of-driver-exports
  • Updating adapter @auth/mikro-orm-adapter to MikroORM V6

🧢 Checklist

  • [x] Documentation
  • [ ] Tests
  • [ ] Ready to be merged

🎫 Affected issues

📌 Resources

emulienfou avatar May 22 '24 20:05 emulienfou

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

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 29, 2024 8:23pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Dec 29, 2024 8:23pm

vercel[bot] avatar May 22 '24 20:05 vercel[bot]

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

A member of the Team first needs to authorize it.

vercel[bot] avatar May 22 '24 20:05 vercel[bot]

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!

ndom91 avatar May 28 '24 15:05 ndom91

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 avatar May 30 '24 13:05 emulienfou

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 :pray:

ndom91 avatar May 31 '24 11:05 ndom91

👍 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↗︎

socket-security[bot] avatar May 31 '24 15:05 socket-security[bot]

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@actions/[email protected] environment, filesystem Transitive: network +1 149 kB thboop
npm/@ariakit/[email protected] None +3 3.85 MB ariakit-bot
npm/@aws-sdk/[email protected] Transitive: environment, filesystem, shell +28 3.7 MB aws-sdk-bot
npm/@aws-sdk/[email protected] None +1 261 kB aws-sdk-bot
npm/@azure/[email protected] Transitive: environment, network +9 3.17 MB azure-sdk
npm/@balazsorban/[email protected] Transitive: environment +4 105 kB balazsorban
npm/@builder.io/[email protected] eval, network 0 2.37 MB adamdbradley
npm/@builder.io/[email protected] eval 0 45.6 MB shairez
npm/@cloudflare/[email protected] None 0 2.69 MB wrangler-publisher
npm/@eslint/[email protected] None 0 47.7 kB eslintbot
npm/@eslint/[email protected] None 0 14.2 kB eslintbot
npm/@graphql-codegen/[email protected] environment, filesystem, network, shell, unsafe +48 9.8 MB dotansimha
npm/@graphql-codegen/[email protected] Transitive: environment, eval, filesystem, shell, unsafe +37 11.6 MB dotansimha
npm/@graphql-typed-document-node/[email protected] None 0 2.96 kB dotansimha
npm/[email protected] environment +3 4.63 MB react-bot
npm/[email protected] environment +2 339 kB react-bot
npm/[email protected] environment 0 765 kB dcas
npm/[email protected] None 0 18.1 kB thejameskyle
npm/[email protected] Transitive: environment, network +18 3.79 MB pi0

🚮 Removed packages: npm/@auth/[email protected], npm/@solidjs/[email protected], npm/@solidjs/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

socket-security[bot] avatar Jun 01 '24 12:06 socket-security[bot]

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.

vercel[bot] avatar Jun 12 '24 20:06 vercel[bot]

Note to other maintainers. This will require a MAJOR version bump, as it modifies peer dependencies.

balazsorban44 avatar Oct 02 '24 20:10 balazsorban44