Skip to content

Releases: tinyland-inc/tinyland-auth-pg

v0.2.4

28 Apr 20:59
0630522

Choose a tag to compare

Added

  • bootstrapUsers({ storage | pool | connectionString, tenantId, users, passwordHasher? }) for idempotent tenant-scoped deploy/startup auth user seeding.
  • Root and ./bootstrap-users package exports for the helper and public types.

Fixed

  • Keeps bootstrap user create/update logic on the shared adapter boundary instead of requiring consumers to duplicate raw SQL upsert logic.

v0.2.3

28 Apr 17:11
ba7bb75

Choose a tag to compare

Broaden @tummycrypt/tinyland-auth peer compatibility to include 0.3.x and validate against auth 0.3.0.

v0.2.2

28 Apr 16:18
v0.2.2
63a31a6

Choose a tag to compare

Publish @tummycrypt/tinyland-auth-pg 0.2.2 from the existing signed v0.2.2 tag.

v0.2.1

22 Apr 22:14
e93eafa

Choose a tag to compare

v0.2.1

Added

  • first-class NodePgStorageAdapter
  • createNodePgStorageAdapter({ connectionString, poolConfig?, closeOnDispose? })
  • Docker-backed node-postgres smoke coverage

Fixed

  • shared package now has a truthful self-hosted PostgreSQL path for CNPG/local PG without requiring consumer-local adapter hacks
  • CI/publish workflow now publishes to npm without the stale GitHub Packages branch

Notes

  • this release preserves the tenant-scoped 0.2.x API introduced in v0.2.0
  • self-hosted consumers can now use node-postgres directly through the shared package

v0.2.0 — driver-agnostic + Pattern B tenant isolation

17 Apr 19:14
ccac899

Choose a tag to compare

Breaking release. Every adapter method now takes tenantId: string as its first parameter. Every row-bearing table carries tenant_id uuid NOT NULL.

Full migration guide: CHANGELOG.md

Highlights

  • Driver-agnostic construction via createPgStorageAdapter({ db }) — accepts any drizzle client (drizzle-orm/neon-http, drizzle-orm/postgres-js, drizzle-orm/node-postgres). Callers own the client lifecycle. PgBouncer-compatible with postgres.js and { prepare: false }.
  • Pattern B tenant isolationtenant_id on every row-bearing table, composite uniques scoped to (tenant_id, <col>), TenantScoped<T> return types.
  • Construction-time validation on both { db } and { connectionString } branches.
  • Driver-agnostic delete counts via .returning({...}).length (fixes silent zero on postgres.js).
  • 29 unit tests + 3 testcontainers smoke tests exercising the postgres.js path end-to-end.

New exports

  • Database — union of supported drizzle client types
  • TenantScoped<T> — widens a domain type with { tenantId: string }
  • PgStorageConfig — discriminated union accepted by the factory

Deprecated

createPgStorageAdapter({ connectionString }) still works but only resolves to neon-http. Prefer { db } for all new code — required for PgBouncer, node-postgres, and self-hosted Postgres.

v0.1.1

30 Mar 03:13
067a2e6

Choose a tag to compare

Fix publishConfig access, add test gate to publish workflow.