[PR #7582] [MERGED] refactor: simplify parse output logic #15665

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

📋 Pull Request Information

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

Base: canaryHead: himself65/2026/01/23/simplify


📝 Commits (4)

📊 Changes

2 files changed (+18 additions, -63 deletions)

View changed files

📝 packages/better-auth/src/cookies/cookies.test.ts (+0 -21)
📝 packages/better-auth/src/db/schema.ts (+18 -42)

📄 Description

Summary by cubic

Simplified output filtering by using the shared filterOutputFields utility and tightened types for schema lookups. This reduces custom code and keeps user, session, and account outputs consistent with core rules.

  • Refactors
    • Replaced local parseOutputData with filterOutputFields in user/session/account output parsing.
    • Updated getFields to use BaseModelNames, unified cache keys, and merged plugin/additional fields by model name.
    • Simplified parseInputData initialization (Object.create(null) only).

Written for commit d5aefcef2a. 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/7582 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/23/2026 **Status:** ✅ Merged **Merged:** 1/26/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2026/01/23/simplify` --- ### 📝 Commits (4) - [`7ebd823`](https://github.com/better-auth/better-auth/commit/7ebd823772483555b31f369c397749108e5bebcd) refactor: simplify parse output logic - [`4c36df8`](https://github.com/better-auth/better-auth/commit/4c36df8d698168ac4392320d63920bd2249f3e88) refactor: type - [`2f7fd4e`](https://github.com/better-auth/better-auth/commit/2f7fd4e76689d98b9ae3e5ded08aec73e7903885) test: remove - [`d5aefce`](https://github.com/better-auth/better-auth/commit/d5aefcef2ae37e1e1c215a0c4de468b26ec2457d) fix: lint ### 📊 Changes **2 files changed** (+18 additions, -63 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/cookies/cookies.test.ts` (+0 -21) 📝 `packages/better-auth/src/db/schema.ts` (+18 -42) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Simplified output filtering by using the shared filterOutputFields utility and tightened types for schema lookups. This reduces custom code and keeps user, session, and account outputs consistent with core rules. - **Refactors** - Replaced local parseOutputData with filterOutputFields in user/session/account output parsing. - Updated getFields to use BaseModelNames, unified cache keys, and merged plugin/additional fields by model name. - Simplified parseInputData initialization (Object.create(null) only). <sup>Written for commit d5aefcef2ae37e1e1c215a0c4de468b26ec2457d. 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-04-13 10:09:48 -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#15665