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

Decrease dependencies.

Open MicahZoltu opened this issue 3 years ago • 0 comments

Desired Behavior

ts-node brings in very few or no transitive dependencies.

Is this request related to a problem?

Sort of. Every dependency a project has slightly increases the attack surface area against developers and CI systems. You can somewhat mitigate this by doing npm ci and npm ci --ignore-scripts but this is often not done and it is easy to accidentally do npm install out of habit or while following instructions. As this project gains dependencies over time, the attack surface it presents to projects increases and the diligence one must follow while using it increases.

Alternatives you've considered

Deno. This requires developers have Deno installed, which is much more heavy weight than ts-node and not fully compatible with existing tooling.

Additional context

When I first started using ts-node I believe the set of dependencies was very small, which was a big selling point since it was getting added to basically every one of my projects along side TypeScript. Over time, I have noticed that the dependency set has been increasing. While 16 transitive dependencies is certainly very far from the worst thing on NPM (I have seen hundreds in some libraries), I would like to see some work done that drives things in the other direction.

Perhaps there are some low hanging fruit dependencies that could be replaced with a few lines of code rather than bringing in a dependency? Are there any features that are unnecessary/no one uses that are the only reason a dependency exists?

image

MicahZoltu avatar Jan 09 '23 11:01 MicahZoltu