Update dependency @js-temporal/polyfill to v0.5.0 - autoclosed #459
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.
This PR contains the following updates:
0.4.4->0.5.0Release Notes
js-temporal/temporal-polyfill (@js-temporal/polyfill)
v0.5.0Compare Source
Breaking changes:
This major update reflects all changes to the Temporal proposal adopted by TC39 between May 2023 and March 2025.
The majority of these changes were made in the June 2024 TC39 meeting (slides here) where the scope of Temporal was reduced at the request of JS engine implementers who were concerned about the size impact of adding Temporal to distributions on limited-capacity devices like low-end Android phones and Apple Watch.
Calendars are now represented by strings representing built-in calendars.
Without custom calendars, the huge surface area of
Temporal.Calendarwas not necessary, and that type was removed from the proposal.Time zones are now only represented by string identifiers representing built-in time zones: either a Zone or Link name from the IANA Time Zone Database, or a time zone offset with minutes precision.
Temporal.TimeZonehas also been removed, and its methods replaced by the following:getPreviousTransition/getNextTransition- use the newgetTimeZoneTransitionmethod ofTemporal.ZoneDateTime.equals- useZonedDateTime.prototype.equalsusing the same instant and calendar.Temporal.TimeZonemethods can use the corresponding methods onTemporal.ZonedDateTime.getISOFields()methods. Instead usewithCalendar('iso8601')and the individual property getters.withPlainDate()methods. Instead usewith({ year, monthCode, day }).toPlainDateTime()andtoZonedDateTime()methods ofTemporal.PlainTime. Instead use the same-named methods onTemporal.PlainDateto combine a date and a time.epochSecondsandepochMicrosecondsproperties. Instead calculate epoch seconds withMath.floor(epochMilliseconds / 1000)and epoch microseconds withepochNanoseconds / 1000n + ((epochNanoseconds % 1000n) < 0n ? -1n : 0n).toPlainYearMonth()andtoPlainMonthDay()methods ofTemporal.PlainDateTimeandTemporal.ZonedDateTime. Instead usetoPlainDate()and then the methods onTemporal.PlainDate.Temporal.Instant.prototype.toZonedDateTimeandTemporal.Now.zonedDateTime. Instead usetoZonedDateTimeISO()/zonedDateTimeISO()to create aTemporal.ZonedDateTimeobject using the ISO8601 calendar, and then usewithCalendar()if a non-ISO calendar is desired.relativeToparameter is no longer accepted inTemporal.Duration.prototype.addandsubtract. Instead take therelativeToobject, add the two durations to it, and difference it with the original usinguntil().Temporal.Duration, and placed limits on each of the units. Years, months, and weeks are each limited to 2³²−1. The other units (days through nanoseconds) are collectively limited: taken together, they must be less thanNumber.MAX_SAFE_INTEGERseconds plus 999,999,999 nanoseconds. This has few user-visible changes, but it does mean that some durations are no longer allowed (for example,Temporal.Duration.from({ seconds: Number.MAX_VALUE }).) (Proposal PR 1, PR 2, PR 3)[+01:01]but not[+01:00:01]or[+01:00:00.000000001](Proposal PR)Temporal.PlainDate.from(20230711)and it would be treated asTemporal.PlainDate.from("20230711"). This is no longer the case. (Proposal PR)Temporal.PlainYearMonth.prototype.toPlainDateandTemporal.PlainMonthDay.prototype.toPlainDatenow have clamping behaviour instead of throwing if the resulting PlainDate would be invalid. For example,birthday.toPlainDate({ year: 2025 })will now return February 28, 2025 if the birthday in question if February 29. (Proposal PR)weekOfYearandyearOfWeekmethods may now returnundefined(Proposal PR)Temporal.Duration.prototype.round(), rounding to a >1 increment of a calendarsmallestUnitwhile simultaneously balancing to a calendarlargestUnitis now disallowed and will throw (Proposal PR)Temporal.MonthDayin a non-ISO8601 calendar will now throw if the year is too far (>¼ million years) in the future or past (Proposal PR)Bug fixes:
Non-breaking changes
BigInt)Configuration
📅 Schedule: Branch creation - "* * * * 1-5" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.