Show HN: From Postgres Proto to TypeScript – new transpiler for tooling
github.comMy journey to upgrade pgsql-parser to TypeScript led to an exciting discovery in the pganalyze/libpg_query repository: protobuf files defining PostgreSQL's AST. This discovery inspired me to create a proto-to-TypeScript transpiler, streamlining the process of typing the pgsql-parser and unlocking other cool new features :)
The transpiler not only allowed me to add typing for pgsql-parser but also spawned a suite of TypeScript utilities that are invaluable for PostgreSQL development.
Explore the tools:
pg-proto-parser: https://github.com/launchql/pg-proto-parser pgsql-parser: https://github.com/launchql/pgsql-parser
Additionally, we now have new utilities generated by the proto parser, make sure to checkout the @pgsql/utils! That has some cool features in it:
@pgsql/enums: https://github.com/launchql/pgsql-parser/tree/main/packages/... @pgsql/types: https://github.com/launchql/pgsql-parser/tree/main/packages/... @pgsql/utils: https://github.com/launchql/pgsql-parser/tree/main/packages/...
Hope you enjoy! Please let me know anything you'd like to see!