Skip to content

fix(expo): avoid shim require#8253

Merged
himself65 merged 2 commits intocanaryfrom
himself65/2026/03/01/platform
Mar 1, 2026
Merged

fix(expo): avoid shim require#8253
himself65 merged 2 commits intocanaryfrom
himself65/2026/03/01/platform

Conversation

@himself65
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 1, 2026 14:36
@himself65 himself65 requested a review from Bekacru as a code owner March 1, 2026 14:36
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
better-auth-docs Building Building Preview, Comment Mar 1, 2026 2:36pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
better-auth-demo Ignored Ignored Mar 1, 2026 2:36pm

Request Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 1, 2026

Open in StackBlitz

@better-auth/api-key

npm i https://pkg.pr.new/@better-auth/api-key@8253

better-auth

npm i https://pkg.pr.new/better-auth@8253

auth

npm i https://pkg.pr.new/auth@8253

@better-auth/core

npm i https://pkg.pr.new/@better-auth/core@8253

@better-auth/drizzle-adapter

npm i https://pkg.pr.new/@better-auth/drizzle-adapter@8253

@better-auth/electron

npm i https://pkg.pr.new/@better-auth/electron@8253

@better-auth/expo

npm i https://pkg.pr.new/@better-auth/expo@8253

@better-auth/i18n

npm i https://pkg.pr.new/@better-auth/i18n@8253

@better-auth/kysely-adapter

npm i https://pkg.pr.new/@better-auth/kysely-adapter@8253

@better-auth/memory-adapter

npm i https://pkg.pr.new/@better-auth/memory-adapter@8253

@better-auth/mongo-adapter

npm i https://pkg.pr.new/@better-auth/mongo-adapter@8253

@better-auth/oauth-provider

npm i https://pkg.pr.new/@better-auth/oauth-provider@8253

@better-auth/passkey

npm i https://pkg.pr.new/@better-auth/passkey@8253

@better-auth/prisma-adapter

npm i https://pkg.pr.new/@better-auth/prisma-adapter@8253

@better-auth/redis-storage

npm i https://pkg.pr.new/@better-auth/redis-storage@8253

@better-auth/scim

npm i https://pkg.pr.new/@better-auth/scim@8253

@better-auth/sso

npm i https://pkg.pr.new/@better-auth/sso@8253

@better-auth/stripe

npm i https://pkg.pr.new/@better-auth/stripe@8253

@better-auth/telemetry

npm i https://pkg.pr.new/@better-auth/telemetry@8253

@better-auth/test-utils

npm i https://pkg.pr.new/@better-auth/test-utils@8253

commit: bae8184

@himself65 himself65 added this pull request to the merge queue Mar 1, 2026
Merged via the queue into canary with commit 35412b0 Mar 1, 2026
24 of 25 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Expo integration package’s build/packaging settings to avoid bundler-generated require shims, and updates the Expo demo app’s pnpm/Babel dependencies to match the new setup.

Changes:

  • Set platform: "neutral" in packages/expo tsdown config.
  • Switched @better-auth/expo published entrypoints/types from *.mjs/*.d.mts to *.js/*.d.ts.
  • Updated the Expo demo to include babel-preset-expo and pnpm build settings.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/expo/tsdown.config.ts Sets neutral platform targeting for the Expo build.
packages/expo/package.json Updates published entrypoints and type declaration paths/extensions.
demo/expo/pnpm-workspace.yaml Adds pnpm build allowlist for better-sqlite3.
demo/expo/pnpm-lock.yaml Locks babel-preset-expo addition.
demo/expo/package.json Adds babel-preset-expo to support the demo’s Babel preset configuration.
Files not reviewed (1)
  • demo/expo/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +35 to +37
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main/module/types were switched to ./dist/*.js + ./dist/*.d.ts, but the build config still uses format: ["esm"] with otherwise-default tsdown settings (same as other packages that publish *.mjs + *.d.mts). Unless tsdown is also configured to change output extensions for this package, these entrypoints will point at files that aren’t emitted and the published package (and the demo’s link:) will break. Consider either keeping the *.mjs/*.d.mts paths, or explicitly configuring tsdown to emit *.js/*.d.ts for ESM output and declarations so the artifacts match the manifest.

Copilot uses AI. Check for mistakes.
Comment on lines 15 to 17
],
platform: "neutral",
sourcemap: true,
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting platform: "neutral" makes sense for Expo/Metro, but it doesn’t (by itself) explain the package.json switch from *.mjs/*.d.mts to *.js/*.d.ts. If the goal is to change emitted extensions, consider adding explicit tsdown options to control JS and d.ts output extensions so the build artifacts stay aligned with the package entrypoints.

Copilot uses AI. Check for mistakes.
himself65 added a commit that referenced this pull request Mar 1, 2026
himself65 added a commit that referenced this pull request Mar 1, 2026
himself65 added a commit that referenced this pull request Mar 1, 2026
@better-auth better-auth locked as resolved and limited conversation to collaborators Mar 31, 2026
@bytaesu bytaesu added the locked Locked conversations after being closed for 7 days label Mar 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked Locked conversations after being closed for 7 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants