keyv - feat: clean up of code with fixes and helpers#1910
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1910 +/- ##
===========================================
+ Coverage 99.88% 100.00% +0.11%
===========================================
Files 37 38 +1
Lines 3409 3450 +41
Branches 526 531 +5
===========================================
+ Hits 3405 3450 +45
+ Misses 4 0 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request refactors the core Keyv implementation by moving the main Keyv class from index.ts to a dedicated keyv.ts file and updating internal imports. The review feedback identifies several opportunities to improve the robustness and performance of the refactored code. Key suggestions include handling Promise.allSettled results more safely by checking fulfillment status instead of using unsafe type assertions, replacing non-idiomatic for...in array iteration with for...of, and optimizing the hasMany method by executing checks in parallel using Promise.all instead of sequential awaits.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
keyv - feat: clean up of code with fixes and helpers