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

Bump dwn-sdk-js to version 0.2.10 #370

Merged
merged 12 commits into from
Jan 10, 2024
Merged

Conversation

LiranCohen
Copy link
Member

This PR updates the dwn-sdk-js library to the version 0.2.10

With this update come:

  • allow writing of pruned initial RecordsWrite, removing the need for a writePrunedRecord method in the dwn-manager
  • update union types for UnionMessageReply to properly represent a union type of all replies.
  • updates to the EventLog, no longer tracking an external watermark, but rather an internal one.

Copy link

codesandbox bot commented Jan 9, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Contributor

github-actions bot commented Jan 9, 2024

TBDocs Report

✅ No errors or warnings

@web5/api

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

TBDocs Report Updated at 2024-01-09T23:51:50Z 16a734a

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Merging #370 (16a734a) into main (dbe2708) will increase coverage by 0.17%.
The diff coverage is 73.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #370      +/-   ##
==========================================
+ Coverage   91.69%   91.86%   +0.17%     
==========================================
  Files          67       67              
  Lines       18176    18163      -13     
  Branches     1534     1543       +9     
==========================================
+ Hits        16667    16686      +19     
+ Misses       1487     1454      -33     
- Partials       22       23       +1     
Components Coverage Δ
agent 88.71% <71.60%> (+0.62%) ⬆️
api 96.94% <100.00%> (+<0.01%) ⬆️
common 98.57% <ø> (ø)
credentials ∅ <ø> (∅)
crypto 94.54% <ø> (ø)
dids 92.24% <ø> (ø)
identity-agent 56.81% <ø> (ø)
crypto-aws-kms 100.00% <ø> (ø)
proxy-agent 58.43% <ø> (ø)
user-agent 55.22% <ø> (ø)

@@ -239,7 +238,7 @@ export class SyncManagerLevel implements SyncManager {

for (let job of pushJobs) {
const [key] = job;
const [did, dwnUrl, watermark, messageCid] = key.split('~');
const [did, dwnUrl, _, messageCid] = key.split('~');
Copy link
Contributor

Choose a reason for hiding this comment

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

@LiranCohen Is there a reason we're still using the watermark in the key?
In other words, why not delete it rather than assigning it to a value we don't use? (_)

Copy link
Member Author

Choose a reason for hiding this comment

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

@frankhinek Yeah, so the events come in the order they should be inserted when doing a EventsGet. We then stick them in a LevelDB queue, to read here. The queue is sorted by the key, so the watermark here is used to sort it in the order it should be applied.

@LiranCohen
Copy link
Member Author

Thanks @frankhinek! I think I've addressed the formatting issues.

@LiranCohen LiranCohen requested a review from frankhinek January 9, 2024 23:50
@LiranCohen LiranCohen merged commit b1b9b7d into main Jan 10, 2024
30 of 31 checks passed
@LiranCohen LiranCohen deleted the lirancohen/bump-dwn-sdk-0.2.10 branch January 10, 2024 15:37
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.

3 participants