ts-node icon indicating copy to clipboard operation
ts-node copied to clipboard

Last release was 6 months ago... is the project dead?

Open devlato opened this issue 1 year ago • 12 comments

Last release was 6 months ago... is the project dead?

devlato avatar May 25 '24 09:05 devlato

I don't know. The previous problem can't be solved by switching versions. It's over

EvilCodeMorty avatar Jul 07 '24 11:07 EvilCodeMorty

We transitioned to tsx and haven't looked back

richardsimko avatar Jul 08 '24 19:07 richardsimko

We transitioned to tsx and haven't looked back

Jest still uses ts-node unfortunately, so if you're using jest you're out of luck.

tkodev avatar Jul 10 '24 20:07 tkodev

We use @swc/jest to do TS -> JS transformation, while Jest still installs ts-node it's not actually used for anything in this case (And as a bonus it's much faster)

richardsimko avatar Jul 11 '24 20:07 richardsimko

@koheiio @richardsimko thanks. Neither tsx nor swc do type-checking our of the box though. At the same time, ts-node does, which makes it a perfect choice for running stuff locally and for building CI automation and developer tools.

devlato avatar Jul 14 '24 04:07 devlato

What I'm struggling with on my end is jest uses ts-node to read tsconfigs, which means latest typescript things like an array for the "extends" property isn't supported, and subpath imports/export resolution.

If you have come across this problem and solved it, it would greatly make my life less painless! I hope there news about ts-node, whether it be good or bad.

In the meantime, I'll check out swc/jest

tkodev avatar Jul 14 '24 04:07 tkodev

If you have come across this problem and solved it, it would greatly make my life less painless!

Not a great option, but you can:

  1. Check out the latest commit.
  2. Package it yourself with yarn pack.
  3. Put the resulting package.tgz into a package repo of your choice, or commit it to your project repo.
  4. Use the file: protocol in your package.json to consume it (if committed to repo).

This fixes the bug that otherwise prevents you from using an array extends in tsconfig.json.

vboginskey avatar Jul 19 '24 18:07 vboginskey

We transitioned to tsx and haven't looked back

If i am not wrong, tsx and swc do not support typescript decorators. We strongly uses decorators.

erayhanoglu avatar Aug 21 '24 05:08 erayhanoglu

We transitioned to tsx and haven't looked back

If i am not wrong, tsx and swc do not support typescript decorators. We strongly uses decorators.

swc supports decorators well, while tsx doesn't support

cjnoname avatar Aug 25 '24 17:08 cjnoname

My only problem with tsx is that it is based on esbuild which drops all comments on transpiling (and accordingly the author have no plans to change that), and that makes /* istanbul ignore */ comments fail to work, leading to false coverage scores.

MuTsunTsai avatar Sep 18 '24 08:09 MuTsunTsai

Jest still uses ts-node unfortunately, so if you're using jest you're out of luck.

We use ts-jest and that seems to work.

yeoffrey avatar Dec 18 '24 16:12 yeoffrey

it seems that ts-node have no activity over 1 year. maybe we need to switch it to swc

i have create new repo and replace ts-node with swc see here. https://github.com/hyperse-io/ts-node

tianyingchun avatar Jun 01 '25 12:06 tianyingchun