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

Various fixes in the reference code #2656

Merged
merged 4 commits into from
Aug 22, 2023
Merged

Various fixes in the reference code #2656

merged 4 commits into from
Aug 22, 2023

Conversation

ptomato
Copy link
Collaborator

@ptomato ptomato commented Aug 18, 2023

Fixes small compliance issues in the reference code, that I came across while doing other things. Also removes unnecessary code from the parser tests.

@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Merging #2656 (be2a15b) into main (2920565) will increase coverage by 0.02%.
Report is 10 commits behind head on main.
The diff coverage is 94.44%.

@@            Coverage Diff             @@
##             main    #2656      +/-   ##
==========================================
+ Coverage   96.05%   96.07%   +0.02%     
==========================================
  Files          20       20              
  Lines       11604    11676      +72     
  Branches     2196     2203       +7     
==========================================
+ Hits        11146    11218      +72     
  Misses        394      394              
  Partials       64       64              
Files Changed Coverage Δ
polyfill/lib/ecmascript.mjs 98.41% <90.62%> (+0.01%) ⬆️
polyfill/lib/calendar.mjs 87.13% <100.00%> (+0.16%) ⬆️
polyfill/lib/plainmonthday.mjs 97.50% <100.00%> (ø)
polyfill/lib/plainyearmonth.mjs 98.27% <100.00%> (ø)

polyfill/lib/ecmascript.mjs Outdated Show resolved Hide resolved
polyfill/lib/ecmascript.mjs Outdated Show resolved Hide resolved
Copy link
Collaborator

@justingrant justingrant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

This was left over from some refactoring.
The ZonedDateTime code path in ToTemporalDate was missing a return
statement. Falling through to the PlainDateTime code path still gave the
right answer, but options.overflow would be accessed an extra time.

The spec is already correct here, so this makes the reference code more
compliant.
In order to be able to properly test the normative change of not
observably iterating an Array in CalendarFields, we have to eliminate a
few more places in the reference code where, contrary to the spec, array
iteration was observable.
@ptomato
Copy link
Collaborator Author

ptomato commented Aug 22, 2023

Thanks for the reviews!

@ptomato ptomato merged commit 3ca02f1 into main Aug 22, 2023
9 checks passed
@ptomato ptomato deleted the fixes branch August 22, 2023 00:20
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