[PR #344] [MERGED] enhance alias path resolution #3240

Closed
opened 2026-03-13 10:45:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/344
Author: @nlynzaad
Created: 10/26/2024
Status: Merged
Merged: 10/26/2024
Merged by: @Bekacru

Base: mainHead: path-alias-resolving


📝 Commits (2)

📊 Changes

2 files changed (+321 additions, -3 deletions)

View changed files

📝 packages/cli/src/utils/get-config.ts (+8 -3)
packages/cli/test/getConfig.test.ts (+313 -0)

📄 Description

this pull request resolves #343 through:
 

  1. calculating the resolved base url by extracting it from tsconfig and joining to the cwd that is at the root of the tsconfig file. the baseUrl is relative to the tsconfig file.
  2. checking if the alias and/or alias path is of a resolver type or a direct alias to a file
  3. since the alias paths is relative to the base url the resulting path is the path join of the resolvedBaseUrl and the alias path
  4. ensure the full alias is used.

🔄 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/344 **Author:** [@nlynzaad](https://github.com/nlynzaad) **Created:** 10/26/2024 **Status:** ✅ Merged **Merged:** 10/26/2024 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `path-alias-resolving` --- ### 📝 Commits (2) - [`7019ade`](https://github.com/better-auth/better-auth/commit/7019ade4435be334e9423d87e39518607eb79a1c) fix alias path resolution - [`fda1dc2`](https://github.com/better-auth/better-auth/commit/fda1dc2bb780666848019cef4ddf33a784232cd4) add tests ### 📊 Changes **2 files changed** (+321 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/cli/src/utils/get-config.ts` (+8 -3) ➕ `packages/cli/test/getConfig.test.ts` (+313 -0) </details> ### 📄 Description this pull request resolves #343 through:   1) calculating the resolved base url by extracting it from tsconfig and joining to the cwd that is at the root of the tsconfig file. the baseUrl is relative to the tsconfig file. 2) checking if the alias and/or alias path is of a resolver type or a direct alias to a file 3) since the alias paths is relative to the base url the resulting path is the path join of the resolvedBaseUrl and the alias path 4) ensure the full alias is used. --- <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 10:45:06 -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#3240