github-readme-stats icon indicating copy to clipboard operation
github-readme-stats copied to clipboard

Migrate codebase to Typescript

Open rickstaa opened this issue 3 years ago • 35 comments

Is your feature request related to a problem? Please describe.

We currently use javascript + type definitions. I, however, think migrating the project to typescript will significantly improve the development experience since it allows us to catch errors earlier.

Extra information

There were some attempts in the past that people can build upon if they want to take on this issue:

  • https://github.com/anuraghazra/github-readme-stats/pull/1288
  • https://github.com/anuraghazra/github-readme-stats/pull/832

Additionally, @HwangTaehyun translated part of the codebase to typescript when creating https://github.com/HwangTaehyun/github-contributor-stats.

rickstaa avatar Sep 25 '22 10:09 rickstaa

Hi @rickstaa,

I would like to work on this issue if that's okay with you as part of hacktoberfest.

guriWiz avatar Oct 01 '22 09:10 guriWiz

@Guri-X First of all, welcome to the community! 🚀 Amazing that you decided to choose to improve GRS as part of https://hacktoberfest.com. Both me and, to my knowledge also, @anuraghazra are big fans of typescript, so having this repository in typescript would be amazing! I assigned you to the issue.Feel free to tag me if you have any questions.

rickstaa avatar Oct 01 '22 09:10 rickstaa

Let me know if the hacktoberfest proposal is accepted. Other candidates would be https://github.com/anuraghazra/github-readme-stats/issues/1761 or https://github.com/anuraghazra/github-readme-stats/issues/2053. For the last one, you could ask to team up with @Pranav2612000.

rickstaa avatar Oct 01 '22 09:10 rickstaa

Thanks @rickstaa for the references. I'll update here as soon as I made some progress.

guriWiz avatar Oct 01 '22 10:10 guriWiz

@Guri-X @rickstaa Can I participate too? I also really like typescript and I am very interested in it! Also, since I've worked here once, I think it might be helpful.

HwangTaehyun avatar Oct 01 '22 10:10 HwangTaehyun

Of course @HwangTaehyun, everyone is welcomed to join. I'm currently a beginner when it comes to typescript so I think i'll get to learn a lot from you.

guriWiz avatar Oct 01 '22 10:10 guriWiz

Let's TypeScript this bad boy.

anuraghazra avatar Oct 01 '22 11:10 anuraghazra

Let's TypeScript this bad boy.

The typescript master has spoken! Let's do this 🚀.

@Guri-X, @HwangTaehyun please check https://github.com/anuraghazra/github-readme-stats/discussions/2076 for GRS-related information about this year's Hacktoberfest. I just signed up as a maintainer and read the guidelines. For your contributions to be valid Hacktoberfest PRs, you must create separate PRs. Therefore, I think it is best that one of you performs the initial typescript setup (see https://webpack.js.org/guides/typescript/) and shares that commit with the other. After that, you can divide folders or files to work on. Feel free to let us know if you have any questions or run into problems 🤓.

rickstaa avatar Oct 01 '22 12:10 rickstaa

@HwangTaehyun, I know you already migrated part of the code to typescript in https://github.com/HwangTaehyun/github-contributor-stats. Maybe you can set up the initial typescript template and add the types you already have, after which you can divide the remaining files?

rickstaa avatar Oct 01 '22 13:10 rickstaa

Happy hacking! 🚀

rickstaa avatar Oct 01 '22 13:10 rickstaa

@rickstaa That's a good idea! I will set up initial typescript settings for this project and divide the remaining files with @Guri-X.

HwangTaehyun avatar Oct 01 '22 13:10 HwangTaehyun

Great. If you want, you can join the GRS-hacktoberfest discord if you want an easier way to discuss.

rickstaa avatar Oct 01 '22 13:10 rickstaa

That's a good idea @rickstaa. Thanks for suggesting this.

guriWiz avatar Oct 01 '22 13:10 guriWiz

Pro tip:

Rely on tests while migrating. But also make sure vercel deployment is working. via vercel CLI

anuraghazra avatar Oct 02 '22 12:10 anuraghazra

@rickstaa @HwangTaehyun @Guri-X... I'm a beginner in typescript and would love to contribute, any leads for this?

lostgirljourney avatar Oct 03 '22 10:10 lostgirljourney

@lostgirljourney Thank you for considering helping with this issue! 🔥🚀 Since this conversion is quite a big task, I allowed both @HwangTaehyun and @Guri-X to work on it. I assigned @HwangTaehyun as the team leader for this issue. If @HwangTaehyun thinks an extra pair of hands is useful, he can assign you some files to convert. 👍🏻 The important thing is that I receive three separate PRs, one from each of you for it to count towards the Hacktoberfest submission.

rickstaa avatar Oct 03 '22 11:10 rickstaa

@lostgirljourney Welcome to join us! Join the discode channel! I applied typescript and webpack settings and dividing some files to migrate. I think three passionate people would be great!

HwangTaehyun avatar Oct 03 '22 12:10 HwangTaehyun

@rickstaa @lostgirljourney @HwangTaehyun @Guri-X I'm quite new to typescript if you have available spots I would like to contribute

cjdomacena avatar Oct 03 '22 16:10 cjdomacena

@cjdomacena Great that you want to contribute to GRS! I will leave the decision to @HwangTaehyun, but unfortunately, I think three people are enough to complete this task.

We seem to be a popular repository to contribute to during Hacktoberfest, so, unfortunately, most Hacktoberfest issues are already in progress (see https://github.com/anuraghazra/github-readme-stats/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). The only one that is not yet taken is:

  • https://github.com/anuraghazra/github-readme-stats/issues/1774

and two that might become available are:

  • https://github.com/anuraghazra/github-readme-stats/issues/1760.
  • https://github.com/anuraghazra/github-readme-stats/issues/2074

You can, of course, also suggest your own ideas (see https://github.com/anuraghazra/github-readme-stats/discussions/2076), or check the Hacktoberfest discord to see if other projects are still looking for contributers.

rickstaa avatar Oct 03 '22 16:10 rickstaa

@rickstaa Sure no worries. I would like to take #1774 if its okay

cjdomacena avatar Oct 03 '22 20:10 cjdomacena

hey @rickstaa! just wanted to ask if i could help with this issue as a part of hacktoberfest.

CallMeEchoCodes avatar Oct 04 '22 07:10 CallMeEchoCodes

@CallMeEchoCodes Great that you want to contribute to GRS. I will leave that decision to @HwangTaehyun (see my previous comment).

rickstaa avatar Oct 04 '22 07:10 rickstaa

@CallMeEchoCodes and @cjdomacena #2074 just became available again as a Hacktoberfest submission.

rickstaa avatar Oct 04 '22 08:10 rickstaa

@lostgirljourney Welcome to join us! Join the discode channel! I applied typescript and webpack settings and dividing some files to migrate. I think three passionate people would be great!

@HwangTaehyun hi, sorry for the late reply, had some work. Can I get a brief on what just happened?

lostgirljourney avatar Oct 04 '22 09:10 lostgirljourney

@lostgirljourney No problem, we are nearly finished with the first migration (see https://github.com/anuraghazra/github-readme-stats/pull/2108). After that @HwangTaehyun will divide the files between the three of you. We are discussing this in GRS-hacktoberfest discord.

rickstaa avatar Oct 04 '22 09:10 rickstaa

@rickstaa Sure no worries. I would like to take #1774 if its okay

@cjdomacena great! Can you maybe comment on #1774 so that I can assign you?

rickstaa avatar Oct 04 '22 12:10 rickstaa

@rickstaa The issue seemed to be locked. It won't let me comment

cjdomacena avatar Oct 04 '22 22:10 cjdomacena

@cjdomacena O, sorry, I meant https://github.com/anuraghazra/github-readme-stats/issues/2074.

rickstaa avatar Oct 04 '22 22:10 rickstaa

@rickstaa I want in on this too

mehulbaid avatar Oct 13 '22 09:10 mehulbaid

@rickstaa I want in on this too

@mehulbaid Great that you want to contribute to GRS. 💪🏻 Unfortunately, I think enough people are already working on this issue (see https://github.com/anuraghazra/github-readme-stats/issues/2052#issuecomment-1265706637).

rickstaa avatar Oct 13 '22 10:10 rickstaa