swc-project / swc-node

Faster ts-node without typecheck
MIT License
1.76k stars 73 forks source link

[swc-node/jest] version 1.5.1 crashes when there are a lot of files #654

Closed marchaos closed 2 years ago

marchaos commented 2 years ago

We have over 3000+ source files, and our tests stall when running with v1.5.0 / 1.5.1.

We tracked down the issue to this line - https://github.com/swc-project/swc-node/blob/master/packages/jest/index.ts#L32, which in turn attempts to include the tsconfig file every time process is called.

If you move readDefaultTsConfig() outside of process, everything works again.