[PR #5704] feat: better-auth/minimal #14414

Closed
opened 2026-04-13 09:27:45 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5704

State: closed
Merged: Yes


This PR introduces better-auth/minimal, which is aimed at reducing bundle size when Kysely is not used. Additionally, the project structure has been modified to remove Kysely.


Summary by cubic

Introduce better-auth/minimal to use adapter-based auth without Kysely, reducing bundle size. Also split context and DB adapter setup to support both minimal and full (Kysely) implementations; migrations only available in the full build.

  • New Features

    • New export: better-auth/minimal with betterAuth using initMinimal.
    • Minimal mode disallows migrations and direct DB connections (clear errors).
    • Adapter selection without Kysely via getBaseAdapter; memory adapter used by default.
    • Package exports and typesVersions updated; build entry added for auth-minimal.
  • Refactors

    • Introduced createAuthContext base; separate init (Kysely) and init-minimal.
    • Replaced db/utils with adapter-base, adapter-kysely, and field-converter.
    • Auth factory split: createBetterAuth with shared logic; Auth type moved to types/auth.
    • Plugin helpers extracted to context/helpers; imports updated to new context index; tests adjusted to new paths.

Written for commit 62ece0c20f. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5704 **State:** closed **Merged:** Yes --- This PR introduces better-auth/minimal, which is aimed at reducing bundle size when Kysely is not used. Additionally, the project structure has been modified to remove Kysely. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Introduce better-auth/minimal to use adapter-based auth without Kysely, reducing bundle size. Also split context and DB adapter setup to support both minimal and full (Kysely) implementations; migrations only available in the full build. - **New Features** - New export: better-auth/minimal with betterAuth using initMinimal. - Minimal mode disallows migrations and direct DB connections (clear errors). - Adapter selection without Kysely via getBaseAdapter; memory adapter used by default. - Package exports and typesVersions updated; build entry added for auth-minimal. - **Refactors** - Introduced createAuthContext base; separate init (Kysely) and init-minimal. - Replaced db/utils with adapter-base, adapter-kysely, and field-converter. - Auth factory split: createBetterAuth with shared logic; Auth type moved to types/auth. - Plugin helpers extracted to context/helpers; imports updated to new context index; tests adjusted to new paths. <sup>Written for commit 62ece0c20f515e342806d36443751794c8e99a52. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:27:46 -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#14414