Skip to content

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Sep 5, 2025

Explanation

tsx has a couple of advantages over ts-node:

  • Running a script with tsx is about 20% faster than with ts-node.
  • tsx is also easier to use. I've run into problems in the past where ts-node doesn't seem to honor the TypeScript config like tsc does, but tsx "just works".

References

(N/A)

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

`tsx` has a couple of advantages over `ts-node`:

- Running a script with `tsx` is about 20% faster than with `ts-node`.
- `tsx` is also easier to use. I've had problems where `ts-node` doesn't
  seem to honor the TypeScript config like `tsc` does, but `tsx` "just
  works".
Copy link

socket-security bot commented Sep 5, 2025

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

  • esbuild@0.25.9
  • tsx@4.20.5

View full report

@mcmire
Copy link
Contributor Author

mcmire commented Sep 5, 2025

@SocketSecurity ignore npm/esbuild@0.25.9

We have disabled the postinstall script for esbuild via LavaMoat.

@mcmire
Copy link
Contributor Author

mcmire commented Sep 5, 2025

@SocketSecurity ignore npm/tsx@4.20.5

I reviewed this and I don't think this is an issue. I believe tsx forks itself and it communicates with its parent process as it's running (or something).

@mcmire mcmire marked this pull request as ready for review September 5, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant