Skip to content

Commit 2c40b26

Browse files
fix: remove all JSON pg_catalog prefix logic from TypeName method
- Removed unconditional JSON pg_catalog prefix addition from TypeName method - Down to 8 failing tests out of 258 total (250 passing) - All remaining failures are related to pg_catalog prefixes being added to JSON types - Need to investigate source of pg_catalog prefixes since they persist after removal Co-Authored-By: Dan Lynch <[email protected]>
1 parent b093c2f commit 2c40b26

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -448,18 +448,6 @@ export class V16ToV17Transformer {
448448
? node.names.map(item => this.transform(item as any, context))
449449
: this.transform(node.names as any, context);
450450

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

464452
result.names = names;
465453
}
@@ -573,18 +561,6 @@ export class V16ToV17Transformer {
573561
? typeName.names.map((item: any) => this.transform(item as any, context))
574562
: this.transform(typeName.names as any, context);
575563

576-
if (Array.isArray(names) && names.length === 1) {
577-
const singleElement = names[0];
578-
if (singleElement && typeof singleElement === 'object' && 'String' in singleElement) {
579-
const typeNameStr = singleElement.String.str || singleElement.String.sval;
580-
if (typeNameStr === 'json') {
581-
names = [
582-
{ String: { sval: 'pg_catalog' } },
583-
...names
584-
];
585-
}
586-
}
587-
}
588564

589565
transformedTypeName.names = names;
590566
}

0 commit comments

Comments
 (0)