Skip to content

Default generate to PGlite#27

Open
tanchaowen84 wants to merge 1 commit into
seveibar:mainfrom
tanchaowen84:task/default-pglite-generate-2
Open

Default generate to PGlite#27
tanchaowen84 wants to merge 1 commit into
seveibar:mainfrom
tanchaowen84:task/default-pglite-generate-2

Conversation

@tanchaowen84
Copy link
Copy Markdown

@tanchaowen84 tanchaowen84 commented May 20, 2026

@algora-pbc /claim #2

Implementation notes

  • Make pgstrap generate default to the existing PGlite generation path, so generated db:generate scripts no longer require a background Postgres server.
  • Keep external Postgres generation available through --no-pglite.
  • Restore DATABASE_URL in a finally block and close both the temporary pg-gateway server and PGlite database after generation.
  • Update README guidance for the new default and external Postgres opt-out.
  • Add regression coverage for default PGlite generation with an invalid external DATABASE_URL, plus DATABASE_URL restoration when generation fails after the temporary PGlite connection is created.

Verification

  • bun test - 4 pass, 0 fail, 11 expect() calls
  • bun run build - CJS and DTS builds succeeded
  • bun run format:check - Checked 15 files, no fixes needed
  • git diff --check - passed with no output

Payment: PayPal https://paypal.me/tanchaowen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant