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

Temporal: Remove tests for part of the approved slate of removals #4108

Merged
merged 5 commits into from
Jun 13, 2024

Conversation

ptomato
Copy link
Contributor

@ptomato ptomato commented Jun 13, 2024

Mostly deletions, and some replacements of deleted API.

This makes tests compliant with the following removals that reached consensus in the TC39 meeting of 2024-06-12:

  • 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

See: tc39/proposal-temporal#2846, tc39/proposal-temporal#2847, tc39/proposal-temporal#2848, tc39/proposal-temporal#2849.

@ptomato ptomato requested review from a team as code owners June 13, 2024 12:39
@ptomato
Copy link
Contributor Author

ptomato commented Jun 13, 2024

Thanks for the quick review. Luckily, very few actual changes, mostly just removals.

@ptomato ptomato merged commit 58df8fb into tc39:main Jun 13, 2024
8 checks passed
@ptomato ptomato deleted the partial-stack-of-temporal-removals branch June 13, 2024 20:04
@littledan
Copy link
Member

Can we add some new tests to assert that these methods aren't exposed? I think it's a pretty likely bug that someone will forget to remove some of them.

@ptomato
Copy link
Contributor Author

ptomato commented Jun 27, 2024

The difficult part about that, I realized, is that it's totally spec-compliant to forget to remove them, according to https://tc39.es/ecma262/#sec-conformance. Although we don't want that, due to the risk of not being able to add them back in the future! So I'd still want to go ahead with it regardless.

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.

3 participants