diff --git a/README.md b/README.md index 3bb9d62..e2e92af 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,19 @@ This is the official PostgreSQL parser, compiled to WebAssembly (WASM) for seaml Built to power [pgsql-parser](https://github.com/pyramation/pgsql-parser), this library delivers full fidelity with the Postgres C codebase — no rewrites, no shortcuts. -### Features +## Features * šŸ”§ **Powered by PostgreSQL** – Uses the official Postgres C parser compiled to WebAssembly * šŸ–„ļø **Cross-Platform** – Runs smoothly on macOS, Linux, and Windows * 🌐 **Node.js & Browser Support** – Consistent behavior in any JS environment * šŸ“¦ **No Native Builds Required** – No compilation, no system-specific dependencies * 🧠 **Spec-Accurate Parsing** – Produces faithful, standards-compliant ASTs -* šŸš€ **Production-Grade** – Powers tools like [`pgsql-parser`](https://github.com/pyramation/pgsql-parser) +* šŸš€ **Production-Grade** – Millions of downloads powering 1000s of projects + +## šŸš€ For Round-trip Codegen + +> šŸŽÆ **Want to parse + deparse (full round trip)?** +> We highly recommend using [`pgsql-parser`](https://github.com/launchql/pgsql-parser) which leverages a pure TypeScript deparser that has been battle-tested against 21,000+ SQL statements and is built on top of libpg-query. ## Installation @@ -47,105 +52,51 @@ const result = await parse('SELECT * FROM users WHERE active = true'); // {"version":170004,"stmts":[{"stmt":{"SelectStmt":{"targetList":[{"ResTarget" ... "op":"SETOP_NONE"}}}]} ``` -## Versions - -Our latest is built with `17-latest` branch from libpg_query - -| PG Major Version | libpg_query | npm dist-tag -|--------------------------|-------------|---------| -| 17 | 17-6.1.0 | [`pg17`](https://www.npmjs.com/package/libpg-query/v/latest) -| 16 | 16-5.2.0 | [`pg16`](https://www.npmjs.com/package/libpg-query/v/pg16) -| 15 | 15-4.2.4 | [`pg15`](https://www.npmjs.com/package/libpg-query/v/pg15) -| 14 | 14-3.0.0 | [`pg14`](https://www.npmjs.com/package/libpg-query/v/pg14) -| 13 | 13-2.2.0 | [`pg13`](https://www.npmjs.com/package/libpg-query/v/pg13) - -## Usage - -### `parse(query: string): Promise` - -Parses the SQL and returns a Promise for the parse tree. May reject with a parse error. - -```typescript -import { parse } from 'libpg-query'; - -const result = await parse('SELECT * FROM users WHERE active = true'); -// Returns: ParseResult - parsed query object -``` - -### `parseSync(query: string): ParseResult` - -Synchronous version that returns the parse tree directly. May throw a parse error. - -```typescript -import { parseSync } from 'libpg-query'; - -const result = parseSync('SELECT * FROM users WHERE active = true'); -// Returns: ParseResult - parsed query object -``` +## šŸ“¦ Packages -⚠ **Note:** If you need additional functionality like `fingerprint`, `scan`, `deparse`, or `normalize`, check out the full package (`@libpg-query/parser`) in the [./full](https://github.com/launchql/libpg-query-node/tree/main/full) folder of the repo. +This repository contains multiple packages to support different PostgreSQL versions and use cases: -### Initialization +### Available Packages & Versions -The library provides both async and sync methods. Async methods handle initialization automatically, while sync methods require explicit initialization. +| Package | Description | PostgreSQL Versions | npm Package | +|---------|-------------|---------------------|-------------| +| **[libpg-query](https://github.com/launchql/libpg-query-node/tree/main/versions)** | Lightweight parser (parse only) | 13, 14, 15, 16, 17 | [`libpg-query`](https://www.npmjs.com/package/libpg-query) | +| **[@pgsql/types](https://github.com/launchql/libpg-query-node/tree/main/types)** | TypeScript type definitions | 13, 14, 15, 16, 17 | [`@pgsql/types`](https://www.npmjs.com/package/@pgsql/types) | +| **[@pgsql/enums](https://github.com/launchql/libpg-query-node/tree/main/enums)** | TypeScript enum definitions | 13, 14, 15, 16, 17 | [`@pgsql/enums`](https://www.npmjs.com/package/@pgsql/enums) | +| **[@libpg-query/parser](https://github.com/launchql/libpg-query-node/tree/main/full)** | Full parser with all features | 17 only | [`@libpg-query/parser`](https://www.npmjs.com/package/@libpg-query/parser) | -#### Async Methods (Recommended) +### Version Tags -Async methods handle initialization automatically and are always safe to use: +Each versioned package uses npm dist-tags for PostgreSQL version selection: -```typescript -import { parse } from 'libpg-query'; - -// These handle initialization automatically -const result = await parse('SELECT * FROM users'); -``` - -#### Sync Methods - -Sync methods require explicit initialization using `loadModule()`: - -```typescript -import { loadModule, parseSync } from 'libpg-query'; - -// Initialize first -await loadModule(); +```bash +# Install specific PostgreSQL version +npm install libpg-query@pg17 # PostgreSQL 17 (latest) +npm install libpg-query@pg16 # PostgreSQL 16 +npm install @pgsql/types@pg17 # Types for PostgreSQL 17 +npm install @pgsql/enums@pg15 # Enums for PostgreSQL 15 -// Now safe to use sync methods -const result = parseSync('SELECT * FROM users'); +# Install latest (defaults to pg17) +npm install libpg-query +npm install @pgsql/types +npm install @pgsql/enums ``` -### `loadModule(): Promise` +### Which Package Should I Use? -Explicitly initializes the WASM module. Required before using any sync methods. +- **Just need to parse SQL?** → Use `libpg-query` (lightweight, all PG versions) +- **Need TypeScript types?** → Add `@pgsql/types` and/or `@pgsql/enums` +- **Need fingerprint, normalize, or deparse?** → Use `@libpg-query/parser` (PG 17 only) -```typescript -import { loadModule, parseSync } from 'libpg-query'; - -// Initialize before using sync methods -await loadModule(); -const result = parseSync('SELECT * FROM users'); -``` -Note: We recommend using async methods as they handle initialization automatically. Use sync methods only when necessary, and always call `loadModule()` first. +## API Documentation -### Type Definitions - -```typescript -interface ParseResult { - version: number; - stmts: Statement[]; -} - -interface Statement { - stmt_type: string; - stmt_len: number; - stmt_location: number; - query: string; -} - -``` +For detailed API documentation and usage examples, see the package-specific READMEs: -**Note:** The return value is an array, as multiple queries may be provided in a single string (semicolon-delimited, as PostgreSQL expects). +- **libpg-query** - [Parser API Documentation](https://github.com/launchql/libpg-query-node/tree/main/versions/17) +- **@pgsql/types** - [Types Documentation](https://github.com/launchql/libpg-query-node/tree/main/types/17) +- **@pgsql/enums** - [Enums Documentation](https://github.com/launchql/libpg-query-node/tree/main/enums/17) +- **@libpg-query/parser** - [Full Parser Documentation](https://github.com/launchql/libpg-query-node/tree/main/full) ## Build Instructions diff --git a/enums/13/package.json b/enums/13/package.json index ba03813..3b3c77b 100644 --- a/enums/13/package.json +++ b/enums/13/package.json @@ -1,6 +1,6 @@ { "name": "@libpg-query/enums13", - "version": "13.12.0", + "version": "13.13.0", "author": "Dan Lynch ", "description": "PostgreSQL AST enums from the real Postgres parser", "main": "index.js", diff --git a/enums/14/package.json b/enums/14/package.json index 6852f27..a78453e 100644 --- a/enums/14/package.json +++ b/enums/14/package.json @@ -1,6 +1,6 @@ { "name": "@libpg-query/enums14", - "version": "14.8.0", + "version": "14.9.0", "author": "Dan Lynch ", "description": "PostgreSQL AST enums from the real Postgres parser", "main": "index.js", diff --git a/enums/15/package.json b/enums/15/package.json index 733c934..4a03861 100644 --- a/enums/15/package.json +++ b/enums/15/package.json @@ -1,6 +1,6 @@ { "name": "@libpg-query/enums15", - "version": "15.8.0", + "version": "15.9.0", "author": "Dan Lynch ", "description": "PostgreSQL AST enums from the real Postgres parser", "main": "index.js", diff --git a/enums/16/package.json b/enums/16/package.json index d8c1dd3..3e8f6a5 100644 --- a/enums/16/package.json +++ b/enums/16/package.json @@ -1,6 +1,6 @@ { "name": "@libpg-query/enums16", - "version": "16.8.0", + "version": "16.9.0", "author": "Dan Lynch ", "description": "PostgreSQL AST enums from the real Postgres parser", "main": "index.js", diff --git a/enums/17/package.json b/enums/17/package.json index 78bf982..ec9ca07 100644 --- a/enums/17/package.json +++ b/enums/17/package.json @@ -1,6 +1,6 @@ { "name": "@libpg-query/enums17", - "version": "17.8.0", + "version": "17.9.0", "author": "Dan Lynch ", "description": "PostgreSQL AST enums from the real Postgres parser", "main": "index.js", diff --git a/full/README.md b/full/README.md index 3a0891d..1a31dd9 100644 --- a/full/README.md +++ b/full/README.md @@ -30,7 +30,12 @@ Built to power [pgsql-parser](https://github.com/pyramation/pgsql-parser), this * 🌐 **Node.js & Browser Support** – Consistent behavior in any JS environment * šŸ“¦ **No Native Builds Required** – No compilation, no system-specific dependencies * 🧠 **Spec-Accurate Parsing** – Produces faithful, standards-compliant ASTs -* šŸš€ **Production-Grade** – Powers tools like [`pgsql-parser`](https://github.com/pyramation/pgsql-parser) +* šŸš€ **Production-Grade** – Millions of downloads powering 1000s of projects + +## šŸš€ For Round-trip Codegen + +> šŸŽÆ **Want to parse + deparse (full round trip)?** +> We highly recommend using [`pgsql-parser`](https://github.com/launchql/pgsql-parser) which leverages a pure TypeScript deparser that has been battle-tested against 21,000+ SQL statements and is built on top of libpg-query. ## Installation diff --git a/full/package.json b/full/package.json index daf5a70..26c93be 100644 --- a/full/package.json +++ b/full/package.json @@ -37,7 +37,7 @@ "@yamlize/cli": "^0.8.0" }, "dependencies": { - "@pgsql/types": "^17.4.2", + "@pgsql/types": "^17.6.0", "@launchql/protobufjs": "7.2.6" }, "keywords": [ diff --git a/package.json b/package.json index c249d4f..66afd46 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "build:enums": "node scripts/build-enums.js", "prepare:enums": "node scripts/prepare-enums.js", "publish:types": "node scripts/publish-types.js", - "publish:enums": "node scripts/publish-enums.js" + "publish:enums": "node scripts/publish-enums.js", + "update:versions-types": "node scripts/update-versions-types.js" }, "devDependencies": { "@types/node": "^20.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76d3247..2dd3eec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,8 +68,8 @@ importers: specifier: 7.2.6 version: 7.2.6 '@pgsql/types': - specifier: ^17.4.2 - version: 17.5.2 + specifier: ^17.6.0 + version: 17.6.0 devDependencies: '@launchql/proto-cli': specifier: 1.25.0 @@ -116,32 +116,32 @@ importers: versions/13: dependencies: '@pgsql/types': - specifier: ^13.10.0 - version: 13.10.0 + specifier: ^13.11.0 + version: 13.11.0 versions/14: dependencies: '@pgsql/types': - specifier: ^14.0.0 - version: 14.0.0 + specifier: ^14.1.0 + version: 14.1.0 versions/15: dependencies: '@pgsql/types': - specifier: ^15.0.2 - version: 15.0.2 + specifier: ^15.1.0 + version: 15.1.0 versions/16: dependencies: '@pgsql/types': - specifier: ^16.0.0 - version: 16.0.0 + specifier: ^16.1.0 + version: 16.1.0 versions/17: dependencies: '@pgsql/types': - specifier: ^17.4.2 - version: 17.5.2 + specifier: ^17.6.0 + version: 17.6.0 packages: @@ -374,24 +374,24 @@ packages: '@types/node': 20.19.1 long: 5.3.2 - /@pgsql/types@13.10.0: - resolution: {integrity: sha512-W2xBQnbaBzGFFDhxdATV+PHq5HET8HTp8Yu7ZdR3gYSLJOU35GjAUE/WQ+ll8pC1m1j+zW11L97S5B1l5eLlbQ==} + /@pgsql/types@13.11.0: + resolution: {integrity: sha512-+pxiFm38fPBF3zgCF7sp8/kU6afr/I8d8FvtwiTRbNetwY2rJ8ASSgdwC4e4ejkz91Pq2Mwyrd+j8AfabYRFeg==} dev: false - /@pgsql/types@14.0.0: - resolution: {integrity: sha512-QbqqGhlinfZKrJudTK2LgbxvMzqjtCZIEHhTNoqySwIlV3EVJHpNv5edrcxsMB61QWP8vRusPpcpFq90LT7Gqg==} + /@pgsql/types@14.1.0: + resolution: {integrity: sha512-TiKzDVkTFxT5Twd604RH/6wmiBdIMyDXRlsZPevdtDpWXowPFm6GEv2TALB0QWq6Xa2GLtBtOCDtdMC2XANmyA==} dev: false - /@pgsql/types@15.0.2: - resolution: {integrity: sha512-K3gtnbqbSUuUVmPm143qx5Gy2EmKuooshV95yMD48EUQ1256sgZBriEfY61OWJnlzdREdqHTIOxQqpZAb7XdZg==} + /@pgsql/types@15.1.0: + resolution: {integrity: sha512-r2qxkInQSev6JyaIwtXVh2dQQ5C5yMR+oIv8ZE2qHRvBqku6eIqcPxldAjAXod2gQ42QGaiXF0rLw/Ijf8Cv5A==} dev: false - /@pgsql/types@16.0.0: - resolution: {integrity: sha512-5y6LsSqrsiZApustJl5a+5Vh2glyhdUVgRJfG+f7AosMvohLG/yptBZg234/rKXsOdFJBXwwUdhv6ynbdZuMHA==} + /@pgsql/types@16.1.0: + resolution: {integrity: sha512-ZsHVTfhxkhHKZYVH3qy24u5HsYYTYgC+d+80Iul+P1lpKAoS4yToMgrWKznhcqiK6iBeHNf8AcdQJXyLolce5g==} dev: false - /@pgsql/types@17.5.2: - resolution: {integrity: sha512-LAuKOfWhYNR31iE+MSZP215kOhkobCB5R8dm1+ZJTV0jqKJRIr7dCVdYeOJA2YL7gOmZmu55ELH/qiZTZqWLSg==} + /@pgsql/types@17.6.0: + resolution: {integrity: sha512-WGVIne1kFm3pIHiCkUWGbv7vlhxCRT+61UigsYejhmEsl4Iyf8d2CBnt9muhi571mfuwvtkeD0sxo5y8oj0ijQ==} dev: false /@pkgjs/parseargs@0.11.0: diff --git a/scripts/update-versions-types.js b/scripts/update-versions-types.js new file mode 100755 index 0000000..b85a3c4 --- /dev/null +++ b/scripts/update-versions-types.js @@ -0,0 +1,127 @@ +#!/usr/bin/env node + +const fs = require('fs'); +const path = require('path'); +const { execSync } = require('child_process'); + +console.log('šŸ”„ Updating @pgsql/types versions in versions/* packages...\n'); + +// Fetch dist-tags for @pgsql/types from npm +console.log('šŸ“” Fetching latest @pgsql/types versions from npm dist-tags...'); +let distTags; +try { + const npmOutput = execSync('npm view @pgsql/types dist-tags --json', { encoding: 'utf8' }); + distTags = JSON.parse(npmOutput); +} catch (error) { + console.error('āŒ Failed to fetch npm data:', error.message); + process.exit(1); +} + +// Extract versions for PostgreSQL 13-17 +const typeVersions = {}; +for (let pgVersion = 13; pgVersion <= 17; pgVersion++) { + const tag = `pg${pgVersion}`; + if (distTags[tag]) { + typeVersions[pgVersion.toString()] = distTags[tag]; + } +} + +console.log('\nšŸ“¦ Found latest versions from npm:'); +Object.entries(typeVersions).sort(([a], [b]) => parseInt(a) - parseInt(b)).forEach(([major, version]) => { + console.log(` PostgreSQL ${major} → @pgsql/types@${version}`); +}); +console.log(); + +// Get all version directories +const versionsDir = path.join(__dirname, '..', 'versions'); +const versionDirs = fs.readdirSync(versionsDir) + .filter(dir => /^\d+$/.test(dir)) + .sort((a, b) => parseInt(a) - parseInt(b)); + +let updatedCount = 0; + +versionDirs.forEach(version => { + const packageJsonPath = path.join(versionsDir, version, 'package.json'); + + if (!fs.existsSync(packageJsonPath)) { + console.log(`āš ļø No package.json found for version ${version}`); + return; + } + + const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); + const targetTypeVersion = typeVersions[version]; + + if (!targetTypeVersion) { + console.log(`āš ļø No type version mapping found for PostgreSQL ${version}`); + return; + } + + const currentTypeVersion = packageJson.dependencies?.['@pgsql/types']; + const expectedTypeVersion = `^${targetTypeVersion}`; + + if (currentTypeVersion === expectedTypeVersion) { + console.log(`āœ… Version ${version}: @pgsql/types already up to date (${currentTypeVersion})`); + return; + } + + // Update the dependency + if (!packageJson.dependencies) { + packageJson.dependencies = {}; + } + + packageJson.dependencies['@pgsql/types'] = expectedTypeVersion; + + // Write back the updated package.json + fs.writeFileSync( + packageJsonPath, + JSON.stringify(packageJson, null, 2) + '\n', + 'utf8' + ); + + console.log(`šŸ“¦ Version ${version}: Updated @pgsql/types from ${currentTypeVersion || 'none'} to ${expectedTypeVersion}`); + updatedCount++; +}); + +// Also update the full package (which uses PostgreSQL 17) +console.log('\nšŸ“¦ Checking full package...'); +const fullPackageJsonPath = path.join(__dirname, '..', 'full', 'package.json'); + +if (fs.existsSync(fullPackageJsonPath)) { + const fullPackageJson = JSON.parse(fs.readFileSync(fullPackageJsonPath, 'utf8')); + const targetTypeVersion = typeVersions['17']; // Full package uses PG 17 + + if (targetTypeVersion) { + const currentTypeVersion = fullPackageJson.dependencies?.['@pgsql/types']; + const expectedTypeVersion = `^${targetTypeVersion}`; + + if (currentTypeVersion === expectedTypeVersion) { + console.log(`āœ… Full package: @pgsql/types already up to date (${currentTypeVersion})`); + } else { + // Update the dependency + if (!fullPackageJson.dependencies) { + fullPackageJson.dependencies = {}; + } + + fullPackageJson.dependencies['@pgsql/types'] = expectedTypeVersion; + + // Write back the updated package.json + fs.writeFileSync( + fullPackageJsonPath, + JSON.stringify(fullPackageJson, null, 2) + '\n', + 'utf8' + ); + + console.log(`šŸ“¦ Full package: Updated @pgsql/types from ${currentTypeVersion || 'none'} to ${expectedTypeVersion}`); + updatedCount++; + } + } +} + +console.log(`\n✨ Updated ${updatedCount} package(s)`); + +if (updatedCount > 0) { + console.log('\nšŸ’” Next steps:'); + console.log(' 1. Run "pnpm install" to update lockfile'); + console.log(' 2. Test the changes'); + console.log(' 3. Commit the updates'); +} \ No newline at end of file diff --git a/types/13/package.json b/types/13/package.json index 819eebe..fd286de 100644 --- a/types/13/package.json +++ b/types/13/package.json @@ -1,6 +1,6 @@ { "name": "@libpg-query/types13", - "version": "13.10.3", + "version": "13.11.0", "author": "Dan Lynch ", "description": "PostgreSQL AST types from the real Postgres parser", "main": "index.js", diff --git a/types/14/package.json b/types/14/package.json index c568681..d11f708 100644 --- a/types/14/package.json +++ b/types/14/package.json @@ -1,6 +1,6 @@ { "name": "@libpg-query/types14", - "version": "14.0.2", + "version": "14.1.0", "author": "Dan Lynch ", "description": "PostgreSQL AST types from the real Postgres parser", "main": "index.js", diff --git a/types/15/package.json b/types/15/package.json index 8ef8e98..c6897c7 100644 --- a/types/15/package.json +++ b/types/15/package.json @@ -1,6 +1,6 @@ { "name": "@libpg-query/types15", - "version": "15.0.4", + "version": "15.1.0", "author": "Dan Lynch ", "description": "PostgreSQL AST types from the real Postgres parser", "main": "index.js", diff --git a/types/16/package.json b/types/16/package.json index 4215ecd..11d9eb5 100644 --- a/types/16/package.json +++ b/types/16/package.json @@ -1,6 +1,6 @@ { "name": "@libpg-query/types16", - "version": "16.0.2", + "version": "16.1.0", "author": "Dan Lynch ", "description": "PostgreSQL AST types from the real Postgres parser", "main": "index.js", diff --git a/types/17/package.json b/types/17/package.json index f5b06fc..01d5041 100644 --- a/types/17/package.json +++ b/types/17/package.json @@ -1,6 +1,6 @@ { "name": "@libpg-query/types17", - "version": "17.5.4", + "version": "17.6.0", "author": "Dan Lynch ", "description": "PostgreSQL AST types from the real Postgres parser", "main": "index.js", diff --git a/versions/13/README.md b/versions/13/README.md index 3bb9d62..f703732 100644 --- a/versions/13/README.md +++ b/versions/13/README.md @@ -30,7 +30,12 @@ Built to power [pgsql-parser](https://github.com/pyramation/pgsql-parser), this * 🌐 **Node.js & Browser Support** – Consistent behavior in any JS environment * šŸ“¦ **No Native Builds Required** – No compilation, no system-specific dependencies * 🧠 **Spec-Accurate Parsing** – Produces faithful, standards-compliant ASTs -* šŸš€ **Production-Grade** – Powers tools like [`pgsql-parser`](https://github.com/pyramation/pgsql-parser) +* šŸš€ **Production-Grade** – Millions of downloads powering 1000s of projects + +## šŸš€ For Round-trip Codegen + +> šŸŽÆ **Want to parse + deparse (full round trip)?** +> We highly recommend using [`pgsql-parser`](https://github.com/launchql/pgsql-parser) which leverages a pure TypeScript deparser that has been battle-tested against 21,000+ SQL statements and is built on top of libpg-query. ## Installation diff --git a/versions/13/package.json b/versions/13/package.json index f0a8d4b..90906ad 100644 --- a/versions/13/package.json +++ b/versions/13/package.json @@ -38,7 +38,7 @@ }, "devDependencies": {}, "dependencies": { - "@pgsql/types": "^13.10.0" + "@pgsql/types": "^13.11.0" }, "keywords": [ "sql", @@ -49,4 +49,4 @@ "plpgsql", "database" ] -} \ No newline at end of file +} diff --git a/versions/14/README.md b/versions/14/README.md index 3bb9d62..f703732 100644 --- a/versions/14/README.md +++ b/versions/14/README.md @@ -30,7 +30,12 @@ Built to power [pgsql-parser](https://github.com/pyramation/pgsql-parser), this * 🌐 **Node.js & Browser Support** – Consistent behavior in any JS environment * šŸ“¦ **No Native Builds Required** – No compilation, no system-specific dependencies * 🧠 **Spec-Accurate Parsing** – Produces faithful, standards-compliant ASTs -* šŸš€ **Production-Grade** – Powers tools like [`pgsql-parser`](https://github.com/pyramation/pgsql-parser) +* šŸš€ **Production-Grade** – Millions of downloads powering 1000s of projects + +## šŸš€ For Round-trip Codegen + +> šŸŽÆ **Want to parse + deparse (full round trip)?** +> We highly recommend using [`pgsql-parser`](https://github.com/launchql/pgsql-parser) which leverages a pure TypeScript deparser that has been battle-tested against 21,000+ SQL statements and is built on top of libpg-query. ## Installation diff --git a/versions/14/package.json b/versions/14/package.json index 516171e..cf555a3 100644 --- a/versions/14/package.json +++ b/versions/14/package.json @@ -38,7 +38,7 @@ }, "devDependencies": {}, "dependencies": { - "@pgsql/types": "^14.0.0" + "@pgsql/types": "^14.1.0" }, "keywords": [ "sql", @@ -49,4 +49,4 @@ "plpgsql", "database" ] -} \ No newline at end of file +} diff --git a/versions/15/README.md b/versions/15/README.md index 3bb9d62..f703732 100644 --- a/versions/15/README.md +++ b/versions/15/README.md @@ -30,7 +30,12 @@ Built to power [pgsql-parser](https://github.com/pyramation/pgsql-parser), this * 🌐 **Node.js & Browser Support** – Consistent behavior in any JS environment * šŸ“¦ **No Native Builds Required** – No compilation, no system-specific dependencies * 🧠 **Spec-Accurate Parsing** – Produces faithful, standards-compliant ASTs -* šŸš€ **Production-Grade** – Powers tools like [`pgsql-parser`](https://github.com/pyramation/pgsql-parser) +* šŸš€ **Production-Grade** – Millions of downloads powering 1000s of projects + +## šŸš€ For Round-trip Codegen + +> šŸŽÆ **Want to parse + deparse (full round trip)?** +> We highly recommend using [`pgsql-parser`](https://github.com/launchql/pgsql-parser) which leverages a pure TypeScript deparser that has been battle-tested against 21,000+ SQL statements and is built on top of libpg-query. ## Installation diff --git a/versions/15/package.json b/versions/15/package.json index ec60fee..ed17f9e 100644 --- a/versions/15/package.json +++ b/versions/15/package.json @@ -38,7 +38,7 @@ }, "devDependencies": {}, "dependencies": { - "@pgsql/types": "^15.0.2" + "@pgsql/types": "^15.1.0" }, "keywords": [ "sql", @@ -49,4 +49,4 @@ "plpgsql", "database" ] -} \ No newline at end of file +} diff --git a/versions/16/README.md b/versions/16/README.md index 3bb9d62..f703732 100644 --- a/versions/16/README.md +++ b/versions/16/README.md @@ -30,7 +30,12 @@ Built to power [pgsql-parser](https://github.com/pyramation/pgsql-parser), this * 🌐 **Node.js & Browser Support** – Consistent behavior in any JS environment * šŸ“¦ **No Native Builds Required** – No compilation, no system-specific dependencies * 🧠 **Spec-Accurate Parsing** – Produces faithful, standards-compliant ASTs -* šŸš€ **Production-Grade** – Powers tools like [`pgsql-parser`](https://github.com/pyramation/pgsql-parser) +* šŸš€ **Production-Grade** – Millions of downloads powering 1000s of projects + +## šŸš€ For Round-trip Codegen + +> šŸŽÆ **Want to parse + deparse (full round trip)?** +> We highly recommend using [`pgsql-parser`](https://github.com/launchql/pgsql-parser) which leverages a pure TypeScript deparser that has been battle-tested against 21,000+ SQL statements and is built on top of libpg-query. ## Installation diff --git a/versions/16/package.json b/versions/16/package.json index 1902d07..69fdff3 100644 --- a/versions/16/package.json +++ b/versions/16/package.json @@ -38,7 +38,7 @@ }, "devDependencies": {}, "dependencies": { - "@pgsql/types": "^16.0.0" + "@pgsql/types": "^16.1.0" }, "keywords": [ "sql", @@ -49,4 +49,4 @@ "plpgsql", "database" ] -} \ No newline at end of file +} diff --git a/versions/17/README.md b/versions/17/README.md index 3bb9d62..f703732 100644 --- a/versions/17/README.md +++ b/versions/17/README.md @@ -30,7 +30,12 @@ Built to power [pgsql-parser](https://github.com/pyramation/pgsql-parser), this * 🌐 **Node.js & Browser Support** – Consistent behavior in any JS environment * šŸ“¦ **No Native Builds Required** – No compilation, no system-specific dependencies * 🧠 **Spec-Accurate Parsing** – Produces faithful, standards-compliant ASTs -* šŸš€ **Production-Grade** – Powers tools like [`pgsql-parser`](https://github.com/pyramation/pgsql-parser) +* šŸš€ **Production-Grade** – Millions of downloads powering 1000s of projects + +## šŸš€ For Round-trip Codegen + +> šŸŽÆ **Want to parse + deparse (full round trip)?** +> We highly recommend using [`pgsql-parser`](https://github.com/launchql/pgsql-parser) which leverages a pure TypeScript deparser that has been battle-tested against 21,000+ SQL statements and is built on top of libpg-query. ## Installation diff --git a/versions/17/package.json b/versions/17/package.json index 3a47b4e..10b20af 100644 --- a/versions/17/package.json +++ b/versions/17/package.json @@ -38,7 +38,7 @@ }, "devDependencies": {}, "dependencies": { - "@pgsql/types": "^17.4.2" + "@pgsql/types": "^17.6.0" }, "keywords": [ "sql", @@ -49,4 +49,4 @@ "plpgsql", "database" ] -} \ No newline at end of file +}