jborean93 / PowerShell-Yayaml

A YAML parser and writer that uses an Assembly Load Context on PowerShell 7+
MIT License
31 stars 2 forks source link

Add new emitter and -Stream parameter #17

Closed jborean93 closed 4 months ago

jborean93 commented 4 months ago

Adds the new emitter logic to reduce the amount of processing done on each input object to YamlDotNet. This also paves the way for supporting comments or other complex scenarios not normally exposed through the Yaml* objects used before.

The ConvertTo-Yaml -Stream parameter can be used to serialize each input object as a YAML string as they are received rather than collecting until the end of the cmdlet call. This is useful if the cmdlet sending the input is long running and the caller wishes to output the objects immediately.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 97.35099% with 4 lines in your changes missing coverage. Please review.

Project coverage is 93.79%. Comparing base (62ad75c) to head (2d1067a).

Files Patch % Lines
src/Yayaml.Module/ConvertToYaml.cs 97.33% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #17 +/- ## ========================================== + Coverage 92.39% 93.79% +1.39% ========================================== Files 16 16 Lines 1078 1466 +388 Branches 188 194 +6 ========================================== + Hits 996 1375 +379 - Misses 56 71 +15 + Partials 26 20 -6 ``` | [Flag](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/17/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | Coverage Δ | | |---|---|---| | [PS_5.1_x64_Windows](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/17/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `89.13% <86.75%> (+2.29%)` | :arrow_up: | | [PS_7.2_x64_Linux](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/17/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `94.48% <94.03%> (+1.31%)` | :arrow_up: | | [PS_7.2_x64_Windows](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/17/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `?` | | | [PS_7.3_x64_Linux](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/17/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `94.48% <94.03%> (+1.31%)` | :arrow_up: | | [PS_7.3_x64_Windows](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/17/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `94.48% <94.03%> (+1.31%)` | :arrow_up: | | [PS_7.4_x64_Linux](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/17/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `94.48% <94.03%> (+1.31%)` | :arrow_up: | | [PS_7.4_x64_Windows](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/17/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `94.48% <94.03%> (+1.31%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.