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

Modify converter to allow setting values for object and array #687

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

chacha912
Copy link
Contributor

@chacha912 chacha912 commented Nov 23, 2023

What this PR does / why we need it:

This PR is associated with yorkie-team/yorkie-js-sdk#691. Since modifications have been made to allow setting values in set and add operations, it is necessary to update the converter accordingly. This involves enabling the setting of values for objects and arrays in the converter.

PR#678 triggers the regression error, so I made corrections and re-submitted. I've added handling for cases where values are not set when converting to PbJSONElementSimple. In the bytesToObject function, It was previously creating a new object with initialTicket when the bytes were nil. However, this logic became inappropriate after separating it from bytesToSnapshot, so I removed it.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Didn't break anything

@chacha912 chacha912 requested a review from hackerwins November 23, 2023 05:36
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 38 lines in your changes are missing coverage. Please review.

Comparison is base (5500afb) 48.96% compared to head (0e6f5cd) 48.81%.
Report is 1 commits behind head on main.

Files Patch % Lines
api/converter/from_pb.go 11.11% 14 Missing and 2 partials ⚠️
api/converter/from_bytes.go 28.57% 7 Missing and 3 partials ⚠️
api/converter/to_bytes.go 40.00% 4 Missing and 2 partials ⚠️
api/converter/to_pb.go 40.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #687      +/-   ##
==========================================
- Coverage   48.96%   48.81%   -0.15%     
==========================================
  Files          69       69              
  Lines       10090    10127      +37     
==========================================
+ Hits         4941     4944       +3     
- Misses       4631     4657      +26     
- Partials      518      526       +8     

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

Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

@hackerwins hackerwins merged commit 10245f8 into main Nov 23, 2023
2 checks passed
@hackerwins hackerwins deleted the set-nested-object branch November 23, 2023 08:28
hackerwins pushed a commit that referenced this pull request Nov 23, 2023
PR#678 triggers the regression error, so I made corrections and
re-submitted. I've added handling for cases where values are not set
when converting to PbJSONElementSimple. In the bytesToObject function,
It was previously creating a new object with initialTicket when the
bytes were nil. However, this logic became inappropriate after
separating it from bytesToSnapshot, so I removed it.
@hackerwins
Copy link
Member

CC) @humdrum, @7hong13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants