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): migrate config module to use TS and ESM #31

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

Conversation

jescalada
Copy link
Collaborator

@jescalada jescalada commented Mar 3, 2025

This PR builds on my previous refactoring PR (#27) to migrate /src/config files to TS and ESM. I modified the logic in src/config/file.ts to work with ESM imports. When using get/set exports, these don't actually refresh unless explicitly exporting the desired variable (in this case, configFile).

*Note: * I investigated the ERR_REQUIRE_ESM error in the CI, which for some reason, works just fine when executing npm run test-coverage-ci locally. Apparently, this is expected when mixing ESM and CommonJS code in the same module. Source

*Note 2: * My fix for the CI issues with ESM/TS was simply removing the dependency with the parent package (by copying the line where the environment variables are fetched). We might face the issue again when migrating the CLI to ESM/TS (if this is a priority).

Changelog

  • Refactor /src/config/ to use TS and ESM
  • Fix various CI issues that were missing in previous PRs

@jescalada jescalada self-assigned this Mar 3, 2025
@jescalada jescalada changed the title Refactor config module to use TS and ESM refactor(ts): migrate config module to use TS and ESM Mar 3, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2025

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

Codecov Report

Attention: Patch coverage is 70.27027% with 55 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@585cda6). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/db/file/pushes.ts 48.48% 17 Missing ⚠️
src/db/file/repo.ts 57.89% 16 Missing ⚠️
src/db/index.ts 40.74% 11 Missing and 5 partials ⚠️
src/db/file/users.ts 77.77% 4 Missing ⚠️
src/config/file.ts 83.33% 2 Missing ⚠️

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #31   +/-   ##
=======================================
  Coverage        ?   50.99%           
=======================================
  Files           ?       48           
  Lines           ?     1655           
  Branches        ?       81           
=======================================
  Hits            ?      844           
  Misses          ?      794           
  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.

renovate bot and others added 7 commits March 26, 2025 10:40
…-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
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