Skip to content

feat(pgpm): zero-config extensions cleanup + --pglite init flag (consolidated)#1358

Merged
pyramation merged 7 commits into
mainfrom
feat/pgpm-extensions-and-pglite
Jul 11, 2026
Merged

feat(pgpm): zero-config extensions cleanup + --pglite init flag (consolidated)#1358
pyramation merged 7 commits into
mainfrom
feat/pgpm-extensions-and-pglite

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Consolidates three PRs (#1354, #1356, #1357) into one. Together they finish the extensions-workflow cleanup and add the --pglite init flag. Pairs with the docs consolidation in constructive-io/constructive.io.

1. Harden pgpm extension (was #1356)

Makes pgpm extension the canonical enable-later path:

  • Non-destructive .control rewrite — edits only the requires = line, preserving custom fields (schema, comment, relocatable, module_pathname, …) instead of regenerating the file from defaults.
  • Non-interactive flags --add/--remove/--set for CI/scripts; no flags ⇒ interactive picker (unchanged).
  • Snapshots updated to reflect that custom fields now survive a dependency change (the desired behavior).

2. --pglite init flag with workspace inheritance (was #1354)

--pglite is sugar over --repo pointing at pglite-boilerplates:

pgpm init workspace --pglite   # records boilerplates:{repo} in workspace pgpm.json
pgpm init                      # inside that workspace → inherits pglite, no flag
pgpm init --pglite | --repo …  # explicit flags still override

Resolve/persist/read helpers live in pgpm/cli/src/commands/init/boilerplate.ts (network-free unit tests); new PGLITE_TEMPLATE_REPO constant and optional PgpmWorkspaceConfig.boilerplates type.

3. pgpm skill docs (was #1357)

Updates .agents/skills/pgpm/ to document zero-config init + the non-interactive pgpm extension flags, and corrects the now-false "fully interactive — don't use in CI" claims.

(PR A, #1355 — defaulting pgpm init to no extensions — already merged and is the base these build on.)

Tests

All three branches' suites merged cleanly (no conflicts): extension writer/command unit + integration tests, init flag resolution + gated e2e, updated snapshots. 37/37 green on each source PR.

Link to Devin session: https://app.devin.ai/sessions/424b76f81a60499493ac946b57136ad9
Requested by: @pyramation

pyramation and others added 6 commits July 11, 2026 02:16
- --pglite is sugar for the pglite-boilerplates template repo (--repo overrides)
- workspace init records the chosen boilerplate source in pgpm.json
- bare `pgpm init` inside a pglite workspace inherits that source automatically
- custom/single-family repos let .boilerplates.json resolve the variant dir

Adds PGLITE_TEMPLATE_REPO constant and PgpmWorkspaceConfig.boilerplates field.
- Non-destructive .control rewrite: only the requires line is updated, preserving custom fields (schema, comment, relocatable, module_pathname)
- Non-interactive flags: --add, --remove, --set
The pg-verify and totp fixtures carry custom .control comments; the old
regenerate-from-defaults behavior wiped them. Now they are preserved, so the
recorded snapshots are updated to match.
…tension

pgpm init now scaffolds with no extensions by default; pgpm extension gained
non-interactive --add/--remove/--set flags and rewrites only the requires line.
Correct the skill's now-false 'fully interactive, don't use in CI' claims for
init and extension, and drop legacy uuid-ossp/plpgsql requires examples.
@pyramation pyramation self-assigned this Jul 11, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation pyramation merged commit eda1f2a into main Jul 11, 2026
37 checks passed
@pyramation pyramation deleted the feat/pgpm-extensions-and-pglite branch July 11, 2026 06:45
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