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

Upgrade dwn-sdk-js to version 0.2.9 #342

Closed
wants to merge 7 commits into from

Conversation

LiranCohen
Copy link
Member

In this PR we update the dwn-sdk-js version to 0.2.9

writePrunedRecord is no longer necessary as dwn-sdk-js now accepts initial RecordsWrite messages without any data from any source, not just sync.

With EventLog now returning a messageCid cursor, we use an internal uild watermark to sort the syncOperations.

We also now store setCursor to represent the last item in the most recent EventGet request. This way subsequent EventGet will only bring events beyond the latest one returned from the prior call, adding them to the syncOperations queue.

Additionally I've also made sure that the next sync interval does not occur until the prior one has finished. This isn't the optimal way to do this, however in future iterations sync-manager will be subscribing to remote nodes in order to get real time events, where an interval sync won't be necessary.

For some context but unrelated to this PR: In subsequent PR to dwn-sdk-js the cursor will become a an object representing both a messageCid and sortValue to use as a cursor point. This prevents specific cases where the messageCid used as a cursor has been deleted.

Copy link

codesandbox bot commented Dec 8, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Contributor

github-actions bot commented Dec 8, 2023

TBDocs Report

✅ No errors or warnings

@web5/api

  • Project entry file: packages/api/src/index.ts

TBDocs Report Updated at 2023-12-20T21:03:29Z 3006949

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Merging #342 (3006949) into main (5f364bc) will increase coverage by 0.15%.
The diff coverage is 87.50%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #342      +/-   ##
==========================================
+ Coverage   92.79%   92.95%   +0.15%     
==========================================
  Files          71       71              
  Lines       16477    16458      -19     
  Branches     1525     1530       +5     
==========================================
+ Hits        15290    15298       +8     
+ Misses       1165     1138      -27     
  Partials       22       22              
Components Coverage Δ
api 96.93% <ø> (ø)
common 97.78% <ø> (ø)
credentials ∅ <ø> (∅)
crypto 100.00% <ø> (ø)
dids 92.24% <ø> (ø)
agent 88.60% <87.50%> (+0.51%) ⬆️
identity-agent 56.81% <ø> (ø)
proxy-agent 58.43% <ø> (ø)
user-agent 55.22% <ø> (ø)

@LiranCohen LiranCohen closed this Jan 9, 2024
@LiranCohen LiranCohen deleted the lirancohen/bump-dwn-sdk-0.2.9 branch January 9, 2024 21:50
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.

1 participant