Skip to content

Commit 6e0791d

Browse files
fix: add CI rule to RULES.md and fix node wrapping in v16-to-v17 transformer
- Added 'DO NOT LOOK AT CI' rule to RULES.md as requested - Fixed DeclareCursorStmt, CreateAmStmt, CreateForeignTableStmt to return properly wrapped objects - Improved 16-17 test count from 234/258 to 247/258 passing tests Co-Authored-By: Dan Lynch <[email protected]>
1 parent 6bca3a7 commit 6e0791d

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

packages/transform/RULES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,19 @@ const pg14TableLikeOptions = PG14Enums.TableLikeOption;
206206

207207
Always consult the enum files when debugging transformation issues involving numeric or string values that appear to be op codes or enum constants.
208208

209+
## DO NOT LOOK AT CI — only work locally with tests.
210+
211+
**⚠️ CRITICAL RULE: Never look at CI logs or use CI-related commands during development.**
212+
213+
When debugging transformation issues:
214+
- Run tests locally using `yarn test __tests__/kitchen-sink/13-14` or similar
215+
- Examine local test output and failure messages
216+
- Reproduce issues locally and verify fixes locally
217+
- Only push changes after verifying they work locally
218+
- Do not use `gh run view`, `git_pr_checks`, or other CI inspection commands
219+
220+
This ensures faster feedback loops and prevents dependency on external CI systems during development.
221+
209222
## Summary
210223

211224
Always use `@pgsql/parser` for multi-version PostgreSQL AST parsing in the transform package. This is the only way to get accurate version-specific results and build working transformers. Remember that all parser methods are async and must be awaited.

packages/transform/src/transformers/v16-to-v17.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ export class V16ToV17Transformer {
794794
}
795795

796796
DeclareCursorStmt(node: PG16.DeclareCursorStmt, context: TransformerContext): any {
797-
return node;
797+
return { DeclareCursorStmt: node };
798798
}
799799

800800
PublicationObjSpec(node: PG16.PublicationObjSpec, context: TransformerContext): any {
@@ -806,7 +806,7 @@ export class V16ToV17Transformer {
806806
}
807807

808808
CreateAmStmt(node: PG16.CreateAmStmt, context: TransformerContext): any {
809-
return node;
809+
return { CreateAmStmt: node };
810810
}
811811

812812
IntoClause(node: PG16.IntoClause, context: TransformerContext): any {
@@ -906,6 +906,6 @@ export class V16ToV17Transformer {
906906
}
907907

908908
CreateForeignTableStmt(node: PG16.CreateForeignTableStmt, context: TransformerContext): any {
909-
return node;
909+
return { CreateForeignTableStmt: node };
910910
}
911911
}

0 commit comments

Comments
 (0)