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

fix syncmanager typedefs to use abstractlevel #309

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

shamilovtim
Copy link
Contributor

@shamilovtim shamilovtim commented Nov 21, 2023

Reason for PR

When using typedefs with LevelDB they're meant to adhere to the abstract-level interfaces rather than directly using the typedefs from the Level package (which is a specific implementation of abstract level).

How PR was implemented

Used the same approach as dwn-js-sdk by pulling from the AbstractLevel interface and correctly annotating its generics

Copy link

codesandbox bot commented Nov 21, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Contributor

github-actions bot commented Nov 21, 2023

TBDocs Report

✅ No errors or warnings

@web5/api

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

Updated @ 2023-11-24T19:29:13.116Z - Commit: 448333b

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Merging #309 (c41ce24) into main (9af892a) will decrease coverage by 0.03%.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
- Coverage   90.80%   90.78%   -0.03%     
==========================================
  Files          74       74              
  Lines       14072    14089      +17     
  Branches     1387     1390       +3     
==========================================
+ Hits        12778    12790      +12     
- Misses       1269     1273       +4     
- Partials       25       26       +1     
Components Coverage Δ
api 96.46% <ø> (-0.23%) ⬇️
common 95.00% <ø> (ø)
credentials 94.32% <ø> (-0.18%) ⬇️
crypto 100.00% <ø> (ø)
dids 88.75% <ø> (ø)
agent 88.07% <100.00%> (-0.01%) ⬇️
identity-agent 56.81% <ø> (ø)
proxy-agent 58.43% <ø> (ø)
user-agent 55.22% <ø> (ø)

Copy link
Contributor

Choose a reason for hiding this comment

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

i thiink the desired convention for imports from top to bottom in this repo (though i'm sure there's evidence of the contrary in a few places bc of time constraints) is:

  • all import types first
  • then all imports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can probably run a formatter that does this in the future. Although past experience has been that import sorting is always a fail

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@mistermoe mistermoe left a comment

Choose a reason for hiding this comment

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

left 1 small comment. other than that, looks great

@shamilovtim shamilovtim merged commit 34b915d into main Nov 28, 2023
29 of 30 checks passed
@shamilovtim shamilovtim deleted the tshamilov/syncmanager-abstract-level branch November 28, 2023 22:38
finn-block pushed a commit that referenced this pull request Mar 19, 2024
* fix syncmanager to use abstractlevel

* fix type

* organize imports
finn-block pushed a commit that referenced this pull request Mar 19, 2024
* fix syncmanager to use abstractlevel

* fix type

* organize imports
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.

4 participants