feat(node26): add ESNext.Intl and ESNext.Date to lib - #360
Open
DASPRiD wants to merge 2 commits into
Open
Conversation
Node 26 ships the Temporal-aware Intl.DateTimeFormat overloads and the Intl Locale Info methods, but neither is declared without ESNext.Intl, so formatting a Temporal value fails to type check against a runtime that supports it.
Completes the Temporal proposal's lib surface: ESNext.Date declares Date.prototype.toTemporalInstant(), which Node 26 ships alongside the Temporal namespace and the Intl amendments.
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.
The Node 26 base sets
libto["es2025", "ESNext.Collection", "ESNext.Temporal"].ESNext.Temporaldeclares theTemporalnamespace, but theIntlintegration lives inESNext.Intl, so formatting a Temporal value does not type check even though Node 26 supports it:Adding
ESNext.Intlcompiles clean.ESNext.Intldeclares two things, and Node 26 implements both. Checked against Node 26.3.1:Temporal-aware
Intl.DateTimeFormatmethods (format,formatToParts,formatRange,formatRangeToParts):Intl Locale Info methods on
Intl.Locale:So nothing in
ESNext.Intlis declared ahead of what the runtime provides._versionbumped to26.1.0, matching how other Node bases version revisions.Second commit: the same reasoning applies to
ESNext.Date. The Temporal proposal adds one method toDate—Date.prototype.toTemporalInstant(), the migration bridge from legacy dates — and Node 26 ships it, but its declaration lives inESNext.Date:With both additions, the base covers the complete Temporal lib surface (
ESNext.Temporal,ESNext.Intl,ESNext.Date).