Skip to content

rename the companion-type suffix from Json to Data, and stop recognizing the old one - #232

Merged
eburgos merged 1 commit into
masterfrom
feat/rename-companion-suffix-to-data
Aug 11, 2026
Merged

rename the companion-type suffix from Json to Data, and stop recognizing the old one#232
eburgos merged 1 commit into
masterfrom
feat/rename-companion-suffix-to-data

Conversation

@eburgos

@eburgos eburgos commented Aug 11, 2026

Copy link
Copy Markdown
Owner

A declaration named XJson published every generated name as X — the
TypeScript type, the Zod consts, the JSON Schema id, and what a reference to it
resolves as. The recognized suffix is Data now, with the same mechanics:
suffix-only, exact case, and XData publishes as X everywhere a name is
read. Json is not recognized at all — a hard switch, taken after auditing the
consuming workspace and finding no Json-suffixed declaration to migrate.

Recognition lives in one place where it lived in two. The reference-resolution
arm was behaviourally identical to the stripping seam once the guard sits
there, so it now routes through the same function instead of repeating the
suffix, and a grep finds no other name-level suffix reading.

Stripping never empties a name: a type named exactly Data keeps it. The old
code lacked that guard — Json alone stripped to the empty string — so it is
new, not preserved.

Pinned from both directions: SomethingData publishes as Something on all
three surfaces including reference resolution, and SomethingJson publishes
as itself, so the old convention is provably gone rather than merely
undocumented. Eleven fixtures migrated to the new suffix; one incidental
Json-named fixture about JSON Schema itself was respelled to match its
siblings; the docs' naming-convention sections and worked examples move with
it.

just fmt, just check, just quick, doctests, just lint-all across all 68
toggles, and the test powerset across all 68 in four partitions — all green.

…ing the old one

A declaration named `XJson` published every generated name as `X` — the
TypeScript type, the Zod consts, the JSON Schema id, and what a reference to it
resolves as. The recognized suffix is `Data` now, with the same mechanics:
suffix-only, exact case, and `XData` publishes as `X` everywhere a name is
read. `Json` is not recognized at all — a hard switch, taken after auditing the
consuming workspace and finding no Json-suffixed declaration to migrate.

Recognition lives in one place where it lived in two. The reference-resolution
arm was behaviourally identical to the stripping seam once the guard sits
there, so it now routes through the same function instead of repeating the
suffix, and a grep finds no other name-level suffix reading.

Stripping never empties a name: a type named exactly `Data` keeps it. The old
code lacked that guard — `Json` alone stripped to the empty string — so it is
new, not preserved.

Pinned from both directions: `SomethingData` publishes as `Something` on all
three surfaces including reference resolution, and `SomethingJson` publishes
as itself, so the old convention is provably gone rather than merely
undocumented. Eleven fixtures migrated to the new suffix; one incidental
`Json`-named fixture about JSON Schema itself was respelled to match its
siblings; the docs' naming-convention sections and worked examples move with
it.

just fmt, just check, just quick, doctests, just lint-all across all 68
toggles, and the test powerset across all 68 in four partitions — all green.
@eburgos
eburgos merged commit 178a361 into master Aug 11, 2026
@eburgos
eburgos deleted the feat/rename-companion-suffix-to-data branch August 11, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant