[PR #5793] [CLOSED] feat: awaitable custom transforms #6227

Closed
opened 2026-03-13 12:51:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5793
Author: @dvanmali
Created: 11/6/2025
Status: Closed

Base: canaryHead: awaitableFactory


📝 Commits (2)

  • 0ac86a0 feat: awaitable custom transforms
  • 1713479 feat: add Awaitable type to core

📊 Changes

3 files changed (+7 additions, -5 deletions)

View changed files

📝 packages/better-auth/src/adapters/adapter-factory/index.ts (+2 -2)
📝 packages/core/src/db/adapter/index.ts (+3 -3)
📝 packages/core/src/types/helper.ts (+2 -0)

📄 Description

Allows customTransformInput and customTransformOutput to be await-able. Required for specific custom computed fields.


Summary by cubic

Make customTransformInput and customTransformOutput awaitable to support async computed fields while keeping sync behavior intact.

  • New Features
    • Adapter factory now awaits customTransformInput/output.
    • Added Awaitable type and updated adapter types to return Awaitable.
    • Enables async computed fields (e.g., external lookups) without breaking existing sync transforms.

Written for commit 17134792e5. Summary will update automatically on new commits.


🔄 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/5793 **Author:** [@dvanmali](https://github.com/dvanmali) **Created:** 11/6/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `awaitableFactory` --- ### 📝 Commits (2) - [`0ac86a0`](https://github.com/better-auth/better-auth/commit/0ac86a01dbcf0bff8f63ea0fa2ef78e36334e269) feat: awaitable custom transforms - [`1713479`](https://github.com/better-auth/better-auth/commit/17134792e504908ede0ae14155f852b057c7c739) feat: add Awaitable type to core ### 📊 Changes **3 files changed** (+7 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/adapters/adapter-factory/index.ts` (+2 -2) 📝 `packages/core/src/db/adapter/index.ts` (+3 -3) 📝 `packages/core/src/types/helper.ts` (+2 -0) </details> ### 📄 Description Allows `customTransformInput` and `customTransformOutput` to be await-able. Required for specific custom computed fields. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Make customTransformInput and customTransformOutput awaitable to support async computed fields while keeping sync behavior intact. - **New Features** - Adapter factory now awaits customTransformInput/output. - Added Awaitable type and updated adapter types to return Awaitable<any>. - Enables async computed fields (e.g., external lookups) without breaking existing sync transforms. <sup>Written for commit 17134792e504908ede0ae14155f852b057c7c739. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <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-03-13 12:51:42 -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#6227