feat(firebase)!: promote to v1.0.0 — cache auth.Client, adopt xerrors, bump deps to v1
Cache auth.Client in OnInit (eliminates per-probe app.Auth call in HealthCheck). Replace all fmt.Errorf with xerrors structured errors (ErrInvalidInput / ErrInternal). Bump health/launcher/logz to v1.0.1, add xerrors v1.0.1, Go directive to 1.26. API committed as stable.
This commit is contained in:
55
RELEASE.md
Normal file
55
RELEASE.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# v1.0.0
|
||||
|
||||
> `code.nochebuena.dev/go/firebase`
|
||||
|
||||
## Overview
|
||||
|
||||
`firebase` manages the lifecycle of a `firebase.google.com/go/v4` App: validates
|
||||
configuration at init time, initialises the SDK App, exposes the native `*firebase.App`
|
||||
to consumers, and performs health checks by probing the Firebase Auth service.
|
||||
|
||||
v1.0.0 caches the `auth.Client` inside the component (eliminating per-probe allocation),
|
||||
adopts `xerrors` for all structured error returns, bumps all micro-lib dependencies to v1,
|
||||
and commits the API as stable.
|
||||
|
||||
## What Changed Since v0.9.0
|
||||
|
||||
### Auth client cached in `OnInit`
|
||||
|
||||
`OnInit` now calls `app.Auth(context.Background())` once and stores the result on the
|
||||
component. `HealthCheck` uses the cached client directly — no per-probe `app.Auth(ctx)`
|
||||
call.
|
||||
|
||||
### Structured errors via `xerrors`
|
||||
|
||||
All `fmt.Errorf` calls replaced with `xerrors`:
|
||||
|
||||
| Situation | Code |
|
||||
|-----------|------|
|
||||
| `ProjectID` empty | `ErrInvalidInput` |
|
||||
| `fb.NewApp` fails | `ErrInternal` (wraps SDK error) |
|
||||
| `app.Auth` fails | `ErrInternal` (wraps SDK error) |
|
||||
| `HealthCheck` before `OnInit` | `ErrInternal` |
|
||||
|
||||
### Dependency updates
|
||||
|
||||
- `health`, `launcher`, `logz` bumped from `v0.9.x` to `v1.0.1`
|
||||
- `xerrors v1.0.1` added as direct dependency
|
||||
- Go directive bumped from `1.25` to `1.26`
|
||||
|
||||
## Full API (stable)
|
||||
|
||||
- `Config` — `ProjectID string` (`FIREBASE_PROJECT_ID`, required)
|
||||
- `Provider` — `App() *fb.App`
|
||||
- `Component` — embeds `launcher.Component` + `health.Checkable` + `Provider`
|
||||
- `New(logger, cfg) Component`
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
go get code.nochebuena.dev/go/firebase@v1.0.0
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
See [CHANGELOG.md](CHANGELOG.md#100---2026-05-12).
|
||||
Reference in New Issue
Block a user