[PR #6513] [MERGED] chore: remove unused exports and export types #32320

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6513
Author: @jonathansamines
Created: 12/4/2025
Status: Merged
Merged: 12/5/2025
Merged by: @Bekacru

Base: canaryHead: chore/remove-unused-exports


📝 Commits (5)

  • a5b54fb chore: remove unused exports
  • 196625b chore: remove unused export types
  • 2c75d23 chore: remove unused duplicate exports
  • eab851c chore: mark code as internal/alias
  • 32fce5a Merge branch 'canary' into chore/remove-unused-exports

📊 Changes

32 files changed (+33 additions, -198 deletions)

View changed files

📝 knip.jsonc (+0 -3)
📝 packages/better-auth/src/adapters/kysely-adapter/bun-sqlite-dialect.ts (+4 -4)
📝 packages/better-auth/src/adapters/kysely-adapter/node-sqlite-dialect.ts (+4 -4)
📝 packages/better-auth/src/api/rate-limiter/index.ts (+1 -1)
📝 packages/better-auth/src/auth/base.ts (+0 -3)
📝 packages/better-auth/src/client/parser.ts (+0 -2)
📝 packages/better-auth/src/client/proxy.ts (+1 -6)
📝 packages/better-auth/src/client/vue/vue-store.ts (+1 -1)
📝 packages/better-auth/src/cookies/session-store.ts (+1 -1)
📝 packages/better-auth/src/plugins/api-key/schema.ts (+1 -1)
📝 packages/better-auth/src/plugins/device-authorization/schema.ts (+1 -1)
📝 packages/better-auth/src/plugins/jwt/utils.ts (+0 -55)
📝 packages/better-auth/src/plugins/oauth-proxy/utils.ts (+1 -1)
📝 packages/better-auth/src/plugins/oidc-provider/error.ts (+1 -1)
📝 packages/better-auth/src/plugins/oidc-provider/schema.ts (+1 -1)
📝 packages/better-auth/src/plugins/organization/adapter.ts (+1 -1)
📝 packages/better-auth/src/utils/shim.ts (+0 -60)
📝 packages/better-auth/src/utils/wildcard.ts (+1 -3)
📝 packages/cli/src/commands/generate.ts (+1 -1)
📝 packages/cli/src/commands/init.ts (+2 -2)

...and 12 more files

📄 Description

Summary by cubic

Reduced the public API surface by removing unused exports and default exports, making several helpers internal-only. This tightens the API, improves tree-shaking, and avoids accidental external usage with no behavioral changes.

  • Refactors
    • Made Kysely SQLite dialect classes and multiple helpers module-private (rate limiter storage, Vue store registration, OAuth vendor base URL, device and OIDC schemas/errors).
    • Switched to named imports and removed default exports in client/parser and utils/wildcard; cleaned up unused types in auth/base.
    • Deleted unused code: JWT private key encrypt/decrypt helpers, shim endpoint utility, deprecated CLI getGenerator, and unused telemetry type definitions.
    • Scoped CLI actions and utility helpers to modules; tidied init options and env filtering; added JSON comment stripping as internal.
    • Updated knip.jsonc by removing ignoreIssues to enable detection of unused exports and types.

Written for commit 32fce5ad85. 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/6513 **Author:** [@jonathansamines](https://github.com/jonathansamines) **Created:** 12/4/2025 **Status:** ✅ Merged **Merged:** 12/5/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `chore/remove-unused-exports` --- ### 📝 Commits (5) - [`a5b54fb`](https://github.com/better-auth/better-auth/commit/a5b54fb958f7b3009d7191e39d25bd2ecaa0d5c4) chore: remove unused exports - [`196625b`](https://github.com/better-auth/better-auth/commit/196625bef4e0c1bbc8b7a15e95f0a82871609b10) chore: remove unused export types - [`2c75d23`](https://github.com/better-auth/better-auth/commit/2c75d2335a078c5993028cffaa6bd04a97d1c5f5) chore: remove unused duplicate exports - [`eab851c`](https://github.com/better-auth/better-auth/commit/eab851c27204507d1e841f051d8df6f482dd92ef) chore: mark code as internal/alias - [`32fce5a`](https://github.com/better-auth/better-auth/commit/32fce5ad85d19171ad43f8fdf119c31ca6835ff0) Merge branch 'canary' into chore/remove-unused-exports ### 📊 Changes **32 files changed** (+33 additions, -198 deletions) <details> <summary>View changed files</summary> 📝 `knip.jsonc` (+0 -3) 📝 `packages/better-auth/src/adapters/kysely-adapter/bun-sqlite-dialect.ts` (+4 -4) 📝 `packages/better-auth/src/adapters/kysely-adapter/node-sqlite-dialect.ts` (+4 -4) 📝 `packages/better-auth/src/api/rate-limiter/index.ts` (+1 -1) 📝 `packages/better-auth/src/auth/base.ts` (+0 -3) 📝 `packages/better-auth/src/client/parser.ts` (+0 -2) 📝 `packages/better-auth/src/client/proxy.ts` (+1 -6) 📝 `packages/better-auth/src/client/vue/vue-store.ts` (+1 -1) 📝 `packages/better-auth/src/cookies/session-store.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/api-key/schema.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/device-authorization/schema.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/jwt/utils.ts` (+0 -55) 📝 `packages/better-auth/src/plugins/oauth-proxy/utils.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/oidc-provider/error.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/oidc-provider/schema.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/organization/adapter.ts` (+1 -1) 📝 `packages/better-auth/src/utils/shim.ts` (+0 -60) 📝 `packages/better-auth/src/utils/wildcard.ts` (+1 -3) 📝 `packages/cli/src/commands/generate.ts` (+1 -1) 📝 `packages/cli/src/commands/init.ts` (+2 -2) _...and 12 more files_ </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Reduced the public API surface by removing unused exports and default exports, making several helpers internal-only. This tightens the API, improves tree-shaking, and avoids accidental external usage with no behavioral changes. - **Refactors** - Made Kysely SQLite dialect classes and multiple helpers module-private (rate limiter storage, Vue store registration, OAuth vendor base URL, device and OIDC schemas/errors). - Switched to named imports and removed default exports in client/parser and utils/wildcard; cleaned up unused types in auth/base. - Deleted unused code: JWT private key encrypt/decrypt helpers, shim endpoint utility, deprecated CLI getGenerator, and unused telemetry type definitions. - Scoped CLI actions and utility helpers to modules; tidied init options and env filtering; added JSON comment stripping as internal. - Updated knip.jsonc by removing ignoreIssues to enable detection of unused exports and types. <sup>Written for commit 32fce5ad85d19171ad43f8fdf119c31ca6835ff0. 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-04-17 23:09:51 -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#32320