[PR #8303] [MERGED] chore: move adapter packages from deps to optional peer deps #16129

Closed
opened 2026-04-13 10:24:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8303
Author: @himself65
Created: 3/2/2026
Status: Merged
Merged: 3/3/2026
Merged by: @himself65

Base: canaryHead: chore/move-adapters-to-peer-deps


📝 Commits (3)

  • 993cda5 chore: move adapter packages from deps to optional peer deps
  • 0a36be1 fix: peer
  • 6e7a330 docs: update

📊 Changes

6 files changed (+53 additions, -12 deletions)

View changed files

📝 docs/content/docs/adapters/drizzle.mdx (+8 -0)
📝 docs/content/docs/adapters/mongo.mdx (+8 -0)
📝 docs/content/docs/adapters/prisma.mdx (+8 -0)
📝 knip.jsonc (+5 -0)
📝 packages/better-auth/package.json (+15 -3)
📝 pnpm-lock.yaml (+9 -9)

📄 Description

Summary

  • Move @better-auth/drizzle-adapter, @better-auth/mongo-adapter, and @better-auth/prisma-adapter from dependencies to optional peerDependencies + devDependencies
  • These packages are only re-exported for user convenience and are not used in core runtime code
  • @better-auth/kysely-adapter and @better-auth/memory-adapter remain as dependencies since they are used directly in runtime paths (get-migration.ts, context/init.ts, adapter-base.ts)

Test plan

  • pnpm install succeeds
  • Verify existing tests still pass
  • Verify builds succeed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8303 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/2/2026 **Status:** ✅ Merged **Merged:** 3/3/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `chore/move-adapters-to-peer-deps` --- ### 📝 Commits (3) - [`993cda5`](https://github.com/better-auth/better-auth/commit/993cda5e8d6ad70563b0f29115f5fccc0cc45095) chore: move adapter packages from deps to optional peer deps - [`0a36be1`](https://github.com/better-auth/better-auth/commit/0a36be128fa5188b4a99b311c56fea75407862e3) fix: peer - [`6e7a330`](https://github.com/better-auth/better-auth/commit/6e7a330817469982d9709868eb27eacc80e836eb) docs: update ### 📊 Changes **6 files changed** (+53 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/adapters/drizzle.mdx` (+8 -0) 📝 `docs/content/docs/adapters/mongo.mdx` (+8 -0) 📝 `docs/content/docs/adapters/prisma.mdx` (+8 -0) 📝 `knip.jsonc` (+5 -0) 📝 `packages/better-auth/package.json` (+15 -3) 📝 `pnpm-lock.yaml` (+9 -9) </details> ### 📄 Description ## Summary - Move `@better-auth/drizzle-adapter`, `@better-auth/mongo-adapter`, and `@better-auth/prisma-adapter` from `dependencies` to optional `peerDependencies` + `devDependencies` - These packages are only re-exported for user convenience and are not used in core runtime code - `@better-auth/kysely-adapter` and `@better-auth/memory-adapter` remain as `dependencies` since they are used directly in runtime paths (`get-migration.ts`, `context/init.ts`, `adapter-base.ts`) ## Test plan - [x] `pnpm install` succeeds - [x] Verify existing tests still pass - [x] Verify builds succeed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 10:24:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#16129