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

migrate to TypeScript #131

Open
wescopeland opened this issue Jun 3, 2024 · 3 comments
Open

migrate to TypeScript #131

wescopeland opened this issue Jun 3, 2024 · 3 comments
Assignees

Comments

@wescopeland
Copy link
Member

No description provided.

@wescopeland wescopeland self-assigned this Jun 3, 2024
@falsepopsky
Copy link

Hi wes,

I just started diving into migrating the project to ts. This will likely result in a large pr. However, before we proceed, I'd like to discuss some things:

Compiler Choice:

Which compiler will we be using for the build process?

I've noticed that some of your packages use microbundle, In my opinion, it's a terrible decision...

  • Shipping incorrect types
  • Using an outdated version of Rollup under the hood, etc.

Recommendation:

  • If code minification isn't a priority and other configs, just use the tsc.
  • Otherwise, Rollup, SWC, or Tsup could be options (since type generation isn't needed in this case).

Dependencies:

A significant number of dependencies might require updates or removal. For example:

  • node-fetch and redis (appear unused).
  • cheerio (scraps RA website).

External API Queries:

I noticed unrelated API queries integrated into the core code (e.g., Bulbapedia, AniList, coronavirus?).
Suggestion: Consider dropping these and utilizing existing bots that handle these APIs. Many such bots likely exist.

Please note that these are just suggestions for discussion. I'll add any further comments that come to mind later...

@meleu
Copy link
Contributor

meleu commented Jun 5, 2024

Hi guys 👋

I was willing to restart working on RABot but Real Life is still happening...

I have some comments about @falsepopsky questions...

Note: keep in mind that, as I'm currently inactive in RA scene, my opinions may be uninformed.

My intention was to rewrite RABot using Sapphire (as pointed in #106). A positive side-effect of this would be that we would have a cleaner package.json (hopefully solving the unused dependencies problem).

Regarding the compiler, I would choose the traditional tsc (but also interested in @wescopeland's input).

About the External API queries...

When I started RABot 6 years ago I was pretty excited with my new toy and how I could make it "smarter" by integrating it with external APIs. Maybe it's kind bloated now... 😅

Probably many of them could simply be removed (e.g.: coronavirus). But if some of them are still used, I would prefer to keep them instead of adding more bots to the server.

That's it. And thanks for keeping this project alive! ❤️

@wescopeland
Copy link
Member Author

Hi @meleu! It is always wonderful to hear from you and I hope you are doing well. Indeed, I would like to see this project kept alive, as it still gets quite a bit of use in the main Discord server 😊. I am standing on your shoulders!

My intention is also to migrate this project to Sapphire, per #106. There is a bunch of tech debt / migration things that need to ideally happen first, hence the beginnings of this with #139.

Sorry @falsepopsky, I greatly appreciate your interest!, but I'm not really sure how to best navigate this discussion. I'm not prepared to discuss or debate the finer points of some of my prior package decisions at this venue. To put it kindly, those packages have many consumers, including in commercial use. This is the first time I've had anyone come to me about microbundle as a technology choice, either as a positive or a negative.

Setting that aside, I agree that microbundle would be an inappropriate choice for RABot as this is an entirely different problem space. tsc would be the most conventional choice. It probably makes the most sense for the longevity of RABot to choose boring technology.

When I opened this GitHub issue without a description, it was mostly because my notes are sprawling, I needed a better TODO list, and I assumed no one was looking at this repo 😆. I hope this wasn't a stretch, as RABot has been rock-solid and stable for ~2 years. I'm already in the middle of migrating the project to TypeScript, hence the issue being self-assigned.

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

No branches or pull requests

3 participants