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

refactor(ts): refactor db module to use TS and ESM #27

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

jescalada
Copy link
Collaborator

This PR piggybacks on Fabio's TS config PR (#26) to refactor the entire db module (one of the "helper" modules available). I'm working on #18, but I think it's better to refactor on a module-by-module basis. This will avoid headaches with missing files and converting dependent files from CommonJS to ESM.

The PR also fixes configs to enable TS and ESM to work together and execute mocha tests without breaking.

I verified that nothing breaks by running unit tests and also using a Mongo DB cloud instance to test that the converted Mongo module generates the initial user as expected:

mongo refactor working

Note: Some types are missing and set to any for simplicity. We should fill those in when we add strict TS linting.

Changelog

  • Refactor /src/db/mongo to TS and ESM
  • Refactor /src/db/mongo to TS and ESM
  • Fix mocha not executing properly with TS files

@jescalada jescalada changed the title Refactor db module to use TS and ESM refactor(ts): refactor db module to use TS and ESM Mar 12, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 59.16667% with 49 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@5d24d9d). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/db/file/pushes.ts 48.48% 17 Missing ⚠️
src/db/index.ts 42.85% 11 Missing and 5 partials ⚠️
src/db/file/repo.ts 60.52% 15 Missing ⚠️
src/db/file/users.ts 92.85% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #27   +/-   ##
=======================================
  Coverage        ?   51.70%           
=======================================
  Files           ?       48           
  Lines           ?     1671           
  Branches        ?       53           
=======================================
  Hits            ?      864           
  Misses          ?      790           
  Partials        ?       17           

☔ 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.

jescalada and others added 4 commits March 21, 2025 18:36
…-plugin-samples - plugins/git-proxy-plugin-samples/package.json
…ples-manager

chore(deps): update dependency @finos/git-proxy to ^1.9.3 - git-proxy-plugin-samples - plugins/git-proxy-plugin-samples/package.json
renovate bot and others added 3 commits March 26, 2025 22:15
fix(deps): update dependency axios to ^1.8.4 - git-proxy-cli - packages/git-proxy-cli/package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants