Skip to content

feat: default to pglite for db:generate without requiring postgres - #66

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

samsiroo wants to merge 1 commit into
seveibar:mainfrom
samsiroo:feat/default-pglite-generate

Conversation

@samsiroo

Copy link
Copy Markdown

Fixes #2
@algora-pbc /claim #2

Summary

Default pglite to true when running generate / db:generate, enabling in-memory schema and type generation out of the box without requiring an active PostgreSQL daemon running in the background.

Users targeting an external PostgreSQL database can explicitly opt out using the --no-pglite flag.

Changes

  • src/cli.ts: Default --pglite flag to true with support for explicit --no-pglite negation (argv.pglite !== false).
  • src/generate.ts: Default pglite parameter to true.
  • tests/generate.pglite.test.ts: Verify generate() runs with PGlite by default without requiring pglite: true explicitly passed.
  • README.md: Update documentation to reflect default in-memory behavior and --no-pglite opt-out.

Verification

  • bun test: All test suites pass.
  • bun run build: Clean compilation with tsup.

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