Skip to content

Commit 3c263dd

Browse files
committed
feat: create @pgsql/quotes package for PostgreSQL identifier quoting and keyword classification
- Extract QuoteUtils class and kwlist from pgsql-deparser into standalone @pgsql/quotes package - Include keyword generator script for syncing with PostgreSQL kwlist.h - Add comprehensive test suite (57 tests) - Update deparser to depend on @pgsql/quotes and re-export for backwards compatibility
1 parent c801dc4 commit 3c263dd

File tree

16 files changed

+4153
-6366
lines changed

16 files changed

+4153
-6366
lines changed

packages/deparser/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"makage": "^0.1.8"
5959
},
6060
"dependencies": {
61+
"@pgsql/quotes": "workspace:*",
6162
"@pgsql/types": "^17.6.2"
6263
}
6364
}

packages/deparser/scripts/keywords.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async function main() {
4141
kwlistPathInput = requireNonEmpty(await ask("Path to PostgreSQL kwlist.h"), "kwlist.h path");
4242
}
4343

44-
const outPathInput = outArg ?? path.resolve(__dirname, "../src/kwlist.ts");
44+
const outPathInput = outArg ?? path.resolve(__dirname, "../../quotes/src/kwlist.ts");
4545

4646
const kwlistPath = path.resolve(expandTilde(kwlistPathInput));
4747
const outPath = path.resolve(outPathInput);

0 commit comments

Comments
 (0)