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): replace Type class with interface #5262

Merged
merged 6 commits into from
Jul 3, 2024

Conversation

timreichen
Copy link
Contributor

  • removes Type class and replaced with a Type interface.

@timreichen timreichen requested a review from kt3k as a code owner July 2, 2024 22:12
@github-actions github-actions bot added the yaml label Jul 2, 2024
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 87.67123% with 9 lines in your changes missing coverage. Please review.

Project coverage is 95.72%. Comparing base (ba704da) to head (67493e3).

Files Patch % Lines
yaml/_type/map.ts 50.00% 3 Missing ⚠️
yaml/_type/seq.ts 50.00% 3 Missing ⚠️
yaml/_type/str.ts 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5262      +/-   ##
==========================================
- Coverage   95.74%   95.72%   -0.03%     
==========================================
  Files         458      457       -1     
  Lines       37973    37955      -18     
  Branches     5562     5561       -1     
==========================================
- Hits        36356    36331      -25     
- Misses       1576     1583       +7     
  Partials       41       41              

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

@iuioiua iuioiua changed the title refactor(yaml): remove Type class refactor(yaml): replace Type class with interface Jul 3, 2024
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.

I like this and was going to do this myself at some point. LGTM.

@kt3k
Copy link
Member

kt3k commented Jul 3, 2024

I'm not in favor of this change. There are many changes in optionality of fields. I'm very unsure this doesn't introduce any bugs.

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.

I think this change is an improvement in design. It also seems safe enough to do.

However, I understand Yoshiya's sentiment. In #5239, I made changes which I thought were harmless, as tests passed. But rather testing is not yet at a level for this package to instil such confidence.

@kt3k, if you feel strongly about this, let's close this for now and revisit once testing is at an adequate level.

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.

LGTM

@kt3k kt3k merged commit 9127978 into denoland:main Jul 3, 2024
15 checks passed
timreichen added a commit to timreichen/std that referenced this pull request Jul 3, 2024
iuioiua pushed a commit that referenced this pull request Jul 3, 2024
* initial commit

* refactor(yaml): inline error functions as methods (#5273)

* Update _loader.ts

Co-authored-by: Yoshiya Hinosawa <[email protected]>

* refactor(yaml): simplify isWhiteSpaceOrEOL (#5271)

* refactor(yaml): replace `Type` class with interface (#5262)

* update

---------

Co-authored-by: Yoshiya Hinosawa <[email protected]>
@timreichen timreichen deleted the yaml-remove-type-class branch August 17, 2024 23:35
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.

3 participants