[PR #6120] [CLOSED] chore(test): add shared vitest configuration for monorepo #6461

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6120
Author: @himself65
Created: 11/20/2025
Status: Closed

Base: canaryHead: himself65/2025/11/19/vitest


📝 Commits (2)

  • dc65884 feat(config): add shared Vitest configuration for better-auth monorepo
  • 7208f77 remove read me

📊 Changes

24 files changed (+197 additions, -62 deletions)

View changed files

📝 package.json (+1 -0)
📝 packages/better-auth/package.json (+2 -0)
📝 packages/better-auth/vitest.config.adapters.ts (+11 -8)
📝 packages/better-auth/vitest.config.ts (+15 -12)
📝 packages/cli/package.json (+3 -1)
📝 packages/cli/vitest.config.ts (+3 -2)
packages/config/package.json (+24 -0)
packages/config/tsconfig.json (+7 -0)
packages/config/vitest.ts (+15 -0)
📝 packages/core/package.json (+3 -1)
📝 packages/core/vitest.config.ts (+3 -2)
📝 packages/expo/package.json (+3 -1)
📝 packages/expo/vitest.config.ts (+11 -8)
📝 packages/passkey/package.json (+3 -1)
📝 packages/passkey/vitest.config.ts (+3 -2)
📝 packages/sso/package.json (+3 -1)
📝 packages/sso/vitest.config.ts (+3 -2)
📝 packages/stripe/package.json (+3 -1)
📝 packages/stripe/vitest.config.ts (+10 -7)
📝 pnpm-lock.yaml (+56 -0)

...and 4 more files

📄 Description

Summary by cubic

Introduces a shared Vitest config package and applies it across the monorepo to run tests against source files and remove duplicated SSR settings. This standardizes test behavior and simplifies maintenance.

  • New Features

    • Added @better-auth/config with sharedVitestConfig (SSR resolves using "dev-source").
    • Added package tsconfig and exports for vitest config.
  • Refactors

    • Updated root and all package vitest.config.ts to merge sharedVitestConfig, keeping local overrides where needed (e.g., adapters include, Expo’s react-native external deps, Stripe globals).
    • Added @better-auth/config and vitest to devDependencies where missing.
    • Updated pnpm-lock and root tsconfig references to include the new config package.

Written for commit 7208f77db5. Summary will update automatically 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/6120 **Author:** [@himself65](https://github.com/himself65) **Created:** 11/20/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `himself65/2025/11/19/vitest` --- ### 📝 Commits (2) - [`dc65884`](https://github.com/better-auth/better-auth/commit/dc6588437cbd816873972f945d5ee7ebf48211a9) feat(config): add shared Vitest configuration for better-auth monorepo - [`7208f77`](https://github.com/better-auth/better-auth/commit/7208f77db5ce9154adf35d65a9c65e03e76ecc51) remove read me ### 📊 Changes **24 files changed** (+197 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `package.json` (+1 -0) 📝 `packages/better-auth/package.json` (+2 -0) 📝 `packages/better-auth/vitest.config.adapters.ts` (+11 -8) 📝 `packages/better-auth/vitest.config.ts` (+15 -12) 📝 `packages/cli/package.json` (+3 -1) 📝 `packages/cli/vitest.config.ts` (+3 -2) ➕ `packages/config/package.json` (+24 -0) ➕ `packages/config/tsconfig.json` (+7 -0) ➕ `packages/config/vitest.ts` (+15 -0) 📝 `packages/core/package.json` (+3 -1) 📝 `packages/core/vitest.config.ts` (+3 -2) 📝 `packages/expo/package.json` (+3 -1) 📝 `packages/expo/vitest.config.ts` (+11 -8) 📝 `packages/passkey/package.json` (+3 -1) 📝 `packages/passkey/vitest.config.ts` (+3 -2) 📝 `packages/sso/package.json` (+3 -1) 📝 `packages/sso/vitest.config.ts` (+3 -2) 📝 `packages/stripe/package.json` (+3 -1) 📝 `packages/stripe/vitest.config.ts` (+10 -7) 📝 `pnpm-lock.yaml` (+56 -0) _...and 4 more files_ </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Introduces a shared Vitest config package and applies it across the monorepo to run tests against source files and remove duplicated SSR settings. This standardizes test behavior and simplifies maintenance. - **New Features** - Added @better-auth/config with sharedVitestConfig (SSR resolves using "dev-source"). - Added package tsconfig and exports for vitest config. - **Refactors** - Updated root and all package vitest.config.ts to merge sharedVitestConfig, keeping local overrides where needed (e.g., adapters include, Expo’s react-native external deps, Stripe globals). - Added @better-auth/config and vitest to devDependencies where missing. - Updated pnpm-lock and root tsconfig references to include the new config package. <sup>Written for commit 7208f77db5ce9154adf35d65a9c65e03e76ecc51. Summary will update automatically 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-03-13 13:00: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#6461