feat(v18)!: retire full/ — libpg-query pg18+ ships the full API (13–17 stay slim)#161
Merged
Conversation
… + full/18 (pg18)
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per discussion: instead of maintaining a separate full package,
full/(@libpg-query/parser) is deleted entirely and the regularlibpg-queryPG18 build (versions/18) becomes the full-API build. PG 13–17 remain slim (parse/parseSync only) — the full API is a PG18+ upgrade incentive.versions/18now exports:parse,parseSync,parsePlPgSQL(+Sync),scan(+Sync),fingerprint(+Sync),normalize(+Sync),loadModule+ SqlError helperstemplates/full/{index.ts, wasm_wrapper.c, libpg-query.d.ts}— full-API variantstemplates/Makefile.templategains{{EXPORTED_FUNCTIONS}};copy-templates.jspicks slim vs full via a newx-publish.fullApi: trueflag (set only on versions/18, whoselibpgQueryTagis also corrected to18-constructive)pg18.test.js: version180004,RETURNING OLD.a AS oa, NEW.a AS na(returningClause.exprs),GENERATED ... VIRTUAL(generated_kind: "v"),ALTER CONSTRAINT c NOT ENFORCED(ATAlterConstraint.alterEnforceability), scan of OLD/NEW tokenspg_query.hsurface (parse/plpgsql/fingerprint/normalize/scan) is unchanged from 17; only AST output shapes differfullmatrix entry removed (v18 covers it); manual build-wasm workflows point atversions/18;publish-versions.jsfull-package block removed; docs (README, PUBLISH.md, versions/18 README + SCAN.md) updatedVerification (local, docker emscripten/emsdk — same as CI)
wasm/index.cjs@pgsql/parserrebuilt against the new v18 wasm — all pass (parser only uses_wasm_parse_query_raw, still exported)Publishing (not done — for Dan)
pnpm run publish:versions # select 18, pick "minor" → publishes libpg-query@18.1.0 --tag pg18or manually:
Optional cleanup on npm afterwards:
npm deprecate @libpg-query/parser "Retired: use libpg-query@pg18 — the full API now ships in the regular package (PG18+)."Link to Devin session: https://app.devin.ai/sessions/2ca64f9082684d28890888748447face
Requested by: @pyramation