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: Add TypeScript support #26

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

Conversation

fabiovincenzi
Copy link
Collaborator

Overview
This PR introduces TypeScript to git-proxy and refactors relevant code to support it.

Changelog

  • Added TypeScript configuration (tsconfig.json) with essential settings for strict type checking, ES6 compatibility, and JSX support.
  • Added typescript and ts-node to manage TypeScript code compilation and execution.
  • Updated the package.json to include TypeScript dependencies.
  • Converted the main entry file from JavaScript (index.js) to TypeScript (index.ts).
  • Modified the start script to use ts-node for running TypeScript files.

@fabiovincenzi fabiovincenzi self-assigned this Feb 17, 2025
@fabiovincenzi fabiovincenzi linked an issue Feb 17, 2025 that may be closed by this pull request
3 tasks
@06kellyjac
Copy link

Should be fine to adopt this upstream if you're happy to open a PR.
We might want to double check we build out the right files for publishing but otherwise looks good.
A good pre-req for the db refactor & best to bring this in ahead of that :)

@fabiovincenzi
Copy link
Collaborator Author

Should be fine to adopt this upstream if you're happy to open a PR. We might want to double check we build out the right files for publishing but otherwise looks good. A good pre-req for the db refactor & best to bring this in ahead of that :)

Thanks for the review @06kellyjac !
Yes, I'll open a PR on the upstream then we can go ahead with db refactor.

if (typeof data.id !== 'string') {
throw new Error('Invalid id');
}
await collection.updateOne({ id: { $eq: data.id } }, { $set: data }, options);

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query object depends on a
user-provided value
.
@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@fabiovincenzi fabiovincenzi changed the title Add TypeScript support refactor: Add TypeScript support Mar 10, 2025
@fabiovincenzi fabiovincenzi force-pushed the typescript-setup branch 2 times, most recently from a3f23bb to e7ec595 Compare March 19, 2025 15:47
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.

[Setup] Add TypeScript to the Project
4 participants