Intl.Locale: apply CLDR alias mappings during canonicalization - #36731
Open
robobun wants to merge 6 commits into
Open
Intl.Locale: apply CLDR alias mappings during canonicalization#36731robobun wants to merge 6 commits into
robobun wants to merge 6 commits into
Claude / Claude Code Review
completed
Aug 2, 2026 in 27m 37s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/jsc/bindings/IntlCanonicalize.cpp:18-22 |
macOS root-locale guard may not cover und + Unicode extension |
Annotations
Check warning on line 22 in src/jsc/bindings/IntlCanonicalize.cpp
claude / Claude Code Review
macOS root-locale guard may not cover und + Unicode extension
The empty-string guard covers bare `und` (ICU locale ID `""`) but `uloc_forLanguageTag("und-u-ca-gregory")` yields `"@calendar=gregorian"` — first byte `'@'`, so it falls through to `ualoc_canonicalForm` unguarded. Whether the macOS 13/14 quirk also fires on empty-base-name-with-keywords is unproven, but no test covers it: consider adding `expect(new Intl.Locale("und-u-ca-gregory").toString()).toBe("und-u-ca-gregory")` alongside the existing `und` assertions so the macOS 13/14 CI lane settles it
Loading