Thanks for your work on this library! We have begun using it and it makes creating tasks for worker threads much easier.
One thing we have noticed is that with the 0.3.0 release, the typescript package is required at runtime. This is because ts-bridge.ts tries to load ts-node, and it doesn't seem to cater for the case where the typescript package is not there.
Although we use TypeScript for our project, we compile to JS at runtime, and we get errors like this:
2021-03-16 02:35:31+0000: at Timeout._onTimeout (/opt/app/node_modules/thread-puddle/lib/index.js:225:20)
2021-03-16 02:35:31+0000: at listOnTimeout (internal/timers.js:549:17)
2021-03-16 02:35:31+0000: at processTimers (internal/timers.js:492:7)
Assuming this isn't just user error, I am hoping to make ts-node an optional peer dependency, and somehow only include ts-node if it is available. If it is user error, I would appreciate being pointed in the right direction!
If work is required, I would be happy to have a go at a PR.
Hi there,
Thanks for your work on this library! We have begun using it and it makes creating tasks for worker threads much easier.
One thing we have noticed is that with the 0.3.0 release, the
typescript
package is required at runtime. This is becausets-bridge.ts
tries to loadts-node
, and it doesn't seem to cater for the case where thetypescript
package is not there.Although we use TypeScript for our project, we compile to JS at runtime, and we get errors like this:
Assuming this isn't just user error, I am hoping to make
ts-node
an optional peer dependency, and somehow only includets-node
if it is available. If it is user error, I would appreciate being pointed in the right direction!If work is required, I would be happy to have a go at a PR.
Thanks!