-
Notifications
You must be signed in to change notification settings - Fork 1
chore: update @convex-dev/better-auth to 0.9.6 #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updated package.json dependencies and peerDependencies - Added supportsJSON flag to adapter config - Updated type imports (BetterAuthDBSchema, DBFieldAttribute) - Swapped parameter order in onUpdate trigger for consistency - Added JSON field type support in schema generation - Added field name mapping support in schema creation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🦋 Changeset detectedLatest commit: cb15708 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🔄 Incremental Review - Latest ChangesCommit: Scope: Initial PR - all changes reviewed ✅ Review SummaryThis dependency update has been implemented correctly with all necessary code changes to support 📋 Code ReviewDependencies (
|
| Aspect | Rating | Notes |
|---|---|---|
| Code Correctness | ✅ Excellent | All changes properly implement new API requirements |
| Type Safety | ✅ Excellent | Type updates are complete and consistent |
| Backward Compatibility | ✅ Excellent | Field name fallback maintains compatibility |
| Documentation | ✅ Good | Changeset and commit message are clear |
| Testing | Recommend running build and type check |
💡 Recommendations
Optional Improvements:
- Consider adding integration tests for the new JSON field type handling
- Document the
supportsJSON: falselimitation in README if not already present
Action Items:
- Changeset created
- Run
pnpm buildto verify build passes - Run
pnpm typecheckto verify type safety - Manual testing with JSON fields (if applicable)
✅ Status: Approved for Merge
All changes are correctly implemented. The update properly handles:
- New type system naming
- JSON field type support
- Field name mapping
- API parameter reordering
This is a clean dependency update with appropriate code changes.
Reviewed: cd33fd3
🤖 Generated with Claude Code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| const specialFieldIndexes = Object.keys( | ||
| specialFields(tables)[key as keyof ReturnType<typeof specialFields>] || | ||
| {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map special-field indexes to renamed field names
The new field name mapping in createSchema updates manual indexes to use field.fieldName and emits fields as attr.fieldName ?? field, but the automatically collected indexes for unique/sortable/reference fields still use the original schema keys. When a Better Auth schema renames a field (e.g. email → emailAddress) and marks it unique, specialFieldIndexes will emit an index on "email" while the table only defines "emailAddress", so the generated schema references a non-existent field and Convex will fail to compile. The list in specialFieldIndexes needs to map each key through the corresponding field.fieldName before returning.
Useful? React with 👍 / 👎.
Summary
This PR updates
@convex-dev/better-authfrom version 0.9.5 to 0.9.6, including all necessary code changes to support the new version.Changes
@convex-dev/better-authto 0.9.6 in devDependencies and peerDependenciessupportsJSON: falseflag to adapter configBetterAuthDBSchema,DBFieldAttribute)onUpdatetrigger (newDoc, oldDoc) for consistencyBreaking Changes
None - all changes are internal implementation updates to match the upstream API.
Test Plan
Changeset
A changeset has been included to document this dependency update.
🤖 Generated with Claude Code