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

BREAKING(yaml): remove listener option from parse() and stringify() #5224

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

iuioiua
Copy link
Contributor

@iuioiua iuioiua commented Jul 1, 2024

What's changed

The ParseOptions.listener and StringifyOptions.listener options have been removed.

Why these changes were made

These options were removed because they:

  1. Are non-standard, according to the YAML 1.2 spec.
  2. Seem to be barely used.
  3. Add a cognitive cost in understanding @std/yaml for users.

Migration guide

This change only affects users who use these options. If you require this feature, use @std/[email protected], as this is the last version containing this feature.

@github-actions github-actions bot added the yaml label Jul 1, 2024
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.73%. Comparing base (90025e9) to head (1a6c7f8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5224      +/-   ##
==========================================
+ Coverage   94.72%   94.73%   +0.01%     
==========================================
  Files         467      467              
  Lines       38143    38134       -9     
  Branches     5510     5507       -3     
==========================================
- Hits        36131    36127       -4     
+ Misses       1974     1969       -5     
  Partials       38       38              

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

@iuioiua iuioiua marked this pull request as ready for review July 1, 2024 07:16
@iuioiua iuioiua requested a review from kt3k as a code owner July 1, 2024 07:16
@iuioiua iuioiua enabled auto-merge (squash) July 1, 2024 07:24
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

This option exposes the entire LoaderState structure to the users via listener callback, which is something we don't want to consider as a public API. This removal of the option makes sense to me.

LGTM

@iuioiua iuioiua merged commit c787328 into main Jul 1, 2024
15 checks passed
@iuioiua iuioiua deleted the yaml-remove-listener branch July 1, 2024 09:08
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