Skip to content

Commit 9454b0d

Browse files
committed
fix: remove JSON-specific transformation logic from TypeName method
- Removed all pg_catalog prefix logic for JSON types - Still investigating root cause of test failures - 9 tests still failing, need to understand structural differences Co-Authored-By: Dan Lynch <[email protected]>
1 parent 69520be commit 9454b0d

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

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

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -449,20 +449,6 @@ export class V16ToV17Transformer {
449449
? node.names.map(item => this.transform(item as any, context))
450450
: this.transform(node.names as any, context);
451451

452-
if (Array.isArray(names) && names.length === 1) {
453-
const singleElement = names[0];
454-
if (singleElement && typeof singleElement === 'object' && 'String' in singleElement) {
455-
const typeName = singleElement.String.str || singleElement.String.sval;
456-
if (typeName === 'json') {
457-
if (!this.isInValuesContext(context)) {
458-
names = [
459-
{ String: { sval: 'pg_catalog' } },
460-
...names
461-
];
462-
}
463-
}
464-
}
465-
}
466452

467453
result.names = names;
468454
}
@@ -565,8 +551,7 @@ export class V16ToV17Transformer {
565551
result.arg = this.transform(node.arg as any, context);
566552
}
567553
if (node.typeName !== undefined) {
568-
const typeNameResult = this.TypeName(node.typeName as any, context);
569-
result.typeName = typeNameResult.TypeName;
554+
result.typeName = this.transform(node.typeName as any, context);
570555
}
571556
if (node.location !== undefined) {
572557
result.location = node.location;

0 commit comments

Comments
 (0)