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

Add RemoveDocument API #480

Merged
merged 7 commits into from
Mar 22, 2023
Merged

Add RemoveDocument API #480

merged 7 commits into from
Mar 22, 2023

Conversation

chacha912
Copy link
Contributor

@chacha912 chacha912 commented Mar 20, 2023

What this PR does / why we need it?

  • Add RemoveDocument API
  • Modify WatchDocument API

What are the relevant tickets?

Ref: yorkie-team/yorkie#484
Ref: yorkie-team/yorkie#491

Does this PR introduce a user-facing change?:

The new approach is to establish a stream connection for each document
instead of watching multiple documents on a single stream.
As a result, the issue of disconnecting and reconnecting the stream
when multiple documents are attached has been resolved.
Consequently, the client events that were tested have also been modified as shown below.
The event marked in red does not occur. - Refer to #484 for the previous test flow
image

Checklist

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

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #480 (aa2d2cf) into main (7482aad) will increase coverage by 0.11%.
The diff coverage is 88.38%.

@@            Coverage Diff             @@
##             main     #480      +/-   ##
==========================================
+ Coverage   89.57%   89.68%   +0.11%     
==========================================
  Files          67       67              
  Lines        5410     5596     +186     
  Branches      528      542      +14     
==========================================
+ Hits         4846     5019     +173     
- Misses        381      386       +5     
- Partials      183      191       +8     
Impacted Files Coverage Δ
src/core/client.ts 73.39% <71.17%> (-4.14%) ⬇️
test/integration/document_test.ts 98.98% <99.19%> (+0.34%) ⬆️
src/api/converter.ts 89.00% <100.00%> (+0.02%) ⬆️
src/document/change/change_pack.ts 100.00% <100.00%> (ø)
src/document/document.ts 81.98% <100.00%> (+2.98%) ⬆️
src/util/error.ts 100.00% <100.00%> (+50.00%) ⬆️
test/helper/helper.ts 74.07% <100.00%> (+3.24%) ⬆️
test/integration/client_test.ts 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@chacha912 chacha912 marked this pull request as ready for review March 22, 2023 09:42
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.
Overall good. I left a few questions.

src/core/client.ts Show resolved Hide resolved
src/core/client.ts Show resolved Hide resolved
@hackerwins hackerwins merged commit 1e2c32d into main Mar 22, 2023
@hackerwins hackerwins deleted the remove-document branch March 22, 2023 10:17
hunkim98 pushed a commit to hunkim98/yorkie-js-sdk that referenced this pull request Jul 12, 2023
Co-authored-by: Youngteac Hong <susukang98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants