[PR #4826] [MERGED] chore: use tsconfig monorepo setup #5599

Closed
opened 2026-03-13 12:29:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4826
Author: @himself65
Created: 9/22/2025
Status: Merged
Merged: 9/22/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/09/22/tsconfig


📝 Commits (6)

📊 Changes

21 files changed (+451 additions, -290 deletions)

View changed files

📝 packages/better-auth/package.json (+1 -5)
📝 packages/better-auth/src/adapters/kysely-adapter/test/number-id/adapter.kysely.number-id.test.ts (+19 -20)
📝 packages/better-auth/src/social-providers/index.ts (+0 -6)
📝 packages/better-auth/src/test-utils/test-instance.ts (+1 -1)
packages/better-auth/tsconfig.declarations.json (+0 -31)
📝 packages/better-auth/tsconfig.json (+6 -20)
📝 packages/cli/package.json (+4 -1)
packages/cli/tsconfig.json (+14 -0)
📝 packages/expo/package.json (+4 -1)
📝 packages/expo/src/client.ts (+5 -5)
📝 packages/expo/src/expo.test.ts (+3 -3)
📝 packages/expo/tsconfig.json (+10 -21)
📝 packages/sso/package.json (+2 -2)
📝 packages/sso/tsconfig.json (+9 -15)
📝 packages/stripe/package.json (+2 -2)
📝 packages/stripe/src/hooks.ts (+9 -9)
📝 packages/stripe/src/index.ts (+4 -4)
📝 packages/stripe/tsconfig.json (+9 -15)
📝 pnpm-lock.yaml (+315 -118)
📝 tsconfig.json (+33 -10)

...and 1 more files

📄 Description

Use tsconfig monorepo setup, following what I did for waku

Summary by cubic

Standardized TypeScript across the monorepo with a shared root tsconfig and project references. This unifies type-checking, emits declarations consistently, and improves Turbo caching.

  • Refactors

    • Added root tsconfig (composite, declaration emit, incremental) with package references.
    • Updated package tsconfigs to extend the root and set rootDir/outDir/lib; added inter-package references.
    • Removed better-auth tsconfig.declarations.json; aligned package scripts to use tsc --project tsconfig.json.
    • Tweaked Turbo “typecheck” to cache .tsbuildinfo and emitted .d.ts files.
    • Small type cleanups to satisfy stricter settings (test utils cast, social providers typings, Kysely adapter test opts).
  • Migration

    • Run turbo run typecheck (or tsc -b from the repo root) to build references and emit .d.ts.
    • If you see stale types, clear dist and .tsbuildinfo, then re-run typecheck.

🔄 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/4826 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/22/2025 **Status:** ✅ Merged **Merged:** 9/22/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/09/22/tsconfig` --- ### 📝 Commits (6) - [`da3ca85`](https://github.com/better-auth/better-auth/commit/da3ca855be84f712fb6ddebd350b9887b3bc103f) chore: use tsconfig monorepo setup - [`806907d`](https://github.com/better-auth/better-auth/commit/806907dc6bedb86728318e193b1e9830b9076fc7) fix: types - [`bd085bd`](https://github.com/better-auth/better-auth/commit/bd085bd26ec348222ee5ad318dc44f15ef5ee76b) chore: types semver - [`84000ad`](https://github.com/better-auth/better-auth/commit/84000ad70c8b27c997e23f688219ce6c3ba21652) chore: missing deps - [`b399e2f`](https://github.com/better-auth/better-auth/commit/b399e2f3dabdf06c07527c18ec0393e742fe380d) chore: rule - [`04d0a74`](https://github.com/better-auth/better-auth/commit/04d0a747c85a80d5cab785db72148855912f91e2) chore: missing dev deps ### 📊 Changes **21 files changed** (+451 additions, -290 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/package.json` (+1 -5) 📝 `packages/better-auth/src/adapters/kysely-adapter/test/number-id/adapter.kysely.number-id.test.ts` (+19 -20) 📝 `packages/better-auth/src/social-providers/index.ts` (+0 -6) 📝 `packages/better-auth/src/test-utils/test-instance.ts` (+1 -1) ➖ `packages/better-auth/tsconfig.declarations.json` (+0 -31) 📝 `packages/better-auth/tsconfig.json` (+6 -20) 📝 `packages/cli/package.json` (+4 -1) ➕ `packages/cli/tsconfig.json` (+14 -0) 📝 `packages/expo/package.json` (+4 -1) 📝 `packages/expo/src/client.ts` (+5 -5) 📝 `packages/expo/src/expo.test.ts` (+3 -3) 📝 `packages/expo/tsconfig.json` (+10 -21) 📝 `packages/sso/package.json` (+2 -2) 📝 `packages/sso/tsconfig.json` (+9 -15) 📝 `packages/stripe/package.json` (+2 -2) 📝 `packages/stripe/src/hooks.ts` (+9 -9) 📝 `packages/stripe/src/index.ts` (+4 -4) 📝 `packages/stripe/tsconfig.json` (+9 -15) 📝 `pnpm-lock.yaml` (+315 -118) 📝 `tsconfig.json` (+33 -10) _...and 1 more files_ </details> ### 📄 Description Use tsconfig monorepo setup, following what I did for [waku](https://github.com/wakujs/waku/pull/132) <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Standardized TypeScript across the monorepo with a shared root tsconfig and project references. This unifies type-checking, emits declarations consistently, and improves Turbo caching. - **Refactors** - Added root tsconfig (composite, declaration emit, incremental) with package references. - Updated package tsconfigs to extend the root and set rootDir/outDir/lib; added inter-package references. - Removed better-auth tsconfig.declarations.json; aligned package scripts to use tsc --project tsconfig.json. - Tweaked Turbo “typecheck” to cache .tsbuildinfo and emitted .d.ts files. - Small type cleanups to satisfy stricter settings (test utils cast, social providers typings, Kysely adapter test opts). - **Migration** - Run turbo run typecheck (or tsc -b from the repo root) to build references and emit .d.ts. - If you see stale types, clear dist and .tsbuildinfo, then re-run typecheck. <!-- 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 12:29:01 -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#5599