fix(javascript): count Unicode code points for string length - #3445
Conversation
Generated-output differences993 files differ — 991 modified, 2 new, 0 deleted |
|
Why are these new tests only for Javascript? Shouldn't all languages that have string length support also be tested this way? |
|
Yes. These cases also belong in other languages' string-length tests. Companion PRs cover Zod (#3443), Effect (#3444), Dart (#3442), and both C# renderers (#3446); this PR covers JavaScript and TypeScript. The shared inputs now live in #3449; these PRs use that common set. Coverage remains incomplete. Other renderers still count bytes, UTF-16 units, or graphemes; enabling these cases there requires further fixes. |
Generated-output differences1000 files differ — 998 modified, 2 new, 0 deleted |
… fix/javascript-unicode-length
Generated-output differences1001 files differ — 999 modified, 2 new, 0 deleted |
* test: enable Swift and TypeScript schema CI coverage * test: centralize language-specific schema discovery * test: share Unicode cases and retain existing option coverage * test: round-trip schema-generated Swift without renaming * test: check schema roundtrips in existing Swift fixture * fix(dart): count Unicode code points in string bounds (#3442) * fix(dart): count Unicode code points in string bounds * test(dart): reuse shared Unicode length fixture * fix(zod): count Unicode code points for string length (#3443) * fix(zod): count Unicode code points for string length * test(zod): use shared Unicode length cases * fix(effect): count Unicode code points for string length (#3444) * fix(effect): count Unicode code points for string length * test(effect): use shared Unicode length cases * fix(javascript): count Unicode code points for string length (#3445) * fix(javascript): count Unicode code points for string length * test(javascript): use shared Unicode length cases
* test: enable Swift and TypeScript schema CI coverage * test: centralize language-specific schema discovery * test: share Unicode cases and retain existing option coverage * test: round-trip schema-generated Swift without renaming * test: check schema roundtrips in existing Swift fixture * fix(dart): count Unicode code points in string bounds (#3442) * fix(dart): count Unicode code points in string bounds * test(dart): reuse shared Unicode length fixture * fix(zod): count Unicode code points for string length (#3443) * fix(zod): count Unicode code points for string length * test(zod): use shared Unicode length cases * fix(effect): count Unicode code points for string length (#3444) * fix(effect): count Unicode code points for string length * test(effect): use shared Unicode length cases * fix(javascript): count Unicode code points for string length (#3445) * fix(javascript): count Unicode code points for string length * test(javascript): use shared Unicode length cases * fix(csharp): count System.Text.Json string bounds in code points
* fix(csharp): count Unicode code points in string bounds * test: enable Swift and TypeScript schema CI coverage * test: centralize language-specific schema discovery * test: share Unicode cases and retain existing option coverage * test: use shared Unicode length inputs * test: round-trip schema-generated Swift without renaming * test: check schema roundtrips in existing Swift fixture * fix(dart): count Unicode code points in string bounds (#3442) * fix(dart): count Unicode code points in string bounds * test(dart): reuse shared Unicode length fixture * fix(zod): count Unicode code points for string length (#3443) * fix(zod): count Unicode code points for string length * test(zod): use shared Unicode length cases * fix(effect): count Unicode code points for string length (#3444) * fix(effect): count Unicode code points for string length * test(effect): use shared Unicode length cases * fix(javascript): count Unicode code points for string length (#3445) * fix(javascript): count Unicode code points for string length * test(javascript): use shared Unicode length cases * fix(csharp): scope Unicode length output to constraint checks * fix(csharp): keep Unicode bound changes specific to Newtonsoft
* fix(effect): preserve optional class properties * test: enable Swift and TypeScript schema CI coverage * test: centralize language-specific schema discovery * test: share Unicode cases and retain existing option coverage * test(effect): reject null for optional non-null properties * test: round-trip schema-generated Swift without renaming * test: check schema roundtrips in existing Swift fixture * fix(dart): count Unicode code points in string bounds (#3442) * fix(dart): count Unicode code points in string bounds * test(dart): reuse shared Unicode length fixture * fix(zod): count Unicode code points for string length (#3443) * fix(zod): count Unicode code points for string length * test(zod): use shared Unicode length cases * fix(effect): count Unicode code points for string length (#3444) * fix(effect): count Unicode code points for string length * test(effect): use shared Unicode length cases * fix(javascript): count Unicode code points for string length (#3445) * fix(javascript): count Unicode code points for string length * test(javascript): use shared Unicode length cases * test: share optional-property regression across languages * test: skip confirmed optional-null failures * test: skip confirmed Haskell optional-null failure
* fix(dart): avoid inherited Object member names * test: enable Swift and TypeScript schema CI coverage * test(dart): scope Object member fixture to Dart * test: centralize language-specific schema discovery * test: share Unicode cases and retain existing option coverage * test: round-trip schema-generated Swift without renaming * test: check schema roundtrips in existing Swift fixture * fix(dart): count Unicode code points in string bounds (#3442) * fix(dart): count Unicode code points in string bounds * test(dart): reuse shared Unicode length fixture * fix(zod): count Unicode code points for string length (#3443) * fix(zod): count Unicode code points for string length * test(zod): use shared Unicode length cases * fix(effect): count Unicode code points for string length (#3444) * fix(effect): count Unicode code points for string length * test(effect): use shared Unicode length cases * fix(javascript): count Unicode code points for string length (#3445) * fix(javascript): count Unicode code points for string length * test(javascript): use shared Unicode length cases * fix: share Object-member keyword coverage across languages * fix(csharp): reserve ToString for record names
* fix(dart): reserve runtime type names * test(dart): scope runtime name regressions to Dart * test: enable Swift and TypeScript schema CI coverage * test: centralize language-specific schema discovery * test: share Unicode cases and retain existing option coverage * test: round-trip schema-generated Swift without renaming * test: check schema roundtrips in existing Swift fixture * fix(dart): count Unicode code points in string bounds (#3442) * fix(dart): count Unicode code points in string bounds * test(dart): reuse shared Unicode length fixture * fix(zod): count Unicode code points for string length (#3443) * fix(zod): count Unicode code points for string length * test(zod): use shared Unicode length cases * fix(effect): count Unicode code points for string length (#3444) * fix(effect): count Unicode code points for string length * test(effect): use shared Unicode length cases * fix(javascript): count Unicode code points for string length (#3445) * fix(javascript): count Unicode code points for string length * test(javascript): use shared Unicode length cases * Cover Dart runtime names in shared keyword input * Reserve runtime type names in Ruby and Flow
JavaScript and TypeScript counted UTF-16 units for string bounds; JSON Schema counts Unicode code points. Count code points and enable the shared regression cases from #3449.
Validation: build; all seven shared cases in both languages; minmaxlength and optional-constraints fixtures; Biome. Production diff: 2 lines (1 added, 1 removed).