Replace `ts-node` with `tsx` or add support to `tsx`
Pre-flight checklist
- [X] I have read the contribution documentation for this project.
- [X] I agree to follow the code of conduct that this project uses.
- [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Problem description
Related to ts-node, tsx only loses type checking and gain other features.
Source: https://github.com/privatenumber/ts-runtime-comparison
Proposed solution
Replace ts-node with tsx (this will fix #3609)
Alternatives considered
Add support to tsx
Additional information
Close #3609 if ts-node is replaced with tsx
tsx can replace rechoir (missing ESM support https://github.com/electron/forge/issues/3671#issuecomment-2365167266) and ts-node dependencies.
tsx handles the preparation and running of ESM/TypeScript modules out of the box (manual setup preparations, like rechoir.prepare, are no longer needed). So files in ESM/TypeScript format can directly import or require.
FYI @caoxiemeihao @erickzhao @MarshallOfSound
would like to see tsx support as well, so that I don't need to have two TS runtimes installed :-)