Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normative: Partial stack of removals #2895

Merged
merged 6 commits into from
Jun 13, 2024
Merged

Conversation

ptomato
Copy link
Collaborator

@ptomato ptomato commented Jun 13, 2024

Here is an implementation of part of the slate of API removals that reached consensus in the TC39 meeting of 2024-06-12. This consists of all removals except for calendars and time zones and things related to them such as getISOFields, which will follow in a later PR.

This PR contains documentation updates, removals from the spec text, removals from the reference code, removals from the suggested TypeScript definitions, and adjustments of the cookbook examples.

Here is what's removed exactly:

  • Temporal.PlainDateTime.p.withPlainDate
  • Temporal.ZonedDateTime.p.withPlainDate
  • Temporal.PlainTime.p.toPlainDateTime
  • Temporal.PlainTime.p.toZonedDateTime
  • Temporal.Instant.fromEpochSeconds
  • Temporal.Instant.fromEpochMicroseconds
  • Temporal.Instant.p.epochSeconds
  • Temporal.Instant.p.epochMicroseconds
  • Temporal.ZonedDateTime.p.epochSeconds
  • Temporal.ZonedDateTime.p.epochMicroseconds
  • Temporal.PlainDateTime.p.toPlainYearMonth
  • Temporal.PlainDateTime.p.toPlainMonthDay
  • Temporal.ZonedDateTime.p.toPlainYearMonth
  • Temporal.ZonedDateTime.p.toPlainMonthDay
  • Temporal.Instant.p.toZonedDateTime
  • Temporal.Now.zonedDateTime
  • Temporal.Now.plainDateTime
  • Temporal.Now.plainDate

Tests are in tc39/test262#4108.

Closes: #2846, #2847, #2848, #2849

@ptomato ptomato mentioned this pull request Jun 13, 2024
91 tasks
@ptomato
Copy link
Collaborator Author

ptomato commented Jun 13, 2024

Thanks for the quick review. (Note, this was also already reviewed by other Temporal champions while on the branch that was shared in the TC39 presentation.)

@ptomato ptomato merged commit 768cceb into main Jun 13, 2024
5 checks passed
@ptomato ptomato deleted the partial-stack-of-removals branch June 13, 2024 20:11
sosukesuzuki added a commit to sosukesuzuki/WebKit that referenced this pull request Aug 18, 2024
https://bugs.webkit.org/show_bug.cgi?id=278285

Reviewed by NOBODY (OOPS!).

At the TC39 meeting on 2024-06, it was decied to obsolete several Temporal APIs[1][2].

This patch removes the following for Temporal.Instant:

- Temporal.Instant.fromEpochSeconds
- Temporal.Instant.fromEpochMicroseconds
- Temporal.Instant.prototype.epochSeconds
- Temporal.Instant.prototype.epochMicroseconds

[1]: https://github.com/tc39/notes/blob/main/meetings/2024-06/june-12.md#temporal-stage-3-update-and-scope-reduction
[2]: tc39/proposal-temporal#2895

* JSTests/stress/date-to-temporal-instant.js:
(shouldBe):
* JSTests/stress/temporal-instant.js:
(shouldBe):
(instants.forEach):
* Source/JavaScriptCore/runtime/ISO8601.h:
* Source/JavaScriptCore/runtime/TemporalInstant.cpp:
* Source/JavaScriptCore/runtime/TemporalInstant.h:
* Source/JavaScriptCore/runtime/TemporalInstantConstructor.cpp:
* Source/JavaScriptCore/runtime/TemporalInstantPrototype.cpp:
webkit-commit-queue pushed a commit to sosukesuzuki/WebKit that referenced this pull request Aug 18, 2024
https://bugs.webkit.org/show_bug.cgi?id=278285

Reviewed by Yusuke Suzuki.

At the TC39 meeting on 2024-06, it was decied to obsolete several Temporal APIs[1][2].

This patch removes the following for Temporal.Instant:

- Temporal.Instant.fromEpochSeconds
- Temporal.Instant.fromEpochMicroseconds
- Temporal.Instant.prototype.epochSeconds
- Temporal.Instant.prototype.epochMicroseconds

[1]: https://github.com/tc39/notes/blob/main/meetings/2024-06/june-12.md#temporal-stage-3-update-and-scope-reduction
[2]: tc39/proposal-temporal#2895

* JSTests/stress/date-to-temporal-instant.js:
(shouldBe):
* JSTests/stress/temporal-instant.js:
(shouldBe):
(instants.forEach):
* Source/JavaScriptCore/runtime/ISO8601.h:
* Source/JavaScriptCore/runtime/TemporalInstant.cpp:
* Source/JavaScriptCore/runtime/TemporalInstant.h:
* Source/JavaScriptCore/runtime/TemporalInstantConstructor.cpp:
* Source/JavaScriptCore/runtime/TemporalInstantPrototype.cpp:

Canonical link: https://commits.webkit.org/282400@main
sosukesuzuki added a commit to sosukesuzuki/WebKit that referenced this pull request Sep 8, 2024
…ainDateTime

https://bugs.webkit.org/show_bug.cgi?id=279312

Reviewed by NOBODY (OOPS!).

Due to changes in Temporal from July 2024, several methods have become obsolete[1]. We have already
removed the methods of Temporal.Instant that were marked obsolete[2].

This patch removes the following methods from Temporal.PlainTime and Temporal.PlainDateTime:

- Temporal.PlainTime.prototype.toPlainDateTime
- Temporal.PlainDateTime.prototype.withPlainDate

Although there are other methods slated for removal in the Temporal changes[1], we had not yet
implemented those methods.

[1]: tc39/proposal-temporal#2895
[2]: https://commits.webkit.org/282400@main

* JSTests/stress/temporal-plaindatetime.js:
* JSTests/stress/temporal-plaintime.js:
(shouldBe.String.Temporal.PlainTime.from):
* Source/JavaScriptCore/runtime/TemporalPlainDateTimePrototype.cpp:
* Source/JavaScriptCore/runtime/TemporalPlainTimePrototype.cpp:
webkit-commit-queue pushed a commit to sosukesuzuki/WebKit that referenced this pull request Sep 8, 2024
…ainDateTime

https://bugs.webkit.org/show_bug.cgi?id=279312

Reviewed by Yusuke Suzuki.

Due to changes in Temporal from July 2024, several methods have become obsolete[1]. We have already
removed the methods of Temporal.Instant that were marked obsolete[2].

This patch removes the following methods from Temporal.PlainTime and Temporal.PlainDateTime:

- Temporal.PlainTime.prototype.toPlainDateTime
- Temporal.PlainDateTime.prototype.withPlainDate

Although there are other methods slated for removal in the Temporal changes[1], we had not yet
implemented those methods.

[1]: tc39/proposal-temporal#2895
[2]: https://commits.webkit.org/282400@main

* JSTests/stress/temporal-plaindatetime.js:
* JSTests/stress/temporal-plaintime.js:
(shouldBe.String.Temporal.PlainTime.from):
* Source/JavaScriptCore/runtime/TemporalPlainDateTimePrototype.cpp:
* Source/JavaScriptCore/runtime/TemporalPlainTimePrototype.cpp:

Canonical link: https://commits.webkit.org/283315@main
michael-markl added a commit to michael-markl/proposal-temporal that referenced this pull request Oct 21, 2024
Fixes broken description caused by the PR tc39#2895
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

size-suggestion: Consider merging Temporal.Now.xISO() and Temporal.Now.x()
2 participants