Skip to content

Conversation

@pyramation
Copy link
Collaborator

Summary

Creates a new pg-ast npm package as a lightweight copy of @pgsql/utils that excludes the runtime schema functionality. This package provides PostgreSQL AST helper functions for building AST nodes programmatically.

Key changes:

  • Copied @pgsql/utils package structure to packages/pg-ast/
  • Disabled runtime schema generation in scripts/pg-proto-parser.ts (runtimeSchema.enabled: false)
  • Removed runtime-schema.ts from the source files
  • Updated README with note directing users to @pgsql/utils if they need runtime schema
  • Updated package.json with name "pg-ast" and appropriate description
  • Cleared CHANGELOG.md for the new package

Review & Testing Checklist for Human

  • Verify the package name "pg-ast" is correct (not scoped like @pgsql/utils) - this was the user's intent since they own the npm name
  • Confirm the tests in __test__/utils.test.ts pass and don't depend on runtime-schema functionality
  • Check that the README note about using @pgsql/utils for runtime schema is clear and accurate
  • Verify CI passes - the build:proto script may fail since it depends on workspace packages, but the source files are pre-generated

Test plan: Run pnpm install && cd packages/pg-ast && npx tsc --noEmit to verify TypeScript compiles. Run tests with pnpm test in the pg-ast directory.

Notes

The source files (asts.ts, wrapped.ts) are auto-generated and were copied from @pgsql/utils. The build:proto script won't work standalone since pg-proto-parser is a workspace dependency, but this shouldn't be an issue since the generated files are already in place.

Link to Devin run: https://app.devin.ai/sessions/cc86c0f40d274912b1531258fdcdbdf1
Requested by: Dan Lynch (@pyramation)

- Create pg-ast package as a copy of @pgsql/utils
- Remove runtime schema from pg-ast config (runtimeSchema.enabled: false)
- Delete runtime-schema.ts file from pg-ast
- Update README with note to use @pgsql/utils for runtime schema
- Update package.json with new name and description
@devin-ai-integration
Copy link
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 and CI monitoring

@pyramation pyramation merged commit ca3e3ce into main Dec 27, 2025
14 checks passed
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.

2 participants