feat: implement multi-version PostgreSQL support with folder-based structure#108
Closed
devin-ai-integration[bot] wants to merge 3 commits into17-latestfrom
Closed
Conversation
…ructure - Create lightweight versions for PG13-16 without deparse/scan functionality - Add full-featured PG17 version (libpg-query-full) - Implement libpg-query-multi package with PG15/16/17 and Parser class API - Add master Makefile for coordinated builds across all versions - Generate version-specific TypeScript types using PgProtoParser - Maintain existing test patterns for each version Key features: - Lightweight WASM builds exclude wasm_deparse_protobuf and wasm_scan functions - Parser class supports runtime version selection with error handling - Version-specific libpg_query tags: 13-2.2.0, 14-3.0.0, 15-4.2.4, 16-5.2.0, 17-6.1.0 - Type generation from GitHub proto files using pg-proto-parser - Comprehensive test suites for all packages - Bundle size optimization for lightweight versions Co-Authored-By: Dan Lynch <pyramation@gmail.com>
Author
🤖 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:
|
- Move root package.json functionality to libpg-query-full (PG17) - Replace root with workspace coordinator package.json - Update all version packages to use Docker-based wasm:make scripts - Standardize exports, files, and dependency configurations - Lightweight versions exclude proto.js from files array - Version-specific @pgsql/types dependencies configured correctly Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Revert root package.json to original libpg-query structure - Rename libpg-query-full to libpg-query-17 to avoid conflicts - Add workspace coordination scripts to root package.json - Maintain Docker-based build pattern across all packages - Fix CI Build WASM job that was failing due to missing wasm:build script Co-Authored-By: Dan Lynch <pyramation@gmail.com>
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.
Multi-Version PostgreSQL Support Implementation
This PR implements a comprehensive multi-version PostgreSQL support system for libpg-query-node with a folder-based structure, enabling users to choose between lightweight and full-featured packages based on their needs.
🎯 Overview
📦 Package Structure
🚀 Key Features
Lightweight Versions (PG13-16)
wasm_deparse_protobuf,wasm_scan,wasm_parse_query_protobuf,wasm_get_protobuf_lenFull Version (PG17)
Multi-Version Package
new Parser({ version: 15 })🔧 Technical Implementation
WASM Wrapper Modifications
wasm_wrapper_light.cfor lightweight versionsJavaScript API Changes
Build System
Type Generation
https://raw.githubusercontent.com/pganalyze/libpg_query/refs/tags/{VERSION}/protobuf/pg_query.proto📋 Version Tags Used
13-2.2.014-3.0.015-4.2.416-5.2.017-6.1.0🧪 Testing Strategy
📊 Bundle Size Comparison
🔨 Build Commands
📖 Usage Examples
Lightweight Version
Full Version
Multi-Version
✅ Verification
🔗 Related
Link to Devin run: https://app.devin.ai/sessions/fc97aafda04f4867810ec991fb0efd2c
Requested by: Dan Lynch (pyramation@gmail.com)