[PR #7650] [MERGED] fix: check jsconfig.json in getPathAliases #33066

Closed
opened 2026-04-17 23:44:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7650
Author: @jycouet
Created: 1/27/2026
Status: Merged
Merged: 1/28/2026
Merged by: @himself65

Base: canaryHead: fix/jsconfig-path-aliases


📝 Commits (1)

  • ff5d5e1 fix: check jsconfig.json when tsconfig.json is missing in getPathAliases

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 packages/cli/src/utils/get-config.ts (+4 -1)

📄 Description

Summary

  • Fall back to jsconfig.json when tsconfig.json is not found in getPathAliases
  • Fixes JSDoc-based SvelteKit projects where @better-auth/cli generate fails because aliases ($env/*, $app/*, $lib/*) are never registered

Fixes #7649


Summary by cubic

getPathAliases now falls back to jsconfig.json when tsconfig.json is missing. This fixes @better-auth/cli generate for JSDoc-based SvelteKit projects by correctly registering $env/, $app/, and $lib/* aliases.

Written for commit ff5d5e1ea9. 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/7650 **Author:** [@jycouet](https://github.com/jycouet) **Created:** 1/27/2026 **Status:** ✅ Merged **Merged:** 1/28/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/jsconfig-path-aliases` --- ### 📝 Commits (1) - [`ff5d5e1`](https://github.com/better-auth/better-auth/commit/ff5d5e1ea96fbd7e3e928dc59df976ccfb60619a) fix: check jsconfig.json when tsconfig.json is missing in getPathAliases ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/cli/src/utils/get-config.ts` (+4 -1) </details> ### 📄 Description ## Summary - Fall back to `jsconfig.json` when `tsconfig.json` is not found in `getPathAliases` - Fixes JSDoc-based SvelteKit projects where `@better-auth/cli generate` fails because aliases (`$env/*`, `$app/*`, `$lib/*`) are never registered Fixes #7649 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic getPathAliases now falls back to jsconfig.json when tsconfig.json is missing. This fixes @better-auth/cli generate for JSDoc-based SvelteKit projects by correctly registering $env/*, $app/*, and $lib/* aliases. <sup>Written for commit ff5d5e1ea96fbd7e3e928dc59df976ccfb60619a. 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-17 23:44:20 -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#33066