[PR #3449] [MERGED] refactor: Pass both building and getRequestEvent from outside of library #4829

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3449
Author: @RobiMez
Created: 7/18/2025
Status: Merged
Merged: 7/18/2025
Merged by: @Bekacru

Base: v1.3Head: fix/#3211-Sveltekitcookies-plugin


📝 Commits (4)

  • ed8c7d7 refactor: Pass both building and getRequestEvent from outside of library
  • 6dbdff0 chore: add Svelte and related dependencies to externals
  • 4491d42 chore: lint
  • f32a4ad refactor(docs): update SvelteKit integration docs with new building and getRequestEvent usage

📊 Changes

3 files changed (+27 additions, -26 deletions)

View changed files

📝 docs/content/docs/integrations/svelte-kit.mdx (+13 -10)
📝 packages/better-auth/build.config.ts (+3 -0)
📝 packages/better-auth/src/integrations/svelte-kit.ts (+11 -16)

📄 Description

  • Removes the need for importing from virtual modules at the expense of more user boilerplate

Summary by cubic

Refactored the SvelteKit integration to require passing both the building flag and getRequestEvent function from outside the library, removing internal imports from virtual modules.

  • Refactors
    • Users now provide building and getRequestEvent, reducing reliance on SvelteKit virtual imports.

🔄 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/3449 **Author:** [@RobiMez](https://github.com/RobiMez) **Created:** 7/18/2025 **Status:** ✅ Merged **Merged:** 7/18/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `v1.3` ← **Head:** `fix/#3211-Sveltekitcookies-plugin` --- ### 📝 Commits (4) - [`ed8c7d7`](https://github.com/better-auth/better-auth/commit/ed8c7d79caaec8b98ceb1852e82f52e6c2dd5fd4) refactor: Pass both building and getRequestEvent from outside of library - [`6dbdff0`](https://github.com/better-auth/better-auth/commit/6dbdff0d54eba1e65e8478af40edc443e6ce86e5) chore: add Svelte and related dependencies to externals - [`4491d42`](https://github.com/better-auth/better-auth/commit/4491d4297c6764be0735bbccc08cd2dcae97b496) chore: lint - [`f32a4ad`](https://github.com/better-auth/better-auth/commit/f32a4ad8c2b5617bba8848dd244aa83fd56ce6e8) refactor(docs): update SvelteKit integration docs with new building and getRequestEvent usage ### 📊 Changes **3 files changed** (+27 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/integrations/svelte-kit.mdx` (+13 -10) 📝 `packages/better-auth/build.config.ts` (+3 -0) 📝 `packages/better-auth/src/integrations/svelte-kit.ts` (+11 -16) </details> ### 📄 Description - Removes the need for importing from virtual modules at the expense of more user boilerplate <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Refactored the SvelteKit integration to require passing both the building flag and getRequestEvent function from outside the library, removing internal imports from virtual modules. - **Refactors** - Users now provide building and getRequestEvent, reducing reliance on SvelteKit virtual imports. <!-- 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:01:18 -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#4829