feat(temporal)!: upgrade @js-temporal/polyfill to 0.5.1#102
Merged
Conversation
0.5.x removed Temporal.Calendar/Temporal.TimeZone as registerable classes entirely - calendars are now plain string identifiers, and Nepali (the one non-CLDR calendar this library supports) can no longer be registered as a Temporal.Calendar subclass. - Vendor 0.5.1 source into src/vendor/temporal/, porting the Ethiopic CLDR 48/ICU 76 era-code fix (js-temporal/temporal-polyfill#357, still unmerged upstream) to the new calendar module shape. - Rewrite Nepali support as a standalone NepaliPlainDate class (src/custom-calendars/nepaliCalendar.ts) wrapping a real ISO Temporal.PlainDate, reproducing the old NepaliCalendar's exact "ISO arithmetic, then reconvert" behaviour rather than "fixing" it, since existing workarounds (day-14 clamping) depend on it. - Introduce AnyPlainDate (Temporal.PlainDate | NepaliPlainDate, src/utils/plainDate.ts) plus a customPlainDateImplementations registry, so hooks/period-calculation code no longer needs to know whether a given calendar is Nepali or a real Temporal calendar. - Switch useDatePicker's internal representation from Temporal.ZonedDateTime to Temporal.PlainDate/NepaliPlainDate - a date picker never needed time-of-day/timezone semantics. BREAKING CHANGE: getNowInCalendar now returns a plain CalendarDate object ({ year, month, day, eraYear? }, src/types.ts) instead of a Temporal.ZonedDateTime. This removes Temporal from the public interface entirely and matches convertFromIso8601/convertToIso8601's existing return shape. Code that only read .year/.month/.day/.eraYear needs no changes; code that called Temporal methods on the result needs to re-derive another date via getNowInCalendar/convertFromIso8601 instead of calling .withCalendar()/.startOfDay() on the previous result. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## alpha #102 +/- ##
==========================================
- Coverage 94.75% 93.28% -1.47%
==========================================
Files 57 58 +1
Lines 1258 1296 +38
Branches 350 367 +17
==========================================
+ Hits 1192 1209 +17
- Misses 65 86 +21
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kabaros
force-pushed
the
fix/vendor-temporal-0.5.1
branch
from
July 5, 2026 06:51
e0ec69d to
ade19d5
Compare
|
cjmamo
self-requested a review
July 6, 2026 11:47
cjmamo
approved these changes
Jul 6, 2026
Contributor
|
🎉 This PR is included in version 3.0.0-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




0.5.x removed Temporal.Calendar/Temporal.TimeZone as registerable classes entirely - calendars are now plain string identifiers, and Nepali (the one non-CLDR calendar this library supports) can no longer be registered as a Temporal.Calendar subclass.
BREAKING CHANGE: getNowInCalendar now returns a plain CalendarDate object ({ year, month, day, eraYear? }, src/types.ts) instead of a Temporal.ZonedDateTime. This removes Temporal from the public interface entirely and matches convertFromIso8601/convertToIso8601's existing return shape. Code that only read .year/.month/.day/.eraYear needs no changes; code that called Temporal methods on the result needs to re-derive another date via getNowInCalendar/convertFromIso8601 instead of calling .withCalendar()/.startOfDay() on the previous result.