Skip to content

fix(runtime): export public composables subpath#315

Merged
onmax merged 4 commits intomainfrom
fix/public-composables-exports
Apr 29, 2026
Merged

fix(runtime): export public composables subpath#315
onmax merged 4 commits intomainfrom
fix/public-composables-exports

Conversation

@onmax
Copy link
Copy Markdown
Collaborator

@onmax onmax commented Apr 29, 2026

This adds a stable @onmax/nuxt-better-auth/composables export for published packages and removes module-owned useUserSession imports from #imports inside the published runtime. App-level auto-imports stay the same, but reusable downstream packages now have a supported subpath instead of relying on Nuxt virtual imports from published code.

The underlying coupling came from 2c955070 (fix: use #imports for useUserSession in plugin). That made sense for module-owned runtime wiring, but it also left no stable public import path for package consumers. This PR keeps the internal runtime on relative imports for its own composables, adds a small docs note about when to use the new subpath, and adds regressions for the new export surface plus the built output.

I checked #307 and #308 first because they touch adjacent fixture and type-stub surfaces. This branch does not stack on either PR, but it does carry the minimal plugin-inference fixture stub adjustment needed for the current suite on top of main.

Ran pnpm test test/exports.test.ts test/composables-subpath-exports.test.ts test/infer-plugins-types.test.ts test/nuxthub-prerender-db-import.test.ts test/preserve-redirect-disabled.test.ts and pnpm typecheck. A full pnpm test run also completed aside from one transient Nuxt test-server port timeout, and the timed-out suite passed immediately when rerun in isolation.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 29, 2026

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

Project Deployment Actions Updated (UTC)
nuxt-better-auth-docs Ready Ready Preview, Comment Apr 29, 2026 8:55am

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 29, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@onmax/nuxt-better-auth@315

commit: 288ff6d

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 29, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
better-auth 288ff6d Apr 29 2026, 08:35 AM

@onmax onmax merged commit 37e39aa into main Apr 29, 2026
4 of 6 checks passed
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.

1 participant