Skip to content

Commit f9b84e1

Browse files
cleanup: remove debug logging from ObjectWithArgs method
Co-Authored-By: Dan Lynch <[email protected]>
1 parent dd04b3c commit f9b84e1

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

packages/transform/src/transformers/v13-to-v14.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,45 +1759,20 @@ export class V13ToV14Transformer {
17591759
const shouldPreserveObjfuncargs = this.shouldPreserveObjfuncargs(context);
17601760
const shouldCreateObjfuncargsFromObjargs = this.shouldCreateObjfuncargsFromObjargs(context);
17611761

1762-
// Debug logging for AlterFunctionStmt context
1763-
if (context.parentNodeTypes && context.parentNodeTypes.includes('AlterFunctionStmt')) {
1764-
console.log('DEBUG AlterFunctionStmt ObjectWithArgs:', {
1765-
shouldCreateObjfuncargs,
1766-
shouldPreserveObjfuncargs,
1767-
shouldCreateObjfuncargsFromObjargs,
1768-
hasObjargs: !!result.objargs,
1769-
hasObjfuncargs: !!result.objfuncargs,
1770-
parentNodeTypes: context.parentNodeTypes
1771-
});
1772-
}
1773-
17741762
if (shouldCreateObjfuncargsFromObjargs && result.objargs) {
17751763
// Create objfuncargs from objargs (this takes priority over shouldCreateObjfuncargs)
1776-
if (context.parentNodeTypes && context.parentNodeTypes.includes('AlterFunctionStmt')) {
1777-
console.log('DEBUG AlterFunctionStmt: CREATING objfuncargs from objargs');
1778-
}
1779-
17801764
result.objfuncargs = Array.isArray(result.objargs)
17811765
? result.objargs.map((arg: any) => this.createFunctionParameterFromTypeName(arg, context))
17821766
: [this.createFunctionParameterFromTypeName(result.objargs, context)];
17831767

17841768
} else if (shouldCreateObjfuncargs) {
1785-
if (context.parentNodeTypes && context.parentNodeTypes.includes('AlterFunctionStmt')) {
1786-
console.log('DEBUG AlterFunctionStmt: CREATING empty objfuncargs');
1787-
}
17881769
result.objfuncargs = [];
17891770
} else if (result.objfuncargs !== undefined) {
17901771
if (shouldPreserveObjfuncargs) {
1791-
if (context.parentNodeTypes && context.parentNodeTypes.includes('AlterFunctionStmt')) {
1792-
console.log('DEBUG AlterFunctionStmt: PRESERVING objfuncargs');
1793-
}
17941772
result.objfuncargs = Array.isArray(result.objfuncargs)
17951773
? result.objfuncargs.map((item: any) => this.transform(item, context))
17961774
: [this.transform(result.objfuncargs, context)];
17971775
} else {
1798-
if (context.parentNodeTypes && context.parentNodeTypes.includes('AlterFunctionStmt')) {
1799-
console.log('DEBUG AlterFunctionStmt: DELETING objfuncargs because shouldPreserveObjfuncargs is false');
1800-
}
18011776
delete result.objfuncargs;
18021777
}
18031778
} else if (!shouldPreserveObjfuncargs) {

0 commit comments

Comments
 (0)