[PR #5008] [MERGED] refactor: move async_hooks to core #13961

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5008
Author: @himself65
Created: 10/1/2025
Status: Merged
Merged: 10/1/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/09/30/async_hooks


📝 Commits (2)

  • d3fa0c2 refactor: move async_hook to core
  • 287cfae Merge branch 'canary' into himself65/2025/09/30/async_hooks

📊 Changes

5 files changed (+69 additions, -35 deletions)

View changed files

📝 packages/better-auth/src/context/transaction.ts (+5 -33)
📝 packages/core/build.config.ts (+5 -1)
📝 packages/core/package.json (+13 -0)
packages/core/src/async_hooks/index.ts (+45 -0)
📝 packages/core/tsconfig.json (+1 -1)

📄 Description

Summary by cubic

Moved AsyncLocalStorage handling into @better-auth/core to centralize cross-runtime support and simplify imports. Adds a core async_hooks entry with getAsyncLocalStorage and updates build/exports.

  • New Features

    • Introduced @better-auth/core/async_hooks with getAsyncLocalStorage and type-only AsyncLocalStorage export.
  • Refactors

    • better-auth transaction context now imports getAsyncLocalStorage from core.
    • Added core build entry and exports for async_hooks; enabled Node types in core tsconfig.

🔄 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/5008 **Author:** [@himself65](https://github.com/himself65) **Created:** 10/1/2025 **Status:** ✅ Merged **Merged:** 10/1/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/09/30/async_hooks` --- ### 📝 Commits (2) - [`d3fa0c2`](https://github.com/better-auth/better-auth/commit/d3fa0c2823716eec50811240690d3596509ea49a) refactor: move async_hook to core - [`287cfae`](https://github.com/better-auth/better-auth/commit/287cfae95de7d665a9f3f55af21cbd509ff1d373) Merge branch 'canary' into himself65/2025/09/30/async_hooks ### 📊 Changes **5 files changed** (+69 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/context/transaction.ts` (+5 -33) 📝 `packages/core/build.config.ts` (+5 -1) 📝 `packages/core/package.json` (+13 -0) ➕ `packages/core/src/async_hooks/index.ts` (+45 -0) 📝 `packages/core/tsconfig.json` (+1 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Moved AsyncLocalStorage handling into @better-auth/core to centralize cross-runtime support and simplify imports. Adds a core async_hooks entry with getAsyncLocalStorage and updates build/exports. - **New Features** - Introduced @better-auth/core/async_hooks with getAsyncLocalStorage and type-only AsyncLocalStorage export. - **Refactors** - better-auth transaction context now imports getAsyncLocalStorage from core. - Added core build entry and exports for async_hooks; enabled Node types in core tsconfig. <!-- 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-04-13 09:14:26 -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#13961