[PR #4079] [MERGED] fix(client): avoid atom to be proxy #13421

Closed
opened 2026-04-13 08:55:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4079
Author: @himself65
Created: 8/19/2025
Status: Merged
Merged: 8/20/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/08/18/avoid-proxy


📝 Commits (3)

📊 Changes

4 files changed (+25 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/client/client.test.ts (+8 -0)
📝 packages/better-auth/src/client/proxy.ts (+4 -0)
📝 packages/better-auth/src/test-utils/test-instance.ts (+1 -1)
packages/better-auth/src/utils/is-atom.ts (+12 -0)

📄 Description

Summary by cubic

Prevented nanostores atoms from being wrapped by the dynamic client proxy. This fixes runtime issues and keeps $store atoms usable across frameworks.

  • Bug Fixes

    • Detect atoms in createDynamicPathProxy and return them as-is (no proxy) via new isAtom utility.
    • Added test to confirm atoms are not Proxied.
  • Types

    • Added DeepFunctionRecord and DeepFunctionOrAtomRecord.
    • Updated createDynamicPathProxy and plugin API types to use these for safer typing.

🔄 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/4079 **Author:** [@himself65](https://github.com/himself65) **Created:** 8/19/2025 **Status:** ✅ Merged **Merged:** 8/20/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/08/18/avoid-proxy` --- ### 📝 Commits (3) - [`8dcda83`](https://github.com/better-auth/better-auth/commit/8dcda833e3aeb0ba4786c864c835b5f4a09a7f2c) fix(client): avoid atom to be proxy - [`a5ccf68`](https://github.com/better-auth/better-auth/commit/a5ccf686835932f5e8b85c4efa49f069ab1b46ae) fix: code - [`ad4be9a`](https://github.com/better-auth/better-auth/commit/ad4be9a50ee0b880ba03c8ffb09d405cf719ee23) fix: more ### 📊 Changes **4 files changed** (+25 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/client/client.test.ts` (+8 -0) 📝 `packages/better-auth/src/client/proxy.ts` (+4 -0) 📝 `packages/better-auth/src/test-utils/test-instance.ts` (+1 -1) ➕ `packages/better-auth/src/utils/is-atom.ts` (+12 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Prevented nanostores atoms from being wrapped by the dynamic client proxy. This fixes runtime issues and keeps $store atoms usable across frameworks. - **Bug Fixes** - Detect atoms in createDynamicPathProxy and return them as-is (no proxy) via new isAtom utility. - Added test to confirm atoms are not Proxied. - **Types** - Added DeepFunctionRecord and DeepFunctionOrAtomRecord. - Updated createDynamicPathProxy and plugin API types to use these for safer typing. <!-- 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 08:55: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#13421