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

Add default export to adapter-mikro-orm #12445

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

Conversation

xN4P4LM
Copy link

@xN4P4LM xN4P4LM commented Dec 31, 2024

☕️ Reasoning

This adds a default export for the mikro-orm-adapter and resolves issues with the ORM:

Before the change the orm toolings is unable to find the configuration:

xn4p4lm@dev ~/p/next-auth-example on main ⨯ ⋊>npx mikro-orm-esm debug
Current MikroORM CLI configuration
 - dependencies:
   - mikro-orm 6.4.2
   - node 23.5.0
   - typescript 5.7.2
 - package.json found
 - ts-node enabled
 - searched config paths:
   - /home/xn4p4lm/projects/next-auth-example/mikro-orm.config.ts (found)
   - /home/xn4p4lm/projects/next-auth-example/src/mikro-orm.config.ts (not found)
   - /home/xn4p4lm/projects/next-auth-example/src/mikro-orm.config.js (not found)
   - /home/xn4p4lm/projects/next-auth-example/mikro-orm.config.js (not found)
 - searched for config name: default
- configuration not found (No "exports" main defined in /home/xn4p4lm/projects/next-auth-example/node_modules/@auth/mikro-orm-adapter/package.json)

After adding the default export, the adapter can find the entities:

xn4p4lm@dev ~/p/next-auth-example on main ⨯ ⋊>npx mikro-orm-esm debug
Current MikroORM CLI configuration
 - dependencies:
   - mikro-orm 6.4.2
   - node 23.5.0
   - typescript 5.7.2
 - package.json found
 - ts-node enabled
 - searched config paths:
   - /home/xn4p4lm/projects/next-auth-example/mikro-orm.config.ts (found)
   - /home/xn4p4lm/projects/next-auth-example/src/mikro-orm.config.ts (not found)
   - /home/xn4p4lm/projects/next-auth-example/src/mikro-orm.config.js (not found)
   - /home/xn4p4lm/projects/next-auth-example/mikro-orm.config.js (not found)
 - searched for config name: default
 - configuration found
 - driver dependencies:
   - knex 3.1.0
   - mariadb 3.4.0
 - database connection successful
 - will use `entities` array (contains 0 references and 1 paths)
   - /home/xn4p4lm/projects/next-auth-example/entities/*.entity.js (not found)
 - could use `entitiesTs` array (contains 3 references and 1 paths)
   - /home/xn4p4lm/projects/next-auth-example/entities/*.entity.ts (found)

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

📌 Resources

@xN4P4LM xN4P4LM requested a review from ndom91 as a code owner December 31, 2024 02:17
Copy link

vercel bot commented Dec 31, 2024

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 31, 2024 3:22pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Dec 31, 2024 3:22pm

Copy link

vercel bot commented Dec 31, 2024

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

A member of the Team first needs to authorize it.

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

socket-security bot commented Dec 31, 2024

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

Package New capabilities Transitives Size Publisher
npm/@ariakit/[email protected] None +3 3.85 MB ariakit-bot
npm/@auth/[email protected] environment Transitive: network +6 4.9 MB balazsorban
npm/@auth/[email protected] None 0 28 kB balazsorban
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/@radix-ui/[email protected] None +4 90.8 kB chancestrickland
npm/@radix-ui/[email protected] None +9 176 kB chancestrickland
npm/@radix-ui/[email protected] None +36 1.71 MB andy-hook, benoitgrelard, chancestrickland, ...3 more
npm/@radix-ui/[email protected] None +15 481 kB chancestrickland
npm/@radix-ui/[email protected] None +1 36.9 kB chancestrickland
npm/@simplewebauthn/[email protected] network +17 2.06 MB iamkale
npm/@types/[email protected] None +9 108 kB types
npm/@types/[email protected] None 0 13.9 kB types
npm/@types/[email protected] None 0 37.9 kB types
npm/@types/[email protected] None +2 1.69 MB types
npm/@vercel/[email protected] environment Transitive: network +2 778 kB vercel-release-bot
npm/[email protected] None 0 22.1 kB joebell93
npm/[email protected] None 0 8.55 kB lukeed
npm/[email protected] environment, filesystem, network Transitive: eval, unsafe +67 2.17 MB jonchurch
npm/[email protected] None 0 19.6 MB ericfennis
npm/[email protected] eval Transitive: environment, filesystem, network +8 181 kB dougwilson
npm/[email protected] environment Transitive: network +5 3.45 MB balazsorban
npm/[email protected] Transitive: environment, eval, filesystem, shell +45 1.46 GB rauchg, timneutkens, vercel-release-bot
npm/[email protected] environment, eval, filesystem +49 6.83 MB pug-bot
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] environment, filesystem Transitive: network, shell, unsafe +105 15.6 MB adamwathan, malfaitrobin, reinink
npm/[email protected] Transitive: environment, filesystem, network, shell +28 241 MB hirokiosame
npm/[email protected] Transitive: environment, network +18 3.79 MB pi0

🚮 Removed packages: npm/@actions/[email protected], npm/@auth/[email protected], npm/@auth/[email protected], npm/@solidjs/[email protected], npm/@solidjs/[email protected], npm/@sveltejs/[email protected], npm/@sveltejs/[email protected], npm/@sveltejs/[email protected], npm/@types/[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], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

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.

2 participants