Skip to content

Conversation

@thepushkaraj
Copy link
Collaborator

@thepushkaraj thepushkaraj commented Dec 20, 2025

📝 Description

Brief description of what this PR does and why.

Fixes # (issue number if applicable)

🔄 Type of Change

Please check the type of change your PR introduces:

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🚀 New adapter (adds support for a new framework)
  • 📚 Documentation (changes to documentation only)
  • 🎨 Code style (formatting, missing semicolons, etc; no production code change)
  • ♻️ Refactoring (code change that neither fixes a bug nor adds a feature)
  • Performance (code change that improves performance)

🎯 Affected Packages

Which packages are affected by this change:

  • @dodopayments/core
  • @dodopayments/nextjs
  • @dodopayments/express
  • @dodopayments/fastify
  • @dodopayments/hono
  • @dodopayments/remix
  • @dodopayments/sveltekit
  • @dodopayments/astro
  • @dodopayments/tanstack
  • @dodopayments/nuxt
  • @dodopayments/betterauth
  • @dodopayments/convex
  • Examples
  • Documentation

📚 Documentation

  • I have updated the README.md (if applicable)
  • I have added/updated code comments for complex logic
  • I have updated the CHANGELOG.md (if applicable)

🔍 Code Quality

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have checked my code for potential security issues

🚀 Framework Adapter Checklist

If you're adding a new framework adapter, please ensure:

  • Follows the standard adapter pattern
  • Implements all three core functions (Checkout, Webhooks, CustomerPortal)
  • Has framework-specific documentation
  • Includes working example implementation
  • Follows framework conventions and best practices
  • Has proper TypeScript types
  • Handles errors appropriately

🔐 Security Considerations

  • I have not exposed any sensitive information (API keys, secrets)
  • My changes don't introduce security vulnerabilities
  • I have followed security best practices
  • Input validation is properly implemented
  • Error messages don't leak sensitive information

📖 Additional Context

Add any other context, screenshots, or additional information about the PR here.

Breaking Changes

If this PR introduces breaking changes, please describe:

  1. What changes are breaking
  2. Why the change was necessary
  3. Migration guide for users
  4. Deprecation timeline (if applicable)

Performance Impact

If this PR affects performance:

  • I have benchmarked the changes
  • Performance improvements are documented
  • No significant performance regressions

Dependencies

  • I have not added unnecessary dependencies
  • New dependencies are justified and documented
  • Dependencies are compatible with project requirements
  • I have updated package.json correctly

🎯 Reviewer Notes

Specific areas to focus on during review:

  • API Design - Check consistency with existing patterns
  • Error Handling - Verify proper error handling and messages
  • Type Safety - Ensure full TypeScript compliance
  • Framework Integration - Verify framework-specific implementation
  • Documentation - Check completeness and accuracy
  • Security - Review for potential security issues

📋 Pre-merge Checklist

  • All CI checks are passing
  • Code has been reviewed and approved
  • Documentation is complete and accurate
  • Breaking changes are properly documented
  • CHANGELOG.md is updated (if applicable)

By submitting this pull request, I confirm that my contribution is made under the terms of the GPL v3 license and that I have the right to submit this work under this license.

Summary by CodeRabbit

  • New Features

    • Added new client-specific export path for streamlined imports.
  • Refactor

    • Reorganized module exports to improve code organization and clarity.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 20, 2025

Walkthrough

Reorganizes module exports by introducing a dedicated ./client entry point in the betterauth package and removing the dodopaymentsClient from the root export. The example application is updated to import from the new entry point accordingly.

Changes

Cohort / File(s) Change Summary
Package Export Restructuring
packages/betterauth/package.json, packages/betterauth/src/index.ts
Added new ./client export entry in package.json with TypeScript definitions and CJS/ESM distributions; removed dodopaymentsClient from root index exports to consolidate client-specific code into the dedicated entry point.
Example Application Update
examples/nextjs-betterauth/lib/auth-client.ts
Updated import path for dodopaymentsClient from @dodopayments/better-auth to @dodopayments/better-auth/client to align with new module structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify the new ./client export paths in package.json resolve correctly to dist files
  • Confirm dodopaymentsClient removal from root exports doesn't break existing consumers (mitigated by example update)
  • Ensure the example update is the only breaking change that needs communication to consumers

Possibly related PRs

Suggested reviewers

  • that-ambuj

Poem

🐰 A path splits in two, client finds its way,
From root to ./client, a cleaner display,
The exports align, the structure refined,
One entry, one purpose—clarity in kind! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description lacks specific implementation details and explanation of what the bug was or why the fix was necessary. While the template sections are present, critical details are missing. Expand the description section to explain what issue was being fixed, why client/server separation was necessary, and any migration guidance for users.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: separating client and server exports in the better-auth package by reorganizing export paths.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-betterauth-example-build

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bb665ad and 0c41e2a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • examples/nextjs-betterauth/lib/auth-client.ts (1 hunks)
  • packages/betterauth/package.json (1 hunks)
  • packages/betterauth/src/index.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/betterauth/src/index.ts
🔇 Additional comments (2)
examples/nextjs-betterauth/lib/auth-client.ts (1)

2-2: LGTM! Import path updated correctly.

The import path now uses the dedicated ./client entry point, which aligns with the new export structure defined in the package.json.

packages/betterauth/package.json (1)

18-21: Build configuration and migration are properly configured.

The tsup.config.ts uses entry: ["src/"] which automatically includes src/client.ts and will generate the required output files (client.d.ts, client.js, client.cjs). The package.json exports are correctly structured for the new entry point. No remaining old import paths detected in the codebase.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@thepushkaraj thepushkaraj deleted the fix-betterauth-example-build branch January 8, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants