update better-auth in solid convex example so @noble/ciphers passes trustPolicy#7656
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changesbetter-auth Upgrade with Type Safety
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit c107483
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud is proposing a fix for your failed CI:
We updated convex/auth.ts to explicitly type the logger configuration as Logger | undefined, resolving a TypeScript incompatibility introduced by upgrading better-auth from ^1.3.27 to ^1.6.19. In v1.6, BetterAuthOptions.logger changed to Logger | undefined, causing @convex-dev/better-auth's contravariant DBAdapter<Options> type check to fail when TypeScript inferred the narrower { disabled: boolean } type. This fix widens the inferred options type so the build passes without weakening type safety.
Tip
✅ We verified this fix by re-running tanstack-solid-start-example-convex-better-auth:build.
diff --git a/examples/solid/start-convex-better-auth/convex/auth.ts b/examples/solid/start-convex-better-auth/convex/auth.ts
index e9c2cdb4..d4d624b9 100644
--- a/examples/solid/start-convex-better-auth/convex/auth.ts
+++ b/examples/solid/start-convex-better-auth/convex/auth.ts
@@ -1,6 +1,7 @@
import { createClient } from '@convex-dev/better-auth'
import { convex } from '@convex-dev/better-auth/plugins'
import { betterAuth } from 'better-auth'
+import type { BetterAuthOptions } from 'better-auth'
import { components } from './_generated/api'
import { query } from './_generated/server'
import type { GenericCtx } from '@convex-dev/better-auth'
@@ -16,12 +17,10 @@ export const createAuth = (
ctx: GenericCtx<DataModel>,
{ optionsOnly } = { optionsOnly: false },
) => {
- return betterAuth({
+ return betterAuth<BetterAuthOptions>({
// disable logging when createAuth is called just to generate options.
// this is not required, but there's a lot of noise in logs without it.
- logger: {
- disabled: optionsOnly,
- },
+ logger: { disabled: optionsOnly },
baseURL: siteUrl,
database: authComponent.adapter(ctx),
// Configure simple, non-verified email/password to get started
Or Apply changes locally with:
npx nx-cloud apply-locally Y75V-ijPn
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
Summary by CodeRabbit