-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
Migration of build + workflow scripts to typescript #3187
Comments
Hi @akshatnema, I would like to open a PR for migrating build scripts files into ts |
@DhairyaMajmudar I would like to work on this, please inform if you need any help. |
This idea is currently part of AsyncAPI mentorship program (https://github.com/orgs/asyncapi/discussions/1361) - You have to apply from there itself. |
Hey Everyone, Form Link - https://forms.gle/ZjhDcfo55B7HDhUy6 |
Project StatusBuild Scripts MigrationList of Scripts (from the least dependent(on each other) to the most dependent script)
Build script migration is expected to be finished by: 2nd January, 2025 (3 weeks delayed from the original timeline) Workflow Script Migration
Unique workflows in the website repoAll Other workflows either are in the .github repo or does not have any javascript code to migrate
Workflow Script Migration is expected to be finished by: 9th January, 2025 Test Scripts Migration (currently not under consideration for the project)
If Considered Test Scripts Migration is expected to be finished by: 20th February, 2025 |
@JeelRajodiya Regarding workflow scripts, migrate only those workflows which are not maintained from Secondly, why there is a need of migrating tests in typescript? |
Sure, I will update the comment.
Isn't this in the scope of the project?, I have mentioned the test script migration in my proposal so I have included it here as well. Are we considering to migrate them? |
Currently, @vishvamsinh28 is writing tests for the scripts. Let him finish that first. It's not necessary to migrate the tests in TS, if they works even if scripts are in typescript. If during of scripts, tests result out incompatible, we can then think of them to migrate them to typescript, else I don't find any reason to migrate them. WDYT? |
I was not aware about it. Thanks for informing.
Sure, Let's drop the plan of migrating the tests. We can think of migrating them later on if needed. |
@akshatnema What do you think about using tsx instead of ts-node? While running the SyntaxError: Cannot use import statement outside a module When I try to just use the require imports, typescript is not detecting the types of imported modules. So I have to use ES imports. To resolve this error, I added However after adding the configuration, another error pop-up, please see below. We can resolve this error as well, but It requires me to modify the tsconfig.json file. On the other hand, when I run the scripts with |
@JeelRajodiya This is a very generic error, probably you have not setup the package.json with ts-node correctly. This should not happen.
Yeah, that's perfectly fine because logically you should have all files is ts only. And it would be best if you thought in that approach to migrate all the script files.
Yeah, feel free to do those changes. You have to make these changes to implement it in better. Just that we are getting some normal configuration issues, we can't simply move from |
@JeelRajodiya Also, during targeting all the above errors (from tsconfig file as well), if we find ourselves in a endless loop to resolve the errors or it is changing the environment for next js inside repo, then we can think to use |
I have a question, Also, I like you inform you that I will be creating a single PR for the script migration |
There's already prettier configured inside eslint configuration. You should follow that only. Yeah it will change most of the formatting, as it will follow the rules mentioned there. Also, make sure that these rules are followed in all ts files. |
@akshatnema are we still thinking of working on this issue? |
Yes we are! |
Description
With the current package.json built for ES modules and packages, as we migrated the website to Next js 14 + Typescript, it has now started affecting the scripts folder like working of meetings workflow, automation of blog creation using npm script, etc. Since, to have uniformity across the website, we decided to migrate the existing Node js scripts to common js modules (in Typescript), enhancing the code maintenance, scalability, and readability for contributors.
Tasks need to be done
This issue comprises multiple tasks, that need to be completed to cover all the scripts in the project. Here is the list:
The text was updated successfully, but these errors were encountered: