Skip to content

feat: upgrade full/ package to PG 18, remove deparse + proto.js#154

Merged
pyramation merged 2 commits into
mainfrom
feat/pg18-full
May 22, 2026
Merged

feat: upgrade full/ package to PG 18, remove deparse + proto.js#154
pyramation merged 2 commits into
mainfrom
feat/pg18-full

Conversation

@pyramation
Copy link
Copy Markdown
Collaborator

@pyramation pyramation commented May 22, 2026

Summary

Upgrades the full/ (@libpg-query/parser) package from libpg_query 17-6.1.0 to 18.0.0 and removes deparse functionality (handled downstream via pgsql-deparser).

Changes:

  • Makefile: LIBPG_QUERY_TAG18.0.0, removed _wasm_deparse_protobuf, _wasm_parse_query_protobuf, _wasm_get_protobuf_len from EXPORTED_FUNCTIONS
  • wasm_wrapper.c: Removed wasm_deparse_protobuf(), wasm_parse_query_protobuf(), wasm_get_protobuf_len() C functions
  • index.ts: Removed deparse(), deparseSync() exports and proto.js import
  • package.json: Removed proto.js from files, removed @launchql/protobufjs dep and @launchql/proto-cli devDep, removed protogen script, updated @pgsql/types to ^18.0.0
  • Deleted: full/proto.js (5.2 MB), full/scripts/protogen.js, full/test/deparsing.test.js
  • CI: Updated full matrix entry from version 17 to 18
  • Docs: Removed deparse API docs from full/README.md, updated root README.md

Remaining exports: parse, parseSync, parsePlPgSQL, parsePlPgSQLSync, fingerprint, fingerprintSync, normalize, normalizeSync, scan, scanSync

BREAKING CHANGE: deparse() and deparseSync() are no longer exported.

Review & Testing Checklist for Human

  • Verify the WASM build compiles successfully against libpg_query 18.0.0 (CI build-wasm job)
  • Verify all remaining tests pass (parse, plpgsql, fingerprint, normalize, scan, errors) across all 3 OS
  • Confirm no downstream consumers of @libpg-query/parser rely on deparse/deparseSync — these are removed
  • After merge, test parsePlPgSQL with PG 18's reworked PL/pgSQL parser to confirm behavior matches expectations

Notes

  • The PL/pgSQL C API signature (pg_query_parse_plpgsql) is unchanged in PG 18 — the rework is internal to how it processes input
  • The protobuf/pg_query.pb-c.h include is retained in wasm_wrapper.c because wasm_scan() uses pg_query__scan_result__unpack from it
  • Removes ~113k lines (mostly the 5.2 MB proto.js)

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

- Update libpg_query tag from 17-6.1.0 to 18.0.0
- Remove deparse/deparseSync (deparse handled downstream)
- Remove proto.js (5.2 MB), @launchql/protobufjs dep, protogen script
- Remove wasm_deparse_protobuf, wasm_parse_query_protobuf, wasm_get_protobuf_len from C wrapper
- Clean up EXPORTED_FUNCTIONS in Makefile
- Update @pgsql/types dep to ^18.0.0
- Update CI matrix full version 17 -> 18

BREAKING CHANGE: deparse() and deparseSync() are no longer exported.
Use @pgsql/deparser or equivalent downstream deparse library instead.
@devin-ai-integration
Copy link
Copy Markdown

🤖 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

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 22, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​pgsql/​types@​18.0.010010010093100

View full report

@pyramation pyramation merged commit 27597fa into main May 22, 2026
66 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.

1 participant