feat(postgres): add @aizvi/auth-postgres package - #12
Closed
ahmadhuss wants to merge 1 commit into
Closed
Conversation
New PostgreSQL storage adapter for @aizvi/auth, backed by pg. postgresAdapter()
opens its own connection pool from a connection string; createPostgresAuthAdapter()
also works with any already-open client matching the query(text, params) => { rows }
shape, including pg.Pool, pg.Client, and @electric-sql/pglite. Unit tests run against
pglite, a real Postgres compiled to WASM, so no server or Docker is needed in CI.
Also updates the root and core package docs to reference the new package, and adds
a changeset for the initial release.
ahmadhuss
force-pushed
the
feat/postgres-package
branch
from
August 1, 2026 05:18
2644e19 to
85c643e
Compare
Member
Author
|
Closing and reopening as a fresh PR to fully clean the branch history (removing an unwanted attribution trailer that persisted across a force-push). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@aizvi/auth-postgrespackage, a PostgreSQL storage adapter for@aizvi/authbacked bypg, following the same pattern as@aizvi/auth-sqlite.postgresAdapter({ connectionString })opens its ownpg.Pool;createPostgresAuthAdapter(db)also works with any already-open client matching thequery(text, params) => { rows }shape, includingpg.Pool,pg.Client, or@electric-sql/pglite.@electric-sql/pglite(a real Postgres compiled to WASM), so the suite needs no Postgres server or Docker.@aizvi/auth-postgresrelease.Test plan
bun run build(all three packages)bun run typecheck(all three packages)bun run lintbun run test(core, sqlite, postgres all pass, including 6 new adapter tests against pglite)