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: Ensure an Object is returned from calendar.mergeFields() #1719

Merged
merged 1 commit into from Sep 2, 2021

Conversation

ptomato
Copy link
Collaborator

@ptomato ptomato commented Aug 12, 2021

In each case where CalendarMergeFields is called, it is later asserted in
PrepareTemporalFields that Type(fields) is Object. Previously the spec
text failed this assertion.

The tests check that a TypeError is thrown in this case, as well as that
the TypeError is thrown before the value is passed to any dateFromFields()
or similar method.

@codecov
Copy link

codecov bot commented Aug 12, 2021

Codecov Report

Merging #1719 (250708c) into main (1dc873e) will decrease coverage by 17.20%.
The diff coverage is 100.00%.

❗ Current head 250708c differs from pull request most recent head adddcd2. Consider uploading reports for the commit adddcd2 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1719       +/-   ##
===========================================
- Coverage   90.11%   72.90%   -17.21%     
===========================================
  Files          17       18        +1     
  Lines       10771     4842     -5929     
  Branches     1611     1059      -552     
===========================================
- Hits         9706     3530     -6176     
- Misses       1029     1030        +1     
- Partials       36      282      +246     
Flag Coverage Δ
test262 72.90% <100.00%> (?)
tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
polyfill/lib/ecmascript.mjs 82.81% <100.00%> (-9.90%) ⬇️
polyfill/lib/calendar.mjs 23.22% <0.00%> (-66.77%) ⬇️
polyfill/lib/intl.mjs 67.46% <0.00%> (-30.94%) ⬇️
polyfill/lib/instant.mjs 79.13% <0.00%> (-7.33%) ⬇️
polyfill/lib/plainyearmonth.mjs 83.42% <0.00%> (-6.39%) ⬇️
polyfill/lib/plaindatetime.mjs 85.14% <0.00%> (-5.22%) ⬇️
polyfill/lib/plainmonthday.mjs 79.01% <0.00%> (-4.67%) ⬇️
polyfill/lib/timezone.mjs 81.66% <0.00%> (-4.61%) ⬇️
polyfill/lib/duration.mjs 90.38% <0.00%> (-3.27%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1dc873e...adddcd2. Read the comment docs.

@ptomato
Copy link
Collaborator Author

ptomato commented Aug 12, 2021

Marking as draft so the normative change is not merged without consensus.

@ptomato ptomato marked this pull request as ready for review August 31, 2021 19:09
In each case where CalendarMergeFields is called, it is later asserted in
PrepareTemporalFields that Type(_fields_) is Object. Previously the spec
text failed this assertion.

The tests check that a TypeError is thrown in this case, as well as that
the TypeError is thrown before the value is passed to any dateFromFields()
or similar method.
@ptomato
Copy link
Collaborator Author

ptomato commented Aug 31, 2021

This change achieved consensus in TC39.

@Ms2ger Would you be able to take a final look?

@Ms2ger Ms2ger merged commit dbb9d7d into main Sep 2, 2021
@Ms2ger Ms2ger deleted the 1669-mergefields-return branch September 2, 2021 15:29
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.

None yet

3 participants