-
Notifications
You must be signed in to change notification settings - Fork 629
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): remove tag
property
#5689
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5689 +/- ##
==========================================
- Coverage 96.28% 96.28% -0.01%
==========================================
Files 474 474
Lines 38392 38381 -11
Branches 5576 5576
==========================================
- Hits 36967 36956 -11
Misses 1383 1383
Partials 42 42 ☔ View full report in Codecov by Sentry. |
tag
property
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please only include changes that directly pertain to removing the tag
property? We can handle any other refactors in a separate PR.
Alright, I undo the |
yaml/_dumper_state.ts
Outdated
this.dump = _result || "{}"; // Empty mapping if no valid pairs. | ||
} | ||
|
||
detectType(explicit: boolean): boolean { | ||
detectType(explicit: boolean) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return type for this method has changed from explicitly boolean
to now being implicitly string | null
. Why? Return types should be explicit and not change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the tag
property is removed and was set inside this function, it has to be returned instead. It returns string
(former true
) and null
(former false
).
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you.
Changes
This PR removes the
tag
property inDumperState
.Reasoning
tag
is only used inwriteBlockMapping()
, so it can be passed as an argument instead.