What's Changed
better-auth v1.5 compatibility
Added
- Native D1 support: New
d1Nativeoption onwithCloudflareaccepts aD1Databasebinding directly — no Drizzle required.
Changed
- BREAKING: Peer dependency
better-authminimum raised from^1.1.21to^1.5.0 - BREAKING: New peer dependency
@better-auth/drizzle-adapter(^1.5.0) required when using Drizzle-based database options (d1,postgres,mysql) - Bumped
zodto^4.3.0,drizzle-ormto^0.45.0
Fixed
- Geolocation silently broken on v1.5+: Session
create.beforehook returned the mutated object directly, which v1.5 interprets astrueand discards mutations. Now returns{ data: ... }wrapper. - Renamed
FieldAttribute→DBFieldAttributeandAuthPluginSchema→BetterAuthPluginDBSchemato match upstream renames - Migrated drizzle adapter imports from deprecated
better-auth/adapters/drizzleto@better-auth/drizzle-adapter - Removed
anytypes from session hook and R2 hook parameters
Full Changelog: v0.2.9...v0.3.0