[PR #4916] [MERGED] chore(core): fix package.json #5655

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

📋 Pull Request Information

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

Base: canaryHead: himself65/2025/09/25/cjs


📝 Commits (1)

  • 5c5266d chore(core): fix package.json

📊 Changes

2 files changed (+20 additions, -2 deletions)

View changed files

📝 packages/core/build.config.ts (+3 -0)
📝 packages/core/package.json (+17 -2)

📄 Description

Summary by cubic

Add CommonJS output and dual ESM/CJS exports for the core package so require() and import both work, with correct TypeScript types. Updated build config to emit CJS and adjusted package.json entries.

  • Bug Fixes
    • Emit CJS via unbuild (rollup.emitCJS).
    • Set main to dist/index.cjs and module to dist/index.mjs.
    • Add exports for both ESM (import) and CJS (require) with types.
    • Add typesVersions to point to dist/index.d.ts.

🔄 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/4916 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/25/2025 **Status:** ✅ Merged **Merged:** 9/25/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/09/25/cjs` --- ### 📝 Commits (1) - [`5c5266d`](https://github.com/better-auth/better-auth/commit/5c5266d362fac8e7ec5757f4321c00584397101b) chore(core): fix package.json ### 📊 Changes **2 files changed** (+20 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/build.config.ts` (+3 -0) 📝 `packages/core/package.json` (+17 -2) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Add CommonJS output and dual ESM/CJS exports for the core package so require() and import both work, with correct TypeScript types. Updated build config to emit CJS and adjusted package.json entries. - **Bug Fixes** - Emit CJS via unbuild (rollup.emitCJS). - Set main to dist/index.cjs and module to dist/index.mjs. - Add exports for both ESM (import) and CJS (require) with types. - Add typesVersions to point to dist/index.d.ts. <!-- 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:30:42 -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#5655