Skip to content

Conversation

jescalada
Copy link
Contributor

@jescalada jescalada commented Sep 24, 2025

Fixes #1212 (linter warnings/CI failures that popped up after #955).

Notably, some of the errors were due to wrapping promises for some of the database functions (this is only necessary when calling neDB functions directly, because they contain callbacks which can't be intercepted otherwise).

Copy link

netlify bot commented Sep 24, 2025

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit a4671a7
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/68d4097bcd1d3000084ec3ea

@jescalada jescalada changed the title fix: linter warnings fix: linter warnings and CI failure Sep 24, 2025
@github-actions github-actions bot added the fix label Sep 24, 2025
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.06%. Comparing base (3322249) to head (a4671a7).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
src/db/file/repo.ts 85.71% 2 Missing and 2 partials ⚠️
src/db/index.ts 90.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1218      +/-   ##
==========================================
- Coverage   84.11%   84.06%   -0.05%     
==========================================
  Files          68       68              
  Lines        2958     2944      -14     
  Branches      373      373              
==========================================
- Hits         2488     2475      -13     
+ Misses        410      409       -1     
  Partials       60       60              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jescalada jescalada requested review from kriswest, 06kellyjac and a team September 24, 2025 13:40
@jescalada
Copy link
Contributor Author

@kriswest Note that the Promise wrappers are not entirely gone, apparently these are required to use neDB's callback functions. An alternative would be to use promisify, not sure if this would change anything as the linter errors are already gone 🤔

Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

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

Approved - easy to review as I've just implemented the same changes and was about to raise the PR. I'd used promise chains in a couple of places and slightly more error handling, but this also looks fine to me.

@kriswest
Copy link
Contributor

@kriswest Note that the Promise wrappers are not entirely gone, apparently these are required to use neDB's callback functions. An alternative would be to use promisify, not sure if this would change anything as the linter errors are already gone 🤔

Promisify will do approximately the same thing so I doubt theres much value in changing.

Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

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

theres one unreachable line, I'm surprised the linter isn't complaining about it

Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

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

LGTM

@kriswest kriswest enabled auto-merge September 24, 2025 14:52
@kriswest kriswest merged commit 1052727 into finos:main Sep 24, 2025
14 checks passed
@kriswest
Copy link
Contributor

kriswest commented Sep 24, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Promise executor functions should not be async in DB code
3 participants