Skip to content

fix(javascript): count Unicode code points for string length - #3445

Merged
schani merged 4 commits into
enable-dart-swift-ts-testsfrom
fix/javascript-unicode-length
Sep 5, 2026
Merged

fix(javascript): count Unicode code points for string length#3445
schani merged 4 commits into
enable-dart-swift-ts-testsfrom
fix/javascript-unicode-length

Conversation

@schani

@schani schani commented Sep 5, 2026

Copy link
Copy Markdown
Member

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).

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Generated-output differences

993 files differ — 991 modified, 2 new, 0 deleted
2396 changed lines — +1405 / −991

Open the generated-output report →

@schani

schani commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

Why are these new tests only for Javascript? Shouldn't all languages that have string length support also be tested this way?

@schani
schani changed the base branch from master to enable-dart-swift-ts-tests September 5, 2026 16:46
@schani

schani commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

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.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Generated-output differences

1000 files differ — 998 modified, 2 new, 0 deleted
2410 changed lines — +1412 / −998

Open the generated-output report →

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Generated-output differences

1001 files differ — 999 modified, 2 new, 0 deleted
2412 changed lines — +1413 / −999

Open the generated-output report →

@schani
schani merged commit b08c20d into enable-dart-swift-ts-tests Sep 5, 2026
35 checks passed
@schani
schani deleted the fix/javascript-unicode-length branch September 5, 2026 17:45
schani added a commit that referenced this pull request Sep 5, 2026
* 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
schani added a commit that referenced this pull request Sep 5, 2026
* 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
schani added a commit that referenced this pull request Sep 5, 2026
* 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
schani added a commit that referenced this pull request Sep 5, 2026
* 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
schani added a commit that referenced this pull request Sep 5, 2026
* 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
schani added a commit that referenced this pull request Sep 5, 2026
* 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
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