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

refactor(yaml): simplify stringifyBlockMapping() #5885

Merged

Conversation

timreichen
Copy link
Contributor

Changes
This PR simplifies the stringifyBlockMapping() function by using an array and joining it at the end like in stringifyBlockSequence() and moves variable assignments and function calls down so they will not be executed if the loop continues early.

Copy link

codecov bot commented Sep 1, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.35%. Comparing base (f86e911) to head (47a5907).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
yaml/_dumper_state.ts 90.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5885   +/-   ##
=======================================
  Coverage   96.34%   96.35%           
=======================================
  Files         479      479           
  Lines       38674    38656   -18     
  Branches     5631     5629    -2     
=======================================
- Hits        37260    37246   -14     
+ Misses       1370     1366    -4     
  Partials       44       44           

☔ 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.

Thanks

@iuioiua iuioiua merged commit 2d6c45e into denoland:main Sep 3, 2024
16 checks passed
@timreichen timreichen deleted the yaml-simplify-stringifyBlockMapping branch September 3, 2024 06:18
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