-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Description
What is the problem this feature will solve?
The Temporal
API is nearing completion in TC39 and is largely stable. It is not turned on by default in V8 just yet until it reaches stage 4 but platforms are starting to enable it by default. We ought to be able to go ahead and enable it by default in main
What is the feature you are proposing to solve the problem?
Enable Temporal by default but still marked as experimental
What alternatives have you considered?
No response
shrujalshah28, pedro757, arturgawlik, kouak, laurisvan and 11 morenetnet
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Type
Projects
Status
Awaiting Triage
Milestone
Relationships
Development
Select code repository
Activity
ljharb commentedon Feb 18, 2025
It would probably be wise to wait until it's been fully shipped unflagged on the web for a bit - maybe for node 25?
jasnell commentedon Feb 18, 2025
Either way. I'm going to prepare a PR but it's fine to let it sit for a bit
aduh95 commentedon Feb 19, 2025
On one hand, I can't wait for
Temporal
to be available, but on the other hand, I can wait and use the polyfill a while longer. So far the experience of enabling flagged features of V8 has been mixed (TLA was a success, the import assertions syntax not so much); given this is fully polifillable, I'm not sure it's worth the risks (although I reckon the risks are very mild at worst).targos commentedon Feb 19, 2025
Can someone link to the tracking issue in V8 so we have some information on the progress of the implementation there?
targos commentedon Feb 19, 2025
I wonder if it passes the existing test262 tests for Temporal.
aduh95 commentedon Feb 19, 2025
https://issues.chromium.org/issues/42201538
jasnell commentedon Feb 19, 2025
Yep, I'm fine with waiting a bit but I wanted to at least get it on the radar here. I'm not in any rush to merge it. V8's test coverage on this is currently hovering around the 75% mark but that is expected to increase significantly in the coming couple of months. My current thinking is that we can let the PR sit and look at merging it still as experimental after 24.0.0 is cut in April with a flag to disable it.
syg commentedon Feb 27, 2025
I strongly recommend against unflagging Temporal while it is still flagged in V8. The stability of the proposal has no correlation with the quality, stability, and completeness of the implementation in V8 itself. If Node does choose to unflag a feature before V8 thinks it is ready for production, we will not be prioritizing bugs, which will frustrate everyone involved.
jasnell commentedon Feb 27, 2025
If we unflag it (which is still far from settled), it wouldn't be until after 24.0.0 at the earliest and would remain in experimental status until v8 unflags it... which is to say we wouldn't actually expect v8 to prioritize bugs beyond whatever y'all are doing now... but conversations like this are precisely why I opened the issue with the proposal, so these things can be discussed.
luxon
(our biggest dep at 4.6 MB) out for smaller dependency 11ty/eleventy#3587fabon-f commentedon Mar 29, 2025
Current V8 implementation of Temporal API is not only incomplete but based on the outdated proposal. Plenty of normative changes are not reflected to the implementation, which can make users confused.
Even the API surface has changed. FYI Deno patches
Temporal
classes to minimize the deviation on the public API by removing and adding methods and properties.https://github.com/denoland/deno/blob/aa1f43702dc79021fe1dfa99e44733aa345a7dce/runtime/js/99_main.js#L498
Despite the effort of Deno, not a few issues (including V8 panic) are reported in the issue tracker.
https://github.com/denoland/deno/issues?q=label%3A%22upstream%22%20temporal
Honestly, I feel that V8 implementation is far from 'experimental', rather it's 'draft'.
Temporal
across Node.js APIs #57891targos commentedon May 8, 2025
See https://chromium-review.googlesource.com/c/v8/v8/+/6514659 / v8/v8@f9aac5f
Temporal in V8 is going to require a Rust toolchain.
Temporal
support to functions that acceptDate
vitest-dev/vitest#8107