fix(intl): apply locale and timezone data - #8997
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThe runtime adds compiled IANA timezone resolution, localized weekday formatting, and separate date/time formatter paths. Compiler detection enables normalization data for ChangesIntl locale and timezone behavior
Additional release notes
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Application
participant IntlDateTimeFormat
participant TimeZoneResolver
participant CompiledTzdb
participant ICUFormatter
Application->>IntlDateTimeFormat: format date with locale and named timeZone
IntlDateTimeFormat->>TimeZoneResolver: canonicalize named timezone
TimeZoneResolver->>CompiledTzdb: resolve zone and instant offset
CompiledTzdb-->>TimeZoneResolver: canonical zone and DST-aware offset
IntlDateTimeFormat->>ICUFormatter: format selected date/time fields
ICUFormatter-->>IntlDateTimeFormat: localized output
IntlDateTimeFormat-->>Application: formatted string
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merged (batched with #8995 and #8996). I checked the timezone work behaviourally rather than trusting the unit tests, since "resolve named zones from the compiled IANA database, including DST" is the sort of claim that passes a fixed-offset implementation right up until it does not:
One fix pushed: the fragment was named Validation — runtime 2787/0, codegen 1341/0, stdlib 124/0 ( |
Fixes #8903
Summary
Testing
Run on
root@perrymaster.skelpo.net:cargo test --release -p perry-runtime name_bearing_components_match_node -- --nocapturecargo test --release -p perry-runtime compiled_tzdb_resolves_named_zone_and_dst -- --nocapturecargo test --release -p perry string_normalization_gate_covers_normalize_and_locale_compare -- --nocapturetest_gap_issue_8903_intl_locale_data.tswith Node 26.8.1, fullPERRY_NO_AUTO_OPTIMIZE=1, and auto-optimized Perry; all outputs were byte-identicalNo version bump.
Summary by CodeRabbit
Bug Fixes
Intl.DateTimeFormatnow supports named IANA time zones with accurate daylight-saving transitions.Intl.Collatorpreserves locale-aware comparison and Unicode normalization in optimized builds.Performance
push()operations can use a faster inline path when applicable.Tests