Skip to content

feat: default to PGlite for type generation#12

Open
joaogscardoso82-max wants to merge 1 commit into
seveibar:mainfrom
joaogscardoso82-max:feat/default-pglite-generate
Open

feat: default to PGlite for type generation#12
joaogscardoso82-max wants to merge 1 commit into
seveibar:mainfrom
joaogscardoso82-max:feat/default-pglite-generate

Conversation

@joaogscardoso82-max
Copy link
Copy Markdown

Summary

pgstrap generate now uses PGlite by default, removing the requirement for a running Postgres instance during type generation.

Changes

  • src/cli.ts: Changed --pglite flag default from false to true
  • README.md: Updated docs to reflect the new default and document --no-pglite for users who need a real Postgres connection

Why

Running bun run db:generate (or npm run db:generate) currently fails unless the user has Postgres running in the background. Since PGlite support is already fully implemented and tested, making it the default removes this friction. Users who need a real Postgres connection can opt in with --no-pglite.

Testing

The existing tests/generate.pglite.test.ts already covers this exact code path. No new tests needed since we're only changing which path is the default.

Closes #2

@algora-pbc /claim #2

`pgstrap generate` now uses PGlite by default, so a running Postgres
instance is no longer required for type generation. Users who need a
real Postgres connection can pass `--no-pglite`.

Closes seveibar#2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Use pglite so that postgres isn't required when generating types

1 participant