Skip to content

Let's enable Temporal by default #57127

@jasnell

Description

@jasnell
Member

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

Activity

added
feature requestIssues that request new features to be added to Node.js.
on Feb 18, 2025
ljharb

ljharb commented on Feb 18, 2025

@ljharb
SponsorMember

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

jasnell commented on Feb 18, 2025

@jasnell
MemberAuthor

Either way. I'm going to prepare a PR but it's fine to let it sit for a bit

aduh95

aduh95 commented on Feb 19, 2025

@aduh95
Contributor

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

targos commented on Feb 19, 2025

@targos
Member

Can someone link to the tracking issue in V8 so we have some information on the progress of the implementation there?

targos

targos commented on Feb 19, 2025

@targos
Member

I wonder if it passes the existing test262 tests for Temporal.

aduh95

aduh95 commented on Feb 19, 2025

@aduh95
Contributor
jasnell

jasnell commented on Feb 19, 2025

@jasnell
MemberAuthor

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

syg commented on Feb 27, 2025

@syg
Contributor

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

jasnell commented on Feb 27, 2025

@jasnell
MemberAuthor

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.

fabon-f

fabon-f commented on Mar 29, 2025

@fabon-f

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'.

targos

targos commented on May 8, 2025

@targos
Member

See https://chromium-review.googlesource.com/c/v8/v8/+/6514659 / v8/v8@f9aac5f

Temporal in V8 is going to require a Rust toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @ljharb@syg@jasnell@targos@fabon-f

      Issue actions

        Let's enable Temporal by default · Issue #57127 · nodejs/node