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

fix(yaml): fix sortKey error message #5873

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

timreichen
Copy link
Contributor

Changes
This PR fixes the sortKey error message with template string and adds a test.

⚠️ Note
Instead of throwing an error, we might want to remove this type check completely, because it should be covered by typescript.

if (typeof this.sortKeys === "function") {
  objectKeyList.sort(this.sortKeys);
} else if (this.sortKeys) {
  objectKeyList.sort();
}

WDYT?

@timreichen timreichen requested a review from kt3k as a code owner August 30, 2024 07:16
@github-actions github-actions bot added the yaml label Aug 30, 2024
Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.36%. Comparing base (94a7e1b) to head (f793168).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5873      +/-   ##
==========================================
+ Coverage   96.35%   96.36%   +0.01%     
==========================================
  Files         479      479              
  Lines       38674    38675       +1     
  Branches     5631     5632       +1     
==========================================
+ Hits        37263    37269       +6     
+ Misses       1367     1363       -4     
+ Partials       44       43       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

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

Wow - what a funny/strange bug. Thanks! We're currently in an undecided state regarding runtime type checking of values, so let's keep the current behavior, even though I think it should go.

@iuioiua iuioiua merged commit d01e301 into denoland:main Sep 3, 2024
16 checks passed
@timreichen timreichen deleted the yaml-fix-sortKey-test branch September 3, 2024 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants