privatenumber / tsx

⚡️ TypeScript Execute | The easiest way to run TypeScript in Node.js
https://tsx.is
MIT License
8.61k stars 132 forks source link

SIGINT results in a forced exit every time when running `tsx watch` with npm #586

Open jabrks opened 2 weeks ago

jabrks commented 2 weeks ago

Acknowledgements

Minimal reproduction URL

https://github.com/jabrks/tsx-reproduction

Problem & expected behavior (under 200 words)

Using npm to run tsx watch results in the following error each time the process is interrupted

[tsx] Previous process hasn't exited yet. Force killing...

The GitHub action in the reproduction linked above demonstrates this by artificially exiting the process after 3 seconds. npm's signal handling behaviour was changed in v10.3.0 as a result of https://github.com/npm/run-script/pull/188 which seems to be related

Bugs are expected to be fixed by those affected by it

Compensating engineering work financially will speed up resolution