Skip to content

Commit 3cc3308

Browse files
fix: drop better-auth peer to fix npm eresolve (#309)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 02c4c03 commit 3cc3308

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"evlog": patch
3+
---
4+
5+
Remove `better-auth` from `peerDependencies`. Optional peers still led npm to resolve Better Auth’s peer graph (including `@sveltejs/kit` / Vite), causing `ERESOLVE` for apps that do not use Better Auth ([#299](https://github.com/HugoRCD/evlog/issues/299)). Users of `evlog/better-auth` should keep `better-auth` as a direct dependency (see docs).

apps/docs/content/2.logging/6.better-auth.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ links:
1818

1919
`evlog/better-auth` turns anonymous wide events into identified ones. Every request automatically includes who made it — no manual `log.set({ user })` needed.
2020

21+
## Prerequisites
22+
23+
Use [Better Auth](https://better-auth.com/) as a **direct dependency** in your app (`npm i better-auth`, `pnpm add better-auth`, `bun add better-auth`, etc.). `evlog` does not bundle Better Auth. The integration is tested against Better Auth `>=1.6.9` (same major as [the playground](https://github.com/HugoRCD/evlog/tree/main/apps/playground)).
24+
2125
::code-collapse
2226

2327
```txt [Prompt]

bun.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/evlog/package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,7 @@
364364
"react-router": ">=7.14.2",
365365
"vite": "^7.0.0 || ^8.0.0",
366366
"ai": ">=6.0.168",
367-
"@tanstack/start-client-core": "^1.167.20",
368-
"better-auth": ">=1.6.9"
367+
"@tanstack/start-client-core": "^1.167.20"
369368
},
370369
"peerDependenciesMeta": {
371370
"@nuxt/kit": {
@@ -415,9 +414,6 @@
415414
},
416415
"@tanstack/start-client-core": {
417416
"optional": true
418-
},
419-
"better-auth": {
420-
"optional": true
421417
}
422418
}
423419
}

0 commit comments

Comments
 (0)