Skip to content

Commit 87a1805

Browse files
authored
Merge pull request #19 from nestm-dev/changeset-release/main
chore: release @nestm/better-auth (alpha)
2 parents 31bb0f6 + d0a3053 commit 87a1805

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

.changeset/pre.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"calm-request-state",
1010
"initial-release",
1111
"public-metadata-interop",
12-
"quiet-routes-decide"
12+
"quiet-routes-decide",
13+
"typeorm-database-adapter"
1314
]
1415
}

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# @nestm/better-auth
22

3+
## 0.1.0-alpha.6
4+
5+
### Minor Changes
6+
7+
- af93872: Add a TypeORM database adapter, exported from the new `./typeorm` subpath.
8+
9+
`typeormAdapter(dataSource, config?)` backs Better Auth with a TypeORM `DataSource` on
10+
PostgreSQL, resolving models and fields through `EntityMetadata` (`rateLimit` → `class
11+
RateLimit` → table `rate_limit`, `userId` → column `user_id`) with an `entities` override for
12+
anything ambiguous. It implements `consumeOne` and `incrementOne` natively as single-statement
13+
compare-and-swaps, and takes a `getManager` hook so auth writes can join a surrounding unit of
14+
work.
15+
16+
The adapter owns the `timestamp`-column timezone contract end to end — binding dates as
17+
ISO-8601 UTC and reading them back through `AT TIME ZONE 'UTC'` — so it is correct on any
18+
machine without `pg.defaults.parseInputDatesAsUTC` or a custom OID 1114 parser, and without
19+
mutating process-global driver state.
20+
21+
`typeorm` is an optional peer (`^1.1.0`), which raises `engines.node` to `>=22.13`.
22+
323
## 0.1.0-alpha.5
424

525
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nestm/better-auth",
3-
"version": "0.1.0-alpha.5",
3+
"version": "0.1.0-alpha.6",
44
"description": "Better Auth integration for NestJS 12 (ESM)",
55
"license": "BSD-3-Clause",
66
"author": "nestm",

0 commit comments

Comments
 (0)