[PR #7308] [MERGED] fix(core): remove dual module waring #7216

Closed
opened 2026-03-13 13:28:32 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7308
Author: @himself65
Created: 1/12/2026
Status: Merged
Merged: 1/12/2026
Merged by: @himself65

Base: canaryHead: himself65/2026/01/12/id


📝 Commits (2)

📊 Changes

4 files changed (+30 additions, -35 deletions)

View changed files

📝 packages/core/src/context/endpoint-context.ts (+11 -2)
📝 packages/core/src/context/index.ts (+0 -29)
📝 packages/core/src/context/request-state.ts (+8 -2)
📝 packages/core/src/context/transaction.ts (+11 -2)

📄 Description

Summary by cubic

Removed the dual-module warning and made AsyncLocalStorage shared across package copies to prevent isolated context and transaction state.

  • Bug Fixes
    • Reuse AsyncLocalStorage via global Symbol.for for endpoint context, request state, and DB transaction.
    • Removed the “Better Auth was already imported” guard in context/index.ts.

Written for commit 927676a0fb. Summary will update 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/7308 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/12/2026 **Status:** ✅ Merged **Merged:** 1/12/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2026/01/12/id` --- ### 📝 Commits (2) - [`8885d77`](https://github.com/better-auth/better-auth/commit/8885d77c9adc25ef1b981a29a15dc67d3231d92d) fix(core): remove dual module warning - [`927676a`](https://github.com/better-auth/better-auth/commit/927676a0fbcf0cda14bd46a7dcc96598373526b4) revert ### 📊 Changes **4 files changed** (+30 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/context/endpoint-context.ts` (+11 -2) 📝 `packages/core/src/context/index.ts` (+0 -29) 📝 `packages/core/src/context/request-state.ts` (+8 -2) 📝 `packages/core/src/context/transaction.ts` (+11 -2) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Removed the dual-module warning and made AsyncLocalStorage shared across package copies to prevent isolated context and transaction state. - **Bug Fixes** - Reuse AsyncLocalStorage via global Symbol.for for endpoint context, request state, and DB transaction. - Removed the “Better Auth was already imported” guard in context/index.ts. <sup>Written for commit 927676a0fbcf0cda14bd46a7dcc96598373526b4. Summary will update 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 13:28:32 -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#7216