Giter Site home page Giter Site logo

migrate to TypeScript about rabot HOT 3 OPEN

wescopeland avatar wescopeland commented on July 30, 2024
migrate to TypeScript

from rabot.

Comments (3)

meleu avatar meleu commented on July 30, 2024 1

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! ❤️

from rabot.

wescopeland avatar wescopeland commented on July 30, 2024 1

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.

from rabot.

falsepopsky avatar falsepopsky commented on July 30, 2024

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

from rabot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.